Views
No views yet
[!IMPORTANT]Multi-Token Prediction (MTP) Layers Grafted on INT8 Quantization
This repo is the TheHouseOfTheDude/Qwen3.6-27B-INT8 W8A16 PTQ quantization with unquantized BF16 MTP layers grafted on top.
- Base quantization: TheHouseOfTheDude Qwen3.6-27B-INT8 — INT8 weights, FP16/BF16 activations via
compressed-tensors(pack-quantized format). See the original repo for quantization details and KLD results.- MTP layers: Taken from Qwen/Qwen3.6-27B in full BF16 precision and added as a second safetensors file (
model-00002-of-00002.safetensors).- Chat template (v9): Updated from froggeric/Qwen-Fixed-Chat-Templates. Fixes broken
</think>tags, misplaced tool calls inside think blocks, and other structural issues that break agentic coding and OpenClaw usage.- Why BF16 for MTP? MTP layers were excluded from the original quantization recipe (
ignore: ['re:.*mtp.*']). Keeping them unquantized avoids any loss of draft-token quality while adding only ~850 MB of overhead.config.jsonincludesre:.*mtp.*in thequantization_config.ignorelist so vLLM skips quantization wrapping for MTP Linear layers during loading.To serve with MTP enabled, use:bash1vllm serve havenoammo/Qwen3.6-27B-INT8-MTP \ 2 --tensor-parallel-size 2 \ 3 --speculative-config '{"method":"mtp","num_speculative_tokens":2}'
compressed-tensors / pack-quantized (2-file sharded safetensors)[!TIP] W8A16 (INT8 weights, FP16/BF16 activations) runs efficiently on Ampere (A100/RTX 3090) and newer GPUs. The INT8 weights halve the weight memory compared to BF16, while activations stay in FP16/BF16 for full precision. Pair with--kv-cache-dtype fp8_e4m3to cut KV cache memory further on supported hardware.
| File | Size | Contents |
|---|---|---|
model-00001-of-00002.safetensors | ~33 GB | INT8 quantized base model weights |
model-00002-of-00002.safetensors | ~850 MB | BF16 MTP layer weights |
model.safetensors.index.json | — | Weight index mapping |
[!NOTE] Adjust--tensor-parallel-sizeandCUDA_VISIBLE_DEVICESto match your GPU setup. This model requires at least 2 × 24 GB GPUs (e.g. dual RTX 3090/4090) with TP=2. The INT8 weights are ~33 GB plus ~850 MB for MTP layers, plus KV cache and activation overhead. For larger setups, scale up to TP=4 or TP=8 accordingly.
1CUDA_VISIBLE_DEVICES=0,1 vllm serve havenoammo/Qwen3.6-27B-INT8-MTP \
2 --tensor-parallel-size 2 \
3 --gpu-memory-utilization 0.95 \
4 --kv-cache-dtype fp8_e4m3 \
5 --max-model-len 262144 \
6 --language-model-only \
7 --speculative-config '{"method":"mtp","num_speculative_tokens":2}' \
8 --default-chat-template-kwargs '{"enable_thinking": true, "preserve_thinking": true}' \
9 --attention-backend FLASHINFER \
10 --reasoning-parser qwen3 \
11 --tool-call-parser qwen3_xml1CUDA_VISIBLE_DEVICES=0,1 vllm serve havenoammo/Qwen3.6-27B-INT8-MTP \
2 --tensor-parallel-size 2 \
3 --gpu-memory-utilization 0.95 \
4 --trust-remote-code \
5 --max-model-len 200000 \
6 --max-num-seqs 2 \
7 --kv-cache-dtype fp8_e4m3 \
8 --max-num-batched-tokens 4096 \
9 --language-model-only \
10 --performance-mode interactivity \
11 --speculative-config '{"method":"mtp","num_speculative_tokens":2}' \
12 --skip-mm-profiling \
13 --attention-backend FLASHINFER \
14 --async-scheduling \
15 --enable-chunked-prefill \
16 --enable-prefix-caching \
17 --mamba-cache-mode all \
18 --mamba-block-size 8 \
19 --reasoning-parser qwen3 \
20 --kv-cache-metrics \
21 --enable-prompt-tokens-details \
22 --enable-auto-tool-choice \
23 --tool-call-parser qwen3_xml \
24 --default-chat-template-kwargs '{"enable_thinking": true, "preserve_thinking": true}'