Image-Text-to-Text
Transformers
Safetensors
qwen3_5_moe
conversational
8-bit precision
compressed-tensors
Instructions to use ig1/Qwen3.6-35B-A3B-NVFP4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ig1/Qwen3.6-35B-A3B-NVFP4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="ig1/Qwen3.6-35B-A3B-NVFP4") 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("ig1/Qwen3.6-35B-A3B-NVFP4") model = AutoModelForMultimodalLM.from_pretrained("ig1/Qwen3.6-35B-A3B-NVFP4", 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 ig1/Qwen3.6-35B-A3B-NVFP4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ig1/Qwen3.6-35B-A3B-NVFP4" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ig1/Qwen3.6-35B-A3B-NVFP4", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/ig1/Qwen3.6-35B-A3B-NVFP4
- SGLang
How to use ig1/Qwen3.6-35B-A3B-NVFP4 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 "ig1/Qwen3.6-35B-A3B-NVFP4" \ --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": "ig1/Qwen3.6-35B-A3B-NVFP4", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "ig1/Qwen3.6-35B-A3B-NVFP4" \ --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": "ig1/Qwen3.6-35B-A3B-NVFP4", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use ig1/Qwen3.6-35B-A3B-NVFP4 with Docker Model Runner:
docker model run hf.co/ig1/Qwen3.6-35B-A3B-NVFP4
add exemples for turboquant
Browse files
README.md
CHANGED
|
@@ -91,12 +91,86 @@ This is recommended for latency-focused serving scenarios (not total throughput/
|
|
| 91 |
|
| 92 |
---
|
| 93 |
|
| 94 |
-
##
|
| 95 |
|
| 96 |
Because of the increase model size from its previous versions (Qwen3-30B-A3B-Thinking-2507 and Qwen3-30B-A3B-Instruct-2507 were 30B not 35B) but also because of its mamba hybrid architecture and its native vision support (layers excluded from the quantization) the final model size is bigger (~ +5GiB) which make its inference by a RTX 5090 with only 32 GiB of RAM challenging.
|
| 97 |
|
| 98 |
If you really want/need to, it is still possible by tuning a few parameters (and accepting a lower max model len/kv cache size and requests concurrency).
|
| 99 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 100 |
```bash
|
| 101 |
docker run --rm --name 'Qwen3.6-35B-A3B-NVFP4' \
|
| 102 |
--runtime=nvidia --gpus 'all' --ipc=host \
|
|
|
|
| 91 |
|
| 92 |
---
|
| 93 |
|
| 94 |
+
## RTX 5090 Optimized Deployment
|
| 95 |
|
| 96 |
Because of the increase model size from its previous versions (Qwen3-30B-A3B-Thinking-2507 and Qwen3-30B-A3B-Instruct-2507 were 30B not 35B) but also because of its mamba hybrid architecture and its native vision support (layers excluded from the quantization) the final model size is bigger (~ +5GiB) which make its inference by a RTX 5090 with only 32 GiB of RAM challenging.
|
| 97 |
|
| 98 |
If you really want/need to, it is still possible by tuning a few parameters (and accepting a lower max model len/kv cache size and requests concurrency).
|
| 99 |
|
| 100 |
+
### With turboquant (recommended)
|
| 101 |
+
|
| 102 |
+
vLLM v0.21.0 landed support of TurbotQuant for hybrid models like Qwen3.5/3.6, drastically enhancing the available KV cache available on a limited VRAM.
|
| 103 |
+
|
| 104 |
+
With a headless environment (no graphical env) you can push the memory usage to `0.95`. Without it is best to set it to `0.875` if you have graphical apps (like Zed) that use the GPU as well but you can try to push it to `0.9` beware that it might not leave the host enought.
|
| 105 |
+
|
| 106 |
+
With `0.875`:
|
| 107 |
+
```
|
| 108 |
+
(EngineCore pid=139) INFO 05-15 15:37:22 [gpu_worker.py:462] Available KV cache memory: 1.59 GiB
|
| 109 |
+
...
|
| 110 |
+
(EngineCore pid=139) INFO 05-15 15:37:22 [kv_cache_utils.py:1871] Auto-fit max_model_len: reduced from 262144 to 210368 to fit in available GPU memory (1.59 GiB available for KV cache)
|
| 111 |
+
(EngineCore pid=139) INFO 05-15 15:37:22 [kv_cache_utils.py:1710] GPU KV cache size: 210,368 tokens
|
| 112 |
+
(EngineCore pid=139) INFO 05-15 15:37:22 [kv_cache_utils.py:1711] Maximum concurrency for 210,368 tokens per request: 1.00x
|
| 113 |
+
```
|
| 114 |
+
|
| 115 |
+
With `0.9`:
|
| 116 |
+
```
|
| 117 |
+
(EngineCore pid=139) INFO 05-15 15:21:12 [gpu_worker.py:462] Available KV cache memory: 2.69 GiB
|
| 118 |
+
...
|
| 119 |
+
(EngineCore pid=139) INFO 05-15 15:21:12 [kv_cache_utils.py:1863] Auto-fit max_model_len: full model context length 262144 fits in available GPU memory
|
| 120 |
+
(EngineCore pid=139) INFO 05-15 15:21:12 [kv_cache_utils.py:1710] GPU KV cache size: 358,441 tokens
|
| 121 |
+
(EngineCore pid=139) INFO 05-15 15:21:12 [kv_cache_utils.py:1711] Maximum concurrency for 262,144 tokens per request: 1.37x
|
| 122 |
+
```
|
| 123 |
+
|
| 124 |
+
#### Linux
|
| 125 |
+
|
| 126 |
+
bash command:
|
| 127 |
+
```bash
|
| 128 |
+
docker run --name 'Qwen3.6-35B-A3B-NVFP4-KVTBQ' \
|
| 129 |
+
--runtime=nvidia --gpus 'all' --ipc=host \
|
| 130 |
+
-e 'HF_TOKEN' \
|
| 131 |
+
-v '/srv/cache:/root/.cache' \
|
| 132 |
+
-p '127.0.0.1:8000:8000' \
|
| 133 |
+
'vllm/vllm-openai:v0.21.0' \
|
| 134 |
+
'ig1/Qwen3.6-35B-A3B-NVFP4' \
|
| 135 |
+
--served-model-name 'Qwen3.6-35B-A3B' \
|
| 136 |
+
--reasoning-parser 'qwen3' \
|
| 137 |
+
--enable-auto-tool-choice \
|
| 138 |
+
--tool-call-parser 'qwen3_coder' \
|
| 139 |
+
--max-model-len 'auto' \
|
| 140 |
+
--limit-mm-per-prompt.video 0 \
|
| 141 |
+
--max-cudagraph-capture-size 32 \
|
| 142 |
+
--max-num-seqs 32 \
|
| 143 |
+
--max-num-batched-tokens 2048 \
|
| 144 |
+
--kv-cache-dtype 'turboquant_k8v4' \
|
| 145 |
+
--gpu-memory-utilization '0.875'
|
| 146 |
+
```
|
| 147 |
+
|
| 148 |
+
#### Windows with Docker and WSL
|
| 149 |
+
|
| 150 |
+
powershell command:
|
| 151 |
+
```powershell
|
| 152 |
+
docker run --name 'Qwen3.6-35B-A3B-NVFP4-KVTBQ' `
|
| 153 |
+
--runtime=nvidia --gpus 'all' --ipc=host `
|
| 154 |
+
-e 'HF_TOKEN' `
|
| 155 |
+
-v 'E:\cache:/root/.cache' `
|
| 156 |
+
-p '127.0.0.1:8000:8000' `
|
| 157 |
+
'vllm/vllm-openai:v0.21.0' `
|
| 158 |
+
'ig1/Qwen3.6-35B-A3B-NVFP4' `
|
| 159 |
+
--served-model-name 'Qwen3.6-35B-A3B' `
|
| 160 |
+
--reasoning-parser 'qwen3' `
|
| 161 |
+
--enable-auto-tool-choice `
|
| 162 |
+
--tool-call-parser 'qwen3_coder' `
|
| 163 |
+
--max-model-len 'auto' `
|
| 164 |
+
--limit-mm-per-prompt.video 0 `
|
| 165 |
+
--max-cudagraph-capture-size 32 `
|
| 166 |
+
--max-num-seqs 32 `
|
| 167 |
+
--max-num-batched-tokens 2048 `
|
| 168 |
+
--kv-cache-dtype 'turboquant_k8v4' `
|
| 169 |
+
--gpu-memory-utilization '0.875'
|
| 170 |
+
```
|
| 171 |
+
|
| 172 |
+
### Without turboquant (old, not recommended)
|
| 173 |
+
|
| 174 |
```bash
|
| 175 |
docker run --rm --name 'Qwen3.6-35B-A3B-NVFP4' \
|
| 176 |
--runtime=nvidia --gpus 'all' --ipc=host \
|