Africa v1 Translation Model
This is a fine-tuned translation model for 29 African languages, based on Qwen3-4B-Instruct-2507.
Model Description
Africa v1 is a multilingual translation model trained to translate between English and 29 African languages. The model uses LoRA (Low-Rank Adaptation) fine-tuning and is available in multiple formats:
- GGUF (Q4_K_M quantized, 2.3 GB)
- MLX 4-bit (2.1 GB)
- LoRA adapters for custom deployment
Supported Languages (29)
African Languages:
- Afrikaans (af), Akan (ak), Amharic (am), Bambara (bm), Ewe (ee)
- Fula (ff), Hausa (ha), Igbo (ig), Kinyarwanda (rw), Kirundi (rn)
- Kongo (kg), Lingala (ln), Luganda (lg), Ndebele (nd), Northern Sotho (nso)
- Chichewa/Nyanja (ny), Oromo (om), Shona (sn), Somali (so), Swahili (sw)
- Tigrinya (ti), Tsonga (ts), Tswana (tn), Twi (tw), Venda (ve)
- Wolof (wo), Xhosa (xh), Yoruba (yo), Zulu (zu)
Plus English (en) for bidirectional translation.
Training Details
Base Model
- Model: Qwen3-4B-Instruct-2507
- Parameters: 4 billion
- Architecture: Transformer-based language model
Fine-tuning
- Method: LoRA (Low-Rank Adaptation)
- LoRA Rank: 8
- LoRA Alpha: 20
- Target Layers: 16 layers
- Training Iterations: 10,000
- Learning Rate: 5e-5
- Batch Size: 1
Training Data
- Total Translation Pairs: 281,993
- Total Training Examples: 563,986 (bidirectional)
- Train Split: 507,587
- Validation Split: 28,199
- Test Split: 28,200
Evaluation Results
Evaluated on 30 test samples:
| Metric | Score | Interpretation |
|---|---|---|
| Non-empty outputs | 30/30 (100%) | All samples generate output |
| BLEU | 0.71 | Very low - experimental model |
| chrF | 9.24 | Low character-level overlap |
| TER | 362.19 | High edit distance |
Note: This is an experimental v1 model. Translation quality is limited due to:
- Training data format (lacks system prompts)
- Low-resource language challenges
- Repetition issues in some outputs
See v2 model for improved version with system prompts.
Usage
GGUF with llama.cpp
# Download the GGUF model
huggingface-cli download aoiandroid/africa-v1-translation-model africa-v1-q4_k_m.gguf
# Run inference
./llama.cpp/main -m africa-v1-q4_k_m.gguf \
-p "Translate from English to Swahili:\n\nHello, how are you?" \
--temp 0.1 \
-n 256
MLX with mlx-lm
# Install MLX
pip install mlx-lm
# Download model
huggingface-cli download aoiandroid/africa-v1-translation-model --local-dir africa-v1-mlx --include "mlx-4bit/*"
# Run inference
python -m mlx_lm.generate \
--model africa-v1-mlx/mlx-4bit \
--prompt "Translate from English to Swahili:\n\nHello, how are you?" \
--max-tokens 256 \
--temp 0.1
LoRA Adapters
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
# Load base model
base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-4B-Instruct-2507")
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen3-4B-Instruct-2507")
# Load LoRA adapters
model = PeftModel.from_pretrained(base_model, "aoiandroid/africa-v1-translation-model", subfolder="lora")
# Run inference
prompt = "Translate from English to Swahili:\n\nHello, how are you?"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=256, temperature=0.1)
translation = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(translation)
Limitations and Biases
- Experimental Model: This is v1 with known quality issues
- Repetition: Model may get stuck in repetition loops
- Hallucination: May generate fluent but incorrect translations
- Low-Resource Languages: Limited training data for some African languages
- English-Centric: Best performance on English↔African pairs
Intended Use
- Research: Exploring multilingual translation for African languages
- Experimentation: Testing low-resource language translation
- Educational: Understanding LoRA fine-tuning approaches
Not recommended for production use. Use v2 or specialized translation models for production.
Citation
@software{africa_v1_translation_model,
title = {Africa v1 Translation Model},
author = {TranslateBlue Project},
year = {2026},
url = {https://huggingface.co/aoiandroid/africa-v1-translation-model}
}
License
Apache 2.0
Model Card Authors
TranslateBlue Project
Model Card Contact
For questions or issues, please open an issue in the model repository.
- Downloads last month
- 33
Model tree for aoiandroid/africa-v1-translation-model
Base model
Qwen/Qwen3-4B-Instruct-2507