← Pack index Download .zip Back to the article

Hy-MT3 1.8B glossary LoRA

A 200-example LoRA, a 30B repair pass, and a decision table. Measured 2026-11-29 on a Mac Studio (Apple M3 Ultra, 96 GB), macOS 15.7.4.

The 1.8B followed a 12-term Arabic glossary 60.0% of the time. The 30B followed it 86.7%. The LoRA gained 6.7 points, not statistically significant. A checker-driven 30B repair pass reached 96.7%, but lost COMET. The 30B direct kept the best COMET.

Results

Arm Glossary strict COMET-Kiwi Median latency Memory
1.8B Q8 base 60.0% 0.7621 1.2s 1.9 GB
1.8B bf16 + LoRA 66.7% 0.7593 9.7s 3.6 GB
1.8B Q8 + repair 96.7% 0.7541 1.8s 32.9 GB
30B direct 86.7% 0.7863 2.3s 32.9 GB

Term-weighted: 54/90 base, 60/90 LoRA, 87/90 repair, 78/90 30B. Paired per-paragraph tests are in scores/summary.json; the LoRA's 95% interval for the glossary gain is -5.8 to +21.0 points (p = 0.307).

Findings

Runbook

  1. Hold out 20 paragraphs, 3 runs. Base 60.0%.
  2. Generate 25 term-context sentences per term. 300 candidates.
  3. Translate with the 30B; keep strict-passing targets. 293 kept.
  4. Split 200 train / 20 validation.
  5. Leakage gate: 0 leaks; hard precondition in training.
  6. Train LoRA: 300 steps, 155 s, loss 0.027.
  7. Evaluate; compare with repair and 30B direct.

Data recipe

recipe.md has the exact generator prompt, teacher prompt, filter rules, leakage rules, LoRA config and commands. The training text is synthetic; the evaluation text is a real Wikipedia article. The boundary is seen terms, unseen sentences.

Reproduction

NLT_HY18_MODEL=/path/to/Hy-MT3-1.8B python3 scripts/train_lora.py   --train data/train200.jsonl --val data/val20.jsonl --steps 300 --batch-size 2 --out adapter/full200
NLT_HY18_MODEL=/path/to/Hy-MT3-1.8B python3 scripts/eval_adapter.py   --adapter adapter/full200 --out results/lora_full_bf16.jsonl
NLT_COMET_DIR=/path/to/comet/kiwi-int8 <python-with-sacrebleu> scripts/score_arms.py

filter_teacher.py, run_repair.py and score_arms.py need sacrebleu/COMET. train_lora.py and eval_adapter.py need Transformers/PEFT. The 30B server is needed for the teacher and repair steps.

File map

Licenses

Caveats

The Wikipedia-derived text and its translations are CC BY-SA 4.0. FLORES-200 is CC BY-SA 4.0. COMET-22 is Apache 2.0; the COMET-Kiwi int8 build is CC BY-NC-SA 4.0. The pack does not contain the paid API key.