Text Generation
Transformers
Safetensors
Sanskrit
sansar
sanskrit
devanagari
slp1
causal-lm
base-model
custom_code
Eval Results (legacy)
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
Download eval/bpb.json from MuseMesh/sansar-350m: direct link, hf CLI and curl.
- Browser
- Download file 2.29 kB
-
https://huggingface.co/MuseMesh/sansar-350m/resolve/main/eval/bpb.json
- Command line
-
hf download hf://MuseMesh/sansar-350m/eval/bpb.json
-
curl -L -o bpb.json https://huggingface.co/MuseMesh/sansar-350m/resolve/main/eval/bpb.json
2.29 kB
| { | |
| "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", | |
| "strip_refs": false, | |
| "clean": "deva", | |
| "text_field": "text_deva", | |
| "denominator": "bytes_deva_utf8", | |
| "block": 512, | |
| "stride": 256, | |
| "step": 103527, | |
| "param_counts": { | |
| "total": 318424064, | |
| "embedding": 8192000, | |
| "token_embedding": 8192000, | |
| "position_embedding": 0, | |
| "value_embedding": 0, | |
| "head": 8192000, | |
| "non_embedding": 302040064 | |
| }, | |
| "method": "records joined with EOS into one stream per set; sliding window, only the last `stride` predictions of each window after the first are scored; nats / Devanagari UTF-8 bytes of the cleaned text / ln 2", | |
| "per_set": { | |
| "dcs_gold": { | |
| "records": 3000, | |
| "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": { | |
| "records": 700, | |
| "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": { | |
| "records": 2000, | |
| "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": { | |
| "records": 2470, | |
| "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": { | |
| "records": 1000, | |
| "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 | |
| } |