Downloads · 30 days
0
Jainamshahhh/helalm-4b
helalm-4b is a text generation model from Jainamshahhh. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as gemma.
HelaLM (හෙළ - an ancient endonym for Sri Lanka and the Sinhala people) is an instruction-tuned adaptation of google/gemma-3-4b-it for Sinhala, a language spoken by ~22 million people yet represented in well under 0.1%…
Downloads · 30 days
0
Access
Public
Updated Jun 15, 2026
Parameters
3.9B
8 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors8 GB · 99%
From the Hugging Face model README
HelaLM (හෙළ - an ancient endonym for Sri Lanka and the Sinhala people) is an instruction-tuned
adaptation of google/gemma-3-4b-it for Sinhala, a language spoken by ~22 million people yet
represented in well under 0.1% of public web text. On a held-out 300-prompt native-Sinhala
evaluation, HelaLM is preferred over its own base model in 92.3% of blind pairwise comparisons
(277-23-0; +84.7% relative), while simultaneously improving every multiple-choice knowledge
benchmark we measured.
Most low-resource adaptations reach for older bases such as Llama-3.2. HelaLM is built instead on Gemma-3-4b, Google's newer-generation open model, and the choice is evidence-backed, not cosmetic: in our controlled ablation the identical recipe on Llama-3.2-3B produced degenerate, code-switched Sinhala, while on Gemma-3 it was 94% preferred. Note also what the 92.3% means: picking a weak base inflates any "relative improvement" number because a broken model is trivial to beat. We deliberately took the strongest modern base, which already produces passable Sinhala, and still win 92.3% of blind comparisons against it. That is a far harder and more meaningful result.
This card documents the full methodology, the controlled ablations that produced it, the evaluation protocol, and the failure modes, with the explicit goal of being reproducible end to end.
Submitted to the Adaption AutoScientist Challenge (Part 1 - Language). The training corpus was produced with Adaptive Data (Adaption Labs); the model was trained on the resulting adapted dataset. Both dataset and weights are released openly (see Reproducibility).
| Axis | Metric | gemma-3-4b-it (base) | HelaLM-4B | Δ |
|---|---|---|---|---|
| Open-ended generation | Win rate, blind pairwise (n=300) | 7.7% (won 23/300) | 92.3% (won 277/300) | +84.7% vs 50% ref |
| Knowledge | Global-MMLU si (acc, n=1000) | 36.6% | 37.8% | +3.3% rel. |
| Reading comprehension | Belebele sin_Sinh (acc, n=900) | 58.3% | 60.4% | +3.6% rel. |
| Curriculum knowledge | SinhalaMMLU (acc, n=1000) | 40.6% | 42.0% | +3.4% rel. |
| Robustness | Foreign-script code-switching | 84 / 300 responses | 0 / 300 | eliminated |
| Robustness | Degenerate repetition loops | 21 / 300 | 1 / 300 | −95% |
The headline is the generation win rate: Sinhala quality is fundamentally a generative, not a multiple-choice, property, and pairwise preference is the metric used by the multilingual-evaluation lineage this work builds on (Aya / Global-MMLU). HelaLM also raises MCQ accuracy - notable because instruction-tuning for fluent long-form generation frequently degrades logprob-style MCQ scoring.

The final model is the product of a 4-run ablation that isolates the two variables that actually govern low-resource adaptation - base model and training intensity - before scaling data:
| Run | Base | Recipe | Data | Outcome |
|---|---|---|---|---|
| 1 | Gemma-3-4b-it | LoRA r=8, 2 ep, attn-only | Aya-only (≈10k) | No gain. Recipe too light to imprint a language. |
| 2 | Llama-3.2-3B | LoRA r=32, 3 ep, all-linear | seed v1 (14k) | MCQ ↑ but generation degenerate - base too weak at Sinhala script. |
| 3 | Gemma-3-4b-it | LoRA r=32, 3 ep, all-linear | seed v1 (14k) | 94.2% win vs base. First strong model. |
| 4 (this) | Gemma-3-4b-it | LoRA r=32, 3 ep, all-linear | seed v2 (35k + math/comprehension) | 92.3% win vs base; beats run 3 head-to-head 56.8%; fixes MCQ regressions. |
Two findings of independent interest:
google/gemma-3-4b-it (text decoder; Gemma3ForCausalLM).train_on_inputs=false).q,k,v,o,gate,up,down).A 34,667-example Sinhala instruction set, co-optimized with Adaptive Data (Adaption Labs) from
openly-licensed seed corpora, then curated. Composition (post-adaptation): human-written instructions
(Aya), large-scale instruction coverage (Aya Collection, quality-filtered), abstractive summarization
(XL-Sum), headline comprehension (NSINA), translation (FLORES+), exam-format MCQ with explanations
(Global-MMLU dev + Wikipedia-grounded synthetic), and a programmatic math-reasoning shard with worked
solutions. Every row carries per-row license/shard/source provenance. Full breakdown, licensing,
and attribution: [helalm-data dataset card].
si (test), SinhalaMMLU, Belebele sin_Sinh (logprob over A-D, matched
code path for base & adapted), FLORES+ chrF, and a 300-prompt open-ended set spanning 10
domains (culture, history, geography, food, practical, exam, general knowledge, writing, reasoning,
grammar) authored to be answerable without post-training-cutoff knowledge.google/gemma-3-4b-it; "Gemma" is a trademark of Google LLC. Redistribution complies with the
Gemma Terms; downstream users are bound by them.from transformers import AutoTokenizer, Gemma3ForCausalLM
from peft import PeftModel
import torch
tok = AutoTokenizer.from_pretrained("google/gemma-3-4b-it")
base = Gemma3ForCausalLM.from_pretrained("google/gemma-3-4b-it", torch_dtype=torch.bfloat16, device_map="auto")
model = PeftModel.from_pretrained(base, "Jainamshahhh/helalm-4b").eval() # or load the merged model directly
msg = [{"role": "user", "content": "වෙසක් පොහොය දිනයේ වැදගත්කම පැහැදිලි කරන්න."}]
ids = tok.apply_chat_template(msg, add_generation_prompt=True, return_tensors="pt").to(model.device)
print(tok.decode(model.generate(ids, max_new_tokens=512)[0][ids.shape[1]:], skip_special_tokens=True))
Author: Jainam Shah. Built with Adaptive Data (Adaption Labs) and the Gemma open model.