Agaram 2.5B Instruct v2 (run5 final)
dsashwin/agaram-2.5b-instruct-v2 is a post-trained release of murai-labs/agaram-2.5b-instruct (2.53B LlamaForCausalLM, ChatML, 8192 context) tuned for Tamil and Tanglish tool calling, Tamil instruction following, and regression-free bilingual translation and chat.
Training Summary
Two-stage post-training on top of murai-labs/agaram-2.5b-instruct:
- Stage 1 — Cleaned SFT (
sft3b): 2.0 epochs (lr=7e-5) over cleaned Tamil/English/Tanglish tool-calling data (missing, refusal/unavailable, negative examples), bilingual instruction-following examples, and on-policy translation replay (with zero decomposed Tamil characters). - Stage 2 — Difficulty-Filtered GRPO (
run5): 450 GRPO steps on NVIDIA A100-SXM4-40GB (lr=2e-5cosine,beta=0.03, LoRA rank 64 merged back to BF16) over 12,294 difficulty-resampled prompts (including 2x on-policy FLORES translation replay) with verifiable tool-call rewards, IndicIFEval rewards, and explicit penalties against repetition loops, prompt echoing, and spurious***dividers.
Evaluation: Base (murai-labs/agaram-2.5b-instruct) vs Ours (v2 / run5 final)
All numbers measured with greedy decoding and identical graders (<|im_end|> stripped at eval via clean_native).
512 New Tokens (Default Release Setting)
| Benchmark / Metric | n | Base (Published) | Ours (v2 / run5 final) | Δ (Ours − Base) |
|---|---|---|---|---|
| Tool Calling (All) | 451 | 51.9% | 80.9% | +29.0 (Holm p=1.3e-27) |
├─ call_sft (seen tools) | 159 | 68.6% | 89.3% | +20.7 |
├─ call_synth (unseen schemas) | 168 | 16.7% | 67.9% | +51.2 |
├─ missing (ask clarification) | 26 | 26.9% | 61.5% | +34.6 |
├─ no_tool (chat reply) | 69 | 98.6% | 100.0% | +1.4 |
├─ unavailable (refuse/explain) | 29 | 75.9% | 82.8% | +6.9 |
└─ tanglish style | 181 | 54.1% | 85.1% | +31.0 |
| IndicIFEval Ground (strict) | 430 | 17.9% | 55.1% | +37.2 (Holm p=5.7e-31) |
| IndicIFEval Trans (strict) | 490 | 11.4% | 35.3% | +23.9 (Holm p=1.7e-23) |
| FLORES en→ta (chrF++) | 1,012 | 52.05 | 52.29 | +0.2 (0/1,012 EN copies, 0 decomposed Tamil) |
| FLORES ta→en (chrF++) | 1,012 | 55.20 | 54.75 | -0.5 |
| Aya Chat Health: Loops % (6-gram ≥4×) | 300 | 2.0% | 3.3% | +1.3 |
| Aya Chat Health: Prompt Echoes % | 300 | 4.7% (5.3% clean) | 5.0% | +0.3 (-0.3 clean) |
Aya Chat Health: Spurious *** % | 300 | 0.0% | 0.0% | 0.0 |
| Aya Chat Health: Tamil→Tamil % | 200 | 98.5% (99.0% clean) | 99.0% | +0.5 (0.0 clean) |
| Aya Chat Health: Mean Reply Chars | 300 | 432.9 (423.1 clean) | 377.1 | -55.8 (-46.0 clean) |
| Vibe LLM Judge (DeepSeek V4.1 Flash) | 300 | 116 wins (68 even) | 116 wins (68 even) | +0.0 (sign p=1.0; Tamil +0.8 toward Ours) |
| lm-eval Mean: 10 Tamil Tasks | — | 43.5 | 43.1 | -0.4 (0 Holm-sig regressions) |
| lm-eval Mean: 3 English Tasks | — | 59.6 | 59.9 | +0.3 (hellaswag +0.7, Holm p=0.013) |
2048 New Tokens (Stripped <|im_end|> Apples-to-Apples Rescore for Base)
| Metric | n | Base (Published) | Ours (v2 / run5 final) | Δ (Ours − Base) |
|---|---|---|---|---|
| Tool Calling (All) | 451 | 51.4% | 80.7% | +29.3 (Holm p=1.9e-28) |
| IndicIFEval Ground (strict) | 430 | 18.1% (raw 17.9%) | 54.9% | +36.7 (Holm p=2.1e-29) |
| IndicIFEval Trans (strict) | 490 | 11.6% (raw 10.0%) | 36.7% | +25.1 (Holm p=7.6e-24) |
Chat Trunc / Loops / Echoes / *** | 300 | 1.7 / 2.3 / 4.7 / 0.0 | 1.3 / 3.3 / 5.3 / 0.0 | Mean chars: 527.4 → 496.6 |
Quickstart (transformers)
Pass tools directly (unwrapped JSON tool definitions, or inspect chat_template.jinja) and always stop on <|im_end|> (token id 2):
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "dsashwin/agaram-2.5b-instruct-v2"
tok = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.bfloat16, device_map="auto")
tools = [{
"name": "get_gold_rate",
"description": "Get today's gold or silver rate in a Tamil Nadu city",
"parameters": {
"type": "object",
"properties": {"metal": {"type": "string"}, "city": {"type": "string"}},
"required": ["metal", "city"],
},
}]
messages = [{"role": "user", "content": "Madurai-la innikku gold rate enna?"}]
prompt = tok.apply_chat_template(messages, tools=tools, tokenize=False, add_generation_prompt=True)
inputs = tok(prompt, return_tensors="pt", add_special_tokens=False).to(model.device)
out = model.generate(**inputs, max_new_tokens=512, do_sample=False, eos_token_id=2)
reply = tok.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=False).split("<|im_end|>")[0]
print(reply)
Expected tool call format:
<tool_call>
{"name": "get_gold_rate", "arguments": {"metal": "gold", "city": "Madurai"}}
</tool_call>
GGUF Companions (llama.cpp / Ollama)
Pre-quantized Q8_0 and Q4_K_M GGUF files (with qwen35 pre-tokenizer, <|im_end|> stop token id 2, and embedded ChatML/tool template) are published in dsashwin/agaram-2.5b-instruct-v2-gguf:
| File | Quant | Size | Notes |
|---|---|---|---|
agaram-2.5b-instruct-v2-Q8_0.gguf | Q8_0 | 2.69 GB | Recommended. Verified 8/9 on local CPU scenarios (matching BF16) with 278/278 token-ID parity. |
agaram-2.5b-instruct-v2-Q4_K_M.gguf | Q4_K_M | 1.56 GB | Compact 4-bit option (~1.6x faster CPU decode; 7/9 local scenarios). |
# llama.cpp
llama-cli -m agaram-2.5b-instruct-v2-Q8_0.gguf --jinja --temp 0
# Ollama
ollama run hf.co/dsashwin/agaram-2.5b-instruct-v2-gguf:Q8_0
ollama run hf.co/dsashwin/agaram-2.5b-instruct-v2-gguf:Q4_K_M
Limitations
- Frozen 2.5B Pretraining Ceiling: Zero-shot multiple-choice knowledge (
lm-eval10 Tamil tasks mean43.1, 3 English tasks mean59.9) reflects the underlying 2.5B base model and trails larger open 3B–4B peers (Qwen3.5-4B50.4,granite-4.1-3b46.5). - Translated Formatting Constraints (
IndicIFEval trans): Improves dramatically overagaram base(11.4% → 35.3%at 512 tokens), but still trailsgemma-4-E4B-it(59.8%/71.8%) andQwen3.5-4B(42.4%/51.8%), especially onenglish_lowercase(some spillover from uppercase training) and***-delimited prompts. - FLORES
ta→en: Shows a minor-0.45chrF++ difference vs base (55.20 → 54.75), whereasen→taimproves slightly (52.05 → 52.29) with0/1,012English copies.