Text Generation
Transformers
Safetensors
Sanskrit
sansar
sanskrit
devanagari
slp1
causal-lm
base-model
custom_code
Eval Results (legacy)
Run this model with HF Jobs
Run MuseMesh/sansar-350m on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/MuseMesh/sansar-350m. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/MuseMesh/sansar-350m on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/MuseMesh/sansar-350m. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/MuseMesh/sansar-350m. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use MuseMesh/sansar-350m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MuseMesh/sansar-350m with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="MuseMesh/sansar-350m", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("MuseMesh/sansar-350m", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use MuseMesh/sansar-350m with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "MuseMesh/sansar-350m" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MuseMesh/sansar-350m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/MuseMesh/sansar-350m
- SGLang
How to use MuseMesh/sansar-350m with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "MuseMesh/sansar-350m" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MuseMesh/sansar-350m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "MuseMesh/sansar-350m" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MuseMesh/sansar-350m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use MuseMesh/sansar-350m with Docker Model Runner:
docker model run hf.co/MuseMesh/sansar-350m
v0.2.0: F9 (ex-Gita 0.5547, clean_v1 0.5773)
Browse filesFiles changed (11)
- CHANGELOG.md+6
- README.md+35-34
- eval/bpb.json+21-21
- eval/bpb_clean_v1.json+21-21
- eval/smoke_test.json+5-5
- eval/verification.json+38-38
- eval/verse_scores.json+23-23
- model.safetensors+2-2
- training/cloud.json+4-4
- training/data_meta.json+68-68
- training/summary.json+366-23
1 unmodified line2345671 unmodified lineVersions are git tags on this repository (`v0.1.0`, ...). Load a fixed version with `from_pretrained("MuseMesh/sansar-350m", revision="v0.1.0", trust_remote_code=True)`.## v0.1.0 (2026-10-03)- Weights of training run `f7_slp1_uni8k_d350m_plus_clean_2x` (experiment F7: 350M at F6-clean-2x data and steps), step 54,212, 2.66B tokens.1 unmodified line23456789101112131 unmodified lineVersions are git tags on this repository (`v0.1.0`, ...). Load a fixed version with `from_pretrained("MuseMesh/sansar-350m", revision="v0.1.0", trust_remote_code=True)`.## v0.2.0 (2026-10-04)- Weights of training run `f9_slp1_uni8k_d350m_plus_all_3x` (experiment F9: 350M, F7 recipe on the full F9 slice at three passes), step 103,527, 5.09B tokens.- Held-out ex-Gītā 0.5547 bits per Devanagari byte, clean_v1 0.5773.- Against v0.1.0: ex-Gītā -3.03%, clean_v1 -2.77%; same architecture and recipe, more data (+71.6M words) and 3 passes instead of 1.84.## v0.1.0 (2026-10-03)- Weights of training run `f7_slp1_uni8k_d350m_plus_clean_2x` (experiment F7: 350M at F6-clean-2x data and steps), step 54,212, 2.66B tokens.
25 unmodified lines26272829303132333435363738394041424344454647484950515253545556575859606162632 unmodified lines66676869707172735 unmodified lines798081828384858687888990919 unmodified lines1011021031041051061076 unmodified lines1141151161171181191201211221231241251261271281291301311321331341351361371381391407 unmodified lines1481491501511521531541551561576 unmodified lines1641651661671681691701711721731741751761771781791801818 unmodified lines19019119219319419519619719819920030 unmodified lines23123223323423523623725 unmodified linesmetrics:- type: bits_per_bytename: "bits per Devanagari byte, pooled excluding the Bhagavad-gītā (E0 held-out sets)"value: 0.572- type: bits_per_bytename: "bits per Devanagari byte, pooled over all five E0 sets"value: 0.5568- type: bits_per_bytename: "bits per Devanagari byte, dcs_gold"value: 0.5757- type: bits_per_bytename: "bits per Devanagari byte, prose"value: 0.5577- type: bits_per_bytename: "bits per Devanagari byte, ood"value: 0.573- type: bits_per_bytename: "bits per Devanagari byte, vedic"value: 0.7052- type: bits_per_bytename: "bits per Devanagari byte, gita"value: 0.1552- type: bits_per_bytename: "bits per Devanagari byte, pooled excluding the Bhagavad-gītā (clean_v1 sets)"value: 0.5937---# Sansar 350MA 318.4M-parameter Sanskrit language model trained from scratch, from the **Sansar** project at [Muse Mesh](https://muse-mesh.com) ([Hugging Face](https://huggingface.co/MuseMesh)): Sanskrit language models, their corpus and their tokenizer. Size class: the d350m preset, GPT-2-medium shape: 24 layers, width 1,024 (302.0M parameters outside the embeddings; 318.4M in total with the 8k vocabulary and untied head).- **This version: v0.1.0** = training run `f7_slp1_uni8k_d350m_plus_clean_2x`, finished 2026-10-03 (experiment F7: 350M at F6-clean-2x data and steps).- **Held-out score**: 0.5720 bits per Devanagari byte (pooled over four held-out sets, excluding the Bhagavad-gītā; lower is better); 0.5937 on the stricter clean_v1 sets.- **Base model**: it continues Devanagari Sanskrit text; it is not instruction-tuned.- **Why this checkpoint**: The first 350M run; the best model on every set when it finished.## Quick start2 unmodified linesfrom transformers import AutoModelForCausalLM, AutoTokenizerrepo = "MuseMesh/sansar-350m"tok = AutoTokenizer.from_pretrained(repo, revision="v0.1.0", trust_remote_code=True)model = AutoModelForCausalLM.from_pretrained(repo, revision="v0.1.0", trust_remote_code=True)inputs = tok("संस्कृतं नाम दैवी वाक्", return_tensors="pt") # Devanagari inout = model.generate(**inputs, max_new_tokens=50, do_sample=True, temperature=0.8, top_k=100)5 unmodified linesWhat this checkpoint wrote for that prompt (CPU, `torch.manual_seed(0)`, 50 new tokens):```textसंस्कृतं नाम दैवी वाक् संस्कृतम् उच्यते । - स्रोतस्वती हि वाक् । - दैवी वाग् एषा यत् संस्कृतम् । - या ब्राह्मी वाक् संस्कृतम् एषा ब्राह्म्```and with greedy decoding:```textसंस्कृतं नाम दैवी वाक् । असंस्कृतं तु मानुषी वागिति । असंस्कृतमिति । असंस्कृतमिति । असंस्कृतमिति । असंस्कृतमिति । असंस्कृतमिति ।```To score text instead of generating it, call the model with `labels=input_ids`; `loss` is the mean negative log-likelihood per token in nats.9 unmodified lines| MLP activation | squared ReLU || Output head | separate (untied), zero-initialised || Vocabulary | 8,000 (SentencePiece unigram over SLP1, [MuseMesh/sansar-sanskrit-tokenizer](https://huggingface.co/MuseMesh/sansar-sanskrit-tokenizer) v0.1.0) || Context | 512 tokens (about 3.6 kB of Devanagari text at the training data's 6.93 Devanagari bytes per token) || Parameters, total | 318,424,064 || Parameters, non-embedding | 302,040,064 || Token embedding | 8,192,000 |6 unmodified lines|---|---|| Optimizer, block matrices | Muon (301,989,888 params): momentum 0.95 (Nesterov), 5 Newton-Schulz steps in bf16, peak lr 0.02, update scaled by sqrt(max(1, rows/cols)), no weight decay || Optimizer, everything else | AdamW: embedding + head (16,384,000 params) with weight decay 0.1, LayerNorm gains without; peak lr 0.001, betas (0.9, 0.95), eps 1e-8 || Learning-rate schedule | linear warm-up over 500 steps, then cosine decay to 0.1 x peak at step 54,212 (Muon and AdamW share it) || Batch | 48 sequences x 2 accumulation steps x 512 tokens = 49,152 tokens per step || Steps | 54,212 || Tokens seen | 2,664,628,224 (1.84 passes over 1,444.7M training tokens) || Gradient clipping | global norm 1.0 || Dropout | 0.0 || Precision | bf16 autocast, fp32 master weights, torch.compile || Seed | 1337 || Data sampling | 512-token windows at uniformly random offsets of the token stream (records separated by `</s>`), so passes are counted in expectation || Hardware | 1x NVIDIA A100 40 GB (Google Cloud a2-highgpu-1g, spot, us-central1) || Wall time | 10.8 h of training (38,946 s), 71.7k tokens/s; 14.0 h of VM time including two restarts after a spot preemption || Compute cost | about $15 of spot GPU time for the training itself; the watcher's estimate for the whole VM time is $18.2 || Final validation | loss 2.4544 nats/token = 0.5103 bits per Devanagari byte on the run's own validation split (0.5% of records by near-duplicate cluster; not comparable across data slices) |Training code: `scripts/train/train.py`, `model.py` and `muon.py` of the Sansar repository; the exact arguments are in `training/summary.json`.## Training data`train_slice_plus_clean` (448.9M words, 15.1M records): corpus rebuild #5 without the archive.org OCR tier, plus TITUS (1.02M words) and grantha (0.99M words) with a held-out filter. After held-out masking: 15,012,243 training records, 1,444.7M tokens, 10.02 GB of Devanagari text. The run saw 2,664.6M tokens = **1.84 passes** (the same data and steps as Sansar 125M v0.1.0).Held-out texts excluded by dedup key and **masked inside training records** (28-character windows, stride 4: 153,903 records masked, 16.3M characters removed, 22,736 records dropped). The Gītā is still partly memorised through near-copies in commentaries, so it stays out of the headline number.The text comes from the Sansar corpus, which collects Sanskrit in Devanagari from public sources: classical e-text collections (GRETIL, SARIT, Muktabodha, the Digital Corpus of Sanskrit, DharmaNexus and others), Sanskrit Wikisource and Wikipedia, dictionaries, and the Sanskrit parts of web-crawl datasets (AI4Bharat Sangraha, IndicCorp, MADLAD-400, the sanskrit-monolingual-pretraining collection). Every record keeps its provenance and a licence tier (T0 permissive, T1 share-alike, T2 non-commercial, T3 no licence statement or all rights reserved). The training slice mixes all tiers: a large share is licensed for non-commercial use only and some sources state no licence, which is why the weights are released under CC BY-NC 4.0 (see Licence). Old archive.org OCR of printed books is left out (it measurably hurt the models).7 unmodified lines| | ex-Gītā (headline) | pooled, all five | dcs_gold | prose | ood | vedic | gita (memorisation) ||---|---:|---:|---:|---:|---:|---:|---:|| E0 sets (9,170 items) | **0.5720** | 0.5568 | 0.5757 | 0.5577 | 0.5730 | 0.7052 | 0.1552 || clean_v1 (8,270 items) | **0.5937** | 0.5727 | 0.5788 | 0.5708 | 0.6036 | 0.7067 | 0.1621 |**Verse completion** (600 verses: 200 each from the Bhagavad-gītā, Mahābhārata and Rāmāyaṇa; the model gets the first half-verse and greedily writes the second, stopping at ॥ or a newline): chrF 0.127, exact match 1/600. chrF credits shared character n-grams, so it rewards plausible vocabulary even when the half-verse is not the right one.**clean_v1** (added 2026-10-04): the same five sets minus every item that could overlap the training text in a way the held-out masking could not see. Some training text types the visarga as an ASCII colon (":" for "ः"); both the held-out mask and the leak gate ignored ":", so a 16-character window of a held-out item could survive inside such a record. clean_v1 removes every item with any such window in either training slice (900 of 9,170 items; mostly a shared stock phrase, rarely a real near-copy). It keeps 8,270 items; `ood` loses half its bytes and reads harder, so compare clean_v1 numbers only with clean_v1 numbers.6 unmodified lines| [Sansar 20M](https://huggingface.co/MuseMesh/sansar-20m) v0.1.0 | 27.1M | 0.7177 | n/a | TOK-v3 screen, arm v0.1, 0.34B tokens || [Sansar 60M](https://huggingface.co/MuseMesh/sansar-60m) v0.1.0 | 63.2M | 0.6434 | n/a | F0, 1.34B tokens || [Sansar 125M](https://huggingface.co/MuseMesh/sansar-125m) v0.1.0 | 97.2M | 0.6039 | 0.6254 | F6-clean-2x, 2.66B tokens || [Sansar 350M](https://huggingface.co/MuseMesh/sansar-350m) v0.1.0 (this model) | 318.4M | 0.5720 | 0.5937 | F7, 2.66B tokens || [Sansar 350M](https://huggingface.co/MuseMesh/sansar-350m) v0.2.0 | 318.4M | 0.5547 | 0.5773 | F9, 5.09B tokens || Krutrim-2-instruct (zero-shot, nf4) | 12B | 0.512 | n/a | general model, 2,048-token window || Sarvam-1 (zero-shot, fp16) | 2.5B | 0.750 | n/a | general model, 2,048-token window || Gemma 4 E2B (zero-shot, fp16) | 4B | 0.892 | n/a | general model, 2,048-token window |### Checked before release- `modeling_sansar.py` against the training code (`scripts/train/model.py`), fp32 on CPU, 6 inputs (one held-out text per set, cropped to 512 tokens, and 512 random ids): with the same bf16 weights the logits are identical (max |difference| 0.0e+00); against the fp32 training weights the bf16 storage moves logits by at most 0.162.- Bits per byte on the first 20 records of each set with `eval_bpb.py`'s own scoring: 0.52258 (training checkpoint, fp32) vs 0.52251 (this repo, bf16 weights) = -0.0141%.- Tokenizer: the same ids as the evaluation pipeline on 100/100 sample texts with `fence_latin=False` (95/100 with the default fence; the rest contain English words); Devanagari round trip exact on 100/100.- Left-padded batches give the same logits as single sequences (max |difference| 2.7e-05).## Limitations8 unmodified lines## VersionsEach version is a git tag on this repository; `main` is the newest. Pin one with `revision="v0.1.0"`. A version is one training run, named by its run id in the Sansar experiment log.| version | date | training run | tokens seen | ex-Gītā | clean_v1 ex-Gītā ||---|---|---|---:|---:|---:|| v0.1.0 | 2026-10-03 | `f7_slp1_uni8k_d350m_plus_clean_2x` (F7) | 2.66B | 0.5720 | 0.5937 |All runs of this size (ex-Gītā on the same E0 sets):30 unmodified linestitle = {Sansar 350M: a Sanskrit language model},author = {Muse Mesh},year = {2026},note = {v0.1.0},url = {https://huggingface.co/MuseMesh/sansar-350m}}```25 unmodified lines26272829303132333435363738394041424344454647484950515253545556575859606162632 unmodified lines66676869707172735 unmodified lines798081828384858687888990919 unmodified lines1011021031041051061076 unmodified lines1141151161171181191201211221231241251261271281291301311321331341351361371381391407 unmodified lines1481491501511521531541551561576 unmodified lines1641651661671681691701711721731741751761771781791801818 unmodified lines19019119219319419519619719819920020130 unmodified lines23223323423523623723825 unmodified linesmetrics:- type: bits_per_bytename: "bits per Devanagari byte, pooled excluding the Bhagavad-gītā (E0 held-out sets)"value: 0.5547- type: bits_per_bytename: "bits per Devanagari byte, pooled over all five E0 sets"value: 0.5394- type: bits_per_bytename: "bits per Devanagari byte, dcs_gold"value: 0.5687- type: bits_per_bytename: "bits per Devanagari byte, prose"value: 0.5406- type: bits_per_bytename: "bits per Devanagari byte, ood"value: 0.5542- type: bits_per_bytename: "bits per Devanagari byte, vedic"value: 0.6892- type: bits_per_bytename: "bits per Devanagari byte, gita"value: 0.1367- type: bits_per_bytename: "bits per Devanagari byte, pooled excluding the Bhagavad-gītā (clean_v1 sets)"value: 0.5773---# Sansar 350MA 318.4M-parameter Sanskrit language model trained from scratch, from the **Sansar** project at [Muse Mesh](https://muse-mesh.com) ([Hugging Face](https://huggingface.co/MuseMesh)): Sanskrit language models, their corpus and their tokenizer. Size class: the d350m preset, GPT-2-medium shape: 24 layers, width 1,024 (302.0M parameters outside the embeddings; 318.4M in total with the 8k vocabulary and untied head).- **This version: v0.2.0** = training run `f9_slp1_uni8k_d350m_plus_all_3x`, finished 2026-10-04 (experiment F9: 350M, F7 recipe on the full F9 slice at three passes).- **Held-out score**: 0.5547 bits per Devanagari byte (pooled over four held-out sets, excluding the Bhagavad-gītā; lower is better); 0.5773 on the stricter clean_v1 sets.- **Base model**: it continues Devanagari Sanskrit text; it is not instruction-tuned.- **Why this checkpoint**: The best model so far: -3.0% ex-Gītā against v0.1.0 on the standard sets and -2.8% on clean_v1.## Quick start2 unmodified linesfrom transformers import AutoModelForCausalLM, AutoTokenizerrepo = "MuseMesh/sansar-350m"tok = AutoTokenizer.from_pretrained(repo, revision="v0.2.0", trust_remote_code=True)model = AutoModelForCausalLM.from_pretrained(repo, revision="v0.2.0", trust_remote_code=True)inputs = tok("संस्कृतं नाम दैवी वाक्", return_tensors="pt") # Devanagari inout = model.generate(**inputs, max_new_tokens=50, do_sample=True, temperature=0.8, top_k=100)5 unmodified linesWhat this checkpoint wrote for that prompt (CPU, `torch.manual_seed(0)`, 50 new tokens):```textसंस्कृतं नाम दैवी वाक् । तस्मिस्तु संस्कृते शब्दे संवृत्ते हि सति संस्कृतं नाम दैवी वाग्भवति । तस्मान्मकाराकारे ओङ्कारे प्रतिष्ठित इति ।। ।। इति एकोनवि```and with greedy decoding:```textसंस्कृतं नाम दैवी वाक् । अस्या अर्थः - अस्याः संस्कृतभाषायाः अर्थः - अभिधेयः । अर्थः - अभिधेयः । अर्थः - प्रयोजनं ।```To score text instead of generating it, call the model with `labels=input_ids`; `loss` is the mean negative log-likelihood per token in nats.9 unmodified lines| MLP activation | squared ReLU || Output head | separate (untied), zero-initialised || Vocabulary | 8,000 (SentencePiece unigram over SLP1, [MuseMesh/sansar-sanskrit-tokenizer](https://huggingface.co/MuseMesh/sansar-sanskrit-tokenizer) v0.1.0) || Context | 512 tokens (about 3.6 kB of Devanagari text at the training data's 6.94 Devanagari bytes per token) || Parameters, total | 318,424,064 || Parameters, non-embedding | 302,040,064 || Token embedding | 8,192,000 |6 unmodified lines|---|---|| Optimizer, block matrices | Muon (301,989,888 params): momentum 0.95 (Nesterov), 5 Newton-Schulz steps in bf16, peak lr 0.02, update scaled by sqrt(max(1, rows/cols)), no weight decay || Optimizer, everything else | AdamW: embedding + head (16,384,000 params) with weight decay 0.1, LayerNorm gains without; peak lr 0.001, betas (0.9, 0.95), eps 1e-8 || Learning-rate schedule | linear warm-up over 500 steps, then cosine decay to 0.1 x peak at step 103,527 (Muon and AdamW share it) || Batch | 48 sequences x 2 accumulation steps x 512 tokens = 49,152 tokens per step || Steps | 103,527 || Tokens seen | 5,088,559,104 (3.00 passes over 1,696.2M training tokens) || Gradient clipping | global norm 1.0 || Dropout | 0.0 || Precision | bf16 autocast, fp32 master weights, torch.compile || Seed | 1337 || Data sampling | 512-token windows at uniformly random offsets of the token stream (records separated by `</s>`), so passes are counted in expectation || Hardware | 1x NVIDIA A100 40 GB (Google Cloud a2-highgpu-1g, spot, us-central1) || Wall time | 20.5 h (73,701 s), 71.7k tokens/s, no preemptions || Compute cost | about $27 of spot GPU time (watcher estimate $26.7 at $1.30/h) || Final validation | loss 2.4171 nats/token = 0.5033 bits per Devanagari byte on the run's own validation split (0.5% of records by near-duplicate cluster; not comparable across data slices) |Training code: `scripts/train/train.py`, `model.py` and `muon.py` of the Sansar repository; the exact arguments are in `training/summary.json`.## Training data`train_slice_plus_all` (520.4M words, 15.2M records) = the v0.1.0 data (448.9M words) plus 71.6M words of leak-gated additions: tier 10 git-hosted e-texts 60.4M (vishvAsa, the e-Bhāratī GitHub copy, ACIP, DSBC, Wikibooks/Wikiquote, ...), repaired core text 3.8M, sanskritdocuments.org 2.8M, All India Radio Sanskrit news 1.1M, school textbooks 1.0M, Google-Vision re-OCR of 9 books 1.5M, and smaller sources. After held-out masking: 15,113,203 training records, 1,696.2M tokens, 11.77 GB of Devanagari text. The run saw 5,088.6M tokens = **3.0 passes**.Held-out texts excluded by dedup key and **masked inside training records** (28-character windows, stride 4); every addition passed an independent leak gate (0 held-out items per set). After training, a blind spot was found: text that types the visarga as ASCII ":" hides overlaps from both the mask and the gate. The `clean_v1` columns below re-score on the held-out items with any such overlap removed; F9 keeps about 91% of its gain there.The text comes from the Sansar corpus, which collects Sanskrit in Devanagari from public sources: classical e-text collections (GRETIL, SARIT, Muktabodha, the Digital Corpus of Sanskrit, DharmaNexus and others), Sanskrit Wikisource and Wikipedia, dictionaries, and the Sanskrit parts of web-crawl datasets (AI4Bharat Sangraha, IndicCorp, MADLAD-400, the sanskrit-monolingual-pretraining collection). Every record keeps its provenance and a licence tier (T0 permissive, T1 share-alike, T2 non-commercial, T3 no licence statement or all rights reserved). The training slice mixes all tiers: a large share is licensed for non-commercial use only and some sources state no licence, which is why the weights are released under CC BY-NC 4.0 (see Licence). Old archive.org OCR of printed books is left out (it measurably hurt the models).7 unmodified lines| | ex-Gītā (headline) | pooled, all five | dcs_gold | prose | ood | vedic | gita (memorisation) ||---|---:|---:|---:|---:|---:|---:|---:|| E0 sets (9,170 items) | **0.5547** | 0.5394 | 0.5687 | 0.5406 | 0.5542 | 0.6892 | 0.1367 || clean_v1 (8,270 items) | **0.5773** | 0.5562 | 0.5719 | 0.5542 | 0.5847 | 0.6912 | 0.1436 |**Verse completion** (600 verses: 200 each from the Bhagavad-gītā, Mahābhārata and Rāmāyaṇa; the model gets the first half-verse and greedily writes the second, stopping at ॥ or a newline): chrF 0.125, exact match 0/600. chrF credits shared character n-grams, so it rewards plausible vocabulary even when the half-verse is not the right one.**clean_v1** (added 2026-10-04): the same five sets minus every item that could overlap the training text in a way the held-out masking could not see. Some training text types the visarga as an ASCII colon (":" for "ः"); both the held-out mask and the leak gate ignored ":", so a 16-character window of a held-out item could survive inside such a record. clean_v1 removes every item with any such window in either training slice (900 of 9,170 items; mostly a shared stock phrase, rarely a real near-copy). It keeps 8,270 items; `ood` loses half its bytes and reads harder, so compare clean_v1 numbers only with clean_v1 numbers.6 unmodified lines| [Sansar 20M](https://huggingface.co/MuseMesh/sansar-20m) v0.1.0 | 27.1M | 0.7177 | n/a | TOK-v3 screen, arm v0.1, 0.34B tokens || [Sansar 60M](https://huggingface.co/MuseMesh/sansar-60m) v0.1.0 | 63.2M | 0.6434 | n/a | F0, 1.34B tokens || [Sansar 125M](https://huggingface.co/MuseMesh/sansar-125m) v0.1.0 | 97.2M | 0.6039 | 0.6254 | F6-clean-2x, 2.66B tokens || [Sansar 350M](https://huggingface.co/MuseMesh/sansar-350m) v0.1.0 | 318.4M | 0.5720 | 0.5937 | F7, 2.66B tokens || [Sansar 350M](https://huggingface.co/MuseMesh/sansar-350m) v0.2.0 (this model) | 318.4M | 0.5547 | 0.5773 | F9, 5.09B tokens || Krutrim-2-instruct (zero-shot, nf4) | 12B | 0.512 | n/a | general model, 2,048-token window || Sarvam-1 (zero-shot, fp16) | 2.5B | 0.750 | n/a | general model, 2,048-token window || Gemma 4 E2B (zero-shot, fp16) | 4B | 0.892 | n/a | general model, 2,048-token window |### Checked before release- `modeling_sansar.py` against the training code (`scripts/train/model.py`), fp32 on CPU, 6 inputs (one held-out text per set, cropped to 512 tokens, and 512 random ids): with the same bf16 weights the logits are identical (max |difference| 0.0e+00); against the fp32 training weights the bf16 storage moves logits by at most 0.217.- Bits per byte on the first 20 records of each set with `eval_bpb.py`'s own scoring: 0.50865 (training checkpoint, fp32) vs 0.50870 (this repo, bf16 weights) = +0.0100%.- Tokenizer: the same ids as the evaluation pipeline on 100/100 sample texts with `fence_latin=False` (95/100 with the default fence; the rest contain English words); Devanagari round trip exact on 100/100.- Left-padded batches give the same logits as single sequences (max |difference| 5.0e-05).## Limitations8 unmodified lines## VersionsEach version is a git tag on this repository; `main` is the newest. Pin one with `revision="v0.2.0"`. A version is one training run, named by its run id in the Sansar experiment log.| version | date | training run | tokens seen | ex-Gītā | clean_v1 ex-Gītā ||---|---|---|---:|---:|---:|| v0.1.0 | 2026-10-03 | `f7_slp1_uni8k_d350m_plus_clean_2x` (F7) | 2.66B | 0.5720 | 0.5937 || v0.2.0 | 2026-10-04 | `f9_slp1_uni8k_d350m_plus_all_3x` (F9) | 5.09B | 0.5547 | 0.5773 |All runs of this size (ex-Gītā on the same E0 sets):30 unmodified linestitle = {Sansar 350M: a Sanskrit language model},author = {Muse Mesh},year = {2026},note = {v0.2.0},url = {https://huggingface.co/MuseMesh/sansar-350m}}```
1234563 unmodified lines1011121314151610 unmodified lines2728293031323334351 unmodified line3738394041424344451 unmodified line4748495051525354551 unmodified line5758596061626364651 unmodified line6768697071727374757677787980818283{"arm": "slp1_uni8k_d350m_plus_clean_2x","ckpt": "/home/kushal/sansar/data/experiments/train/runs/f7_slp1_uni8k_d350m_plus_clean_2x/ckpt.pt","tokenizer": "/home/kushal/sansar/data/experiments/tok/e2/spm_slp1_unigram_8000_v2.model","vocab_size": 8000,"transliterate": "slp1",3 unmodified lines"denominator": "bytes_deva_utf8","block": 512,"stride": 256,"step": 54212,"param_counts": {"total": 318424064,"embedding": 8192000,10 unmodified lines"tokens": 49763,"tokens_scored": 49762,"bytes_deva_utf8": 370794,"nll_nats": 147964.897,"bpb": 0.57571,"nll_per_token": 2.97345,"bytes_deva_per_token": 7.4512},"gita": {1 unmodified line"tokens": 22518,"tokens_scored": 22517,"bytes_deva_utf8": 166845,"nll_nats": 17953.693,"bpb": 0.15524,"nll_per_token": 0.79734,"bytes_deva_per_token": 7.4094},"ood": {1 unmodified line"tokens": 425704,"tokens_scored": 425703,"bytes_deva_utf8": 2921851,"nll_nats": 1160484.781,"bpb": 0.573,"nll_per_token": 2.72604,"bytes_deva_per_token": 6.8636},"prose": {1 unmodified line"tokens": 145348,"tokens_scored": 145347,"bytes_deva_utf8": 1015536,"nll_nats": 392596.977,"bpb": 0.55773,"nll_per_token": 2.7011,"bytes_deva_per_token": 6.9869},"vedic": {1 unmodified line"tokens": 16714,"tokens_scored": 16713,"bytes_deva_utf8": 77606,"nll_nats": 37933.642,"bpb": 0.70519,"nll_per_token": 2.26971,"bytes_deva_per_token": 4.6432}},"pooled": {"tokens": 660047,"bytes_deva_utf8": 4552632,"nll_nats": 1756933.99,"bpb": 0.55676},"seconds": 71.7}1234563 unmodified lines1011121314151610 unmodified lines2728293031323334351 unmodified line3738394041424344451 unmodified line4748495051525354551 unmodified line5758596061626364651 unmodified line6768697071727374757677787980818283{"arm": "slp1_uni8k_d350m_plus_all_3x","ckpt": "/home/kushal/sansar/data/experiments/train/runs/f9_slp1_uni8k_d350m_plus_all_3x/ckpt.pt","tokenizer": "/home/kushal/sansar/data/experiments/tok/e2/spm_slp1_unigram_8000_v2.model","vocab_size": 8000,"transliterate": "slp1",3 unmodified lines"denominator": "bytes_deva_utf8","block": 512,"stride": 256,"step": 103527,"param_counts": {"total": 318424064,"embedding": 8192000,10 unmodified lines"tokens": 49763,"tokens_scored": 49762,"bytes_deva_utf8": 370794,"nll_nats": 146155.688,"bpb": 0.56867,"nll_per_token": 2.93709,"bytes_deva_per_token": 7.4512},"gita": {1 unmodified line"tokens": 22518,"tokens_scored": 22517,"bytes_deva_utf8": 166845,"nll_nats": 15810.887,"bpb": 0.13672,"nll_per_token": 0.70218,"bytes_deva_per_token": 7.4094},"ood": {1 unmodified line"tokens": 425704,"tokens_scored": 425703,"bytes_deva_utf8": 2921851,"nll_nats": 1122476.182,"bpb": 0.55423,"nll_per_token": 2.63676,"bytes_deva_per_token": 6.8636},"prose": {1 unmodified line"tokens": 145348,"tokens_scored": 145347,"bytes_deva_utf8": 1015536,"nll_nats": 380543.803,"bpb": 0.54061,"nll_per_token": 2.61817,"bytes_deva_per_token": 6.9869},"vedic": {1 unmodified line"tokens": 16714,"tokens_scored": 16713,"bytes_deva_utf8": 77606,"nll_nats": 37071.39,"bpb": 0.68916,"nll_per_token": 2.21812,"bytes_deva_per_token": 4.6432}},"pooled": {"tokens": 660047,"bytes_deva_utf8": 4552632,"nll_nats": 1702057.95,"bpb": 0.53937},"seconds": 72.0}
1234563 unmodified lines1011121314151610 unmodified lines2728293031323334351 unmodified line3738394041424344451 unmodified line4748495051525354551 unmodified line5758596061626364651 unmodified line6768697071727374757677787980818283{"arm": "slp1_uni8k_d350m_plus_clean_2x","ckpt": "/home/kushal/sansar/data/experiments/train/runs/f7_slp1_uni8k_d350m_plus_clean_2x/ckpt.pt","tokenizer": "/home/kushal/sansar/data/experiments/tok/e2/spm_slp1_unigram_8000_v2.model","vocab_size": 8000,"transliterate": "slp1",3 unmodified lines"denominator": "bytes_deva_utf8","block": 512,"stride": 256,"step": 54212,"param_counts": {"total": 318424064,"embedding": 8192000,10 unmodified lines"tokens": 48533,"tokens_scored": 48532,"bytes_deva_utf8": 361250,"nll_nats": 144923.816,"bpb": 0.57877,"nll_per_token": 2.98615,"bytes_deva_per_token": 7.4434},"gita": {1 unmodified line"tokens": 18174,"tokens_scored": 18173,"bytes_deva_utf8": 134396,"nll_nats": 15097.492,"bpb": 0.16207,"nll_per_token": 0.83076,"bytes_deva_per_token": 7.395},"ood": {1 unmodified line"tokens": 216526,"tokens_scored": 216525,"bytes_deva_utf8": 1436488,"nll_nats": 600972.451,"bpb": 0.60357,"nll_per_token": 2.77553,"bytes_deva_per_token": 6.6343},"prose": {1 unmodified line"tokens": 109703,"tokens_scored": 109702,"bytes_deva_utf8": 757787,"nll_nats": 299795.612,"bpb": 0.57076,"nll_per_token": 2.73282,"bytes_deva_per_token": 6.9076},"vedic": {1 unmodified line"tokens": 16520,"tokens_scored": 16519,"bytes_deva_utf8": 76667,"nll_nats": 37555.04,"bpb": 0.7067,"nll_per_token": 2.27345,"bytes_deva_per_token": 4.6409}},"pooled": {"tokens": 409456,"bytes_deva_utf8": 2766588,"nll_nats": 1098344.412,"bpb": 0.57275},"seconds": 44.7}1234563 unmodified lines1011121314151610 unmodified lines2728293031323334351 unmodified line3738394041424344451 unmodified line4748495051525354551 unmodified line5758596061626364651 unmodified line6768697071727374757677787980818283{"arm": "slp1_uni8k_d350m_plus_all_3x","ckpt": "/home/kushal/sansar/data/experiments/train/runs/f9_slp1_uni8k_d350m_plus_all_3x/ckpt.pt","tokenizer": "/home/kushal/sansar/data/experiments/tok/e2/spm_slp1_unigram_8000_v2.model","vocab_size": 8000,"transliterate": "slp1",3 unmodified lines"denominator": "bytes_deva_utf8","block": 512,"stride": 256,"step": 103527,"param_counts": {"total": 318424064,"embedding": 8192000,10 unmodified lines"tokens": 48533,"tokens_scored": 48532,"bytes_deva_utf8": 361250,"nll_nats": 143204.901,"bpb": 0.57191,"nll_per_token": 2.95073,"bytes_deva_per_token": 7.4434},"gita": {1 unmodified line"tokens": 18174,"tokens_scored": 18173,"bytes_deva_utf8": 134396,"nll_nats": 13377.718,"bpb": 0.14361,"nll_per_token": 0.73613,"bytes_deva_per_token": 7.395},"ood": {1 unmodified line"tokens": 216526,"tokens_scored": 216525,"bytes_deva_utf8": 1436488,"nll_nats": 582189.057,"bpb": 0.5847,"nll_per_token": 2.68878,"bytes_deva_per_token": 6.6343},"prose": {1 unmodified line"tokens": 109703,"tokens_scored": 109702,"bytes_deva_utf8": 757787,"nll_nats": 291111.709,"bpb": 0.55423,"nll_per_token": 2.65366,"bytes_deva_per_token": 6.9076},"vedic": {1 unmodified line"tokens": 16520,"tokens_scored": 16519,"bytes_deva_utf8": 76667,"nll_nats": 36729.851,"bpb": 0.69117,"nll_per_token": 2.22349,"bytes_deva_per_token": 4.6409}},"pooled": {"tokens": 409456,"bytes_deva_utf8": 2766588,"nll_nats": 1066613.236,"bpb": 0.55621},"seconds": 44.8}
12345613 unmodified lines20212223242526272829303132333435{"size": "350m","version": "v0.1.0","transformers": "5.18.0","torch": "2.14.0+cu130","dtype_loaded": "torch.bfloat16",13 unmodified lines],"sampled_seed0": {"new_tokens": 50,"seconds": 11.1,"text": "संस्कृतं नाम दैवी वाक् संस्कृतम् उच्यते । - स्रोतस्वती हि वाक् । - दैवी वाग् एषा यत् संस्कृतम् । - या ब्राह्मी वाक् संस्कृतम् एषा ब्राह्म्","do_sample": true,"temperature": 0.8,"top_k": 100},"greedy": {"new_tokens": 50,"seconds": 10.7,"text": "संस्कृतं नाम दैवी वाक् । असंस्कृतं तु मानुषी वागिति । असंस्कृतमिति । असंस्कृतमिति । असंस्कृतमिति । असंस्कृतमिति । असंस्कृतमिति । ","do_sample": false}}12345613 unmodified lines20212223242526272829303132333435{"size": "350m","version": "v0.2.0","transformers": "5.18.0","torch": "2.14.0+cu130","dtype_loaded": "torch.bfloat16",13 unmodified lines],"sampled_seed0": {"new_tokens": 50,"seconds": 10.6,"text": "संस्कृतं नाम दैवी वाक् । तस्मिस्तु संस्कृते शब्दे संवृत्ते हि सति संस्कृतं नाम दैवी वाग्भवति । तस्मान्मकाराकारे ओङ्कारे प्रतिष्ठित इति ।। ।। इति एकोनवि","do_sample": true,"temperature": 0.8,"top_k": 100},"greedy": {"new_tokens": 50,"seconds": 10.8,"text": "संस्कृतं नाम दैवी वाक् । अस्या अर्थः - अस्याः संस्कृतभाषायाः अर्थः - अभिधेयः । अर्थः - अभिधेयः । अर्थः - प्रयोजनं ।","do_sample": false}}
123456720 unmodified lines28293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091926 unmodified lines99100101102103104105106107108109110111112113114115116117118119120{"size": "350m","version": "v0.1.0","run": "f7_slp1_uni8k_d350m_plus_clean_2x","torch": "2.14.0+cu130","transformers": "5.18.0","hf_load_seconds": 0.3,20 unmodified lines"tokens": 19,"max_abs_diff_vs_same_bf16_weights": 0.0,"mean_abs_diff_vs_same_bf16_weights": 0.0,"max_abs_diff_vs_fp32_master": 0.11745977401733398,"mean_abs_diff_vs_fp32_master": 0.014218589290976524,"argmax_agree_vs_fp32_master": 0.9473684430122375,"logit_abs_max": 14.64286994934082},{"input": "gita","tokens": 27,"max_abs_diff_vs_same_bf16_weights": 0.0,"mean_abs_diff_vs_same_bf16_weights": 0.0,"max_abs_diff_vs_fp32_master": 0.11260700225830078,"mean_abs_diff_vs_fp32_master": 0.014620981179177761,"argmax_agree_vs_fp32_master": 1.0,"logit_abs_max": 17.363927841186523},{"input": "ood","tokens": 512,"max_abs_diff_vs_same_bf16_weights": 0.0,"mean_abs_diff_vs_same_bf16_weights": 0.0,"max_abs_diff_vs_fp32_master": 0.16158431768417358,"mean_abs_diff_vs_fp32_master": 0.018361805006861687,"argmax_agree_vs_fp32_master": 0.9921875,"logit_abs_max": 22.05112075805664},{"input": "prose","tokens": 61,"max_abs_diff_vs_same_bf16_weights": 0.0,"mean_abs_diff_vs_same_bf16_weights": 0.0,"max_abs_diff_vs_fp32_master": 0.10389328002929688,"mean_abs_diff_vs_fp32_master": 0.014177503995597363,"argmax_agree_vs_fp32_master": 1.0,"logit_abs_max": 19.031599044799805},{"input": "vedic","tokens": 22,"max_abs_diff_vs_same_bf16_weights": 0.0,"mean_abs_diff_vs_same_bf16_weights": 0.0,"max_abs_diff_vs_fp32_master": 0.0967111587524414,"mean_abs_diff_vs_fp32_master": 0.01373979914933443,"argmax_agree_vs_fp32_master": 1.0,"logit_abs_max": 14.517696380615234},{"input": "random_512","tokens": 512,"max_abs_diff_vs_same_bf16_weights": 0.0,"mean_abs_diff_vs_same_bf16_weights": 0.0,"max_abs_diff_vs_fp32_master": 0.15893936157226562,"mean_abs_diff_vs_fp32_master": 0.012213928624987602,"argmax_agree_vs_fp32_master": 0.990234375,"logit_abs_max": 20.123470306396484}],"logits_max_abs_diff_impl": 0.0,"logits_max_abs_diff_bf16_storage": 0.16158431768417358,"left_padding_max_abs_diff": 2.6702880859375e-05,"tokenizer_ids_identical": "95/100","tokenizer_first_difference": {"set": "ood",6 unmodified lines"block": 512,"stride": 256,"original_fp32_master": {"pooled": 0.52258,"dcs_gold": 0.63318,"gita": 0.22109,"ood": 0.53169,"prose": 0.53124,"vedic": 0.73468},"hf_bf16_weights_fp32_compute": {"pooled": 0.52251,"dcs_gold": 0.63299,"gita": 0.22115,"ood": 0.53161,"prose": 0.53109,"vedic": 0.73439},"pooled_rel_diff": -0.00014147842095831275,"seconds": 85.4}}123456720 unmodified lines28293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091926 unmodified lines99100101102103104105106107108109110111112113114115116117118119120{"size": "350m","version": "v0.2.0","run": "f9_slp1_uni8k_d350m_plus_all_3x","torch": "2.14.0+cu130","transformers": "5.18.0","hf_load_seconds": 0.3,20 unmodified lines"tokens": 19,"max_abs_diff_vs_same_bf16_weights": 0.0,"mean_abs_diff_vs_same_bf16_weights": 0.0,"max_abs_diff_vs_fp32_master": 0.0973672866821289,"mean_abs_diff_vs_fp32_master": 0.013156784698367119,"argmax_agree_vs_fp32_master": 1.0,"logit_abs_max": 13.353614807128906},{"input": "gita","tokens": 27,"max_abs_diff_vs_same_bf16_weights": 0.0,"mean_abs_diff_vs_same_bf16_weights": 0.0,"max_abs_diff_vs_fp32_master": 0.1327071189880371,"mean_abs_diff_vs_fp32_master": 0.014552494511008263,"argmax_agree_vs_fp32_master": 1.0,"logit_abs_max": 20.497982025146484},{"input": "ood","tokens": 512,"max_abs_diff_vs_same_bf16_weights": 0.0,"mean_abs_diff_vs_same_bf16_weights": 0.0,"max_abs_diff_vs_fp32_master": 0.21717453002929688,"mean_abs_diff_vs_fp32_master": 0.02046874165534973,"argmax_agree_vs_fp32_master": 0.9921875,"logit_abs_max": 25.13204574584961},{"input": "prose","tokens": 61,"max_abs_diff_vs_same_bf16_weights": 0.0,"mean_abs_diff_vs_same_bf16_weights": 0.0,"max_abs_diff_vs_fp32_master": 0.09520530700683594,"mean_abs_diff_vs_fp32_master": 0.011608722619712353,"argmax_agree_vs_fp32_master": 1.0,"logit_abs_max": 16.601123809814453},{"input": "vedic","tokens": 22,"max_abs_diff_vs_same_bf16_weights": 0.0,"mean_abs_diff_vs_same_bf16_weights": 0.0,"max_abs_diff_vs_fp32_master": 0.11458206176757812,"mean_abs_diff_vs_fp32_master": 0.014504635706543922,"argmax_agree_vs_fp32_master": 1.0,"logit_abs_max": 14.617786407470703},{"input": "random_512","tokens": 512,"max_abs_diff_vs_same_bf16_weights": 0.0,"mean_abs_diff_vs_same_bf16_weights": 0.0,"max_abs_diff_vs_fp32_master": 0.17591071128845215,"mean_abs_diff_vs_fp32_master": 0.011679315008223057,"argmax_agree_vs_fp32_master": 0.99609375,"logit_abs_max": 17.314958572387695}],"logits_max_abs_diff_impl": 0.0,"logits_max_abs_diff_bf16_storage": 0.21717453002929688,"left_padding_max_abs_diff": 5.030632019042969e-05,"tokenizer_ids_identical": "95/100","tokenizer_first_difference": {"set": "ood",6 unmodified lines"block": 512,"stride": 256,"original_fp32_master": {"pooled": 0.50865,"dcs_gold": 0.64282,"gita": 0.17083,"ood": 0.51883,"prose": 0.52615,"vedic": 0.72155},"hf_bf16_weights_fp32_compute": {"pooled": 0.5087,"dcs_gold": 0.64263,"gita": 0.17111,"ood": 0.51887,"prose": 0.52632,"vedic": 0.72173},"pooled_rel_diff": 9.97135358179582e-05,"seconds": 57.7}}
2 unmodified lines345678910111213141516171819202122232425262728293031323334353637383940414243441 unmodified line464748495051522 unmodified lines"missing_predictions": [],"overall": {"answered": 600,"macro_alt": 0.0016666666666666668,"macro_chrF": 0.12746240635628503,"macro_exact": 0.0016666666666666668,"macro_exact_norm": 0.0016666666666666668,"macro_exact_strict": 0.0016666666666666668,"micro_alt": 0.0016666666666666668,"micro_chrF": 0.12746240635628503,"micro_exact": 0.0016666666666666668,"micro_exact_norm": 0.0016666666666666668,"micro_exact_strict": 0.0016666666666666668,"n": 600},"per_task": {"verse_completion": {"alt": 0.0016666666666666668,"answered": 600,"chrF": 0.12746240635628503,"exact": 0.0016666666666666668,"exact_norm": 0.0016666666666666668,"exact_strict": 0.0016666666666666668,"n": 600}},"predictions_file": "/home/kushal/sansar/data/experiments/train/f7/slp1_uni8k_d350m_plus_clean_2x/verse_preds.jsonl","subtotals": {"verse_completion/bhagavadgita": {"alt": 0.005,"chrF": 0.12771624416392885,"exact": 0.005,"exact_norm": 0.005,"exact_strict": 0.005,"n": 200},"verse_completion/mahabharata": {"alt": 0.0,"chrF": 0.12679006412731655,"exact": 0.0,"exact_norm": 0.0,"exact_strict": 0.0,1 unmodified line},"verse_completion/ramayana": {"alt": 0.0,"chrF": 0.12788091077760969,"exact": 0.0,"exact_norm": 0.0,"exact_strict": 0.0,2 unmodified lines345678910111213141516171819202122232425262728293031323334353637383940414243441 unmodified line464748495051522 unmodified lines"missing_predictions": [],"overall": {"answered": 600,"macro_alt": 0.0,"macro_chrF": 0.12482517291338882,"macro_exact": 0.0,"macro_exact_norm": 0.0,"macro_exact_strict": 0.0,"micro_alt": 0.0,"micro_chrF": 0.12482517291338882,"micro_exact": 0.0,"micro_exact_norm": 0.0,"micro_exact_strict": 0.0,"n": 600},"per_task": {"verse_completion": {"alt": 0.0,"answered": 600,"chrF": 0.12482517291338882,"exact": 0.0,"exact_norm": 0.0,"exact_strict": 0.0,"n": 600}},"predictions_file": "/home/kushal/sansar/data/experiments/train/f9/slp1_uni8k_d350m_plus_all_3x/verse_preds.jsonl","subtotals": {"verse_completion/bhagavadgita": {"alt": 0.0,"chrF": 0.12835374548435394,"exact": 0.0,"exact_norm": 0.0,"exact_strict": 0.0,"n": 200},"verse_completion/mahabharata": {"alt": 0.0,"chrF": 0.12198469069160979,"exact": 0.0,"exact_norm": 0.0,"exact_strict": 0.0,1 unmodified line},"verse_completion/ramayana": {"alt": 0.0,"chrF": 0.12413708256420274,"exact": 0.0,"exact_norm": 0.0,"exact_strict": 0.0,
123version https://git-lfs.github.com/spec/v1oid sha256:b9046a57ceb4e1d75a2564850c711720785e0adaedbc14b50429489f7f1a90e1size 636863928123version https://git-lfs.github.com/spec/v1oid sha256:150e99221ac4fb738bae51e91db6e91a3a5ddece61e91d736f3207904bd3a448size 636863920
2 unmodified lines345678910112 unmodified lines"machine": "a2-highgpu-1g","spot": true,"zone": "us-central1-a","running_seconds": 50450.34674024582,"restarts": 2,"rate_usd_h": 1.3,"est_cost_usd": 18.22,"status": "2026-10-03 00:46:46 done (rc 0, steps 54212)"}2 unmodified lines345678910112 unmodified lines"machine": "a2-highgpu-1g","spot": true,"zone": "us-central1-a","running_seconds": 73898.4669239521,"restarts": 0,"rate_usd_h": 1.3,"est_cost_usd": 26.69,"status": "2026-10-04 07:06:40 done (rc 0, steps 103527)"}
12345623 unmodified lines3031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394956 unmodified lines102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144{"created": "2026-09-30T13:35:56","input": "/home/kushal/sansar/data/unified_v3/train_slice_plus_clean.jsonl.gz","vocab_size": 8000,"eos_id": 2,"filters": {23 unmodified lines"text_cleaning": {"normalize_dandas": true,"rule": "standalone '//' -> '॥', standalone '/' -> '।' (whitespace or string boundary on both sides), applied after NFC and after the dedup key is taken","danda_double_normalised": 1328628,"danda_single_normalised": 1393005,"records_with_danda_normalised": 1334297,"drop_rule_lines": true,"rule_lines_dropped": 5,"records_with_rule_lines": 5,"records_dropped_all_rule_lines": 5,"strip_refs": true,"strip_refs_rule": "a token of >=2 digit groups (ASCII or Devanagari) joined by - , . । _ with an optional trailing pada letter (a-d / अ-द, optional virama) and optional bracket; `प्.`/`प्।`/`p.` + digits + optional letter + `)`; and a [bracketed] group that contains digits and no Devanagari word of >=3 base letters. A single digit group (`॥ २७ ॥`, `२७।`) is never touched. Whitespace is collapsed only on lines that lost a token, and a `॥ ॥` pair left behind by a cut is folded to one daṇḍa","ref_tokens_stripped": 815,"ref_page_markers_stripped": 10,"ref_bracket_groups_stripped": 2265,"ref_danda_pairs_collapsed": 8,"ref_lines_emptied": 1,"ref_chars_removed": 33334,"records_with_refs_stripped": 901,"records_dropped_all_refs": 2,"ref_samples": ["[1]","[भा.पु. 1.10.26]","[भ.र.सि. 2.1.14]","1.4.87]","[ भय ॥ गी० । ]","[11]","[कृ.क. 2.28]","[ना.शा. 20.76]","[भा.पु. 2.4.14]","10.32.14]","2.3.40]","2.1.204]","[भा.पु. 10.3.26]","1.2.4","[भा.पु. 10.47.58]","[उ.नी. 14.114]","4।20","[उ.नी. 15.210]","[4]","[उ.नी. 14.32]","3.3","7.104.10]","५।२७-२८]","1.2.22","12.4.40]","[उ.नी. 1.19]","[वि.पु. 1.9.129132]","[गो.ली. 11.121]","940.2.1","15.8]"],"bytes_deva_utf8_counted": "after held-out masking and cleaning"},"heldout_mask": {"probes": 17466,"records_masked": 153903,"spans_masked": 404925,"chars_removed": 16279006,"records_dropped_heldout_masked": 22736,"by_set": {"experiments/eval": 134553,"tok/eval": 284095},"files_by_set": {"tok/eval": 6,6 unmodified lines"cluster_file": "/home/kushal/sansar/data/unified_v3/neardup_clusters.jsonl.gz","cluster_memberships_loaded": 2221286,"clustered_records": 1902408,"unclustered_records": 13185086,"train_clustered_records": 1893171,"val_clustered_records": 9237},"records_read": 15120792,"records_kept": 15087494,"records_skipped": {"not_training_candidate": 0,"script": 0,"licence": 0,"empty": 0,"bad_json": 0,"excluded_heldout": 10555,"records_dropped_heldout_masked": 22736,"known_heldout_overlap": 0,"all_rule_lines": 5},"train": {"records": 15012243,"tokens": 1444720245,"bytes_utf8": 4109517947,"utf8_bytes": 4109517947,"bpb_denominator": "bytes_deva_utf8","bytes_deva_utf8": 10018038052,"bin": "/home/kushal/sansar/data/experiments/train/f5_plus_clean_slp1_uni8k_wmasked/train.bin","bytes_per_token": 2.8445,"tokens_per_byte": 0.351555},"val": {"records": 75251,"tokens": 7253911,"bytes_utf8": 20634710,"utf8_bytes": 20634710,"bpb_denominator": "bytes_deva_utf8","bytes_deva_utf8": 50333079,"bin": "/home/kushal/sansar/data/experiments/train/f5_plus_clean_slp1_uni8k_wmasked/val.bin","bytes_per_token": 2.8446,"tokens_per_byte": 0.351539}}12345623 unmodified lines3031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394956 unmodified lines102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144{"created": "2026-10-03T15:45:38","input": "/home/kushal/sansar/data/unified_v3/train_slice_plus_all.jsonl.gz","vocab_size": 8000,"eos_id": 2,"filters": {23 unmodified lines"text_cleaning": {"normalize_dandas": true,"rule": "standalone '//' -> '॥', standalone '/' -> '।' (whitespace or string boundary on both sides), applied after NFC and after the dedup key is taken","danda_double_normalised": 1334631,"danda_single_normalised": 1412556,"records_with_danda_normalised": 1336843,"drop_rule_lines": true,"rule_lines_dropped": 204,"records_with_rule_lines": 164,"records_dropped_all_rule_lines": 5,"strip_refs": true,"strip_refs_rule": "a token of >=2 digit groups (ASCII or Devanagari) joined by - , . । _ with an optional trailing pada letter (a-d / अ-द, optional virama) and optional bracket; `प्.`/`प्।`/`p.` + digits + optional letter + `)`; and a [bracketed] group that contains digits and no Devanagari word of >=3 base letters. A single digit group (`॥ २७ ॥`, `२७।`) is never touched. Whitespace is collapsed only on lines that lost a token, and a `॥ ॥` pair left behind by a cut is folded to one daṇḍa","ref_tokens_stripped": 497179,"ref_page_markers_stripped": 4605,"ref_bracket_groups_stripped": 34575,"ref_danda_pairs_collapsed": 81014,"ref_lines_emptied": 2615,"ref_chars_removed": 4340245,"records_with_refs_stripped": 25954,"records_dropped_all_refs": 2,"ref_samples": ["[10.13.14]","१।१४०","३९-४०","3.9.2.1","[छा.उ. 6.14.2]","[१६]","(४.१.६३)","प्. 477:","६।३७,","७-१-१)","६।३।१३७","61-62-63-64","४.०५७.०६","[4.1.64]","7.2.22","[17]","२.७.१)","१०-१२","१-४-२८,","१०।१३४।७,","३४-४०","२००६-११-०६","[तै।उ। २.५.१]","३.१","2581-7787","४,५","[भ.र.सि. 2.1.456]","1.3.83)","20-00","४।२।६६"],"bytes_deva_utf8_counted": "after held-out masking and cleaning"},"heldout_mask": {"probes": 17466,"records_masked": 153905,"spans_masked": 404929,"chars_removed": 16279098,"records_dropped_heldout_masked": 22736,"by_set": {"experiments/eval": 134553,"tok/eval": 284099},"files_by_set": {"tok/eval": 6,6 unmodified lines"cluster_file": "/home/kushal/sansar/data/unified_v3/neardup_clusters.jsonl.gz","cluster_memberships_loaded": 2221286,"clustered_records": 1902408,"unclustered_records": 13286564,"train_clustered_records": 1893171,"val_clustered_records": 9237},"records_read": 15222330,"records_kept": 15188972,"records_skipped": {"not_training_candidate": 0,"script": 0,"licence": 0,"empty": 0,"bad_json": 0,"excluded_heldout": 10615,"records_dropped_heldout_masked": 22736,"known_heldout_overlap": 0,"all_rule_lines": 5},"train": {"records": 15113203,"tokens": 1696174507,"bytes_utf8": 4831094326,"utf8_bytes": 4831094326,"bpb_denominator": "bytes_deva_utf8","bytes_deva_utf8": 11772151128,"bin": "/home/kushal/sansar/data/experiments/train/f9_plus_all_slp1_uni8k_wmasked/train.bin","bytes_per_token": 2.8482,"tokens_per_byte": 0.351095},"val": {"records": 75769,"tokens": 8645787,"bytes_utf8": 24581892,"utf8_bytes": 24581892,"bpb_denominator": "bytes_deva_utf8","bytes_deva_utf8": 59904768,"bin": "/home/kushal/sansar/data/experiments/train/f9_plus_all_slp1_uni8k_wmasked/val.bin","bytes_per_token": 2.8432,"tokens_per_byte": 0.351714}}
1234521 unmodified lines27282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172734 unmodified lines7879808182838418 unmodified lines103104105106107108109{"run": "f7_slp1_uni8k_d350m_plus_clean_2x","preset": "d350m","model_config": {"vocab_size": 8000,21 unmodified lines"non_embedding": 302040064},"tokenizer": "/opt/sansar/data/spm_slp1_unigram_8000_v2.model","steps": 54212,"tokens_seen": 2664628224,"tokens_per_step": 49152,"batch_size": 48,"grad_accum": 2,"block_size": 512,"compiled": true,"dtype": "bf16","best_val_loss": 2.45384,"best_bpb": 0.5102,"mean_tok_s": 69049.4,"median_tok_s": 71679.6,"peak_gpu_mem_alloc_gb": 30.355,"wall_seconds": 38946.3,"evals": [{"step": 52000,"val_loss": 2.4583,"bpb": 0.5111,"tokens_seen": 2555904000,"t": 37380.5},{"step": 54000,"val_loss": 2.4538,"bpb": 0.5102,"tokens_seen": 2654208000,"t": 38793.8},{"step": 54212,"val_loss": 2.4544,"bpb": 0.5103,"tokens_seen": 2664628224,"t": 38946.3}],"args": {"data_dir": "/opt/sansar/data","runs_dir": "/opt/sansar/runs","run": "f7_slp1_uni8k_d350m_plus_clean_2x","preset": "d350m","n_layer": 0,"n_head": 0,4 unmodified lines"lr": 0.001,"min_lr_frac": 0.1,"warmup_steps": 500,"max_steps": 54212,"weight_decay": 0.1,"optim": "muon","muon_lr": 0.02,18 unmodified lines"time_budget_min": 0.0,"compile": 1,"dtype": "bf16","resume": true,"seed": 1337,"sample_tokens": 120,"sample_temperature": 0.8,1234521 unmodified lines272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164 unmodified lines42142242342442542642718 unmodified lines446447448449450451452{"run": "f9_slp1_uni8k_d350m_plus_all_3x","preset": "d350m","model_config": {"vocab_size": 8000,21 unmodified lines"non_embedding": 302040064},"tokenizer": "/opt/sansar/data/spm_slp1_unigram_8000_v2.model","steps": 103527,"tokens_seen": 5088559104,"tokens_per_step": 49152,"batch_size": 48,"grad_accum": 2,"block_size": 512,"compiled": true,"dtype": "bf16","best_val_loss": 2.41714,"best_bpb": 0.50329,"mean_tok_s": 69902.4,"median_tok_s": 71683.9,"peak_gpu_mem_alloc_gb": 29.173,"wall_seconds": 73701.5,"evals": [{"step": 2000,"val_loss": 3.445,"bpb": 0.7173,"tokens_seen": 98304000,"t": 1503.7},{"step": 4000,"val_loss": 3.2062,"bpb": 0.6676,"tokens_seen": 196608000,"t": 2918.9},{"step": 6000,"val_loss": 3.0905,"bpb": 0.6435,"tokens_seen": 294912000,"t": 4352.5},{"step": 8000,"val_loss": 3.0161,"bpb": 0.628,"tokens_seen": 393216000,"t": 5767.2},{"step": 10000,"val_loss": 2.9586,"bpb": 0.616,"tokens_seen": 491520000,"t": 7182.0},{"step": 12000,"val_loss": 2.9153,"bpb": 0.607,"tokens_seen": 589824000,"t": 8614.7},{"step": 14000,"val_loss": 2.881,"bpb": 0.5999,"tokens_seen": 688128000,"t": 10028.8},{"step": 16000,"val_loss": 2.85,"bpb": 0.5934,"tokens_seen": 786432000,"t": 11461.3},{"step": 18000,"val_loss": 2.8251,"bpb": 0.5882,"tokens_seen": 884736000,"t": 12874.3},{"step": 20000,"val_loss": 2.7977,"bpb": 0.5825,"tokens_seen": 983040000,"t": 14290.4},{"step": 22000,"val_loss": 2.7808,"bpb": 0.579,"tokens_seen": 1081344000,"t": 15724.5},{"step": 24000,"val_loss": 2.7612,"bpb": 0.5749,"tokens_seen": 1179648000,"t": 17139.5},{"step": 26000,"val_loss": 2.7404,"bpb": 0.5706,"tokens_seen": 1277952000,"t": 18554.7},{"step": 28000,"val_loss": 2.7267,"bpb": 0.5678,"tokens_seen": 1376256000,"t": 19987.9},{"step": 30000,"val_loss": 2.7132,"bpb": 0.5649,"tokens_seen": 1474560000,"t": 21402.8},{"step": 32000,"val_loss": 2.6985,"bpb": 0.5619,"tokens_seen": 1572864000,"t": 22817.0},{"step": 34000,"val_loss": 2.6816,"bpb": 0.5583,"tokens_seen": 1671168000,"t": 24249.8},{"step": 36000,"val_loss": 2.672,"bpb": 0.5564,"tokens_seen": 1769472000,"t": 25664.4},{"step": 38000,"val_loss": 2.6533,"bpb": 0.5525,"tokens_seen": 1867776000,"t": 27099.6},{"step": 40000,"val_loss": 2.6419,"bpb": 0.5501,"tokens_seen": 1966080000,"t": 28515.7},{"step": 42000,"val_loss": 2.6324,"bpb": 0.5481,"tokens_seen": 2064384000,"t": 29931.8},{"step": 44000,"val_loss": 2.6194,"bpb": 0.5454,"tokens_seen": 2162688000,"t": 31367.1},{"step": 46000,"val_loss": 2.6102,"bpb": 0.5435,"tokens_seen": 2260992000,"t": 32782.6},{"step": 48000,"val_loss": 2.5968,"bpb": 0.5407,"tokens_seen": 2359296000,"t": 34198.6},{"step": 50000,"val_loss": 2.5859,"bpb": 0.5384,"tokens_seen": 2457600000,"t": 35632.9},{"step": 52000,"val_loss": 2.5762,"bpb": 0.5364,"tokens_seen": 2555904000,"t": 37047.5},{"step": 54000,"val_loss": 2.5649,"bpb": 0.5341,"tokens_seen": 2654208000,"t": 38482.2},{"step": 56000,"val_loss": 2.5559,"bpb": 0.5322,"tokens_seen": 2752512000,"t": 39899.7},{"step": 58000,"val_loss": 2.548,"bpb": 0.5305,"tokens_seen": 2850816000,"t": 41314.3},{"step": 60000,"val_loss": 2.5367,"bpb": 0.5282,"tokens_seen": 2949120000,"t": 42760.8},{"step": 62000,"val_loss": 2.5279,"bpb": 0.5263,"tokens_seen": 3047424000,"t": 44175.0},{"step": 64000,"val_loss": 2.5188,"bpb": 0.5245,"tokens_seen": 3145728000,"t": 45590.1},{"step": 66000,"val_loss": 2.5104,"bpb": 0.5227,"tokens_seen": 3244032000,"t": 47023.0},{"step": 68000,"val_loss": 2.501,"bpb": 0.5208,"tokens_seen": 3342336000,"t": 48448.7},{"step": 70000,"val_loss": 2.493,"bpb": 0.5191,"tokens_seen": 3440640000,"t": 49881.2},{"step": 72000,"val_loss": 2.4855,"bpb": 0.5175,"tokens_seen": 3538944000,"t": 51295.4},{"step": 74000,"val_loss": 2.4821,"bpb": 0.5168,"tokens_seen": 3637248000,"t": 52709.7},{"step": 76000,"val_loss": 2.474,"bpb": 0.5151,"tokens_seen": 3735552000,"t": 54155.3},{"step": 78000,"val_loss": 2.4667,"bpb": 0.5136,"tokens_seen": 3833856000,"t": 55569.1},{"step": 80000,"val_loss": 2.4605,"bpb": 0.5123,"tokens_seen": 3932160000,"t": 56984.5},{"step": 82000,"val_loss": 2.4566,"bpb": 0.5115,"tokens_seen": 4030464000,"t": 58416.3},{"step": 84000,"val_loss": 2.4482,"bpb": 0.5098,"tokens_seen": 4128768000,"t": 59831.0},{"step": 86000,"val_loss": 2.445,"bpb": 0.5091,"tokens_seen": 4227072000,"t": 61262.8},{"step": 88000,"val_loss": 2.4413,"bpb": 0.5083,"tokens_seen": 4325376000,"t": 62677.8},{"step": 90000,"val_loss": 2.4367,"bpb": 0.5074,"tokens_seen": 4423680000,"t": 64092.9},{"step": 92000,"val_loss": 2.4335,"bpb": 0.5067,"tokens_seen": 4521984000,"t": 65525.1},{"step": 94000,"val_loss": 2.4319,"bpb": 0.5064,"tokens_seen": 4620288000,"t": 66939.0},{"step": 96000,"val_loss": 2.4266,"bpb": 0.5053,"tokens_seen": 4718592000,"t": 68353.6},{"step": 98000,"val_loss": 2.4253,"bpb": 0.505,"tokens_seen": 4816896000,"t": 69785.5},{"step": 100000,"val_loss": 2.4219,"bpb": 0.5043,"tokens_seen": 4915200000,"t": 71199.0},{"step": 102000,"val_loss": 2.4195,"bpb": 0.5038,"tokens_seen": 5013504000,"t": 72612.1},{"step": 103527,"val_loss": 2.4171,"bpb": 0.5033,"tokens_seen": 5088559104,"t": 73701.5}],"args": {"data_dir": "/opt/sansar/data","runs_dir": "/opt/sansar/runs","run": "f9_slp1_uni8k_d350m_plus_all_3x","preset": "d350m","n_layer": 0,"n_head": 0,4 unmodified lines"lr": 0.001,"min_lr_frac": 0.1,"warmup_steps": 500,"max_steps": 103527,"weight_decay": 0.1,"optim": "muon","muon_lr": 0.02,18 unmodified lines"time_budget_min": 0.0,"compile": 1,"dtype": "bf16","resume": false,"seed": 1337,"sample_tokens": 120,"sample_temperature": 0.8,
CHANGELOG.md+6
README.md+35-34
eval/bpb.json+21-21
eval/bpb_clean_v1.json+21-21
eval/smoke_test.json+5-5
eval/verification.json+38-38
eval/verse_scores.json+23-23
model.safetensors+2-2
training/cloud.json+4-4
training/data_meta.json+68-68
training/summary.json+366-23