⚡ Sarvam-1 Full Fine-Tuned Hindi → Marathi
High-Speed Indic Causal LLM for Hindi to Marathi Machine Translation
🚀 Executive Summary: This checkpoint is a 100% full parameter fine-tuned version of
sarvamai/sarvam-1(2.52B Causal Language Model), adapted end-to-end for Hindi (hin_Deva) → Marathi (mar_Deva) translation. Trained across 3 full epochs (~6.28M samples seen) on 2,095,356 deduplicated, semantically filtered parallel sentence pairs with zero data leakage. Delivering blazing 22.6 sentences/sec throughput, it provides production-grade conversational, administrative, and literary translation fidelity.
🌟 Why Sarvam-1 for Hindi-Marathi?
- ⚡ Ultra-Fast Generation (22.6 sent/s): Highly optimized autoregressive generation delivers 2x–3x faster translation than 7B+ models, ideal for real-time APIs, chat translation, and bulk document pipelines.
- 🎯 100% Full-Parameter Adaptation: Unlike LoRA or adapter-based fine-tuning, all 2.52B parameters were updated, enabling deep alignment with Marathi case-marking (विभक्ती प्रत्यय), postpositions, and gender-number-person agreement (व्याकरणिक लिंग-वचन सुसंगती).
- 📚 Massive Clean Training Corpus: Trained on 2,095,356 curated parallel pairs (Samanantar, BPCC, ILCI) filtered via LaBSE semantic score (≥ 0.75) and verified with 0% test-set leakage.
- 📉 Smooth Mathematical Convergence: Training validation loss dropped monotonically from 28.04 down to 1.4935, ensuring rock-solid stability and zero hallucination/repetition loops.
- 💻 Lightweight Deployment: Requires only ~5.5 GB VRAM in BF16/FP16, making it runnable on budget GPUs (RTX 3060/4060, T4, A10) and CPU environments.
🔄 Inference Architecture & Pipeline Flow
sequenceDiagram
autonumber
actor User as 👤 Client / API
participant Tokenizer as 🔤 Sarvam Tokenizer
participant LLM as ⚡ Sarvam-1 (2.52B Full FT)
participant Output as 🌟 Target Stream (Marathi)
User->>Tokenizer: Hindi Input (hin_Deva)
Note over Tokenizer: Chat Template Injection (<|user|>, <|assistant|>)
Tokenizer->>LLM: Input IDs + Attention Mask
Note over LLM: KV-Cached Autoregressive Generation<br/>⚡ 22.6 sentences/sec throughput
LLM->>Output: Decoded Token Stream (mar_Deva)
Output-->>User: Fluent Marathi Translation
📊 Benchmark Evaluation Results
Evaluated across 9,550 test sentence pairs spanning 5 independent benchmarks:
| Benchmark Suite | Test Samples | SacreBLEU (flores200) | SacreBLEU (intl) | chrF++ | WMT22-COMET-DA | Primary Strength |
|---|---|---|---|---|---|---|
| 🏆 In-House Testset (Oct 2026) | 1,011 | 22.83 | 14.43 | 42.79 | 0.7384 | Real-world Indian multi-domain robustness |
| 📈 Held-Out Test (Corpus Split) | 5,000 | 21.72 | 13.24 | 39.12 | 0.7715 | Broad vocabulary & terminology retention |
| 🌐 FLORES-200 devtest | 1,012 | 20.76 | 10.35 | 39.99 | 0.7201 | High out-of-domain generalization |
| 📰 IN22-Gen | 1,024 | 18.93 | 10.02 | 38.53 | 0.7096 | Formal journalistic prose translation |
| 💬 IN22-Conv | 1,503 | 16.91 | 11.32 | 37.21 | 0.7731 | Conversational dialogue & colloquial phrasing |
📋 In-House Domain Breakdown (Oct 2026 Testset)
Evaluated on 1,011 curated pairs across 8 core Indian domain verticals:
| Domain | Test Pairs | SacreBLEU | chrF++ | Relative Precision Meter |
|---|---|---|---|---|
| 🏖️ Tourism | 59 pairs | 37.02 BLEU | 51.92 chrF++ | ██████████ 37.0 |
| 🏥 Health | 43 pairs | 28.21 BLEU | 46.42 chrF++ | ████████░░ 28.2 |
| 🌿 Climate | 40 pairs | 26.70 BLEU | 45.52 chrF++ | ███████░░░ 26.7 |
| 🎓 Education | 301 pairs | 26.65 BLEU | 46.89 chrF++ | ███████░░░ 26.7 |
| 💻 Technology | 36 pairs | 22.07 BLEU | 41.53 chrF++ | ██████░░░░ 22.1 |
| 🏛️ Admin | 249 pairs | 19.93 BLEU | 39.92 chrF++ | █████░░░░░ 19.9 |
| ⚖️ Law | 243 pairs | 18.00 BLEU | 39.39 chrF++ | █████░░░░░ 18.0 |
| 🌾 Agriculture | 40 pairs | 17.67 BLEU | 40.19 chrF++ | █████░░░░░ 17.7 |
💻 Quickstart / Python Usage
Method 1: Hugging Face pipeline (Easiest & Cleanest)
import torch
from transformers import pipeline
translator = pipeline(
"text-generation",
model="vennyvirtuoso/sarvam-1-hindi-marathi",
torch_dtype=torch.bfloat16,
device_map="auto"
)
hindi_text = "भारत एक समृद्ध संस्कृति और विविध भाषाओं वाला देश है।"
messages = [
{"role": "user", "content": f"Translate the following text from Hindi to Marathi:\n{hindi_text}"}
]
output = translator(messages, max_new_tokens=256, do_sample=False)
marathi_translation = output[0]["generated_text"][-1]["content"].strip()
print("Marathi:", marathi_translation)
Method 2: Standard AutoModelForCausalLM Generation
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "vennyvirtuoso/sarvam-1-hindi-marathi"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="auto"
)
model.eval()
hindi_text = "शिक्षा हर नागरिक का मौलिक अधिकार है और समाज के विकास की नींव है।"
messages = [
{"role": "user", "content": f"Translate the following text from Hindi to Marathi:\n{hindi_text}"}
]
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
with torch.no_grad():
outputs = model.generate(
**inputs,
max_new_tokens=256,
do_sample=False,
repetition_penalty=1.05
)
translation = tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=True).strip()
print("Marathi Translation:", translation)
Method 3: High-Throughput Batch Translation (Production Pipeline)
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "vennyvirtuoso/sarvam-1-hindi-marathi"
tokenizer = AutoTokenizer.from_pretrained(model_id, padding_side="left")
if tokenizer.pad_token is None:
tokenizer.pad_token = tokenizer.eos_token
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.bfloat16, device_map="auto")
hindi_sentences = [
"जलवायु परिवर्तन आज के समय की सबसे बड़ी चुनौतियों में से एक है।",
"पर्यटन उद्योग स्थानीय लोगों को रोजगार के नए अवसर प्रदान करता है।",
"कृषि क्षेत्र भारतीय अर्थव्यवस्था की रीढ़ माना जाता है।"
]
prompts = [
tokenizer.apply_chat_template(
[{"role": "user", "content": f"Translate the following text from Hindi to Marathi:\n{s}"}],
tokenize=False,
add_generation_prompt=True
)
for s in hindi_sentences
]
inputs = tokenizer(prompts, return_tensors="pt", padding=True).to(model.device)
with torch.no_grad():
outputs = model.generate(**inputs, max_new_tokens=256, do_sample=False)
for i, out in enumerate(outputs):
marathi = tokenizer.decode(out[inputs.input_ids.shape[1]:], skip_special_tokens=True).strip()
print(f"[{i+1}] {hindi_sentences[i]}")
print(f" ➔ {marathi}\n")
🛠️ Prompt Formatting & Chat Template
The model uses Sarvam-1's native chat template:
<|user|>
Translate the following text from Hindi to Marathi:
{hindi_input_text}
<|assistant|>
{marathi_output_text}
When using tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True), the template is automatically formatted.
⚙️ Hardware & Deployment Requirements
| Precision | Min VRAM Required | Recommended Hardware | Inference Throughput |
|---|---|---|---|
| BF16 / FP16 | ~5.5 GB | RTX 3060 / 4060 / T4 / A10 / RTX 6000 Ada | 22.6 sent/sec |
| INT8 | ~3.2 GB | Consumer GPU / Low VRAM Cloud Instance | ~18 sent/sec |
| INT4 (AWQ/GGUF) | < 2.0 GB | Edge Devices / Apple Silicon / CPU | ~12 sent/sec |
📜 Citation & Reference
If you use this model or benchmark results in your research or application, please cite:
@misc{sarvam1_hindi_marathi_2026,
author = {Venny Virtuoso},
title = {Sarvam-1 Full Fine-Tuned Hindi to Marathi Machine Translation Model},
year = {2026},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/vennyvirtuoso/sarvam-1-hindi-marathi}}
}