Hi there!
Today we’re talking about TurboQuant, and more precisely how to get it running on a hybrid model (Qwen3.6-27B, which mixes Gated DeltaNet layers and attention layers) on a 24GB consumer Blackwell card. You might tell me that’s a really narrow niche. You’d be right. Most documented setups run on 80GB Ampere datacenter cards or on a DGX Spark. But it’s exactly the card in my Olares One, and you may be in the same situation.
The background in two minutes
If you’ve never run an LLM locally, here’s what you need to follow along.
The Olares One is a mini-PC running Olares, a self-hosted OS built on Kubernetes. It has an RTX 5090 Laptop GPU (the 5090M) with 24GB of VRAM, on the “consumer” Blackwell architecture (sm_120, not to be confused with datacenter Blackwell, sm_100), a Core Ultra 9 275HX and 96GB of RAM. VRAM is small but very fast: a model that fits entirely in it runs fast.
The engine here is vLLM, a Python/CUDA inference server built to serve many users at once. The model is Qwen3.6-27B, a dense 27-billion-parameter model, in a 4-bit quantized version (Lorbus/Qwen3.6-27B-int4-AutoRound): each weight is stored in 4 bits instead of 16, which brings the model down to about 17GB.
The KV cache is the memory of what the model has already read in the conversation. It grows with the context and takes VRAM. TurboQuant compresses that cache to 3 or 4 bits per value instead of 8 or 16, so you can keep many more tokens in memory (a token is a piece of a word). The variants tested here are k8v4 (8-bit keys, 4-bit values), 4bit_nc (4-bit keys and values) and 3bit_nc.
MTP (multi-token prediction) is a form of speculative decoding. A small head built into the model guesses the next few tokens (3 here, hence n=3), then the model checks them all in a single pass and keeps the ones it agrees with. Same output, fewer expensive steps.
Finally, Genesis is a set of vLLM patches written by Sandermage. They’re monkey-patches: at startup they replace some vLLM functions in memory, without recompiling anything, to add what vLLM doesn’t officially support yet.
The numbers
Bench on the Olares One (RTX 5090M, 24GB GDDR7, 896 GB/s, sm_120 Blackwell). Model: Qwen3.6-27B Lorbus/Qwen3.6-27B-int4-AutoRound. 3 prompts × 800 tokens (Space Invaders HTML, Go REST API guide, PostgreSQL B-tree explainer). temperature=0.6, top_p=0.95.
| Stack | Cold (Space Invaders) | AVG (3 runs) | KV pool | Context |
|---|---|---|---|---|
| Dense MTP + fp8_e5m2 (reference v2.2.2) | ~90 t/s | ~90 t/s | 24K tokens | 75K |
| Turbo TQ K8V4 no MTP | 40 t/s | 40 t/s | 149K tokens | 128K |
| Turbo TQ K8V4 + MTP n=3 | 37 t/s | 38 t/s | 120K tokens | 80K |
| Turbo TQ 4bit_nc no MTP | 28 t/s | — | 224K tokens | 128K |
| Turbo TQ 4bit_nc + MTP n=3 | 46 t/s | 60 t/s [46-73] | 177K tokens | 100K |
How to read it: “Cold” is the generation speed on the first prompt, with nothing cached; “AVG” is the average over the three prompts; “KV pool” is how many tokens the KV cache can hold in VRAM; “Context” is the maximum context length configured. The first row is my reference, the v2.2.2 chart with MTP and a regular fp8 KV cache.
The winning config (last row) makes the KV pool far bigger than that reference (177K tokens against 24K), at the cost of about 33% cold throughput. That’s a very good trade when you send long prompts or when an agent piles up context. We sign!
The first blocker: NotImplementedError on a hybrid model
First attempt with vLLM 0.20-nightly (a dated build of the main branch), which includes PR #38479, the one that added TurboQuant to vLLM. And then, a slap in the face:
NotImplementedError: TurboQuant KV cache is not supported for hybrid
(attention + Mamba) models. Boundary layer protection requires uniform
attention layers.
The reason: Qwen3.5 and 3.6 mix two kinds of layers. Gated DeltaNet layers (24 of 32 in 3.5, a similar share in 3.6) are a form of linear attention: instead of a growing KV cache, they keep a fixed-size state, and vLLM files them with Mamba-style layers. The other layers do full attention. TurboQuant’s “boundary layer protection” algorithm assumes all layers are the same, so vLLM refuses outright.
This is where Sandermage’s Genesis patches come in: 28 monkey-patches that fill exactly this gap. The repo (Sandermage/genesis-vllm-patches, MIT, tag v7.51-stable-2026-04-27) was tested on Ampere (RTX A5000 80GB). Nobody had validated them on consumer Blackwell yet, hence the first unknown: do they apply on sm_120 without breaking anything?
Genesis on sm_120
They apply without a hitch:
[INFO:genesis.apply_all] Genesis platform:
compute_capability: [12, 0]
is_blackwell: false # Sandermage classifies sm_120 as "non-Blackwell" but it works
has_native_fp8: true
[INFO:genesis.apply_all] Genesis Results: 26 applied, 32 skipped, 0 failed
No failures across the 26 applied patches. The 32 skipped ones are either opt-ins we don’t enable or Ampere-specific patches (the FP8 Marlin fallback) that turn themselves off because Blackwell has native FP8.
The patch that matters for us is P4, TurboQuant support for hybrid models. It bypasses the NotImplementedError, routes the GDN (Gated DeltaNet) layers through the right path, and fixes page-size mismatches between attention and recurrent layers. Exactly what we needed.
Once Genesis is applied, vLLM accepts --kv-cache-dtype turboquant_k8v4 or turboquant_4bit_nc and boots on Qwen3.6-27B. First objective reached!
Four traps specific to this stack
1. P65 is required
GENESIS_ENABLE_P65_TURBOQUANT_SPEC_CG_DOWNGRADE=1 is documented by Sandermage as an opt-in that works around vLLM issue #40880 (MTP × TurboQuant × cudagraph degenerate output). In practice, on Blackwell with MTP and 4bit_nc, the pod doesn’t even boot without P65:
torch._dynamo.exc.TorchRuntimeError: RuntimeError when making fake tensor call
Explanation: Dynamo failed to run FX node with fake tensors:
call_function <built-in function mul>(*(
FakeTensor(..., device='cuda:0', size=(196608, 128)),
FakeTensor(..., device='cuda:0', size=(48*s72, 128))
), **{}): got RuntimeError(
'The size of tensor a (196608) must match the size of tensor b (48*s72)
at non-singleton dimension 0'
)
Some vocabulary first. CUDA graphs (“cudagraph” in the logs) record a sequence of GPU kernel launches once (kernels are the functions that run on the card), then replay it in one go, which saves the cost of launching each kernel from the CPU. “Eager” mode launches kernels one by one, which is slower. The bug sits in CUDA graph capture when MTP draft tensors meet TurboQuant kernels. P65 sends spec-verify batches through eager mode, which avoids the broken zone. Without P65, TorchDynamo trips and engine init fails. Don’t panic: turn it on and it boots.
P65 has a cost: speculative verification loses the CUDA graph speedup. That’s why MTP + TurboQuant doesn’t deliver the gain you’d expect over a no-MTP baseline. In the table, Turbo K8V4 does 40 t/s without MTP and 37-38 t/s with MTP n=3: under P65, MTP costs more than it brings back. Ouch.
MTP only pays off again with TQ 4bit_nc (46 t/s cold vs 28 t/s without MTP). Probably because 4bit_nc quantizes K and V the same way (MSE quantization), with a more uniform internal dispatch that gets along better with eager batches than K8V4, which mixes FP8 keys and 4-bit values. More on that in the notes.
2. turboquant_3bit_nc breaks at compile time
I tried pushing compression further (4.9× vs 3.8× for 4bit_nc and 2.6× for K8V4). Immediate failure, with the rest of the config identical:
torch._dynamo.exc.TorchRuntimeError: RuntimeError when making fake tensor call
...same shape mismatch (196608, 128) vs (48*s72, 128)...
Disabling Genesis P5B (the strategy that pads smaller KV pages up to the max size) doesn’t help: the problem is intrinsic to the MTP draft tensors × 3-bit kernel reshape combination. Probably a vLLM or Genesis bug specific to 3-bit blocks. Worth watching in case Sandermage ships a P67 or later that fixes it.
For now, 3bit_nc + MTP doesn’t work on this stack. To use 3bit_nc you have to turn MTP off, and then you drop to 28 t/s (like the Turbo TQ 4bit_nc no MTP row, but worse because of the 3-bit kernel overhead). Not worth it. Next!
3. --max-num-batched-tokens must exceed the Mamba block_size
vLLM splits its caches into blocks. The block_size of the Mamba cache (the one for the Gated DeltaNet layers) changes with the KV cache type, because Genesis P5 (page-size unification) aligns it on the LCM of all attention patterns:
| KV dtype | Mamba block_size |
|---|---|
| fp8_e5m2 (dense ref) | 2080 |
| turboquant_k8v4 | 2080 |
| turboquant_4bit_nc | ~4096 |
| turboquant_3bit_nc | ~4128 |
The right column is the block size you’ll get, and it’s the minimum to put in --max-num-batched-tokens, since vLLM enforces block_size <= max_num_batched_tokens. On 4bit_nc you need at least 4096 (I used 8192 for headroom); on K8V4, 4096 is enough. If you start 3bit_nc with Sandermage’s prod value (4096), you hit an AssertionError at boot. Just adjust per dtype.
4. Prefix caching changes everything
Prefix caching lets vLLM reuse the KV cache of a prompt beginning it has already seen instead of recomputing it. In the bench, run 2 (Go REST API) hit 73 t/s while run 1 (Space Invaders, cold) was at 46 t/s. The two prompts have different user content, but they share the system prompt and Qwen3’s tokenizer init, and --enable-prefix-caching --prefix-caching-hash-algo xxhash reuses the KV of the common tokens. Hence the jump.
Keep it in mind when you read numbers: a “warm” t/s, for an agent iterating over the same context, is about 50-60% faster than a “cold” t/s on a fresh prompt. For the cold reference (worst case), use run 1.
Full recipe
Here’s everything you need to reproduce it.
Docker image
docker.io/aamsellem/vllm-qwen36-blackwell:0.20.0-genesis, built on vllm/vllm-openai:cu130-nightly-fe9c3d6c5f66c873d196800384ed6880687b9e52 (a nightly built after the #38479 merge on April 15, 2026).
The Dockerfile installs the Genesis plugin, copies the patches into vLLM, then writes an entrypoint that applies the patches before starting vllm:
FROM vllm/vllm-openai:cu130-nightly-fe9c3d6c5f66c873d196800384ed6880687b9e52
RUN apt-get update && apt-get install -y --no-install-recommends git && \
git clone --depth 1 --branch v7.51-stable-2026-04-27 \
https://github.com/Sandermage/genesis-vllm-patches.git /tmp/genesis && \
cd /tmp/genesis && \
pip install --no-deps --no-cache-dir ./genesis_vllm_plugin && \
VLLM_DIR="$(python3 -c 'import vllm, os; print(os.path.dirname(vllm.__file__))')" && \
cp -r vllm/_genesis "$VLLM_DIR/_genesis" && \
rm -rf /tmp/genesis && apt-get purge -y git && \
apt-get autoremove -y && rm -rf /var/lib/apt/lists/*
COPY patch_tolist_cudagraph.py /patches/patch_tolist_cudagraph.py
RUN echo '#!/bin/sh\nset -e\npython3 -m vllm._genesis.patches.apply_all || true\npython3 /patches/patch_tolist_cudagraph.py || true\nexec vllm "$@"' > /entrypoint.sh && \
chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
CMD ["serve"]
vLLM args
The lines tied to this post are --kv-cache-dtype turboquant_4bit_nc (TurboQuant), --max-num-batched-tokens 8192 (trap 3), --enable-prefix-caching (trap 4) and --speculative-config (MTP with 3 guessed tokens per step):
--model Lorbus/Qwen3.6-27B-int4-AutoRound
--quantization auto_round
--dtype float16
--kv-cache-dtype turboquant_4bit_nc
--max-model-len 100000
--gpu-memory-utilization 0.97
--max-num-seqs 1
--max-num-batched-tokens 8192
--language-model-only
--enable-prefix-caching
--prefix-caching-hash-algo xxhash
--enable-chunked-prefill
--enable-auto-tool-choice
--tool-call-parser qwen3_coder
--reasoning-parser qwen3
--performance-mode interactivity
--async-scheduling
--no-scheduler-reserve-full-isl
--attention-config.flash_attn_version 2
--speculative-config '{"method":"mtp","num_speculative_tokens":3}'
Env vars
The GENESIS_ENABLE_* variables turn on the optional patches, including P65 (trap 1):
VLLM_USE_FLASHINFER_SAMPLER=1
VLLM_MEMORY_PROFILER_ESTIMATE_CUDAGRAPHS=1
VLLM_ALLOW_LONG_MAX_MODEL_LEN=1
VLLM_MARLIN_USE_ATOMIC_ADD=1
VLLM_FLOAT32_MATMUL_PRECISION=high
GENESIS_ENABLE_P5B_KV=1
GENESIS_ENABLE_P65_TURBOQUANT_SPEC_CG_DOWNGRADE=1
GENESIS_ENABLE_P66_CUDAGRAPH_SIZE_FILTER=1
GENESIS_ENABLE_P64_QWEN3CODER_MTP_STREAMING=1
GENESIS_ENABLE_P60_GDN_NGRAM_FIX=1
GENESIS_ENABLE_P62_STRUCT_OUT_SPEC_TIMING=1
PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True,max_split_size_mb:512
NCCL_CUMEM_ENABLE=0
NCCL_P2P_DISABLE=1
OMP_NUM_THREADS=1
CUDA_DEVICE_MAX_CONNECTIONS=8
Bench harness
The script sends the three prompts to the OpenAI-compatible API, times each answer and prints the average, min and max in tokens per second:
import urllib.request, json, time
prompts = [
"Build a complete Space Invaders game in a single HTML file...",
"Write a comprehensive guide to building a REST API in Go...",
"Explain how a B-tree index works in PostgreSQL...",
]
results = []
for i, p in enumerate(prompts):
data = json.dumps({
"model": "qwen3.6-27b",
"messages": [{"role": "user", "content": p}],
"max_tokens": 800,
"temperature": 0.6, "top_p": 0.95
}).encode()
req = urllib.request.Request("http://localhost:8000/v1/chat/completions",
data=data,
headers={"Content-Type": "application/json"})
t0 = time.time()
r = json.loads(urllib.request.urlopen(req).read())
el = time.time() - t0
toks = r["usage"]["completion_tokens"]
print(f"RUN{i+1} TOKENS={toks} ELAPSED={el:.2f}s TPS={toks/el:.2f}")
results.append(toks/el)
print(f"AVG={sum(results)/len(results):.2f} MIN={min(results):.2f} MAX={max(results):.2f}")
On Olares, every app runs in a Kubernetes pod. I run the script from inside the pod to bypass the auth sidecar:
kubectl exec -n vllmqwen36turbo27bone-aurelien deploy/vllmqwen36turbo27bone -c vllm-server -- python3 -c "..."
Live metrics (steady state)
What vLLM reports once it’s running. The 177,840-token KV pool is only 5-15% used during generation, so there’s plenty of room left for context:
Avg generation throughput: 60 t/s [46-73 range across 3 prompts]
KV cache pool: 177,840 tokens
KV cache usage during generation: 5-15%
Mean acceptance length: variable (P65 forces eager → metrics less meaningful)
Engine init: 100s (cudagraph compilation 42s + load weights 7s + KV alloc + warmup)
Model loading: 16.65 GiB
Random notes
- Why 4bit_nc beats K8V4 with MTP. My theory: 4bit_nc applies the same MSE quantization to K and V, while K8V4 mixes FP8 keys and 4-bit values. The eager spec-verify dispatch (forced by P65) would get through the uniform path more easily. That’s an observation; I haven’t confirmed it in the Genesis code. If anyone has a kernel-level explanation, I’m all ears!
- Why not K3V4_NC: I didn’t test it. On paper it sits between K8V4 and 4bit_nc, but Sandermage’s docs barely mention it. If you try it, tell me what you get!
- Why not Lucebox: Lucebox (Luce-Org/lucebox-hub, MIT) claims 78 t/s on Qwen3.6-27B with a matched DFlash drafter (a small separate model that guesses blocks of tokens) and its own ggml fork. No public Docker image, you have to compile. That’s my next post (here it is).
- Measurement caveats: t/s are measured from inside the pod, so with no envoy auth gate and no network round-trip. Variance depends on the prompt: run 2 (Go REST) is faster than run 1 (Space Invaders), probably thanks to a partial prefix cache hit on the system prompt and common tokens. For a number without cache hits, use run 1.
Credits
- Sandro / Sandermage for the 28 Genesis monkey-patches that made all this possible, the result of several weeks of reverse engineering. Hat tip!
- vibhavagarwal5 for vLLM PR #38479, merged on April 15, 2026: the TurboQuant 2-bit KV cache has been upstream since then.
- Lorbus for the AutoRound INT4 quant, which stores the
mtp.fchead already dequantized to BF16 in the file: MTP memory goes from 2.37 GiB (buffer created at load time) to ~280 MiB (read from disk). - Wasif Basharat and u/Kindly-Cantaloupe978 for the RTX 3090 24GB and RTX 5090 32GB recipes that gave me my starting point.
That’s it! To reproduce, everything is in the aamsellem/olares-one-market repo (Helm chart vllmqwen36turbo27bone v2.2.0), with the public Docker image aamsellem/vllm-qwen36-blackwell:0.20.0-genesis. If something doesn’t reproduce on your side, open an issue or drop a comment here and I’ll fix it. See you next time!
Disclosure — All benchmarks in this post run on my own Olares One. If this content helped you and you’re considering buying one, ordering through this referral link gets you $300 off ($4,699 instead of $4,999), stackable with the $300 Black Friday discount starting November 17: $600 off in total ($4,399). I’m mentioning this out of transparency — and yes, incidentally, it helps keep the blog alive (hosting, domain, and the time I spend writing here).