--- license: apache-2.0 datasets: - DBCMLAB/Constructionsafety_QApairs language: - ko --- **This model is fine-tuned by [DBCMLAB/Constructionsafety_QApairs](https://huggingface.co/datasets/DBCMLAB/Constructionsafety_QApairs) based on [beomi/KoAlpaca-Polyglot-12.8B](https://huggingface.co/beomi/KoAlpaca-Polyglot-12.8B).** ## Inference example ```python !pip install -U transformers !pip install git+https://github.com/huggingface/peft !pip install -U bitsandbytes import torch from transformers import pipeline, AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig repo_name = "DBCMLAB/KoAlpaca-Pyglot-12.8B-ConstructionSafety" quantization_config = BitsAndBytesConfig( load_in_8bit=True, ) model = AutoModelForCausalLM.from_pretrained(repo_name, quantization_config=quantization_config, device_map='cuda') tokenizer = AutoTokenizer.from_pretrained(repo_name) pipe = pipeline( 'text-generation', model=model, tokenizer=tokenizer, device_map='cuda', ) def ask(x, context='', is_input_full=False): ans = pipe( f"### 질문: {x}\n\n### 맥락: {context}\n\n### 답변:" if context else f"### 질문: {x}\n\n### 답변:", do_sample=True, max_new_tokens=256, temperature=0.3, top_p=0.95, return_full_text=False, eos_token_id=2, ) print(ans[0]['generated_text']) ask("흙막이 가시설 공사시 주의사항은 무엇인가요?") ``` ## Output ``` 흙막이 가시설 공사시 주의사항으로는 흙막이 지보공을 시공하기 전에 설계도면과 시방서를 확인하고, 지반의 조건과 안전성을 검토한 후 그에 맞게 시공해야 합니다. 또한, 가시설의 설치 및 해체 작업은 작업지휘자를 지정하여 작업지휘자의 지시에 따라 작업을 실시하고, 지보공을 설치하는 경우에는 버팀보와 띠장에 대한 충분한 내력을 확보해야 합니다. 그리고 흙막이 공사 중에는 계측기를 설치하여 변위 측정 및 응력 산출을 통해 안전성을 검토해야 합니다. 해체 작업 시에는 안전시설을 설치하고, 상부에 있는 하중을 먼저 제거한 후에 작업을 실시하며, 낙하방지 시설을 설치하여 상부 피해를 방지해야 합니다. 또한, 작업장에는 조명과 배수시설을 설치하고, 낙하 위험이 있는 작업공구와 용접기 등은 안전하게 고정시켜야 합니다. 흙막이 가시설 해체 작업 시에는 더욱 철저한 안전성 검토가 필요합니다. ```