Downloads · 30 days
10
2% of all-time downloads
datapaf/llama3_8b_hn_rus_continued
llama3_8b_hn_rus_continued is a text generation model from datapaf. Use it when you need the model to write or continue text. It is set up for transformers.
Downloads · 30 days
10
2% of all-time downloads
All-time downloads
475
Public
Parameters
8B
32.1 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors32.1 GB · 100%
From the Hugging Face model README
from transformers import AutoTokenizer, AutoModelForCausalLM
from transformers import pipeline
import torch
pipeline = pipeline(
"text-generation",
model="datapaf/llama3_8b_hn_rus_continued",
torch_dtype=torch.bfloat16,
device_map='auto'
)
messages = [
{"role": "system", "content": "Ты AI-помощник, ответь на вопрос"},
{"role": "user", "content": "Привет! Как дела?"},
]
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=256,
eos_token_id=terminators,
do_sample=False,
repetition_penalty=1.2,
return_full_text=False
)
print(outputs)