hekmon commited on
Commit
f538d0d
·
verified ·
1 Parent(s): b496cc6

add exemples for turboquant

Browse files
Files changed (1) hide show
  1. README.md +75 -1
README.md CHANGED
@@ -91,12 +91,86 @@ This is recommended for latency-focused serving scenarios (not total throughput/
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
  ```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 \