Text Generation
Transformers
Safetensors
qwen3_5
image-text-to-text
qwen3.6
nvfp4
quantized
modelopt
mtp
speculative-decoding
blackwell
text-only
conversational
8-bit precision
Instructions to use sakamakismile/Qwen3.6-27B-Text-NVFP4-MTP with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use sakamakismile/Qwen3.6-27B-Text-NVFP4-MTP with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="sakamakismile/Qwen3.6-27B-Text-NVFP4-MTP") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("sakamakismile/Qwen3.6-27B-Text-NVFP4-MTP") model = AutoModelForMultimodalLM.from_pretrained("sakamakismile/Qwen3.6-27B-Text-NVFP4-MTP", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] 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 sakamakismile/Qwen3.6-27B-Text-NVFP4-MTP with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "sakamakismile/Qwen3.6-27B-Text-NVFP4-MTP" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sakamakismile/Qwen3.6-27B-Text-NVFP4-MTP", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/sakamakismile/Qwen3.6-27B-Text-NVFP4-MTP
- SGLang
How to use sakamakismile/Qwen3.6-27B-Text-NVFP4-MTP 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 "sakamakismile/Qwen3.6-27B-Text-NVFP4-MTP" \ --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": "sakamakismile/Qwen3.6-27B-Text-NVFP4-MTP", "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 "sakamakismile/Qwen3.6-27B-Text-NVFP4-MTP" \ --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": "sakamakismile/Qwen3.6-27B-Text-NVFP4-MTP", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use sakamakismile/Qwen3.6-27B-Text-NVFP4-MTP with Docker Model Runner:
docker model run hf.co/sakamakismile/Qwen3.6-27B-Text-NVFP4-MTP
README: n=3 spec recommended (132/105/106 tok/s); document mtp.fc bf16 = Lorbus trick
Browse files
README.md
CHANGED
|
@@ -73,11 +73,13 @@ vllm serve sakamakismile/Qwen3.6-27B-Text-NVFP4-MTP \
|
|
| 73 |
--trust-remote-code \
|
| 74 |
--gpu-memory-utilization 0.85 \
|
| 75 |
--max-model-len 8192 \
|
|
|
|
| 76 |
--quantization modelopt \
|
| 77 |
-
--
|
|
|
|
| 78 |
```
|
| 79 |
|
| 80 |
-
`num_speculative_tokens:
|
| 81 |
|
| 82 |
### Without speculation
|
| 83 |
|
|
@@ -86,9 +88,24 @@ vllm serve sakamakismile/Qwen3.6-27B-Text-NVFP4-MTP \
|
|
| 86 |
--trust-remote-code \
|
| 87 |
--gpu-memory-utilization 0.85 \
|
| 88 |
--max-model-len 8192 \
|
|
|
|
| 89 |
--quantization modelopt
|
| 90 |
```
|
| 91 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 92 |
## Hardware target
|
| 93 |
|
| 94 |
Built and tested on **NVIDIA RTX PRO 6000 Blackwell (SM120)**. Should also work on **RTX 5090** and other Blackwell consumer/workstation cards with sufficient VRAM (the model is roughly 14 GB after NVFP4 + ~850 MB of bf16 MTP/conv1d/lm_head).
|
|
|
|
| 73 |
--trust-remote-code \
|
| 74 |
--gpu-memory-utilization 0.85 \
|
| 75 |
--max-model-len 8192 \
|
| 76 |
+
--language-model-only \
|
| 77 |
--quantization modelopt \
|
| 78 |
+
--reasoning-parser qwen3 \
|
| 79 |
+
--speculative-config '{"method":"qwen3_5_mtp","num_speculative_tokens":3}'
|
| 80 |
```
|
| 81 |
|
| 82 |
+
`num_speculative_tokens: 3` is the **recommended setting** even though the model has a single MTP layer (`mtp_num_hidden_layers=1`): vLLM applies that one layer recursively three times per draft pass, and on Qwen3.5/3.6-family models the per-position acceptance rates stay high enough (typically ~87 / ~72 / ~61 % at positions 1 / 2 / 3) that mean accepted-length lands around 3.0 — which is what unlocks 100+ tok/s on a single Blackwell card. `num_speculative_tokens: 1` (the value originally documented for this family) is a safer fallback if you hit a draft-path bug. The `qwen3_5_mtp` method handler is what vLLM uses for the Qwen3.5/3.6 family (internal `model_type: qwen3_5`); plain `mtp` also works as a fallback.
|
| 83 |
|
| 84 |
### Without speculation
|
| 85 |
|
|
|
|
| 88 |
--trust-remote-code \
|
| 89 |
--gpu-memory-utilization 0.85 \
|
| 90 |
--max-model-len 8192 \
|
| 91 |
+
--language-model-only \
|
| 92 |
--quantization modelopt
|
| 93 |
```
|
| 94 |
|
| 95 |
+
## Verified throughput
|
| 96 |
+
|
| 97 |
+
Single-request decode, T = 0, 9 runs across 3 prompt lengths on 1 × RTX PRO 6000 Blackwell, vLLM 0.19.1rc1:
|
| 98 |
+
|
| 99 |
+
| Prompt | Tokens | n=1 tok/s | **n=3 tok/s** |
|
| 100 |
+
|---|---|---|---|
|
| 101 |
+
| Short (50 tok) | 50 | ~71 | **132.5** |
|
| 102 |
+
| Medium (350 tok) | 350 | ~85 | **105.5** |
|
| 103 |
+
| Long-form (700 tok) | 700 | ~85 | **106.5** |
|
| 104 |
+
|
| 105 |
+
GPU memory at load: ~15 GB. Mean acceptance length 1.93 / 2.0 at n=1, ~3.0 / 4.0 at n=3 (per-position accept ~87 / 72 / 61 %, matches Pulsate1680's RTX PRO 4500 Blackwell result on this same checkpoint).
|
| 106 |
+
|
| 107 |
+
The `mtp.fc` weight is kept in **bf16** in the safetensors (not NVFP4) — equivalent to the Lorbus-style "dequantize the fusion layer in the file" trick, applied to NVFP4 instead of AutoRound. This is a side effect of the `*mtp*` ignore entry in the modelopt config, but it is the load-bearing detail behind the n=3 throughput.
|
| 108 |
+
|
| 109 |
## Hardware target
|
| 110 |
|
| 111 |
Built and tested on **NVIDIA RTX PRO 6000 Blackwell (SM120)**. Should also work on **RTX 5090** and other Blackwell consumer/workstation cards with sufficient VRAM (the model is roughly 14 GB after NVFP4 + ~850 MB of bf16 MTP/conv1d/lm_head).
|