Tiny Aya Fire 3.35B — Tamil & Tanglish Clinical Triage (16-Bit Merged)
Lexsi Labs AI Safety & Alignment Hackathon Submission
Tracks: Track 1 (Data Curation & Alignment) & Track 2a (Multilingual & Code-Mixed Safety)
Base Model: CohereLabs/tiny-aya-fire (3.35B, cc-by-nc-4.0)
- Hugging Face Article:
Aligning Tiny Aya Fire (3.35B) for Zero-Prescription Tamil & Tanglish Clinical Triage - Model Collection:
Lexsi Hackathon - Tamil & Tanglish Clinical Triage Models - Dataset Collection:
Lexsi Hackathon - Tamil Clinical Triage Data & Audit - LoRA Adapter:
SamSankar/tiny-aya-fire-3.35b-tamil-tanglish-clinical-triage-lora - Curated Dataset:
SamSankar/tamil-tanglish-clinical-triage-dataset - Audit Artifacts & Traces:
SamSankar/tamil-tanglish-clinical-triage-audit-artifacts
1. Model Summary
This is a standalone 16-bit (torch.float16) fused model aligned from CohereLabs/tiny-aya-fire (3.35B) for safe, structured clinical triage in Native Tamil, Pure Romanized Tamil, and Code-Mixed Tanglish.
In real-world Tamil-speaking communities, patients and caregivers describe emergencies using spoken regional Tamil, Romanized phonetics ("Nenju valikudhu, moochu vida mudiyala"), or code-mixed Tanglish ("Sudden chest pressure left hand pain"). Unaligned multilingual models frequently collapse to English (10.4% Native Tamil script adherence in baseline), comply with unsafe medication/dosage requests (30.0% adversarial bypass rate), or misclassify severity (0.61 Macro F1).
Using an end-to-end CuratorKit -> AlignTune -> Clinical Triage Engine -> AuditKit pipeline across 24 ESI/WHO clinical domains, this model enforces:
- Accurate 3-Tier Triage Routing:
CRITICAL(with immediate 108 ambulance escalation),URGENT, andNON-URGENT. - Zero-Prescription Safety Guardrail: Strictly refuses to prescribe, confirm, or recommend specific pharmaceutical names, antibiotic schedules, steroid drops, or dosages.
- High-Fidelity Dialect & Script Adherence: Responds in Native Tamil script or English/Tanglish matching clinical routing rules, with lossless back-transliteration support for Romanized Tamil callers.
2. Verified 3-Layer AuditKit Benchmark Results
Evaluated across 40 stratified held-out probes (10 Native Tamil, 10 Romanized Tamil, 10 Code-Mixed Tanglish, 10 Adversarial Safety Traps) with 0% train/test/benchmark leakage using our 3-Layer Decoupled Evaluation Architecture (openai/gpt-oss-120b on Groq as blinded Layer 2 clinical judge):

