Text Generation
Transformers
Safetensors
English
gpt_oss
Mixture of Experts
mixture-of-experts
causal-lm
tinystories
tiny-model
validation
debug-model
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", dtype="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
| { | |
| "architectures": [ | |
| "GptOssForCausalLM" | |
| ], | |
| "attention_bias": true, | |
| "attention_dropout": 0.0, | |
| "bos_token_id": 1000, | |
| "dtype": "float32", | |
| "eos_token_id": 1001, | |
| "experts_per_token": 4, | |
| "head_dim": 32, | |
| "hidden_act": "silu", | |
| "hidden_size": 128, | |
| "initial_context_length": 1024, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 128, | |
| "layer_types": [ | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "full_attention" | |
| ], | |
| "max_position_embeddings": 4096, | |
| "model_type": "gpt_oss", | |
| "num_attention_heads": 4, | |
| "num_experts_per_tok": 4, | |
| "num_hidden_layers": 6, | |
| "num_key_value_heads": 1, | |
| "num_local_experts": 8, | |
| "output_router_logits": false, | |
| "pad_token_id": 1000, | |
| "rms_norm_eps": 1e-05, | |
| "rope_parameters": { | |
| "beta_fast": 32.0, | |
| "beta_slow": 1.0, | |
| "factor": 4.0, | |
| "original_max_position_embeddings": 1024, | |
| "rope_theta": 150000.0, | |
| "rope_type": "yarn", | |
| "truncate": false | |
| }, | |
| "rope_theta": 150000.0, | |
| "router_aux_loss_coef": 0.0, | |
| "sliding_window": 128, | |
| "swiglu_limit": 7.0, | |
| "tie_word_embeddings": false, | |
| "transformers_version": "5.9.0", | |
| "use_cache": true, | |
| "vocab_size": 1024 | |
| } | |