Instructions to use Bheri/ithasa-qwen3-embedding with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use Bheri/ithasa-qwen3-embedding with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("Bheri/ithasa-qwen3-embedding") sentences = [ "That is a happy person", "That is a happy dog", "That is a very happy person", "Today is a sunny day" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
English–Sanskrit Qwen3-Embedding with Mitrasamgraha
SentenceTransformer fine-tuned from Qwen/Qwen3-Embedding-0.6B 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: 1024
- Maximum input length: 2048 tokens
- Pooling: mean pooling
- Similarity: cosine
- Training objective: CachedMultipleNegativesRankingLoss with duplicate-free batches
Usage
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("Bheri/ithasa-qwen3-embedding")
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.9940 |
| Sanskrit Llama | 0.7760 |
| Translation data | 0.9770 |
| Mitrasamgraha | 0.9590 |
| Macro average | 0.92650 |
These are validation results used for checkpoint selection, not held-out test results or general semantic-search benchmark scores.
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.7790 |
| Translation data | 0.9860 |
| Mitrasamgraha | 0.9530 |
| Macro average | 0.92850 |
Evaluation identifier: 20261024T144725208700Z. The macro test accuracy is
92.850%. These are translation-retrieval
results, not a general semantic-search or NER benchmark.
Training configuration
- Learning rate: 5e-06
- Maximum epoch budget: 3; early stopping enabled
- Contrastive batch size: 128
- Cached forward mini-batch size: 4
- Seed: 42
- Selected checkpoint: step 6,500; run stopped at step 7,250 (epoch 1.523).
- Run identifier:
20261022T175131114364Z
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
- 25