Edit model card

This model is fine-tuned by DBCMLAB/Constructionsafety_QApairs based on beomi/KoAlpaca-Polyglot-12.8B.

Inference example

!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

흙막이 κ°€μ‹œμ„€ κ³΅μ‚¬μ‹œ μ£Όμ˜μ‚¬ν•­μœΌλ‘œλŠ” 흙막이 지보곡을 μ‹œκ³΅ν•˜κΈ° 전에 섀계도면과 μ‹œλ°©μ„œλ₯Ό ν™•μΈν•˜κ³ , μ§€λ°˜μ˜ 쑰건과 μ•ˆμ „μ„±μ„ κ²€ν† ν•œ ν›„ 그에 맞게 μ‹œκ³΅ν•΄μ•Ό ν•©λ‹ˆλ‹€. λ˜ν•œ, κ°€μ‹œμ„€μ˜ μ„€μΉ˜ 및 해체 μž‘μ—…μ€ μž‘μ—…μ§€νœ˜μžλ₯Ό μ§€μ •ν•˜μ—¬ μž‘μ—…μ§€νœ˜μžμ˜ μ§€μ‹œμ— 따라 μž‘μ—…μ„ μ‹€μ‹œν•˜κ³ , 지보곡을 μ„€μΉ˜ν•˜λŠ” κ²½μš°μ—λŠ” λ²„νŒ€λ³΄μ™€ 띠μž₯에 λŒ€ν•œ μΆ©λΆ„ν•œ λ‚΄λ ₯을 확보해야 ν•©λ‹ˆλ‹€. 그리고 흙막이 곡사 μ€‘μ—λŠ” 계츑기λ₯Ό μ„€μΉ˜ν•˜μ—¬ λ³€μœ„ μΈ‘μ • 및 응λ ₯ μ‚°μΆœμ„ 톡해 μ•ˆμ „μ„±μ„ κ²€ν† ν•΄μ•Ό ν•©λ‹ˆλ‹€. 해체 μž‘μ—… μ‹œμ—λŠ” μ•ˆμ „μ‹œμ„€μ„ μ„€μΉ˜ν•˜κ³ , 상뢀에 μžˆλŠ” ν•˜μ€‘μ„ λ¨Όμ € μ œκ±°ν•œ 후에 μž‘μ—…μ„ μ‹€μ‹œν•˜λ©°, λ‚™ν•˜λ°©μ§€ μ‹œμ„€μ„ μ„€μΉ˜ν•˜μ—¬ 상뢀 ν”Όν•΄λ₯Ό 방지해야 ν•©λ‹ˆλ‹€. λ˜ν•œ, μž‘μ—…μž₯μ—λŠ” μ‘°λͺ…κ³Ό λ°°μˆ˜μ‹œμ„€μ„ μ„€μΉ˜ν•˜κ³ , λ‚™ν•˜ μœ„ν—˜μ΄ μžˆλŠ” μž‘μ—…κ³΅κ΅¬μ™€ μš©μ ‘κΈ° 등은 μ•ˆμ „ν•˜κ²Œ κ³ μ •μ‹œμΌœμ•Ό ν•©λ‹ˆλ‹€. 흙막이 κ°€μ‹œμ„€ 해체 μž‘μ—… μ‹œμ—λŠ” λ”μš± μ² μ €ν•œ μ•ˆμ „μ„± κ²€ν† κ°€ ν•„μš”ν•©λ‹ˆλ‹€. 
Downloads last month
6
Inference API
Unable to determine this model's library. Check the docs .

Dataset used to train DBCMLAB/KoAlpaca-Pyglot-12.8B-ConstructionSafety