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
File size: 3,620 Bytes
e2362f2 82d5cd4 e2362f2 82d5cd4 e2362f2 82d5cd4 e2362f2 82d5cd4 e2362f2 82d5cd4 e2362f2 82d5cd4 e2362f2 82d5cd4 e2362f2 82d5cd4 e2362f2 82d5cd4 e2362f2 82d5cd4 e2362f2 82d5cd4 e2362f2 82d5cd4 e2362f2 82d5cd4 e2362f2 82d5cd4 e2362f2 82d5cd4 e2362f2 | 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": "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,
"hf_param_counts": {
"total": 318424064,
"embedding": 8192000,
"head": 8192000,
"non_embedding": 302040064
},
"orig_param_counts": {
"total": 318424064,
"embedding": 8192000,
"token_embedding": 8192000,
"position_embedding": 0,
"value_embedding": 0,
"head": 8192000,
"non_embedding": 302040064
},
"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.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",
"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.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
}
} |