skt/kogpt2-base-v2λ₯Ό AIHub μΌμƒλŒ€ν™” λ°μ΄ν„°μ…‹μœΌλ‘œ νŒŒμΈνŠœλ‹ν•œ λͺ¨λΈμž…λ‹ˆλ‹€.
ν•™μŠ΅ μ½”λ“œ: https://github.com/HeegyuKim/open-domain-dialog
Streamlit Demo: https://heegyukim-open-domain-dialog-st-demo-1tzktp.streamlitapp.com/

μ‚¬μš©μ˜ˆμ‹œ

tokenizer = AutoTokenizer.from_pretrained("heegyu/kodialogpt-v0")
model = AutoModelForCausalLM.from_pretrained("heegyu/kodialogpt-v0")
generator = pipeline("text-generation", model=model, tokenizer=tokenizer)

generation_args = dict(
    num_beams=4,
    repetition_penalty=2.0,
    no_repeat_ngram_size=4,
    eos_token_id=375, # \n
    max_new_tokens=64,
    do_sample=True,
    top_k=50,
    early_stopping=True
)
generator(
    ["0 : **λŠ” κ²Œμž„ μ’‹μ•„ν•˜λ‹ˆ\n1 :",
    "0 : μ–΄μ œ κ°•λ‚¨μ—μ„œ 살인사건 λ‚¬λŒ€ γ…œγ…œ λ„ˆλ¬΄ λ¬΄μ„œμ›Œ\n1 : 헐 μ™œ? 무슨 일 μžˆμ—ˆμ–΄?\n0 : μ‚¬μ§„λ³΄λ‹ˆκΉŒ 막 ν”Όν˜λ¦¬λŠ” μ‚¬λžŒμžˆκ³  경찰듀이 λ– μ„œ μ œμ••ν•˜κ³  λ‚œλ¦¬λ„ μ•„λ‹ˆμ—ˆλ‹€λ˜λ°??\n1 :",
    "0 : μžκΈ°μ•Ό μ–΄μ œλŠ” λ‚˜ν•œν…Œ μ™œ κ·Έλž¬μ–΄?\n1 : λ­” 일 μžˆμ—ˆμ–΄?\n0 : μ–΄λ–»κ²Œ λ‚˜ν•œν…Œ 말도 없이 그럴 수 μžˆμ–΄? λ‚˜ μ§„μ§œ μ‹€λ§ν–ˆμ–΄\n1 : "],
    **generation_args
)

κ²°κ³Ό

[[{'generated_text': '0 : **λŠ” κ²Œμž„ μ’‹μ•„ν•˜λ‹ˆ\n1 : λ‚˜λŠ” κ²Œμž„μ„ 잘 μ•ˆ ν•΄ ν‚€ν‚€ '}],
 [{'generated_text': '0 : μ–΄μ œ κ°•λ‚¨μ—μ„œ 살인사건 λ‚¬λŒ€ γ…œγ…œ λ„ˆλ¬΄ λ¬΄μ„œμ›Œ\n1 : 헐 μ™œ? 무슨 일 μžˆμ—ˆμ–΄?\n0 : μ‚¬μ§„λ³΄λ‹ˆκΉŒ 막 ν”Όν˜λ¦¬λŠ” μ‚¬λžŒμžˆκ³  경찰듀이 λ– μ„œ μ œμ••ν•˜κ³  λ‚œλ¦¬λ„ μ•„λ‹ˆμ—ˆλ‹€λ˜λ°??\n1 : 아이고... μ§„μ§œ 무섭닀... '}],
 [{'generated_text': '0 : μžκΈ°μ•Ό μ–΄μ œλŠ” λ‚˜ν•œν…Œ μ™œ κ·Έλž¬μ–΄?\n1 : λ­” 일 μžˆμ—ˆμ–΄?\n0 : μ–΄λ–»κ²Œ λ‚˜ν•œν…Œ 말도 없이 그럴 수 μžˆμ–΄? λ‚˜ μ§„μ§œ μ‹€λ§ν–ˆμ–΄\n1 : 뭘 잘λͺ» ν–ˆκΈΈλž˜ 그래? '}]]

ν•™μŠ΅μ— μ‚¬μš©ν•œ ν•˜μ΄νΌνŒŒλΌλ―Έν„°

Downloads last month
17
Inference Examples
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social visibility and check back later, or deploy to Inference Endpoints (dedicated) instead.