- Basemodel MLP-KTLim/llama-3-Korean-Bllossom-8B
- Dataset
Python code with Pipeline
import transformers
import torch
model_id = "VIRNECT/llama-3-Korean-8B-V3"
pipeline = transformers.pipeline(
"text-generation",
model=model_id,
model_kwargs={"torch_dtype": torch.bfloat16},
device_map="auto",
)
pipeline.model.eval()
PROMPT = '''λΉμ μ μΈκ°κ³Ό λννλ μΉμ ν μ±λ΄μ
λλ€. μ§λ¬Έμ λν μ 보λ₯Ό μν©μ λ§κ² μμΈν μ 곡ν©λλ€. λΉμ μ΄ μ§λ¬Έμ λν λ΅μ λͺ¨λ₯Έλ€λ©΄, μ¬μ€μ λͺ¨λ₯Έλ€κ³ λ§ν©λλ€.'''
instruction = "볡μ‘λ μ΄λ‘ μμ PHλ 무μμΈκ°μ?"
messages = [
{"role": "system", "content": f"{PROMPT}"},
{"role": "user", "content": f"{instruction}"}
]
prompt = pipeline.tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True
)
terminators = [
pipeline.tokenizer.eos_token_id,
pipeline.tokenizer.convert_tokens_to_ids("<|eot_id|>")
]
outputs = pipeline(
prompt,
max_new_tokens=2048,
eos_token_id=terminators,
do_sample=True,
temperature=0.6,
top_p=0.9
)
print(outputs[0]["generated_text"][len(prompt):])
- Downloads last month
- 3,376
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.