indic-rerank-small
v2 (2026-11-26): adds English training data (English nDCG@10 0.645 → 0.693) and is slightly better on Hindi, Bengali and Telugu too. The previous version is the
v1tag (revision="v1").
A 140M-parameter reranker (cross-encoder) for Indian-language search, which also works when the query is typed in the Latin alphabet ("bharat mein kitne rajya hain") and the passages are in native script. Give it a query and the candidate passages from a first-stage retriever (BM25, or an embedding model such as altslate/indic-embed-small); it returns a relevance score for each pair. Query and passages should be in the same language (see limitations).
Trained and tested on Hindi, Bengali and Telugu (the Indian languages in MIRACL), plus English. It is a distillation of BAAI/bge-reranker-v2-m3 (568M) into jhu-clsp/mmBERT-small. The teacher cannot handle romanized queries (on our test it reranks them no better than leaving the candidates in their original order), so this model was taught to give a romanized query the scores the teacher gives the native-script query.
Usage
sentence-transformers
from sentence_transformers import CrossEncoder
model = CrossEncoder("altslate/indic-rerank-small")
query = "bharat mein kitne rajya hain"
docs = ["भारत में 28 राज्य और 8 केंद्र शासित प्रदेश हैं।", "क्रिकेट एक लोकप्रिय खेल है।"]
print(model.predict([(query, d) for d in docs])) # [0.996 0.0005]
print(model.rank(query, docs)) # the first passage ranks first
Scores are passed through a sigmoid (0–1). Tested with sentence-transformers 5.1.2 (transformers 4.57.6) and 6.3.0 (transformers
5.24.0); both give the same scores. With plain transformers, use AutoModelForSequenceClassification and read logits[:, 0]
(pairs encoded as tokenizer(queries, passages, truncation="only_second", max_length=384)).
transformers.js / ONNX
onnx/model.onnx (fp32, 563 MB) and onnx/model_fp16.onnx (282 MB) take input_ids and attention_mask for (query, passage)
pairs and return logits (apply a sigmoid for 0–1 scores).
import { AutoTokenizer, AutoModelForSequenceClassification } from "@huggingface/transformers";
const tok = await AutoTokenizer.from_pretrained("altslate/indic-rerank-small");
const model = await AutoModelForSequenceClassification.from_pretrained("altslate/indic-rerank-small", { dtype: "fp16" }); // or "fp32"
const query = "bharat mein kitne rajya hain";
const docs = ["भारत में 28 राज्य और 8 केंद्र शासित प्रदेश हैं।", "क्रिकेट एक लोकप्रिय खेल है।"];
const { logits } = await model(tok(docs.map(() => query), { text_pair: docs, padding: true, truncation: true, max_length: 384 }));
console.log(logits.tolist().map(r => r[0])); // ~[5.48, -7.59]: higher = more relevant
Tested with @huggingface/transformers 4.3.2 in Node 22: fp32 gives the PyTorch scores exactly; fp16 differs by at most 0.003 on
our check pairs. Through onnxruntime on 15 dev queries per language (100 candidates each), fp16 nDCG@10 is within ±0.005 of PyTorch.
Dynamic int8 quantization lost too much (romanized Hindi 0.694 → 0.546), so there is no int8 file.
Results
Test: mteb/MIRACLReranking, the MIRACL dev queries (350 per language), each with 100 candidate passages from Wikipedia and human relevance labels; nDCG@10. No dev query was used in training (one Hindi train query whose text matched a dev query was dropped; no English training question matched one). We evaluated two versions on it (v1, then v2 with English data) and released the better one, so it is not fully untouched; no other settings were tuned on it. MIRACL's test labels are not public.
| Model | Params | Native-script queries (hi / bn / te) | Romanized queries (hi / bn / te) | English |
|---|---|---|---|---|
| altslate/indic-rerank-small (v2) | 140M | 0.813 (0.696 / 0.819 / 0.924) | 0.772 (0.624 / 0.777 / 0.914) | 0.693 |
| previous revision (v1, no English data) | 140M | 0.806 (0.693 / 0.811 / 0.914) | 0.756 (0.614 / 0.763 / 0.892) | 0.645 |
| BAAI/bge-reranker-v2-m3 (teacher) | 568M | 0.857 (0.754 / 0.859 / 0.958) | 0.560 (0.483 / 0.503 / 0.695) | 0.746 |
| cross-encoder/mmarco-mMiniLMv2-L12-H384-v1 | 118M | 0.774 (0.676 / 0.754 / 0.892) | 0.264 (0.175 / 0.189 / 0.429) | 0.680 |
| no reranking (candidates in their given order) | – | 0.565 | 0.565 | 0.420 |
- Romanized queries are the MIRACL queries romanized word by word by the dictionary + rule romanizer used to make the training data (a different random seed). This favours our model; we have no human-romanized test queries. Telugu romanized queries lose little (0.914 vs 0.924); Hindi loses most (0.624 vs 0.696).
- English: slightly better than mMiniLM (0.693 vs 0.680), below the teacher (0.746). For English-only search a dedicated English reranker will do better.
Known limitations
- Query and passage must be in the same language (a romanized query with a native-script passage of that language is fine). All training pairs were same-language, and cross-language pairs score near zero even when the passage is an exact translation (in a quick test, a romanized Hindi query scored 0.00 against the Bengali translation of its answer). For cross-language search, use the first-stage scores of a multilingual embedder such as indic-embed-small instead.
- Trained only on Hindi, Bengali and Telugu queries (the Indian languages in MIRACL). Other Indian languages are untested; the base model has seen them in pre-training, but expect lower quality.
- Below its teacher on native-script queries (0.813 vs 0.857) and English (0.693 vs 0.746); the teacher is 4× larger.
- Training passages are Wikipedia paragraphs; chat-style or product-search text is untested.
- Queries were romanized by rules and dictionaries, not typed by people, so heavy abbreviation or unusual spellings are less covered.
- Inputs longer than 384 tokens (query + passage) are truncated.
Training
- Queries: MIRACL train topics for Hindi (1,168), Bengali (1,631) and Telugu (3,452); 189 of them held out for checks.
- Candidates per query: the passages MIRACL annotators judged (relevant and not relevant) plus the top 30 passages that altslate/indic-embed-small retrieves from that language's MIRACL Wikipedia corpus.
- Targets: bge-reranker-v2-m3 scores for each (native-script query, passage) pair.
- Inputs: each query is shown in native script (35%), fully romanized (50%) or half romanized (15%), always with the teacher's scores for the native-script query.
- English (v2): 6,000 questions from sentence-transformers/natural-questions (Natural Questions, CC BY-SA 3.0), each with its answer passage plus the top 30 of ~75k NQ passages retrieved by indic-embed-small, scored by the teacher; v2 continued v1 for 3,000 steps (lr 2e-5) on the Indic and English lists together.
- Loss: listwise KL divergence between the softmax of the teacher's and the model's scores over each query's candidates (16 per query), plus 0.1 × MSE on the raw scores. v1: 6,000 steps of 16 queries, AdamW, lr 3e-5, about 3.7 hours on one NVIDIA DGX Spark (GB10); v2: 3,000 more steps, about 1.9 hours. No text was generated by a language model.
| Data | Used for | License |
|---|---|---|
| miracl/miracl train topics and qrels, miracl/miracl-corpus (hi, bn, te) | queries, passages | Apache-2.0 (passages from Wikipedia, CC BY-SA) |
| sentence-transformers/natural-questions | English questions and passages (v2) | CC BY-SA 3.0 (Natural Questions) |
| mteb/MIRACLReranking (dev) | testing only | CC BY-SA 4.0 |
| Aksharantar word pairs, Dakshina romanization lexicons (train splits) | romanizing queries | CC0 / CC-BY 4.0; CC BY-SA 4.0 |
Code: github.com/AltSlate-Labs/indic-chat-toolkit (src/rerank/).
License
Apache-2.0. The base model (mmBERT-small) is MIT-licensed; the teacher (bge-reranker-v2-m3) is Apache-2.0.
Citation
Please cite MIRACL (Zhang et al., 2023), the teacher and the base model.