Kintu-1.0-39M
A small Luganda (Ganda) chat model: goldfish-models/lug_latn_10mb fine-tuned to reply to a single message. It has 39M parameters and is meant for research and on-device experiments.
This is an experimental model. It was trained on machine-translated data that no one has reviewed, it has no memory of earlier turns, and it doesn't know facts. Expect fluent-sounding Luganda that is often off-topic or wrong.
Usage
Prompt format: [CLS]Omuntu: <message> Omuyambi: ("Omuntu" = person, "Omuyambi" = helper). The model writes the reply and ends it with [SEP].
from transformers import AutoModelForCausalLM, PreTrainedTokenizerFast
repo = "henryhale/Kintu-1.0-39M"
tok = PreTrainedTokenizerFast.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(repo)
message = "Oli otya?"
inputs = tok(f"[CLS]Omuntu: {message} Omuyambi:", return_tensors="pt", add_special_tokens=False)
out = model.generate(**inputs, max_new_tokens=40, do_sample=True, top_p=0.9,
eos_token_id=tok.convert_tokens_to_ids("[SEP]"),
pad_token_id=tok.convert_tokens_to_ids("<pad>"))
print(tok.decode(out[0, inputs.input_ids.shape[1]:], skip_special_tokens=True))
Use PreTrainedTokenizerFast rather than AutoTokenizer: the base model's tokenizer config fails to load with AutoTokenizer on some setups (for example Kaggle and Colab).
The tokenizer drops newlines, so the role labels are the only thing separating the message from the reply. Keep the prompt on one line.
Model details
| Architecture | GPT-2, 4 layers, 512 hidden size, 39M parameters |
| Base model | goldfish-models/lug_latn_10mb, a monolingual model trained on about 10 MB of Luganda text |
| Tokenizer | The base model's Unigram tokenizer, 50k vocabulary, unchanged |
| Context | 512 tokens in the base model; fine-tuned on sequences of up to 256 tokens |
| Language | Luganda (lg / lug_Latn) |
Training data
The pixelsandpointers/ed-for-lm and HuggingFaceTB/smoltalk rows of henryhale/luganda-sft-translated: 58,829 + 2,260 single-turn prompt/reply pairs before filtering. The dataset was machine-translated from English with facebook/nllb-200-distilled-600M and has not been reviewed.
Training
| Example format | [CLS]Omuntu: <prompt> Omuyambi: <reply>[SEP], with the loss computed on the reply only |
| Epochs | 3, keeping the checkpoint with the lowest held-out loss |
| Optimizer | AdamW, learning rate 1e-4, cosine schedule, 200 warmup steps, weight decay 0.01 |
| Batch size | 64 (16 per GPU × 2 GPUs × 2 gradient-accumulation steps) |
| Precision | fp16 mixed precision |
| Hardware | 2× NVIDIA T4 (Kaggle), 968 seconds |
Loss is per-token cross-entropy on reply tokens:
| Epoch | Training loss | Held-out loss |
|---|---|---|
| 1 | 3.927 | 3.717 |
| 2 | 3.607 | 3.555 |
| 3 | 3.460 | 3.527 |
The published weights are from epoch 3: held-out loss 3.527, perplexity about 34.
Intended use
- Research on small and low-resource-language models
- On-device and offline chat experiments in Luganda
- A starting point for fine-tuning on reviewed or domain-specific Luganda data
Out of scope: factual questions, advice of any kind (medical, legal, financial or otherwise), anything where wrong output could cause harm, and commercial use (see License).
Limitations and risks
- Single turn only. Every training pair is one message and one reply, so the model doesn't use earlier turns.
- No knowledge. At 39M parameters, trained on about 10 MB of text, it produces plausible Luganda, not reliable information.
- Translated, not native. The training replies are NLLB translations of English. They may sound unnatural to native speakers and carry translation errors.
- Cultural mismatch. The source conversations were written by English-speaking crowdworkers (EmpatheticDialogues) or generated synthetically (SmolTalk). Their situations and norms may not fit Luganda speakers.
- Inherited biases. The model may reproduce biases from its pretraining text, from the English source data and from the translation model.
- Emotional topics. Most replies come from conversations about personal feelings. The model may respond to serious situations, such as distress, in ways that are inappropriate. It is not a support tool.
License
Released under CC BY-NC 4.0 (attribution, non-commercial):
- The base model,
goldfish-models/lug_latn_10mb, is Apache 2.0. - SmolTalk is Apache 2.0.
- EmpatheticDialogues, the source of most of the training data, is CC BY-NC 4.0.
- The translations were made with NLLB-200, which is CC BY-NC 4.0, and the dataset card asks for non-commercial / research use only.