TL;DR: This is a pretrained base MLM checkpoint: a Hindi extension of the ModernBERT architecture, trained from scratch on Hindi text. The base model is competitive with other models across tasks, and it outperforms them on retrieval after DPR fine-tuning. Checkpoint ba1157 · 8192 context · Hindi BPE vocab 50,368.
This release uses the ModernBERT architecture and training recipe, adapted for Hindi with a new tokenizer and ~28B tokens of Hindi pretraining.
Model summary
Type
Base MLM checkpoint (pretrained, not task fine-tuned)
Architecture
ModernBERT (ModernBertForMaskedLM)
Initialization
Megatron init (full_megatron); pretrained from scratch on Hindi
Parameters
~188M
Layers
22
Hidden size
768
Attention heads
12
Vocab size
50,368
Max sequence length
8192
Languages
Hindi (hi)
Pretraining tokens
~23.6B (Sangraha) + ~4.85B (IndicCorp V2)
Hardware
1× NVIDIA RTX 4090 (24 GB)
Training time
5 days
Transformers
>=5.12.0
Eval summary
hindi-modernBERT is competitive on supervised Hindi understanding tasks and is the strongest model in this comparison on retrieval after DPR fine-tuning.
Area
Benchmark
Score
NER
Naamapadam Hindi F1
0.8001
Intent
MASSIVE Hindi Macro-F1
0.4731
Retrieval
mMARCO Hindi nDCG@10
0.2825
Retrieval
MLDR hi nDCG@10
0.2635
Checkpoint folders
The repository root contains the main ba1157 release. Earlier checkpoints are also available in subfolders:
Apply Devanagari script normalisation + NFKC before tokenization for best results. See the training repo for preprocess_for_tokenizer().
For dense retrieval, fine-tune this base checkpoint with the DPR recipe on Hindi mMARCO triples. The training entrypoint is scripts/run_retrieval_finetune.py:
make retrieval-finetune ARGS="retrieval_ft.backbone=kkkamur07/hindi-modernbert retrieval_ft.max_seq_length=8192"
Retrieval uses a DPR fine-tuned checkpoint built from this base checkpoint.
After DPR fine-tuning on 1.25M mMARCO Hindi triplets, hindi-modernBERT outperforms the other Hindi baselines on both full mMARCO Hindi and long-document MLDR hi.
Model
Max seq
mMARCO nDCG@10
MLDR hi nDCG@10
hindi-modernBERT
8192
0.2825
0.2635
mmBERT-small
8192
0.2714
0.2337
IndicBERTv2-MLM-only
512
0.2821
0.1707
The 8192-token backbone is what separates hindi-modernBERT on long-document MLDR: IndicBERTv2 is close on short mMARCO but falls behind on MLDR hi because it cannot encode full long documents. These are DPR numbers, one vector per document.
Full retrieval benchmarks (DPR, 8192 context):
Benchmark
What it measures
nDCG@10
Recall@10
MRR@10
Selection (1k mMARCO Hindi)
Small held-out Hindi mMARCO validation split used to select the DPR learning rate/checkpoint. Not the final headline benchmark.
Hindi long-document retrieval benchmark. Tests whether the 8192-token context helps retrieve long documents.
0.2635
0.3900
0.2252
Metric glossary: nDCG@10 measures ranking quality in the top 10, Recall@10 measures whether relevant passages appear in the top 10, and MRR@10 measures how high the first relevant result appears.
1@misc{hindi-modernbert2026,
2 title = {hindi-modernBERT: A Hindi ModernBERT Encoder with 8192 Context},
3 author = {Krrish Agarwalla},
4 year = {2026},
5 note = {Checkpoint ba1157. Base MLM; trained from scratch on Hindi.}
6}
bibtex
1@article{modernbert2024,
2 title = {Smarter, Better, Faster, Longer: A Modern Bidirectional Encoder for Fast, Memory Efficient, and Long Context Finetuning and Inference},
3 author = {Warner, Benjamin and Chizhov, Anton and Ermolaev, Alexander and others},
4 journal = {arXiv preprint arXiv:2412.13663},
5 year = {2024}
6}