Image-Text-to-Text
Transformers
Safetensors
qwen3_5_moe
quantized
gptq
int4
Mixture of Experts
qwen3.6
mtp
speculative-decoding
conversational
4-bit precision
Instructions to use palmfuture/Qwen3.6-35B-A3B-GPTQ-Int4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use palmfuture/Qwen3.6-35B-A3B-GPTQ-Int4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="palmfuture/Qwen3.6-35B-A3B-GPTQ-Int4") 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("palmfuture/Qwen3.6-35B-A3B-GPTQ-Int4") model = AutoModelForMultimodalLM.from_pretrained("palmfuture/Qwen3.6-35B-A3B-GPTQ-Int4", 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 palmfuture/Qwen3.6-35B-A3B-GPTQ-Int4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "palmfuture/Qwen3.6-35B-A3B-GPTQ-Int4" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "palmfuture/Qwen3.6-35B-A3B-GPTQ-Int4", "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/palmfuture/Qwen3.6-35B-A3B-GPTQ-Int4
- SGLang
How to use palmfuture/Qwen3.6-35B-A3B-GPTQ-Int4 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 "palmfuture/Qwen3.6-35B-A3B-GPTQ-Int4" \ --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": "palmfuture/Qwen3.6-35B-A3B-GPTQ-Int4", "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 "palmfuture/Qwen3.6-35B-A3B-GPTQ-Int4" \ --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": "palmfuture/Qwen3.6-35B-A3B-GPTQ-Int4", "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 palmfuture/Qwen3.6-35B-A3B-GPTQ-Int4 with Docker Model Runner:
docker model run hf.co/palmfuture/Qwen3.6-35B-A3B-GPTQ-Int4
Update README.md
Browse files
README.md
CHANGED
|
@@ -25,6 +25,23 @@ GPTQ Int4 quantization of [Qwen/Qwen3.6-35B-A3B](https://huggingface.co/Qwen/Qwe
|
|
| 25 |
|
| 26 |
This v2 release ships **MTP (Multi-Token Prediction) speculative decoding weights** verified working on both vLLM 0.19.1 and SGLang 0.5.10.
|
| 27 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
## Quality
|
| 29 |
|
| 30 |
| Metric | Value |
|
|
@@ -134,6 +151,29 @@ vllm serve palmfuture/Qwen3.6-35B-A3B-GPTQ-Int4 \
|
|
| 134 |
|
| 135 |
Requires `trust_remote_code=True` for the Qwen3.5-MoE architecture.
|
| 136 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 137 |
## Speculative decoding (MTP)
|
| 138 |
|
| 139 |
This release ships **MTP (Multi-Token Prediction) weights** in the per-expert split format expected by vLLM and SGLang loaders (785 MTP keys total, all BF16). Speculative decoding is verified working on both engines.
|
|
@@ -164,6 +204,8 @@ Verified on vLLM 0.19.1 + 4× RTX 3060 12GB:
|
|
| 164 |
| Mean acceptance length | 2.4–2.8 / 2 draft tokens |
|
| 165 |
| KV pool | 160,800 tokens (262K max-model-len, 2.34× concurrency) |
|
| 166 |
|
|
|
|
|
|
|
| 167 |
### SGLang with MTP (EAGLE)
|
| 168 |
|
| 169 |
```bash
|
|
@@ -204,6 +246,7 @@ The full per-module quantization log is published as [`quant_log.csv`](./quant_l
|
|
| 204 |
- **Cold experts.** 157 of 256 expert IDs fell back to RTN in at least one layer; 99 always got GPTQ. Top cold experts: 235, 249, 234, 197, 237. These rarely route at inference.
|
| 205 |
- **Ampere-only limitations.** On RTX 3060 (SM86), fp8 KV cache is storage-only (dequantized for attention). No FP8 compute path.
|
| 206 |
- **vLLM `--quantization` flag.** Do not pass `--quantization moe_wna16` to vLLM — it triggers a `KeyError` in the MTP loader path. SGLang requires the flag; vLLM must auto-detect.
|
|
|
|
| 207 |
|
| 208 |
## Credits
|
| 209 |
|
|
@@ -214,4 +257,4 @@ The full per-module quantization log is published as [`quant_log.csv`](./quant_l
|
|
| 214 |
|
| 215 |
---
|
| 216 |
|
| 217 |
-
Quantized by [@palmfuture](https://huggingface.co/palmfuture).
|
|
|
|
| 25 |
|
| 26 |
This v2 release ships **MTP (Multi-Token Prediction) speculative decoding weights** verified working on both vLLM 0.19.1 and SGLang 0.5.10.
|
| 27 |
|
| 28 |
+
## ⚠️ Important: Thinking-mode infinite loops
|
| 29 |
+
|
| 30 |
+
Qwen3.6 has a documented [infinite-loop issue in thinking mode](https://github.com/QwenLM/Qwen3.6/issues/88) that affects all variants (BF16, FP8, AWQ, GPTQ) — this is a model-level issue, not a quantization defect. On hard problems, reasoning can run away and consume the entire `max_tokens` budget with repeated phrases like "Wait, but actually...".
|
| 31 |
+
|
| 32 |
+
**Recommended mitigation:** set a server-side `thinking_token_budget` using [vllm-default-thinking-budget](https://github.com/palmfuture/vllm-default-thinking-budget):
|
| 33 |
+
|
| 34 |
+
```bash
|
| 35 |
+
git clone https://github.com/palmfuture/vllm-default-thinking-budget
|
| 36 |
+
./vllm-default-thinking-budget/install.sh /path/to/your/vllm/venv
|
| 37 |
+
|
| 38 |
+
export VLLM_DEFAULT_THINKING_BUDGET=8192 # cap reasoning tokens
|
| 39 |
+
export VLLM_DEFAULT_PRESENCE_PENALTY=1.0 # repetition suppression
|
| 40 |
+
vllm serve palmfuture/Qwen3.6-35B-A3B-GPTQ-Int4 ...
|
| 41 |
+
```
|
| 42 |
+
|
| 43 |
+
This works around vLLM [issue #28070](https://github.com/vllm-project/vllm/issues/28070) where `--override-generation-config` silently drops `thinking_token_budget` and `presence_penalty`. See [Recommended sampling config](#recommended-sampling-config) below for tuning by workload.
|
| 44 |
+
|
| 45 |
## Quality
|
| 46 |
|
| 47 |
| Metric | Value |
|
|
|
|
| 151 |
|
| 152 |
Requires `trust_remote_code=True` for the Qwen3.5-MoE architecture.
|
| 153 |
|
| 154 |
+
## Recommended sampling config
|
| 155 |
+
|
| 156 |
+
For thinking mode, follow [official Qwen3.6 guidance](https://huggingface.co/Qwen/Qwen3.6-35B-A3B) plus a server-side `thinking_token_budget` to prevent runaway reasoning:
|
| 157 |
+
|
| 158 |
+
```bash
|
| 159 |
+
vllm serve palmfuture/Qwen3.6-35B-A3B-GPTQ-Int4 \
|
| 160 |
+
--override-generation-config '{"temperature": 0.6, "top_p": 0.95, "top_k": 20, "min_p": 0.0}' \
|
| 161 |
+
--reasoning-parser qwen3 \
|
| 162 |
+
--reasoning-config '{"reasoning_start_str": "<think>", "reasoning_end_str": " I need to give the final answer now.</think>"}' \
|
| 163 |
+
...
|
| 164 |
+
```
|
| 165 |
+
|
| 166 |
+
Combine with [vllm-default-thinking-budget](https://github.com/palmfuture/vllm-default-thinking-budget) for the budget defaults:
|
| 167 |
+
|
| 168 |
+
| Workload | `VLLM_DEFAULT_THINKING_BUDGET` | Notes |
|
| 169 |
+
|----------|--------------------------------|-------|
|
| 170 |
+
| Agent / tool calls | 2048–4096 | Low reasoning need, fast response |
|
| 171 |
+
| General chat | 8192 | Balanced default |
|
| 172 |
+
| Coding tasks | 8192–16384 | Includes refactor and debug |
|
| 173 |
+
| Math / hard reasoning | 16384–32768 | Approaching official 80K guidance |
|
| 174 |
+
|
| 175 |
+
The `reasoning_end_str` injection ensures the model produces a coherent final answer when the budget is exceeded, instead of cutting off mid-thought.
|
| 176 |
+
|
| 177 |
## Speculative decoding (MTP)
|
| 178 |
|
| 179 |
This release ships **MTP (Multi-Token Prediction) weights** in the per-expert split format expected by vLLM and SGLang loaders (785 MTP keys total, all BF16). Speculative decoding is verified working on both engines.
|
|
|
|
| 204 |
| Mean acceptance length | 2.4–2.8 / 2 draft tokens |
|
| 205 |
| KV pool | 160,800 tokens (262K max-model-len, 2.34× concurrency) |
|
| 206 |
|
| 207 |
+
> **Note:** MTP and `thinking_token_budget` cannot be used together on vLLM 0.19.x ([vLLM issue #39573](https://github.com/vllm-project/vllm/issues/39573)). Choose MTP for throughput on stable workloads, or drop MTP and use `thinking_token_budget` for loop protection on reasoning-heavy workloads.
|
| 208 |
+
|
| 209 |
### SGLang with MTP (EAGLE)
|
| 210 |
|
| 211 |
```bash
|
|
|
|
| 246 |
- **Cold experts.** 157 of 256 expert IDs fell back to RTN in at least one layer; 99 always got GPTQ. Top cold experts: 235, 249, 234, 197, 237. These rarely route at inference.
|
| 247 |
- **Ampere-only limitations.** On RTX 3060 (SM86), fp8 KV cache is storage-only (dequantized for attention). No FP8 compute path.
|
| 248 |
- **vLLM `--quantization` flag.** Do not pass `--quantization moe_wna16` to vLLM — it triggers a `KeyError` in the MTP loader path. SGLang requires the flag; vLLM must auto-detect.
|
| 249 |
+
- **Thinking-mode loops.** Affects all Qwen3.6-35B-A3B variants regardless of quantization. Use [vllm-default-thinking-budget](https://github.com/palmfuture/vllm-default-thinking-budget) for server-side mitigation.
|
| 250 |
|
| 251 |
## Credits
|
| 252 |
|
|
|
|
| 257 |
|
| 258 |
---
|
| 259 |
|
| 260 |
+
Quantized by [@palmfuture](https://huggingface.co/palmfuture).
|