Views
No views yet
IQ4_KS GGUF quantization of Qwen3.6-27B that preserves the MTP (Multi-Token Prediction) layers, allowing for significantly faster text generation via speculative decoding.ik_llama.cpp to retain the MTP head while shrinking the VRAM requirements down to a highly efficient Q4 footprint.llama-server on a 3090 to measure evaluation speed. Enabling Multi-Token Prediction with 1 draft token yields roughly a 16% speedup over standard inference.| Configuration | Speed | Setup / Flags |
|---|---|---|
| MTP Max 1 | 28.99 t/s | -mtp --draft-max 1 --draft-p-min 0.0 |
| Baseline (No MTP) | 24.99 t/s | (No MTP flags) |
| MTP Max 2 | 24.84 t/s | -mtp --draft-max 2 --draft-p-min 0.0 |
wiki.test.raw with n_ctx=512 over 580 chunks. Tests confirm that enabling MTP decoding does not negatively impact the perplexity score:| Quant | Size | Without MTP PPL | With MTP PPL |
|---|---|---|---|
| Hybrid IQ4_KS | 16.8 GiB | 6.9424 +/- 0.04574 | 6.9424 +/- 0.04574 |
| Q4_K_M | 15.7 GiB | 7.0291 +/- 0.04648 | 7.0291 +/- 0.04648 |
1custom="
2# SSM State Logic
3blk\..*\.ssm_alpha\.weight=f32
4blk\..*\.ssm_beta\.weight=f32
5blk\..*\.ssm_out\.weight=q8_0
6
7# 1. Non-linear mapping strictly for attention
8blk\..*\.attn_.*\.weight=iq4_nl
9
10# 2. Sandwich boost (First 8 / Last 8) -> iq5_ks for ALL FFN tensors
11blk\.[0-7]\.ffn_.*\.weight=iq5_ks
12blk\.(5[6-9]|6[0-3])\.ffn_.*\.weight=iq5_ks
13
14# 3. Global bottleneck boost -> iq5_ks for remaining ffn_down
15blk\..*\.ffn_down\.weight=iq5_ks
16
17# 4. Fallback -> iq4_ks for remaining ffn_gate / ffn_up
18blk\..*\.ffn_.*\.weight=iq4_ks
19
20# 5. High precision anchors
21token_embd\.weight=q8_0
22output\.weight=q8_0
23"
24
25custom=$(
26 echo "$custom" | grep -v '^#' | \
27 sed -Ez 's:\n+:,:g;s:,$::;s:^,::'
28)Q8_0 intermediate model using --allow-requantize.GGML_CUDA_NO_PINNED=1 is used to prevent system RAM exhaustion on 24GB VRAM setups.1GGML_CUDA_NO_PINNED=1 ./ik_llama.cpp/build/bin/llama-imatrix \
2 -m ./Qwen3.6-27B-MTP-Q8_0.gguf \
3 -f /path/to/ubergarm-imatrix-calibration-corpus-v02.txt \
4 -o Qwen3.6-27B-MTP-imatrix.dat \
5 --ctx-size 512 \
6 -t 16 \
7 --fit1./ik_llama.cpp/build/bin/llama-quantize \
2 --allow-requantize \
3 --imatrix ./Qwen3.6-27B-MTP-imatrix.dat \
4 --custom-q "$custom" \
5 ./Qwen3.6-27B-MTP-Q8_0.gguf \
6 ./Qwen3.6-27B-MTP-IQ4_KS.gguf \
7 IQ4_KS 161wget https://huggingface.co/datasets/ikawrakow/validation-datasets-for-llama.cpp/resolve/main/wiki.test.raw.gz
2gunzip wiki.test.raw.gz
3
4# Standard Perplexity
5./ik_llama.cpp/build/bin/llama-perplexity \
6 -m ./Qwen3.6-27B-MTP-IQ4_KS.gguf \
7 -f ./wiki.test.raw \
8 -c 512 \
9 -ngl 99
10
11# Perplexity with MTP enabled
12./ik_llama.cpp/build/bin/llama-perplexity \
13 -m ./Qwen3.6-27B-MTP-IQ4_KS.gguf \
14 -f ./wiki.test.raw \
15 -c 512 \
16 -ngl 99 \
17 -mtp --draft-max 1 --draft-p-min 0.0-mtp and --draft-max 1) to utilize the Multi-Token Prediction speedups!1./ik_llama.cpp/build/bin/llama-server \
2 -m ./Qwen3.6-27B-MTP-IQ4_KS.gguf \
3 -c 10000 \
4 -ngl 99 \
5 -mtp --draft-max 1 --draft-p-min 0.0