Qwen3.6-35B-A3B-TinyKV (Qwen3.6-35B-A3B with a 2.5×
smaller KV cache from retraining only its 10 full-attention layers) on top of palmfuture's GPTQ-Int4 checkpoint (routed experts int4, everything else bf16): the quantized shards are
palmfuture/Qwen3.6-35B-A3B-GPTQ-Int4's, unchanged; the 10 converted attention layers come from
tinykv-patch.safetensors in bf16, and the quantization config leaves exactly those layers unquantized.
Target: any vLLM GPU with GPTQ support, 24 GB class and up; weights ~21 GB.
Intel Arc Pro B70 (32 GB): checked on vLLM 0.32 XPU (the b70 cookbook
image b70.7) with attention kernels rebuilt to include head size 128, gpu_memory_utilization=0.82 (≤ 25 GB), fp8 KV cache,
text only: the full 262k context fits with a 911,760-token KV cache (3.5 full-length requests), against 368,202 tokens
(1.4 requests) for the stock GPTQ-Int4 at the same settings; mean |Δ log p| vs PyTorch 0.105 (same as on CUDA), 22/24 needles
at 30k (stock 23/24). Speed on the same B70 with the full cookbook stack (serve.sh: CUDA graphs, MTP k=4, fp8 KV, gpu_memory_utilization=0.82), next to
the stock palmfuture GPTQ-Int4 on the identical setup:
| One Intel Arc Pro B70, ≤ 25 GB | stock GPTQ-Int4 | TinyKV-GPTQ-Int4 |
|---|---|---|
| longest context that fits | ~211K | 262K |
| decode, 130K-token prompt | 186 tok/s | 233 tok/s (+25%) |
| prefill, 130K-token prompt | 3,461 tok/s | 5,486 tok/s (+58%) |
| 64 users, 512 in / 512 out | 1,372 out / 2,744 total tok/s | 1,421 / 2,841 |
| 64 users, 8K in / 512 out | 42 running, 387 out tok/s | all 64 running, 449 out tok/s (+16%) |
| localmaxxing canonical prompts (verified runs) | 237.0 (reasoning-v1) / 208.7 (code-v1) tok/s |
The head-128 kernels are in cookbook release v4
(SO_FILE=kernels/libattn_kernels_xe_2.tinykv.so TINYKV_PLUGIN=<this repo>/plugin ./serve.sh); without them vLLM XPU falls
back to a slow PyTorch attention for the 128-wide cache heads.
pip install vllm==0.32.0
hf download darioooooo0o/Qwen3.6-35B-A3B-TinyKV-GPTQ-Int4 --include "plugin/*" --local-dir . && pip install ./plugin # registers the TinyKV architecture
vllm serve darioooooo0o/Qwen3.6-35B-A3B-TinyKV-GPTQ-Int4 --max-model-len 131072 --gpu-memory-utilization 0.9 --limit-mm-per-prompt '{"image":0,"video":0}'
Single GPU (the plugin has no tensor parallel yet), text only (the vision tower is unchanged but untested).
vLLM 0.32.0 on one RTX PRO 6000 (96 GB), gpu_memory_utilization=0.85, max_model_len=32768, next to the same base
checkpoint without TinyKV:
| TinyKV-GPTQ-Int4 | stock GPTQ-Int4 | |
|---|---|---|
| KV cache capacity | 6.12M tokens | 2.55M tokens (2.40×) |
| 30k needles, 32 near-identical decoys | 22/24 (logp -0.474) | 24/24 (logp -0.363) |
| mean |Δ log p| vs its bf16 reference | 0.1032 vs PyTorch TinyKV | 0.1662 vs PyTorch Qwen3.6 |
The last row is the quantization noise of each: per-token log-prob difference on 4 held-out 1k-token prompts against the unquantized model in PyTorch. For reference, bf16 TinyKV in vLLM is at 0.0478 and holds 1.59M tokens at the same settings (stock bf16: 0.66M). Greedy answer to "Explain in three sentences why the sky is blue.": "Sunlight reaches Earth as white light, which is composed of all colors of the visible spectrum. As this light passes through the atmosphere, it collides with ga…"
See the main model card for how the conversion works, the training recipe and the full quality tables. GGUFs: Qwen3.6-35B-A3B-TinyKV-GGUF.
Made by @imdariotoo. I post my local-model releases on X, so follow there for the next ones.
Quantized base: palmfuture/Qwen3.6-35B-A3B-GPTQ-Int4. Training, evaluation and these checks ran on CloudRift RTX PRO 6000 GPUs, provided through their AI Builder Grant. Thanks to CloudRift for the compute.
Apache-2.0, as the base model (Qwen/Qwen3.6-35B-A3B) and the quantized base.
model-00003-of-00006.safetensors 4.3 GBmodel-00004-of-00006.safetensors 4.3 GBmodel-00005-of-00006.safetensors 4.3 GBmodel-00002-of-00006.safetensors 4.3 GBmodel-00001-of-00006.safetensors 4.3 GBmodel-00006-of-00006.safetensors 1.2 GBtinykv-patch.safetensors 560 MBgh release download v4 -p 'libattn_kernels_xe_2.tinykv.so' -D kernels; SO_FILE=kernels/libattn_kernels_xe_2.tinykv.so TINYKV_PLUGIN=<model>/plugin MODEL_DIR=<model> GPU_UTIL=0.82 ./serve.sh (cookbook serve.sh = vllm serve --quantization gptq --kv-cache-dtype fp8 --max-model-len 262144 --max-num-seqs 8 --speculative-config '{"method":"mtp","num_speculative_tokens":4,"draft_sample_method":"probabilistic"}' + fp8 lm_head, fp8 weight-only attention/GDN/shared expert, int4 MoE decode GEMV)在 LocalMaxxing 上查看测试 来自 LocalMaxxing 的 2 次社区测试(1 种配置)的中位数。
自己运行:配置指南