akello_base: direct Lugbara ⇄ Ateso translation (pretrained base)

akello_base is a 89M-parameter encoder-decoder Transformer that translates Lugbara → Ateso and Ateso → Lugbara with one model, directly, with no English on either side. The direction is set by a prefix token on the source (<2teo> / <2lgg>; the tag names the target language).

This is a pretrained base, not a finished translator. It was trained only on machine-translated pairs (see Training) and has not been fine-tuned on human-translated data. A fine-tuned version is published separately as amDANIEL2024/akello_finetuned.

Quick start

pip install torch sentencepiece safetensors huggingface_hub
import sys
from huggingface_hub import snapshot_download

folder = snapshot_download("amDANIEL2024/akello_base")   # add token="hf_..." if the repo is still private
sys.path.insert(0, folder)
from akello import Translator

t = Translator(folder)                                   # uses the GPU if there is one
print(t.translate("<a Lugbara sentence>", "lgg2teo"))
print(t.translate(["<a Ateso sentence>"], "teo2lgg"))

Directions are "lgg2teo" and "teo2lgg". translate takes a string or a list and accepts beam (default 4). This is a custom PyTorch model, not a transformers model, so AutoModel will not load it.

Model

Architecture pre-LN Transformer encoder-decoder, 6 + 6 layers, d_model 640, 8 heads, FFN 2560, GELU
Parameters 89M (input embedding, decoder embedding and output projection are tied)
Tokenizer shared SentencePiece, 32,000 pieces, trained on Lugbara and Ateso text only (spm.model)
Context 256 positions (sinusoidal); training pairs were limited to 128 pieces per side
Weights model.safetensors (float32)

Training

  • Data: the Lugbara–Ateso pairs of tulati, used in both directions. In tulati every non-English column is a machine translation of one English column, made by Sunbird/translate-nllb-1.3b-salt; so both sides of every pair are machine output and no human-written Lugbara or Ateso is in it. The English column was not used. This card does not report how good that translator is for Lugbara or Ateso.
  • Filtering (counts from this run): of 1,534,699 tulati rows, 188,556 were dropped by tulati's quality flags (empty, degenerate, looks-like-English, length-outlier; flagged in Lugbara: 104,472, in Ateso: 104,732). Then 1,071 pairs with identical sides and 399 exact duplicates were removed, leaving 1,344,673 pairs. Decontamination against SALT dev/test removed 2 pair(s), leaving 1,344,671; 1,999 of those were held out for validation.
  • Tokenizer: trained on tulati plus the text of the SALT train split (Lugbara and Ateso only).
  • Pretraining: 5 epochs, 23,051 optimizer steps (about 25k target tokens per step), fp16 on one Kaggle T4, label smoothing 0.1, AdamW, linear warmup then inverse-sqrt decay (peak LR 3e-4). Trained on tulati only.

Evaluation

Full SALT dev/test scores: not run for this base yet. SALT test has not been used for anything.

End of pretraining (step 23,051), quick checks:

Set Direction Loss Quick chrF++ (greedy, first 128 sentences)
tulati validation (held-out machine-translated pairs) lgg→teo 1.842 47.15
tulati validation (held-out machine-translated pairs) teo→lgg 1.275 47.68
SALT dev (human translations) lgg→teo 3.608 39.78
SALT dev (human translations) teo→lgg 3.175 36.86

The quick chrF++ is a noisy check on a small subset with greedy decoding; it is not comparable to full-set scores.

Note that SALT's Lugbara and Ateso sentences are independent human translations of the same English sentence, so a reference in one language is not a translation of the reference in the other.

Limitations

  • Training pairs are machine output (see Training), so the model inherits that translator's errors and style; real human-written text (dialect, spelling, code-switching) may be handled worse than benchmark numbers suggest.
  • Meaning can be dropped or changed, especially for numbers, names and rare words. Do not use it for medical, legal or other high-stakes content without human review.
  • Sentence-level model: inputs longer than about 128 pieces are truncated or degrade.
  • Outputs have not been reviewed by native Lugbara / Ateso speakers.

Files

model.safetensors weights · config.json architecture and training summary · spm.model tokenizer · akello.py standalone inference code · README.md this card.

License

Released under the MIT License (as are tulati, the translation model that generated the training data, and SALT).

Author

Amanyire Daniel (amDANIEL2024) · domusdeiug@gmail.com · https://domusdeiug.com

Downloads last month
-
Safetensors
Model size
89.4M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Dataset used to train amDANIEL2024/akello_base