Downloads · 30 days
67
11% of all-time downloads
ViorikaAI-org/MicroLlama
MicroLlama is a text generation model from ViorikaAI-org. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as mit.
<p align="center" <img src="banner.jpg" alt="MicroLlama Banner" width="100%" </p
Downloads · 30 days
67
11% of all-time downloads
All-time downloads
594
Public
Parameters
3.6M
29.3 MB on disk
Likes
2
Public
Click a slice to open those files.
.safetensors14.6 MB · 98%
From the Hugging Face model README
Эксперементальная микро-модель
from transformers import AutoModelForCausalLM, PreTrainedTokenizerFast
model_name = "ViorikaAI-org/MicroLlama"
tokenizer = PreTrainedTokenizerFast.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name)
model.eval()
prompt = "<s> Привет, как дела? =>"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(
**inputs,
max_new_tokens=32,
temperature=0.7,
top_k=50,
top_p=0.9,
do_sample=True,
no_repeat_ngram_size=2,
pad_token_id=tokenizer.pad_token_id,
eos_token_id=tokenizer.eos_token_id
)
full_text = tokenizer.decode(outputs[0], skip_special_tokens=False)
answer = full_text.split("=>")[-1].replace("</s>", "").strip()
print(f"Ответ модели: {answer}")