Tulati: Multi-model translation for Ugandan and regional languages
2 min read
The Tulati model handles text translation across six languages: English, Acholi, Ateso, Luganda, Lugbara, and Runyankole. Under the hood, the system uses 10 specialized models for individual language pairs, combined by a single script with automatic routing. If a direct pair is unavailable, translation routes through an intermediate language for optimal quality. Users get accurate text in the required language, along with the flexibility to choose model sizes (`int8` for CPUs or `fp32` for GPUs).
Key features
- Support for 6 languages and automatic selection of the optimal translation route
- ONNX (format for fast and efficient model execution) runtime for fast inference on CPU and GPU
- Dynamic file loading: only the parts needed for a specific request are downloaded
- Choice between high accuracy (`fp32`) and compact size (`int8`)
What you can do
- Integrate a multilingual translator into local scripts or chatbots for rare language pairs
- Run text translation on a regular CPU using optimized `int8` weights
- Work via the command line for batch translation or pre-loading all language models in offline mode
- Explore step-by-step document translation routing and evaluate quality through intermediate stages
Example
from huggingface_hub import hf_hub_download
import sys; sys.path.insert(0, hf_hub_download("amDANIEL2024/tulati_communitymodel_onnx", "tulati.py").rsplit("/", 1)[0])
from tulati import Translator
t = Translator.from_pretrained("amDANIEL2024/tulati_communitymodel_onnx", size="auto")
print(t.translate("Hello world", "English", "Luganda"))
Read more
DetailsArchitecture: Pre-LN encoder-decoder Transformer, exported to ONNX (opset 17).
Quality: average chrF++ score for direct pairs is 44.9, and for chained pairs 41.6–41.7.
File size: the full `int8` set takes 1.11 GB, and `fp32` takes 3.58 GB.
Limitations: the model operates at the sentence level; long texts are split at word boundaries, and chained translations can accumulate errors.










Comments