Update README.md
Browse files
README.md
CHANGED
@@ -21,4 +21,40 @@ This is a smaller version of the Meta's [Llama-3.2-1B](https://huggingface.co/me
|
|
21 |
- It has **400 Million parameters**
|
22 |
- The **context size** of this model is **1024** tokens.
|
23 |
- It has the same **tokenizer** as Llama-3.2-1B, trained from scratch using the same Amharic dataset as the model with a vocabulary size of **32k**.
|
|
|
24 |
- This is a base model and hasn't undergone any supervised finetuing yet.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
- It has **400 Million parameters**
|
22 |
- The **context size** of this model is **1024** tokens.
|
23 |
- It has the same **tokenizer** as Llama-3.2-1B, trained from scratch using the same Amharic dataset as the model with a vocabulary size of **32k**.
|
24 |
+
- Validation Perplexity: **41.3**
|
25 |
- This is a base model and hasn't undergone any supervised finetuing yet.
|
26 |
+
|
27 |
+
|
28 |
+
### How to use
|
29 |
+
First, you need to install the latest version of transformers
|
30 |
+
```
|
31 |
+
pip install -Uq transformers
|
32 |
+
```
|
33 |
+
|
34 |
+
You can use this model directly with a pipeline for text generation:
|
35 |
+
|
36 |
+
```python
|
37 |
+
from transformers import pipeline
|
38 |
+
|
39 |
+
llama_am = pipeline(
|
40 |
+
"text-generation",
|
41 |
+
model="rasyosef/Llama-3.2-400M-Amharic",
|
42 |
+
device_map="auto"
|
43 |
+
)
|
44 |
+
|
45 |
+
prompt = "አዲስ አበባ"
|
46 |
+
llama_am(
|
47 |
+
prompt,
|
48 |
+
max_new_tokens=128,
|
49 |
+
temperature=0.5,
|
50 |
+
do_sample=True,
|
51 |
+
top_k=8,
|
52 |
+
top_p=0.8,
|
53 |
+
repetition_penalty=1.2
|
54 |
+
)
|
55 |
+
```
|
56 |
+
|
57 |
+
Output:
|
58 |
+
```python
|
59 |
+
[{'generated_text': 'አዲስ አበባ፣ ታህሳስ 8 ፣2012 (ኤፍ ቢ ሲ) የኢፌዴሪ የውጭ ጉዳይ ሚኒስትር አቶ ገዱ አንዳርጋቸው ከአፍሪካ ህብረት የስራ አስፈጻሚዎች ምክር ቤት መደበኛ ስብሰባ ጎን ለጎን ከዴሞክራቲክ ሪፐብሊክ ኮንጎ አቻቸው ማሪ ቱምባ ንዜዛ እና ከሌሎች የአፍሪካ አምባሳደሮች ጋር ተወያይተዋል።በውይይታቸውም በአፍሪካ የኮሮና ቫይረስን ለመከላከል እየተከናወኑ ባሉ ስራዎች ዙሪያ መምከራቸውን በትዊተር ገጻቸው አስፍረዋል።የሁለቱን ሀገራት ግንኙነት በተመለከተም፥ ኢትዮጵያ በህብረቱ ቋሚ አምባሳደርነት ባላት ሀላፊነት ለሹመት ማቅረብዋ የሚደነቅ መሆኑንም አንስተዋል።ኢትዮጵያ የኮቪድ19 ወረርሽኝን ለመግታት እያደረገች ባለው ጥረት ለደቡብ አፍሪካ ምስጋና አቅርባም ነበር፤ ቫይረሱን ለመቆጣጠር ከኢትዮጵያ ምን እንደምትማር በዝርዝር ላቀረብንላቸው ጥያቄም ወደፊት በሚሰሩ የትብብር መስኮች ላይ ተነጋግረን መስራት እንፈልጋለን ብለዋል።በቀጣይም ሁለቱ'}]
|
60 |
+
```
|