🟢 IndicMaxxer-2B

Your language, your machine. A 2B Indian-language assistant that cuts the token tax on Kannada, Hindi, Kanglish and Hinglish, and runs on a 4 GB laptop GPU.

ಕನ್ನಡ · हिंदी · English · Kanglish · Hinglish


Why

Indian languages pay a token tax: the same sentence costs many more tokens than in English. More tokens mean a higher bill, slower replies and less room in the context window. Romanised Indian text (Kanglish, Hinglish), which is how most people actually type, is taxed the hardest.

IndicMaxxer-2B is Sarvam-1 (2B) with our tokenizer fused into it, fine-tuned to chat in five styles without mixing them, to reason in your own language, and to call simple tools.

What's different from stock Sarvam-1

Sarvam-1 IndicMaxxer-2B
Vocabulary 68,096 71,892 (+3,792 fused whole-word tokens)
Hinglish tokens / word 2.65 1.99 (−25.0%)
Kanglish tokens / word 4.07 3.23 (−20.5%)
Kannada tokens / word 2.54 2.43 (−4.3%)
Hindi tokens / word 1.47 1.45 (−1.2%)
English tokens / word 1.67 1.67 (unchanged)
Chat format base model ChatML chat, /instruct and /reasoning modes
Identity — IndicMaxxer, keeps to the user's language and script

Tokens per word measured on held-out text per style, before vs after fusion.

How the fusion works

frequent word in our 5-style corpus
   └─ Sarvam splits it into ≥ 3 pieces, our 48K tokenizer into fewer?
        └─ add " word" as ONE new token
             └─ new embedding = mean of the Sarvam pieces it replaces
                  └─ keep only if tokens/word goes DOWN on held-out text (never pay a tax increase)

Examples of fused tokens: nanagè, naanu, maahitiyannu, mujhe, liye, kiya, ಗೊತ್ತಿಲ್ಲ, ದಯವಿಟ್ಟು, बताइए, ज़्यादा.

Quick start

import torch
from transformers import AutoTokenizer, AutoModelForCausalLM

repo = "viczx/IndicMaxxer-2B"
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(repo, dtype=torch.float16, device_map="auto")

msgs = [
    {"role": "system", "content": "You are IndicMaxxer. The user writes Hinglish: reply in Hinglish only."},
    {"role": "user", "content": "kal interview hai, kuch tips do /instruct"},
]
ids = tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt").to(model.device)
out = model.generate(ids, max_new_tokens=200, do_sample=False, no_repeat_ngram_size=6,
                     eos_token_id=[tok.convert_tokens_to_ids("<|im_end|>"), tok.eos_token_id])
print(tok.decode(out[0, ids.shape[1]:], skip_special_tokens=True))

4 GB GPU? Load in 4-bit (~2 GB VRAM):

from transformers import BitsAndBytesConfig
q = BitsAndBytesConfig(load_in_4bit=True, bnb_4bit_quant_type="nf4", bnb_4bit_compute_dtype=torch.float16)
model = AutoModelForCausalLM.from_pretrained(repo, quantization_config=q, device_map={"": 0})

Modes

Flag at the end of your message Behaviour
/instruct Direct answer. The reply starts with an empty <think>\n\n</think> block.
/reasoning Thinks step by step in your language inside <think>…</think>, then answers. Sample k passes and vote for self-consistency.

Tip: use no_repeat_ngram_size instead of repetition_penalty. Indic suffixes legitimately repeat, and a penalty breaks grammar.

Samples

Style Prompt IndicMaxxer-2B
ಕನ್ನಡ ನನ್ನ ಆರ್ಡರ್ ಇನ್ನೂ ಬಂದಿಲ್ಲ, ಏನು ಮಾಡಬೇಕು? ನಿಮ್ಮ ಆರ್ಡರ್ ಸಂಖ್ಯೆಯನ್ನು ನನಗೆ ನೀಡಿ… ನಾನು ನಿಮಗೆ ಸಹಾಯ ಮಾಡಲು ನನ್ನ ಕೈಲಾದಷ್ಟು ಪ್ರಯತ್ನಿಸುತ್ತೇನೆ.
हिंदी मेरा रिफंड कब तक आएगा? यह आपके बैंक खाते के आधार पर अलग-अलग होता है। आमतौर पर यह 24 घंटे से लेकर एक सप्ताह तक का समय लेता है…
Hinglish kal interview hai, kuch tips do Interview se pehle achhi tarah se research kijiye aur apni strengths ke baare mein sochkar confidence banaye rakhie…
Kanglish naale meeting ide, enu prepare maadli? Naale meeting ge ready aagi 2 gante munche office ge barri…

The full app (IndicMaxxer)

The model is the core of a fully local assistant (GitHub):

  • Token compressor (LLMLingua-2) on history, documents and search results: 40–60% fewer context tokens.
  • Rule-based tool router: web search (Wikipedia kn/hi/en + DuckDuckGo), OCR (EasyOCR), PDF/DOCX reading and writing.
  • Voice: Silero VAD → WavLM speaker lock → Whisper (Kannada/Hindi/English) → IndicMaxxer-2B → Mithi TTS. Everything on the laptop.

Training

Base sarvamai/sarvam-1 (2B)
Tokenizer Sarvam-1 + 3,792 fused tokens from our 48K Indic tokenizer
Method LoRA r=32 on all attention/MLP projections + trainable new-token rows (fp32), base frozen fp16
Data ~20K chats: SmolTalk-heavy English, Aya / IndicAlign Kannada & Hindi, Hinglish/Kanglish sets, our hand-written conversations, native-language reasoning traces, identity rows
Compute 1× T4 (Kaggle free tier), 75 min, 703 steps, 3.5M tokens (~0.6 epoch)

Limitations

  • Trained for less than one epoch: facts, names and long answers can be wrong; English answers can ramble.
  • English token cost is unchanged from Sarvam-1 (English words were not fused).
  • /reasoning arithmetic is unreliable at this size; use the k-pass vote.
  • Not safety-tuned beyond the base model. Don't use for medical, legal or financial decisions.

Licence

Derived from Sarvam-1 and distributed under its licence terms (see the Sarvam-1 model card). Check them before any commercial use.


Built by Datamaxxers for The Big Hack 2.0 · AI Research track R3: The token tax
Downloads last month
3
Safetensors
Model size
3B params
Tensor type
F16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for viczx/IndicMaxxer-2B

Adapter
(37)
this model