Downloads · 30 days
8
12% of all-time downloads
karthikrajgopal/sanskritgemma-256
sanskritgemma-256 is a sentence similarity model from karthikrajgopal. Use it when you need a score for how close two texts are. It is set up for model2vec. The card lists the license as mit.
A Model2Vec static distillation of Ganaraj/rgveda-embedding-gemma — an embeddinggemma variant tuned on Vedic Sanskrit. Static embeddings are a lookup table: no transformer runs at inference, so encoding is ~1,000× fas…
Downloads · 30 days
8
12% of all-time downloads
All-time downloads
69
Public
Parameters
65.5M
144 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors131 MB · 91%
From the Hugging Face model README
A Model2Vec static distillation of
Ganaraj/rgveda-embedding-gemma — an
embeddinggemma variant tuned on Vedic Sanskrit. Static embeddings are a lookup table: no
transformer runs at inference, so encoding is ~1,000× faster on CPU at the cost of word order and
context.
Ganaraj/rgveda-embedding-gemmafrom model2vec import StaticModel
model = StaticModel.from_pretrained("karthikrajgopal/sanskritgemma-256")
embeddings = model.encode(["धर्मक्षेत्रे कुरुक्षेत्रे", "the field of dharma"])
Measured on the complete Bhagavad Gītā — 701 verses indexed as Devanagari only, queried by their IAST transliteration and by two independent published English translations. An English query is therefore genuine cross-lingual retrieval with no leakage. Scores are MRR@10.
| model | teacher | dims | IAST | EN close | EN free | mean |
|---|---|---|---|---|---|---|
| potion-multilingual-128M | — | 256 | 0.647 | 0.265 | 0.233 | 0.536 |
| distilled-embeddinggemma | embeddinggemma-300m | 256 | 0.684 | 0.251 | 0.205 | 0.535 |
| (same teacher, 512d) | embeddinggemma-300m | 512 | 0.677 | 0.243 | 0.203 | 0.531 |
| sanskritgemma-256 | rgveda-embedding-gemma | 256 | 0.656 | 0.317 | 0.249 | 0.555 |
The teacher is the lever, not the width. Doubling the general embeddinggemma distillation to 512 dims made it worse; re-distilling from a Sanskrit-tuned teacher at 256 dims moved English-close retrieval from 0.251 to 0.317.
| width | size | mean MRR |
|---|---|---|
| 256 | 131 MB | 0.555 |
| 384 | 196 MB | 0.561 |
| 512 | 262 MB | 0.563 |
| 768 | 393 MB | 0.565 |
256 reaches 98% of 768's quality at a third of the disk, which is why this is the width worth publishing.
This model is strongest where the encoder is doing the retrieval: flat chunk search, an ANN-only path, or a transliteration-heavy corpus — its IAST top-1 (0.487) is the best of the static models tested, against potion's 0.420.
Measured inside a full retrieval stack — tree structure, section roll-up and assembled context —
potion-multilingual pulled ahead (0.238 against 0.213 mean MRR, paired bootstrap
95% CI [+0.016, +0.074] over 500 queries). Once whole sections are being assembled, what is left
for the encoder is loose English semantics, and a broadly-trained multilingual model handles that
better. Benchmark the configuration you ship, not the encoder alone.
Static pooling also cannot recover a word that sandhi or compounding has fused: dharmakṣetre is
one token. In litesearch that gap is closed outside the
encoder, by indexing lemmas and Monier-Williams glosses alongside the text.
Distilled with Model2Vec. Full evaluation, including the
paired significance test, is in litesearch's 10_sanskrit_eval notebook.
MIT, following the Model2Vec tooling. The teacher derives from Google's embeddinggemma, whose Gemma terms of use flow through — check those before redistributing derivatives.