Tiny Aya Earth, Amharic maternal and reproductive health Q&A (v4c DPO, merged)
Research prototype. Not medical advice. Non-commercial use only (CC BY-NC 4.0). Answers can be wrong. Anyone with danger signs in pregnancy (heavy bleeding, severe headache or blurred vision, convulsions, high fever, reduced fetal movement, waters breaking early, severe abdominal pain) must go to a health facility immediately.
By downloading or using this model you agree to use it for non-commercial purposes only (CC BY-NC 4.0 and the Tiny Aya licence) and accept that it does not give medical advice.
This is CohereLabs/tiny-aya-earth (3.35B parameters, Cohere2 architecture) fine-tuned to answer maternal, sexual and reproductive health questions in Amharic. It was built for the Lexsi Labs hackathon (Track 1) with the full Lexsi tool chain: CuratorKIT (data curation) -> AlignTune (SFT, then DPO) -> AuditKIT (evaluation).
The weights in this repo are a single fp16 model: the official base with four LoRA adapters merged in order
(run-2 curated SFT -> v3 SFT -> v4c DPO; each was trained on the previous merged model). The individual adapters are in
5LeaderW/tiny-aya-earth-amharic-maternal-health-adapters.
Use
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
repo = "5LeaderW/tiny-aya-earth-amharic-maternal-health"
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(repo, dtype=torch.float16, device_map="auto")
msgs = [{"role": "user", "content": "ነፍሰ ጡር ሴት ምን አይነት ምግብ መመገብ አለባት?"}]
enc = tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt", return_dict=True).to(model.device)
out = model.generate(**enc, max_new_tokens=256, do_sample=False)
print(tok.decode(out[0, enc["input_ids"].shape[1]:], skip_special_tokens=True))
All reported numbers use greedy decoding, max 256 new tokens, the stock chat template and no extra system prompt. Tested with transformers 5.15.0 and peft 0.21 on a Tesla T4 (fp16; T4 has no bf16, so the merge is fp16 although the base ships in bf16).
Method chain
| Stage | Tool | Data | Result |
|---|---|---|---|
| Dataset build | scripts | 5 Amharic sources (below), cleaned, deduplicated, seed 42 | train 7,109 / dev 374 / test 550 |
| Run 2 curation | CuratorKIT (TextCleaner, Exact + MinHash dedup, SchemaGate, project gates on BaseGate) | train 7,109 -> 4,806 | dropped broken text, English-heavy, off-topic, Q/A mismatch rows; referral line on danger-sign answers |
| Run 2 SFT ("B") | AlignTune 0.1.30 (TRL backend), LoRA r16 / alpha 32, lr 1e-4, 1 epoch | curated 4,806 rows | adapter run2_B_sft |
| Run 3 curation (v3) | CuratorKIT + LLM quality gate (Gemma 4 31B, fluency >= 4 and correctness >= 4), referral rewrites checked by DeepSeek V4 Flash, 123 synthetic danger-sign questions | 4,806 -> 2,691 rows, 803 DPO pairs | |
| v3 SFT | AlignTune SFT from the merged run-2 model | 2,691 rows | adapter v3_sft |
| v3 DPO | AlignTune DPO (beta 0.1, lr 5e-5, 1 epoch, low-memory) | 763 + 40 pairs | over-referral: a generic facility line on 86.5% of non-urgent answers |
| v4b DPO | AlignTune DPO from the merged v3 SFT model | 915 + 53 pairs (urgent pairs, routine counter-pairs, fluency pairs, anti-repetition pairs) | false urgency: a "go now" line on 19.2% of factual answers |
| v4c DPO (this model) | AlignTune DPO from the merged v3 SFT model, same settings | 1,086 + 62 pairs (v4b pairs - 90 urgent anti-repetition pairs + 270 false-urgency counter-pairs) | false urgency 1.3%, urgent probe referral 96.3% |
| Evaluation | AuditKIT per-sample metrics + sacrebleu chrF++ + regex referral audit + LLM judge | 550 test rows, 82-question held-out urgent probe, Belebele, AfriMMLU | table below |
DPO settings (v3, v4b, v4c): sigmoid loss, beta 0.1, lr 5e-5, 1 epoch, batch 1 x grad-accum 16, gradient checkpointing, max length 768, reference log-probs precomputed once, fp16 base + fp32 LoRA r16 on all attention and MLP projections, model split over two T4s. v4c: 1,086 train pairs, dev reward accuracy 0.97, margin 4.85, eval loss 0.125, 0 non-finite values, 23 min of training.
Compute: free Kaggle T4 x2 only (private kernels). No paid GPU, no HF Jobs.
Results
Test = 550 held-out rows (400 AmHQA + 150 Walelign SRH, never trained on). Belebele amh_Ethi (900) and AfriMMLU
amh (500) are zero-shot multiple choice (argmax over A-D). Referral rates use a regex audit (referral_lib.py); test
questions were labelled urgent / routine / none by an LLM triage prompt (1 / 102 / 447). Because the test set has only
one urgent question, urgent behaviour is measured on a held-out probe of 82 new Amharic danger-sign questions.
| Metric | Baseline | Run-2 B SFT | v3 SFT | v3 DPO | v4b DPO | v4c DPO |
|---|---|---|---|---|---|---|
| chrF++ test (550) | 10.3 | 9.1 | 9.8 | 10.7 | 12.3 | 12.3 |
| chrF++ AmHQA (400) | 9.2 | 8.3 | 8.9 | 9.5 | 11.5 | 11.4 |
| chrF++ Walelign SRH (150) | 17.8 | 15.1 | 16.6 | 19.0 | 18.4 | 19.0 |
| AuditKIT chrf, per-sample mean | 18.8 | 18.8 | 19.9 | 21.3 | 20.1 | 22.7 |
| Belebele amh_Ethi acc % | 61.7 | 63.0 | 63.4 | 62.8 | 62.9 | 63.6 |
| AfriMMLU amh acc % | 46.4 | 44.2 | 44.4 | 44.0 | 43.8 | 44.4 |
| Hit 256-token cap % | 98.5 | 44.7 | 35.3 | 14.0 | 34.5 | 29.5 |
| Answers with Markdown % | 96.0 | 0.0 | 0.0 | 0.0 | 0.2 | 0.0 |
| Referral line %, non-urgent test (549) | 0.7 | 0.0 | 12.8 | 86.5 | 23.0 | 5.8 |
| Urgent "go now" line %, factual test (447) | 0.4 | 0.0 | 0.0 | 1.3 | 19.2 | 1.3 |
| Referral line %, held-out urgent probe (82) | n/a | n/a | 67.1 | 100.0 | 98.8 | 96.3 |
| Urgent-worded referral %, urgent probe (82) | n/a | n/a | 51.2 | 86.6 | 98.8 | 92.7 |
LLM judge (DeepSeek-V4.1-Flash via HF Inference Providers, same fixed 100-row sample, blind shuffled labels; correctness / Amharic fluency, 1-5). Each row is its own judge pass, so compare systems only within a row:
| Judge pass | Baseline | Run-2 B | v3 SFT | v3 DPO | v4b DPO | v4c DPO |
|---|---|---|---|---|---|---|
| Five-way (run 3) | 2.56 / 3.80 | 2.38 / 3.37 | 2.58 / 3.66 | |||
| v3 SFT vs v3 DPO | 2.65 / 3.68 | 3.29 / 4.27 | ||||
| v3 DPO vs v4b | 3.18 / 4.34 | 3.12 / 4.47 | ||||
| v4b vs v4c | 3.13 / 4.50 | 3.01 / 4.43 | ||||
| v4b vs v4c, labels reversed | 3.13 / 4.50 | 3.00 / 4.39 |
Why v4c over v4b: v4c removes the false "go to a health facility now" lines (19.2% -> 1.3% of factual answers) and keeps the benchmarks and the urgent probe, at a judge correctness cost of 0.12-0.13 versus v4b (consistent in both label orders). The author accepted that trade to avoid false alarms.
Merge check
The single fp16 model was produced on free Kaggle T4 x2 (private kernel amh-tinyaya-merge-v4c, 6 min) by merging the
adapters in order with PEFT merge_and_unload (merge_adapter.py; adapter SHA-256s in merge_check/stack.json).
On the first 16 test rows (one batch, greedy, 256 new tokens) the merged model gives 16/16 identical answers to the
way the v4c evaluation loaded the model (merged v3 SFT model + v4c adapter). Against the stored v4c evaluation
predictions it matches 13/16 exactly (mean chrF 97.7); the 3 differing answers diverge only after 311-391 characters, and
the adapter path shows the very same 3 differences, so they come from batch padding (the original run used
length-sorted batches over all 550 rows), not from the merge. Details: merge_check/merge_check.md.
Training data
| Source | Licence | Used for |
|---|---|---|
| Walelign/Amharic_SRH_Dataset | CC BY-NC 4.0 | train + 150 test rows |
| ImhotepSystems/AfriHealth-QA (Amharic rows) | CC BY 4.0 | train |
| AmHQA, Bogale et al. 2026, Mendeley Data, doi:10.17632/8cks7m5f8s.1 | CC BY 4.0 | train + 400 test rows (self-made seeded split) |
| danilior/amharic_maternal_health | no licence stated | train (59 v3 SFT rows, 100 run-2 rows, and DPO pairs built from them); removed from the published datasets |
| EthioNLP/Amharic_Instruction_dataset (Walia-LLM, Azime et al. 2024) | no licence stated on the card | train (general Amharic slice: 653 run-2 rows, 312 v3 rows); removed from the published datasets |
| Synthetic danger-sign questions and referral rewrites | generated with Gemma 4 31B, checked by DeepSeek V4 Flash | train |
Training-data licence disclosure. This model was trained on the full data above, including the two sources that state no licence (danilior and EthioNLP). On 2026-11-06 all of their rows, and the DPO pairs built from them, were removed from the published dataset repos for licence reasons. The model was not retrained, so its weights still reflect that data. If you are a rights holder of either source and object, please open a discussion on this repo.
Curated data (licence-cleaned), DPO pairs and all evaluation logs: 5LeaderW/amharic-maternal-health-sft-curated-v3,
5LeaderW/amharic-maternal-health-dpo-pairs, 5LeaderW/amharic-maternal-health-aya-eval-logs.
Limitations
- Not a medical device. It can state wrong facts confidently. Judge correctness is about 3 out of 5.
- Judge noise. The same judge on the same rows gave v3 DPO 3.28 / 4.31 in one pass and 3.18 / 4.34 in another, so differences of about 0.1 are within noise. The judge is an LLM, not a clinician; no human medical review was done.
- Machine-translated references. AmHQA (400 of 550 test rows) and much of Walelign SRH read as translations of English consumer-health QA. chrF++ against them rewards literal, translated phrasing and is low for every system.
- Test set is mostly general health. Only the 150 Walelign rows are in-domain SRH; 88 rows are maternal by keyword. The intended maternal benchmark (HanaMekonen) was not available.
- Residual over-referral. 5.8% of non-urgent answers (13.7% of routine ones) still end in a referral line. The judge's "safe referral when needed" rate fell from 76.9% (v4b) to 55.1% (v4c): on some routine questions the judge wanted a referral that v4c leaves out.
- Urgent recall is not perfect. 3 of 82 held-out danger-sign answers have no referral line, and 7.3% lack urgent wording.
- Synthetic danger-sign data. The corpus had few real danger-sign questions, so 123 synthetic Amharic danger-sign questions (LLM-generated, LLM-checked) were added; the 82-question urgent probe was made the same way. Both are LLM text, not real patient questions.
- Synthetic referral edits. DPO pairs were built by adding or removing referral sentences (rewrites by Gemma 4 31B, and regex-built pairs that append boilerplate or "go now" lines mined from earlier model outputs). The model learned these patterns, not clinical triage.
- Length. 29.5% of answers hit the 256-token cap (repetition loops remain).
- Licences. Two training sources (danilior, EthioNLP) state no licence. The model was trained on them; their rows were removed from the published datasets (see Training data).
Licence
CC BY-NC 4.0, non-commercial use only, inherited from CohereLabs/tiny-aya-earth (Cohere Labs CC-BY-NC licence; users must also follow Cohere Labs' Acceptable Use Policy). The training data is also non-commercial (it includes CC BY-NC 4.0 data); the training run also used two sources with no stated licence, which are not redistributed (see Training data). No other licence is granted.
Citation and attribution
Base model: Cohere Labs, Tiny Aya Earth. Data: Walelign Amharic SRH dataset; AfriHealth-QA (HASH Consortium, Zindi/ITU challenge); Bogale, Tegegne, Abate, Belay (2026) AmHQA, Mendeley Data V1, doi:10.17632/8cks7m5f8s.1; danilior/amharic_maternal_health; EthioNLP Amharic Instruction dataset (Azime et al. 2024, arXiv:2402.08015). Benchmarks: facebook/belebele, masakhane/afrimmlu. Tools: Lexsi Labs CuratorKIT, AlignTune 0.1.30, AuditKIT 1.1.3.