File size: 2,889 Bytes
7c6a478
831eba9
 
 
 
 
 
 
 
 
 
 
7c6a478
831eba9
7c6a478
 
831eba9
 
e4188f7
831eba9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7c6a478
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
---
widget:
- text: አዲስ አበባ
  example_title: Example 1
- text: በኢንግሊዝ ፕሪምየር ሊግ
  example_title: Example 2
- text: ዶናልድ ትራምፕ
  example_title: Example 3
language:
- am
metrics:
- perplexity
library_name: transformers
pipeline_tag: text-generation
---

# Llama 3.2 180M Amharic

This is a smaller version of the Meta's [Llama-3.2-1B](https://huggingface.co/meta-llama/Llama-3.2-1B) decoder transformer model pretrained from scratch for **26 hours** using a single **A100 40GB** GPU **274 million tokens** of **Amharic** text. 

- It has **180 Million parameters**
- The **context size** of this model is **1024** tokens.
- 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**.
- This is a base model and hasn't undergone any supervised finetuing yet. The isntruction following version of this model is [Llama-3.2-180M-Amharic-Instruct](https://huggingface.co/rasyosef/Llama-3.2-180M-Amharic-Instruct)

### How to use
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:

```python
from transformers import pipeline

llama_am = pipeline(
    "text-generation",
    model="rasyosef/Llama-3.2-180M-Amharic",
    device_map="auto"
  )

prompt = "አዲስ አበባ"
llama_am(
    prompt,
    max_new_tokens=128,
    temperature=0.5,
    do_sample=True,
    top_k=8,
    top_p=0.8,
    repetition_penalty=1.2
  )
```

Output:
```python
[{'generated_text': 'አዲስ አበባ ፣ ጥር 22፣ 2012 (ኤፍ ቢ ሲ) በአዲስ አበባ ከተማ አስተዳደር የካ ክፍለ ከተማ እና ወረዳ 10 የመኖሪያ ቤቶች አካባቢ በዛሬው ዕለት የሙቀት መለኪያ መሳሪያ ወድቆ መገኘቱን የአዲስ አበባ ከተማ አስተዳደር የቤቶች ልማት ፕሮጀክት ፅሕፈት ቤት አስታወቀ።የፅህፈት ቤቱ ዋና ስራ አስኪያጅ አቶ ፀጋዬ በቀለ ለኢዜአ እንደገለጹት፥ በክፍለ ከተማው ወረዳ አንድ በተለምዶ ቦሌ ሚካኤል አየር አምባ ተብሎ በሚጠራው አከባቢ ዛሬ ከምሽቱ 1 ሰዓት እስከ ቀኑ ሰባት ሰዓት ድረስ ከፍተኛ ሙቀት ተመዝግቧል።በክፍለ ከተማው ወረዳ ሁለት ውስጥ መኖሪያ ቤታቸውና ቢሮዎቻቸው በፍንዳታ ጉዳት የደረሰባቸው ሲሆን በመኖሪያ ቤታቸውም የኤሌክትሪክ ጄኔሬተር በመፈንዳቱ ህክምና ላይ እንደነበሩ ገልፀዋል።በአሁኑ ወቅት በአካባቢው ምንም አይነት የኤሌክትሪክ ሃይል ባለመገኘቱ ምክንያት ነዋሪዎቹ ለከፍተኛ'}]
```