Instructions to use aneeshm44/gpt-oss-92b-dynamic-pruning-98-threshold with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use aneeshm44/gpt-oss-92b-dynamic-pruning-98-threshold with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="aneeshm44/gpt-oss-92b-dynamic-pruning-98-threshold") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("aneeshm44/gpt-oss-92b-dynamic-pruning-98-threshold") model = AutoModelForCausalLM.from_pretrained("aneeshm44/gpt-oss-92b-dynamic-pruning-98-threshold") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use aneeshm44/gpt-oss-92b-dynamic-pruning-98-threshold with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "aneeshm44/gpt-oss-92b-dynamic-pruning-98-threshold" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "aneeshm44/gpt-oss-92b-dynamic-pruning-98-threshold", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/aneeshm44/gpt-oss-92b-dynamic-pruning-98-threshold
- SGLang
How to use aneeshm44/gpt-oss-92b-dynamic-pruning-98-threshold 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 "aneeshm44/gpt-oss-92b-dynamic-pruning-98-threshold" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "aneeshm44/gpt-oss-92b-dynamic-pruning-98-threshold", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "aneeshm44/gpt-oss-92b-dynamic-pruning-98-threshold" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "aneeshm44/gpt-oss-92b-dynamic-pruning-98-threshold", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use aneeshm44/gpt-oss-92b-dynamic-pruning-98-threshold with Docker Model Runner:
docker model run hf.co/aneeshm44/gpt-oss-92b-dynamic-pruning-98-threshold
Upload config.json with huggingface_hub
Browse files- config.json +126 -0
config.json
ADDED
|
@@ -0,0 +1,126 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"GptOssForCausalLM"
|
| 4 |
+
],
|
| 5 |
+
"attention_bias": true,
|
| 6 |
+
"attention_dropout": 0.0,
|
| 7 |
+
"eos_token_id": 200002,
|
| 8 |
+
"experts_per_token": 4,
|
| 9 |
+
"head_dim": 64,
|
| 10 |
+
"hidden_act": "silu",
|
| 11 |
+
"hidden_size": 2880,
|
| 12 |
+
"initial_context_length": 4096,
|
| 13 |
+
"initializer_range": 0.02,
|
| 14 |
+
"intermediate_size": 2880,
|
| 15 |
+
"layer_types": [
|
| 16 |
+
"sliding_attention",
|
| 17 |
+
"full_attention",
|
| 18 |
+
"sliding_attention",
|
| 19 |
+
"full_attention",
|
| 20 |
+
"sliding_attention",
|
| 21 |
+
"full_attention",
|
| 22 |
+
"sliding_attention",
|
| 23 |
+
"full_attention",
|
| 24 |
+
"sliding_attention",
|
| 25 |
+
"full_attention",
|
| 26 |
+
"sliding_attention",
|
| 27 |
+
"full_attention",
|
| 28 |
+
"sliding_attention",
|
| 29 |
+
"full_attention",
|
| 30 |
+
"sliding_attention",
|
| 31 |
+
"full_attention",
|
| 32 |
+
"sliding_attention",
|
| 33 |
+
"full_attention",
|
| 34 |
+
"sliding_attention",
|
| 35 |
+
"full_attention",
|
| 36 |
+
"sliding_attention",
|
| 37 |
+
"full_attention",
|
| 38 |
+
"sliding_attention",
|
| 39 |
+
"full_attention",
|
| 40 |
+
"sliding_attention",
|
| 41 |
+
"full_attention",
|
| 42 |
+
"sliding_attention",
|
| 43 |
+
"full_attention",
|
| 44 |
+
"sliding_attention",
|
| 45 |
+
"full_attention",
|
| 46 |
+
"sliding_attention",
|
| 47 |
+
"full_attention",
|
| 48 |
+
"sliding_attention",
|
| 49 |
+
"full_attention",
|
| 50 |
+
"sliding_attention",
|
| 51 |
+
"full_attention"
|
| 52 |
+
],
|
| 53 |
+
"max_position_embeddings": 131072,
|
| 54 |
+
"model_type": "gpt_oss",
|
| 55 |
+
"num_attention_heads": 64,
|
| 56 |
+
"num_experts_per_tok": 4,
|
| 57 |
+
"num_hidden_layers": 36,
|
| 58 |
+
"num_key_value_heads": 8,
|
| 59 |
+
"num_local_experts": 114,
|
| 60 |
+
"output_router_logits": false,
|
| 61 |
+
"pad_token_id": 199999,
|
| 62 |
+
"quantization_config": {
|
| 63 |
+
"modules_to_not_convert": [
|
| 64 |
+
"model.layers.*.self_attn",
|
| 65 |
+
"model.layers.*.mlp.router",
|
| 66 |
+
"model.embed_tokens",
|
| 67 |
+
"lm_head"
|
| 68 |
+
],
|
| 69 |
+
"quant_method": "mxfp4"
|
| 70 |
+
},
|
| 71 |
+
"rms_norm_eps": 1e-05,
|
| 72 |
+
"rope_scaling": {
|
| 73 |
+
"beta_fast": 32.0,
|
| 74 |
+
"beta_slow": 1.0,
|
| 75 |
+
"factor": 32.0,
|
| 76 |
+
"original_max_position_embeddings": 4096,
|
| 77 |
+
"rope_type": "yarn",
|
| 78 |
+
"truncate": false
|
| 79 |
+
},
|
| 80 |
+
"rope_theta": 150000,
|
| 81 |
+
"router_aux_loss_coef": 0.9,
|
| 82 |
+
"sliding_window": 128,
|
| 83 |
+
"swiglu_limit": 7.0,
|
| 84 |
+
"tie_word_embeddings": false,
|
| 85 |
+
"transformers_version": "4.55.0.dev0",
|
| 86 |
+
"use_cache": true,
|
| 87 |
+
"vocab_size": 201088,
|
| 88 |
+
"num_local_experts_per_layer": [
|
| 89 |
+
114,
|
| 90 |
+
111,
|
| 91 |
+
102,
|
| 92 |
+
100,
|
| 93 |
+
102,
|
| 94 |
+
107,
|
| 95 |
+
106,
|
| 96 |
+
102,
|
| 97 |
+
101,
|
| 98 |
+
98,
|
| 99 |
+
92,
|
| 100 |
+
84,
|
| 101 |
+
92,
|
| 102 |
+
89,
|
| 103 |
+
98,
|
| 104 |
+
100,
|
| 105 |
+
97,
|
| 106 |
+
100,
|
| 107 |
+
103,
|
| 108 |
+
100,
|
| 109 |
+
104,
|
| 110 |
+
102,
|
| 111 |
+
103,
|
| 112 |
+
99,
|
| 113 |
+
101,
|
| 114 |
+
101,
|
| 115 |
+
101,
|
| 116 |
+
102,
|
| 117 |
+
97,
|
| 118 |
+
100,
|
| 119 |
+
104,
|
| 120 |
+
113,
|
| 121 |
+
102,
|
| 122 |
+
93,
|
| 123 |
+
94,
|
| 124 |
+
82
|
| 125 |
+
]
|
| 126 |
+
}
|