Downloads · 30 days
582
42% of all-time downloads
CraneAILabs/edu-ganda-gemma-e2b-v5
edu-ganda-gemma-e2b-v5 is a text generation model from CraneAILabs. Use it when you need the model to write or continue text. The card lists the license as gemma.
The final model of Crane AI Labs' Proposal 2 work (Fab AI Foundation, funded by the Gates Foundation): an offline Luganda assistant for Primary 1 to 3 teachers that plans lessons, drills phonics, sets and marks assess…
Downloads · 30 days
582
42% of all-time downloads
All-time downloads
1.4K
Public
Parameters
5.5B
11.1 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors11.1 GB · 100%
From the Hugging Face model README
The final model of Crane AI Labs' Proposal 2 work (Fab AI Foundation, funded by the Gates Foundation): an offline Luganda assistant for Primary 1 to 3 teachers that plans lessons, drills phonics, sets and marks assessments and drafts messages to parents, sized to run on a phone.
v5 is a SLERP merge, at weight 0.5, of two Crane Gemma-4-E2B checkpoints (built 2 September 2026):
a065_polished_v2), the teaching model: pedagogy fine-tuning, then
reinforcement learning against loops, for exact numeracy and for translation; and| Measure | v5 | v5-Polished | v4 | Gemma-4-E2B (base) |
|---|---|---|---|---|
| Judge (Gemini 3.7 Flash, mean of three passes, full-length answers): all instructions followed, 25-task teacher bank | 74.7% | 65.3% | 64.0% | 81.3% |
| Judge: task quality, 0 to 10 | 6.13 | 5.43 | 4.95 | 7.53 |
| Judge: Luganda written, of the 6 tasks that ask for Luganda | 5 | 5 | 6 | 5 |
| Judge: Luganda quality, 0 to 10 (requested Luganda missing = 0) | 2.67 | 0.50 | 3.90 | 0.28 |
| Instruction adherence, 220 program-checked prompts | 72.3% | 70.5% | 63.6% | 59.1% |
| Numeracy, 150 held-out problems | 72.0% | 68.7% | 73.3% | 48.7% |
| Translation, MAFAND-MT test (1,500 sentences), chrF++ Luganda→English | 48.4 | 47.8 | 48.9 | 17.6 |
| Translation, MAFAND-MT, chrF++ English→Luganda | 41.9 | 41.5 | 44.1 | 14.6 |
| Loops without a guard, 60 essay / 60 drill prompts | 10.0% / 28.3% | 5.0% / 33.3% | 13.3% / 41.7% | 70.0% / 16.7% |
| Fab AI Foundation LLPK, Luganda / English | 76 / 90 | 79 / 88 | 12 / 73 | 62 / 91 |
generation_config (eos_token_id = [1, 106, 50], which
includes <turn|>, id 106, the Gemma-4 end of turn). Do not pass the Gemma-3 <end_of_turn>
token; it does not exist in the Gemma-4 vocabulary.repetition_penalty=1.0 with no_repeat_ngram_size=4. In a sweep on v5 this held loops at zero with 68.3% numeracy and 70.8% instruction adherence, against 60.8% and 63.3% for the older 1.15 / 3 guard.<bos>; tokenise the templated text with
add_special_tokens=False so it is not added twice.import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
MODEL = "CraneAILabs/edu-ganda-gemma-e2b-v5"
tok = AutoTokenizer.from_pretrained(MODEL)
model = AutoModelForCausalLM.from_pretrained(MODEL, torch_dtype=torch.bfloat16, device_map="auto").eval()
def chat(prompt, max_new_tokens=512):
text = tok.apply_chat_template([{"role": "user", "content": prompt}],
add_generation_prompt=True, tokenize=False)
inputs = tok(text, return_tensors="pt", add_special_tokens=False).to(model.device) # template has <bos>
out = model.generate(**inputs, max_new_tokens=max_new_tokens, do_sample=False,
repetition_penalty=1.0, no_repeat_ngram_size=4) # stop tokens come from generation_config
return tok.decode(out[0, inputs.input_ids.shape[1]:], skip_special_tokens=True).strip()
print(chat("Nnyonnyola engeri y'okunaaba engalo mu Luganda."))
Experimental research checkpoint. Review Luganda content before use with learners.
On load, transformers may report self_attn.k_proj, v_proj and k_norm for language-model layers
15 to 34 as unused or missing in the v4 parent; Gemma-4-E2B's last 20 layers share keys and values
with earlier layers and never read their own. The merge keeps v5-Polished's values for those tensors
and for the untied output head, which is why v5 has 5.53 billion parameters against v4's 5.10.
Gemma-4 ends a turn with <turn|> (token 106). Do not pass Gemma-3's <end_of_turn> as a stop token: it does not
exist in the Gemma-4 vocabulary, so generation will not stop at the end of the answer and the model keeps writing
unrelated text. Leave eos_token_id unset (the checkpoint's generation_config already stops on [1, 106, 50]), or
include 106 if you pass your own list.