Text Generation
Transformers
Safetensors
qwen3_5_moe
expert-pruning
mixture-of-experts
pruned
qwen3.6
reap
conversational
Instructions to use 0xSero/Qwen3.6-28B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use 0xSero/Qwen3.6-28B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="0xSero/Qwen3.6-28B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoProcessor, AutoModelForCausalLM processor = AutoProcessor.from_pretrained("0xSero/Qwen3.6-28B") model = AutoModelForCausalLM.from_pretrained("0xSero/Qwen3.6-28B") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = processor.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(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use 0xSero/Qwen3.6-28B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "0xSero/Qwen3.6-28B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "0xSero/Qwen3.6-28B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/0xSero/Qwen3.6-28B
- SGLang
How to use 0xSero/Qwen3.6-28B 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 "0xSero/Qwen3.6-28B" \ --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": "0xSero/Qwen3.6-28B", "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 "0xSero/Qwen3.6-28B" \ --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": "0xSero/Qwen3.6-28B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use 0xSero/Qwen3.6-28B with Docker Model Runner:
docker model run hf.co/0xSero/Qwen3.6-28B
Fix config: use wrapper form with text_config for vLLM compatibility
Browse filesPrevious flat-form commit (c69703c) changed model_type to qwen3_5_moe but left fields at top level. Qwen3_5MoeConfig.__init__ expects a text_config dict; when absent it defaults num_experts to 256, causing IndexError on the 205-expert REAP checkpoint. This commit uses the proper wrapper structure with text_config carrying num_experts=205.
- config.json +82 -85
config.json
CHANGED
|
@@ -2,94 +2,91 @@
|
|
| 2 |
"architectures": [
|
| 3 |
"Qwen3_5MoeForCausalLM"
|
| 4 |
],
|
| 5 |
-
"attention_bias": false,
|
| 6 |
-
"attention_dropout": 0.0,
|
| 7 |
-
"attn_output_gate": true,
|
| 8 |
"bos_token_id": 248044,
|
| 9 |
-
"dtype": "bfloat16",
|
| 10 |
"eos_token_id": 248044,
|
| 11 |
-
"full_attention_interval": 4,
|
| 12 |
-
"head_dim": 256,
|
| 13 |
-
"hidden_act": "silu",
|
| 14 |
-
"hidden_size": 2048,
|
| 15 |
-
"initializer_range": 0.02,
|
| 16 |
-
"layer_types": [
|
| 17 |
-
"linear_attention",
|
| 18 |
-
"linear_attention",
|
| 19 |
-
"linear_attention",
|
| 20 |
-
"full_attention",
|
| 21 |
-
"linear_attention",
|
| 22 |
-
"linear_attention",
|
| 23 |
-
"linear_attention",
|
| 24 |
-
"full_attention",
|
| 25 |
-
"linear_attention",
|
| 26 |
-
"linear_attention",
|
| 27 |
-
"linear_attention",
|
| 28 |
-
"full_attention",
|
| 29 |
-
"linear_attention",
|
| 30 |
-
"linear_attention",
|
| 31 |
-
"linear_attention",
|
| 32 |
-
"full_attention",
|
| 33 |
-
"linear_attention",
|
| 34 |
-
"linear_attention",
|
| 35 |
-
"linear_attention",
|
| 36 |
-
"full_attention",
|
| 37 |
-
"linear_attention",
|
| 38 |
-
"linear_attention",
|
| 39 |
-
"linear_attention",
|
| 40 |
-
"full_attention",
|
| 41 |
-
"linear_attention",
|
| 42 |
-
"linear_attention",
|
| 43 |
-
"linear_attention",
|
| 44 |
-
"full_attention",
|
| 45 |
-
"linear_attention",
|
| 46 |
-
"linear_attention",
|
| 47 |
-
"linear_attention",
|
| 48 |
-
"full_attention",
|
| 49 |
-
"linear_attention",
|
| 50 |
-
"linear_attention",
|
| 51 |
-
"linear_attention",
|
| 52 |
-
"full_attention",
|
| 53 |
-
"linear_attention",
|
| 54 |
-
"linear_attention",
|
| 55 |
-
"linear_attention",
|
| 56 |
-
"full_attention"
|
| 57 |
-
],
|
| 58 |
-
"linear_conv_kernel_dim": 4,
|
| 59 |
-
"linear_key_head_dim": 128,
|
| 60 |
-
"linear_num_key_heads": 16,
|
| 61 |
-
"linear_num_value_heads": 32,
|
| 62 |
-
"linear_value_head_dim": 128,
|
| 63 |
-
"mamba_ssm_dtype": "float32",
|
| 64 |
-
"max_position_embeddings": 262144,
|
| 65 |
"model_type": "qwen3_5_moe",
|
| 66 |
-
"
|
| 67 |
-
"
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 84 |
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 85 |
"partial_rotary_factor": 0.25,
|
| 86 |
-
"
|
| 87 |
-
"
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 95 |
}
|
|
|
|
| 2 |
"architectures": [
|
| 3 |
"Qwen3_5MoeForCausalLM"
|
| 4 |
],
|
|
|
|
|
|
|
|
|
|
| 5 |
"bos_token_id": 248044,
|
|
|
|
| 6 |
"eos_token_id": 248044,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
"model_type": "qwen3_5_moe",
|
| 8 |
+
"tie_word_embeddings": false,
|
| 9 |
+
"text_config": {
|
| 10 |
+
"attention_bias": false,
|
| 11 |
+
"attention_dropout": 0.0,
|
| 12 |
+
"attn_output_gate": true,
|
| 13 |
+
"full_attention_interval": 4,
|
| 14 |
+
"head_dim": 256,
|
| 15 |
+
"hidden_act": "silu",
|
| 16 |
+
"hidden_size": 2048,
|
| 17 |
+
"initializer_range": 0.02,
|
| 18 |
+
"layer_types": [
|
| 19 |
+
"linear_attention",
|
| 20 |
+
"linear_attention",
|
| 21 |
+
"linear_attention",
|
| 22 |
+
"full_attention",
|
| 23 |
+
"linear_attention",
|
| 24 |
+
"linear_attention",
|
| 25 |
+
"linear_attention",
|
| 26 |
+
"full_attention",
|
| 27 |
+
"linear_attention",
|
| 28 |
+
"linear_attention",
|
| 29 |
+
"linear_attention",
|
| 30 |
+
"full_attention",
|
| 31 |
+
"linear_attention",
|
| 32 |
+
"linear_attention",
|
| 33 |
+
"linear_attention",
|
| 34 |
+
"full_attention",
|
| 35 |
+
"linear_attention",
|
| 36 |
+
"linear_attention",
|
| 37 |
+
"linear_attention",
|
| 38 |
+
"full_attention",
|
| 39 |
+
"linear_attention",
|
| 40 |
+
"linear_attention",
|
| 41 |
+
"linear_attention",
|
| 42 |
+
"full_attention",
|
| 43 |
+
"linear_attention",
|
| 44 |
+
"linear_attention",
|
| 45 |
+
"linear_attention",
|
| 46 |
+
"full_attention",
|
| 47 |
+
"linear_attention",
|
| 48 |
+
"linear_attention",
|
| 49 |
+
"linear_attention",
|
| 50 |
+
"full_attention",
|
| 51 |
+
"linear_attention",
|
| 52 |
+
"linear_attention",
|
| 53 |
+
"linear_attention",
|
| 54 |
+
"full_attention",
|
| 55 |
+
"linear_attention",
|
| 56 |
+
"linear_attention",
|
| 57 |
+
"linear_attention",
|
| 58 |
+
"full_attention"
|
| 59 |
],
|
| 60 |
+
"linear_conv_kernel_dim": 4,
|
| 61 |
+
"linear_key_head_dim": 128,
|
| 62 |
+
"linear_num_key_heads": 16,
|
| 63 |
+
"linear_num_value_heads": 32,
|
| 64 |
+
"linear_value_head_dim": 128,
|
| 65 |
+
"mamba_ssm_dtype": "float32",
|
| 66 |
+
"max_position_embeddings": 262144,
|
| 67 |
+
"moe_intermediate_size": 512,
|
| 68 |
+
"mtp_num_hidden_layers": 1,
|
| 69 |
+
"mtp_use_dedicated_embeddings": false,
|
| 70 |
+
"num_attention_heads": 16,
|
| 71 |
+
"num_experts": 205,
|
| 72 |
+
"num_experts_per_tok": 8,
|
| 73 |
+
"num_hidden_layers": 40,
|
| 74 |
+
"num_key_value_heads": 2,
|
| 75 |
+
"output_router_logits": false,
|
| 76 |
+
"pad_token_id": null,
|
| 77 |
"partial_rotary_factor": 0.25,
|
| 78 |
+
"rms_norm_eps": 1e-06,
|
| 79 |
+
"rope_parameters": {
|
| 80 |
+
"mrope_interleaved": true,
|
| 81 |
+
"mrope_section": [11, 11, 10],
|
| 82 |
+
"partial_rotary_factor": 0.25,
|
| 83 |
+
"rope_theta": 10000000,
|
| 84 |
+
"rope_type": "default"
|
| 85 |
+
},
|
| 86 |
+
"router_aux_loss_coef": 0.001,
|
| 87 |
+
"shared_expert_intermediate_size": 512,
|
| 88 |
+
"use_cache": true,
|
| 89 |
+
"vocab_size": 248320,
|
| 90 |
+
"model_type": "qwen3_5_moe_text"
|
| 91 |
+
}
|
| 92 |
}
|