Text Generation
Transformers
Safetensors
English
gpt_oss
Mixture of Experts
mixture-of-experts
causal-lm
tinystories
tiny-model
validation
debug-model
mxfp4
e2m1
e8m0
Instructions to use shibatch/tinygptossmoe3m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use shibatch/tinygptossmoe3m with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="shibatch/tinygptossmoe3m")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("shibatch/tinygptossmoe3m", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use shibatch/tinygptossmoe3m with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "shibatch/tinygptossmoe3m" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "shibatch/tinygptossmoe3m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/shibatch/tinygptossmoe3m
- SGLang
How to use shibatch/tinygptossmoe3m 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 "shibatch/tinygptossmoe3m" \ --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": "shibatch/tinygptossmoe3m", "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 "shibatch/tinygptossmoe3m" \ --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": "shibatch/tinygptossmoe3m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use shibatch/tinygptossmoe3m with Docker Model Runner:
docker model run hf.co/shibatch/tinygptossmoe3m
| { | |
| "checkpoint_model_sha256": "30dac8e68ccf869d872beb382cebd0be8b168de761dfb38f1358d260d4b8d09d", | |
| "official_openai_revision": "599476783c6f88508dab8577808b5ead5cbee8d2", | |
| "triton_kernels_revision": "9e1e203f64752cf99abf0e44286231c5d5df7e76", | |
| "device": "NVIDIA GeForce RTX 5060 Ti", | |
| "device_capability": [ | |
| 12, | |
| 0 | |
| ], | |
| "torch_version": "2.8.0+cu128", | |
| "triton_version": "3.4.0", | |
| "reproduction_command": "CUDA_VISIBLE_DEVICES=<gpu> PYTHONPATH=third_party/openai-gpt-oss:third_party/triton/python/triton_kernels python tools/generate_gptoss_mxfp4_reference.py --checkpoint original --tokenizer hf --output-dir rebuilt/mxfp4_reference_outputs --openai-repo third_party/openai-gpt-oss --triton-repo third_party/triton --prompt 'Once upon a time,' --max-new-tokens 64 --context 256 --device cuda:0", | |
| "prompt": "Once upon a time,", | |
| "prompt_token_ids": [ | |
| 430, | |
| 446, | |
| 258, | |
| 395, | |
| 11 | |
| ], | |
| "logits_shape": [ | |
| 1, | |
| 5, | |
| 1024 | |
| ], | |
| "output_provenance": { | |
| "full_logits": "gpt_oss.triton.model.Transformer full-sequence forward", | |
| "cached_logits": "gpt_oss.triton.model.Transformer with per-layer Cache", | |
| "greedy_continuation": "gpt_oss.triton.model.Transformer with per-layer Cache", | |
| "routing": "gpt_oss.torch.model.Transformer MoE equations", | |
| "expert_projection": "gpt_oss.torch.model.Transformer MoE equations" | |
| }, | |
| "full_vs_cached": { | |
| "max_abs_diff": 0.0, | |
| "mean_abs_diff": 0.0, | |
| "all_token_argmax_equal": true | |
| }, | |
| "triton_full_vs_torch_full": { | |
| "max_abs_diff": 0.4375, | |
| "mean_abs_diff": 0.0456787645816803, | |
| "all_token_argmax_equal": true | |
| }, | |
| "routing": { | |
| "layers": 6, | |
| "tokens": 5, | |
| "experts_per_token": 4, | |
| "includes_router_logits": true | |
| }, | |
| "expert_projection": { | |
| "selected_output_shape_per_layer": [ | |
| 5, | |
| 4, | |
| 128 | |
| ], | |
| "includes_weighted_sum": true | |
| }, | |
| "tiny_attention_adapter": { | |
| "gqa_axis_adapter": "transpose query dimensions 2 and 3", | |
| "attention_backend": "gpt_oss.triton.attention.attention_ref", | |
| "reason": "tiny config uses 1 KV head, 4 groups, and head_dim 32", | |
| "official_source_modified": false | |
| }, | |
| "files": { | |
| "full_logits.safetensors": "5dc16765dd175ff95e7a923e1569dcca83880b044bb4de53cadb419c4535018f", | |
| "cached_logits.safetensors": "5dc16765dd175ff95e7a923e1569dcca83880b044bb4de53cadb419c4535018f", | |
| "routing.safetensors": "f94ffb12b3da2c922fc7e95134603e155fd06046dbaba9610360e8aea2d58311", | |
| "expert_projection.safetensors": "33f73333341f7a86b6a44d273581a096bed789d927a90ce7411d43c0437748bb", | |
| "greedy_continuation.json": "1478ed0112bf32f0444a5dd1bae9eeaebe2cc751396d1fe92513e6e208984b2d" | |
| } | |
| } | |