AK04-IXR

sarvam1-hinglish-tn-lora

Dedicated Endpoints

Run this model inference on single tenant GPU with unmatched speed and reliability at scale.

Learn more
Container

Run this model inference with full control and performance in your environment.

Learn more

Get help setting up a custom Dedicated Endpoints.

Talk with our engineer to get a quote for reserved GPU instances with discounts.

README

License: mit

Why

The base sarvam-1 is a base (non-instruct) model and cannot be reliably prompted into TN (12-shot ICL scores 49.9% WER — worse than rules). This adapter is fine-tuned on a synthetic, correct-by-construction code-mixed corpus.

Results (held-out 40-sentence labeled set)

Table
SystemWER ↓CER ↓Exact-Match ↑
naive rules (indic-numtowords)43.6%43.7%0%
competitive rule engine20.9%17.5%27.5%
Sarvam-1 base (12-shot ICL)49.9%35.4%5%
this adapter7.96%6.37%62.5%

Usage

python

from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
tok = AutoTokenizer.from_pretrained("sarvamai/sarvam-1")
m = AutoModelForCausalLM.from_pretrained("sarvamai/sarvam-1")
m = PeftModel.from_pretrained(m, "AK04-IXR/sarvam1-hinglish-tn-lora")
prompt = "Input: Mera flight ticket PNR-8392 hai, aur departure 4:30 PM ko hai.\nOutput:"
ids = tok(prompt, return_tensors="pt").to(m.device)
out = m.generate(**ids, max_new_tokens=96, do_sample=False)
print(tok.decode(out[0][ids['input_ids'].shape[1]:], skip_special_tokens=True))
# -> Mera flight ticket pee-en-aar eight three nine two hai, aur departure four thirty pee-em ko hai.

Training

LoRA (r=16, α=32, all attn+MLP projections; 0.94% of params) on ~8k synthetic pairs, 3 epochs, bf16, on a single A100. See the GitHub repo for the data generator, trainer, and evaluation harness.

Limitations

Trained on synthetic data, so it follows the project's normalization conventions; the held-out test set is small (40 sentences) — treat the headline number as indicative and see the per-category breakdown in the repo.

Model provider

AK04-IXR

Model tree

Base

sarvamai/sarvam-1

Adapter

this model

Modalities

Input

Text

Output

Text

Pricing

Dedicated Endpoints

View details

Supported Functionality

Model APIs

Dedicated Endpoints

Container

More information

Explore FriendliAI today