Downloads · 30 days
187
17% of all-time downloads
rasyosef/Llama-3.2-400M-Amharic-Instruct
Llama-3.2-400M-Amharic-Instruct is a text generation model from rasyosef. Use it when you need the model to write or continue text. It is set up for transformers.
This model is an Instruction-Tuned version of Llama 3.2 400M Amharic.
Downloads · 30 days
187
17% of all-time downloads
All-time downloads
1.1K
Public
Parameters
413M
1.7 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors1.7 GB · 100%
From the Hugging Face model README
This model is an Instruction-Tuned version of Llama 3.2 400M Amharic.
Given the nature of the training data, the phi-2 instruct model is best suited for prompts using the chat format as follows. You can provide the prompt as a question with a generic template as follows:
<|im_start|>user
ጥያቄ?<|im_end|>
<|im_start|>assistant
For example:
<|im_start|>user
ሶስት የአፍሪካ ሀገራት ጥቀስልኝ<|im_end|>
<|im_start|>assistant
where the model generates the text after <|im_start|>assistant .
First, you need to install the latest version of transformers
pip install -Uq transformers
You can use this model directly with a pipeline for text generation:
from transformers import pipeline
llama3_am = pipeline(
"text-generation",
model="rasyosef/Llama-3.2-400M-Amharic-Instruct",
device_map="auto"
)
messages = [{"role": "user", "content": "ሶስት የአፍሪካ ሀገራት ጥቀስልኝ"}]
llama3_am(messages, max_new_tokens=128, repetition_penalty=1.1, return_full_text=False)
Output:
[{'generated_text': '1. ግብፅ 2. ናይጄሪያ 3. ጋና'}]