English–Sanskrit mmBERT with Mitrasamgraha

SentenceTransformer fine-tuned from jhu-clsp/mmBERT-base on cleaned English–Sanskrit parallel text, including all retained Mitrasamgraha training pairs. This run starts from the pretrained base encoder; it does not continue the earlier v2/v3 models.

  • Embedding dimension: 768
  • Maximum input length: 256 tokens
  • Pooling: mean pooling
  • Similarity: cosine
  • Training objective: CachedMultipleNegativesRankingLoss with duplicate-free batches

Usage

from sentence_transformers import SentenceTransformer

model = SentenceTransformer("Bheri/ithasa-mmbert-mitrasamgraha")
sentences = ["The teacher speaks.", "गुरुः वदति।"]
embeddings = model.encode(sentences, normalize_embeddings=True)
print(embeddings @ embeddings.T)

Training data

609,187 training pairs. Source files were normalized, checked for structural and script problems, deduplicated, and separated from validation and test by normalized sentence identity. Mitrasamgraha uses the original source split assignments. Unfiltered NLLB was excluded.

Source Training pairs
Mitrasamgraha 376,925
Translation data 120,557
BPCC 94,441
Sanskrit Llama 17,264

Script and length filtering do not certify the semantic correctness of every translation. One representative per sentence side was retained for contrastive training. Raw source datasets were preserved locally.

Validation results

Validation contains 2,000 pairs: 500 per source. Each source is evaluated separately with a 500-candidate translation pool, in both English-to-Sanskrit and Sanskrit-to-English directions. Values below average the two directions.

Source Mean bidirectional accuracy
BPCC 0.9970
Sanskrit Llama 0.7600
Translation data 0.9690
Mitrasamgraha 0.9500
Macro average 0.91900

These are validation results used for checkpoint selection, not held-out test results or general semantic-search benchmark scores. Against the separately trained three-source control, adding Mitrasamgraha changed its validation accuracy from 0.867 to 0.950, while Sanskrit Llama changed from 0.801 to 0.760. Macro accuracy changed from 0.90800 to 0.91900.

Held-out test results

Evaluated on 2,000 separate test pairs, 500 per source, using a separate 500-candidate pool per source and both translation-retrieval directions. These records were excluded from training and checkpoint selection.

Source Mean bidirectional accuracy
BPCC 0.9960
Sanskrit Llama 0.7610
Translation data 0.9720
Mitrasamgraha 0.9460
Macro average 0.91875

Evaluation identifier: 20261022T161322171678Z. The macro test accuracy is 91.875%. These are translation-retrieval results, not a general semantic-search or NER benchmark.

Training configuration

  • Learning rate: 2e-05
  • Maximum epoch budget: 3; early stopping enabled
  • Contrastive batch size: 128
  • Cached forward mini-batch size: 16
  • Seed: 42
  • Selected checkpoint: step 6,500; run stopped at step 7,250 (epoch 1.523).
  • Run identifier: 20261021T174520772832Z

The validation gate compares against the starting base model. Passing it does not establish superiority over the trained control. Assess the per-source results and your actual retrieval queries when selecting a deployment model.

Downloads last month
30
Safetensors
Model size
0.3B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Bheri/ithasa-mmbert-mitrasamgraha

Finetuned
(199)
this model