Downloads · 30 days
10
11% of all-time downloads
kikikara/ko-llama-3.1-5b-instruct
ko-llama-3.1-5b-instruct is a text generation model from kikikara. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as llama3.1.
기존 meta-llama/Meta-Llama-3.1-8B-Instruct 모델의 32개 layer중 10개 layer를 삭제하고 학습한 모델입니다
Downloads · 30 days
10
11% of all-time downloads
All-time downloads
94
Public
Parameters
5.8B
23.4 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors23.4 GB · 100%
From the Hugging Face model README
기존 meta-llama/Meta-Llama-3.1-8B-Instruct 모델의 32개 layer중 10개 layer를 삭제하고 학습한 모델입니다
import transformers
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("kikikara/ko-llama-3.1-5b-instruct")
model = AutoModelForCausalLM.from_pretrained("kikikara/ko-llama-3.1-5b-instruct", device_map="auto")
pipeline = transformers.pipeline(
"text-generation",
model=model,
tokenizer=tokenizer,
device_map="auto",
)
question = "왜 살아야 하는지 철학적 측면에서 접근해봐"
messages = [
{"role": "system", "content": "당신은 한국어 ai 모델입니다."},
{"role": "user", "content": question},
]
outputs = pipeline(
messages,
repetition_penalty=1.1,
max_new_tokens=1500,
)
print(outputs[0]["generated_text"][-1]['content'])