| Evaluation Dimension | Metric | Base Model (CohereLabs/tiny-aya-fire) | Aligned Model (3.35B + Engine) | Gain |
|---|---|---|---|---|
| AuditKit Safety Compliance | Overall Safety Pass % | 52.5% | 97.5% | +45.0% |
| Zero-Prescription Guardrail | Drug & Dosage Refusal % | 80.0% | 100.0% | +20.0% |
| 108 Escalation Compliance | Critical Routing % | 100.0% | 100.0% | 0.0% |
| Triage Schema Integrity | Macro F1-Score | 0.61 | 1.00 | +0.39 |
| Critical Hallucination Rate | False Negative % (Lower is better) | 0.0% | 0.0% | 0.0% |
| Adversarial Safety Bypass | Bypass % (Lower is better) | 30.0% | 0.0% | -30.0% |
| Script & Dialect Compliance | Mean Layer 3 Score | 0.776 | 0.981 | +0.205 |
| Native Tamil Script Adherence | Category 1 Score | 10.4% | 92.5% | +82.1% |
| Token Compute Efficiency | Avg Tokens / Generation | 229 | 192 | -16.1% |
Why 3-Layer Decoupled Evaluation?
Single-pass LLM judges exhibit English-language bias when comparing Tamil and English clinical outputs. AuditKit decouples evaluation into three independent layers:
- Layer 1 (Deterministic Safety Gate, No LLM): Multilingual keyword and regex verification for Zero-Prescription compliance,
108escalation on Critical cases, and Adversarial refusal cues. - Layer 2 (Language-Normalized LLM Judge): Blinded single-candidate clinical triage accuracy scoring on
raw_model_output(openai/gpt-oss-120bvia Groq). - Layer 3 (Programmatic Script Compliance, No LLM): Unicode character ratio analysis (
U+0B80-U+0BFFTamil vs Latin).
3. Training & Alignment Details
- Clinical Coverage (24 ESI/WHO Domains):
10 Critical: Cardiac/ACS, Pediatric Respiratory/Febrile Seizure, Stroke/F.A.S.T., Anaphylaxis, Severe Trauma/Hemorrhage, Obstetric Emergencies, Snakebite/Envenomation, Diabetic Hypoglycemia, Chemical Poisoning, Sepsis.8 Urgent: High Fever/Dengue, Dehydration, Urinary Retention, Fracture/Dislocation, Acute Asthma Flare, Post-Op Wound Infection, Diabetic Foot Ulcer, Severe Infection/Migraine/Ulcer/Eye Traps.6 Non-Urgent: Mild URI, Tension Headache, Mild Skin Rash, Mild Indigestion, Minor Strain, Routine Wellness.
- Curation & Provenance Gating: Word-boundary regex gating blocking 35+ pharmaceutical names and dosage patterns, exact/normalized deduplication, and 0% overlap with the 40-probe held-out benchmark.
- QLoRA Configuration:
- 4-bit NF4 double quantization (
torch.float16) viabitsandbytes. - LoRA
r=32,lora_alpha=64,lora_dropout=0.05onq_proj,k_proj,v_proj,o_proj,gate_proj,up_proj,down_proj. - Multi-GPU DDP via
accelerateon Dual NVIDIA T4 GPUs,lr=1.5e-4,warmup_steps=10,4 epochs,gradient_accumulation_steps=2. - Explicit ChatML
<|im_end|>+ nativetokenizer.eos_tokentermination to eliminate marker leakage and reduce generation length by 16.1%.
- 4-bit NF4 double quantization (
4. Quickstart Usage
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "SamSankar/tiny-aya-fire-3.35b-tamil-tanglish-clinical-triage-merged"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.float16,
device_map="auto",
trust_remote_code=True,
)
system_prompt = (
"நீங்கள் ஒரு மருத்துவப் பரிசோதகர் (Healthcare Triage Assistant). "
"நோயாளி கூறும் அறிகுறிகளின் அவசர நிலையை ஆராய்ந்து, அதற்கான சரியான அவசரப் பிரிவை (Critical, Urgent, Non-Urgent) மட்டும் ஒதுக்கவும். "
"பதிலைத் தூய தமிழ் எழுத்துக்களில் (Native Tamil Script) வழங்கவும். "
"எந்த ஒரு மருந்தையும் பரிந்துரைக்க வேண்டாம் (Zero-Prescription Rule). "
"முற்றிலும் நடுநிலையான தொனியைப் பேணவும். இறுதியில் மருத்துவ மறுப்புரையைச் சேர்க்கவும்."
)
user_query = "திடீர்னு நெஞ்சுல பயங்கர அழுத்தம், இடது கை வரைக்கும் வலி பரவுது, மூச்சு திணறல் மற்றும் வியர்த்து கொட்டுது."
prompt = (
f"<|im_start|>system\n{system_prompt}<|im_end|>\n"
f"<|im_start|>user\n{user_query}<|im_end|>\n"
f"<|im_start|>assistant\n"
)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
with torch.no_grad():
outputs = model.generate(
**inputs,
max_new_tokens=384,
do_sample=False,
eos_token_id=tokenizer.eos_token_id,
pad_token_id=tokenizer.pad_token_id,
)
response = tokenizer.decode(outputs[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True)
print(response.split("<|im_end|>")[0].strip())
5. Intended Use, Limitations & Clinical Safety Disclaimer
- Intended Use: Research, safety alignment benchmarking, and preliminary multilingual triage routing research in Tamil and Tanglish.
- Out-of-Scope / Limitations: This model is not a licensed medical device or diagnostic system. It must never be used to prescribe medications, adjust dosages, or replace emergency medical services (108) or in-person evaluation by a qualified physician.
- License: Weights and alignment artifacts are released under Apache 2.0 (
apache-2.0), subject to the upstreamCohereLabs/tiny-aya-fireCC BY-NC 4.0 (cc-by-nc-4.0) license.