InDIM-small: A 32M-Parameter Ultra-Lightweight Encoder for Indian Languages and English
2 min readupdated
InDIM-small by the CobuildX-AI team is a compact encoder-only base language model (text encoder for understanding tasks rather than generation) built on the ModernBERT architecture. It handles 12 Indian languages (Hindi, Bengali, Tamil, Telugu, Marathi, Gujarati, Kannada, Malayalam, Odia, Punjabi, Assamese, Urdu) alongside English, understanding both native scripts and romanized or code-mixed text. Initialized from mmBERT-small (140M), it outperforms its predecessor on 12 out of 15 benchmarks while being a quarter of the size and running roughly 3 times faster on a CPU. It is ideal for developers looking to fine-tune lightweight classifiers, search, and entity extraction tools without expensive GPUs.
Key features
- Support for 13 languages in native scripts, transliteration (Latin alphabet), and mixed formats.
- ModernBERT architecture (12 layers, RoPE, local and global attention) featuring factorized embeddings (128 dimensions) and a 128,064-token vocabulary.
- High CPU speed: median latency on an Intel i7-10700 (8 threads) is 8 / 12 / 37 ms for 64 / 128 / 512 tokens.
- Ready-to-use weights in ONNX format (fp32 and dynamic int8) with a 0.998 cosine similarity retention after quantization.
What you can do
- Fine-tune the model for personally identifiable information (PII) detection and named entity recognition (NER) in documents and chats, including texts longer than 512 tokens.
- Build a fast intent and slot classifier for voice assistants or chatbots supporting Hindi and romanized text.
- Use it as a compact encoder for semantic and cross-lingual search (after fine-tuning on paired data) on CPU servers.
Example
from transformers import AutoTokenizer, AutoModelForMaskedLM, pipeline
tok = AutoTokenizer.from_pretrained("CobuildX-AI/InDIM-small", trust_remote_code=True)
mlm = AutoModelForMaskedLM.from_pretrained("CobuildX-AI/InDIM-small", trust_remote_code=True)
fill = pipeline("fill-mask", model=mlm, tokenizer=tok)
print(fill("भारत की राजधानी [MASK] है।")[0]["token_str"])
Read more
DetailsBenchmarks: MASSIVE intent accuracy is 85.2 (vs. 84.2 for mmBERT-small), IndiaPII-Bench typed F1 is 0.960, and Naamapadam NER F1 is 0.704.
Training and inference: a learning rate between 2e-4 and 8e-4 is recommended for fine-tuning; int8 classifier quantization shifts outputs in 3–7% of cases.
Limitations: it does not generate text; English capabilities and transfer from it are weaker than for Indian languages; Odia and Assamese have less pretraining representation than the others.
License: Apache-2.0.










Comments