Downloads · 30 days
40
14% of all-time downloads
NaolBM/LFM2.5-1.2B-AfriBase
LFM2.5-1.2B-AfriBase is a text generation model from NaolBM. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
This model extends the LFM2.5-1.2B base model with a massively expanded vocabulary optimized for African languages, achieving state-of-the-art tokenization efficiency across 8 languages.
Downloads · 30 days
40
14% of all-time downloads
All-time downloads
283
Public
Parameters
1.3B
7.6 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors2.5 GB · 99%
From the Hugging Face model README
This model extends the LFM2.5-1.2B base model with a massively expanded vocabulary optimized for African languages, achieving state-of-the-art tokenization efficiency across 8 languages.
| Source | Languages | Tokens Added |
|---|---|---|
| NaolBM/Africa-BBPE | Swahili, Hausa, Yoruba, Arabic | 50000 |
| Base model | Original English | 64,400 |
| TOTAL | 110,397 |
| Language | Text Sample | Tokens | Chars/Token | Efficiency |
|---|---|---|---|---|
| Amharic | አማርኛ ቋንቋ በኢትዮጵያ | 3 | 5.00 | 🏆 EXCELLENT |
| Oromo | Afaan Oromoo kan namoonni | 4 | 6.25 | 🏆 EXCELLENT |
| Tigrinya | ትግርኛ ቋንቋ ኣብ ኤርትራን | 4 | 4.25 | 🏆 EXCELLENT |
| Swahili | Kiswahili ni lugha ya Kibantu | 7 | 4.14 | 🏆 EXCELLENT |
| English | Natural language processing | 6 | 4.50 | 🏆 EXCELLENT |
| Mixed | I speak Amharic: አማርኛ and Swahili | 9 | 4.89 | 🏆 EXCELLENT |
| Hausa | Hausa yare ne na Afro-Asiatic | 10 | 2.90 | 👍 GOOD |
| Yoruba | fun mi kekere ayẹwo | 8 | 2.38 | 👍 GOOD |
| Arabic | معالجة اللغة الطبيعية | 16 | 1.31 | 🟡 OK |
from transformers import AutoTokenizer, AutoModelForCausalLM
# Load model and tokenizer
tokenizer = AutoTokenizer.from_pretrained("NaolBM/LFM2.5-1.2B-AfriBase")
model = AutoModelForCausalLM.from_pretrained("NaolBM/LFM2.5-1.2B-AfriBase")
# Test in any African language
text = "አማርኛ ቋንቋ በኢትዮጵያ" # Amharic
# text = "Kiswahili ni lugha ya Kibantu" # Swahili
# text = "Hausa yare ne na Afro-Asiatic" # Hausa
tokens = tokenizer.tokenize(text)
print(f"Tokens: {len(tokens)}")
print(f"Chars/token: {len(text)/len(tokens):.2f}")
| Model | Amharic | Swahili | Oromo | English | Avg |
|---|---|---|---|---|---|
| Ours | 5.00 | 4.14 | 6.25 | 4.50 | 4.97 |
| Gemma-3 | 0.77 | 2.12 | 2.12 | 4.00 | 2.25 |
| Qwen-3 | 0.77 | 0.77 | 0.77 | 4.00 | 1.58 |
Our model is 2-4x more efficient than leading alternatives! 🏆
@misc{naol2026panafrican,
title={Pan-African Language Model: A 1.2B Parameter LLM Optimized for African Languages},
author={Naol},
year={2026},
howpublished={\url{https://huggingface.co/NaolBM/LFM2.5-1.2B-AfriBase}},
}