Text Generation
Transformers
Safetensors
Sanskrit
sansar
sanskrit
devanagari
slp1
causal-lm
base-model
custom_code
Eval Results (legacy)
Instructions to use MuseMesh/sansar-20m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MuseMesh/sansar-20m with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="MuseMesh/sansar-20m", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("MuseMesh/sansar-20m", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use MuseMesh/sansar-20m with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "MuseMesh/sansar-20m" # 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-20m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/MuseMesh/sansar-20m
- SGLang
How to use MuseMesh/sansar-20m 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-20m" \ --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-20m", "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-20m" \ --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-20m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use MuseMesh/sansar-20m with Docker Model Runner:
docker model run hf.co/MuseMesh/sansar-20m
File size: 3,603 Bytes
329a89b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 | {
"size": "20m",
"version": "v0.1.0",
"run": "tokv3_v01_d20m",
"torch": "2.14.0+cu130",
"transformers": "5.18.0",
"hf_load_seconds": 0.2,
"hf_param_counts": {
"total": 27073024,
"embedding": 4096000,
"head": 4096000,
"non_embedding": 18881024
},
"orig_param_counts": {
"total": 27073024,
"embedding": 4096000,
"token_embedding": 4096000,
"position_embedding": 0,
"value_embedding": 0,
"head": 4096000,
"non_embedding": 18881024
},
"tied_head": false,
"hf_head_equals_wte": false,
"logits": [
{
"input": "dcs_gold",
"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.050026655197143555,
"mean_abs_diff_vs_fp32_master": 0.007199867628514767,
"argmax_agree_vs_fp32_master": 1.0,
"logit_abs_max": 14.390743255615234
},
{
"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.05633831024169922,
"mean_abs_diff_vs_fp32_master": 0.007845329120755196,
"argmax_agree_vs_fp32_master": 1.0,
"logit_abs_max": 14.983847618103027
},
{
"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.09844303131103516,
"mean_abs_diff_vs_fp32_master": 0.009610326960682869,
"argmax_agree_vs_fp32_master": 0.998046875,
"logit_abs_max": 19.00731658935547
},
{
"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.05675983428955078,
"mean_abs_diff_vs_fp32_master": 0.007296254858374596,
"argmax_agree_vs_fp32_master": 1.0,
"logit_abs_max": 17.56630516052246
},
{
"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.05190229415893555,
"mean_abs_diff_vs_fp32_master": 0.008906053379178047,
"argmax_agree_vs_fp32_master": 1.0,
"logit_abs_max": 13.91469955444336
},
{
"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.15868473052978516,
"mean_abs_diff_vs_fp32_master": 0.010886614210903645,
"argmax_agree_vs_fp32_master": 0.990234375,
"logit_abs_max": 16.144594192504883
}
],
"logits_max_abs_diff_impl": 0.0,
"logits_max_abs_diff_bf16_storage": 0.15868473052978516,
"left_padding_max_abs_diff": 1.430511474609375e-05,
"tokenizer_ids_identical": "95/100",
"tokenizer_first_difference": {
"set": "ood",
"index": 2
},
"tokenizer_ids_identical_fence_latin_false": "100/100",
"tokenizer_roundtrip_exact": "100/100",
"bpb_sample": {
"records_per_set": 20,
"block": 512,
"stride": 256,
"original_fp32_master": {
"pooled": 0.68017,
"dcs_gold": 0.74491,
"gita": 0.47254,
"ood": 0.68294,
"prose": 0.72442,
"vedic": 0.9819
},
"hf_bf16_weights_fp32_compute": {
"pooled": 0.68017,
"dcs_gold": 0.74491,
"gita": 0.47263,
"ood": 0.68295,
"prose": 0.72441,
"vedic": 0.98186
},
"pooled_rel_diff": 6.287091102380568e-06,
"seconds": 6.0
}
} |