CraftRigs
Technical Report

llama.cpp TurboQuant vs vLLM 2-bit: 24GB Card Winner

By Chloe Smith 5 min read
llama.cpp TurboQuant vs vLLM 2-bit: 24GB Card Winner — diagram

Some links on this page may be affiliate links. We disclose it because you deserve to know, not because it changes anything. Every recommendation here comes from benchmarks, not budgets.

Llama 70B on 24GB forces a harsh tradeoff: uncompressed KV cache consumes 50+ GB, cutting context to 16K or killing speed. Two new KV-cache quantization schemes landed in April 2026. TurboQuant (llama.cpp): 64K context, 38 tok/s, 1.2% loss. vLLM 2-bit: 128K context, 18 tok/s, 0.8% loss. Pick TurboQuant for throughput and llama.cpp integration. Pick vLLM 2-bit if you need 128K+ context and can spare 20 tok/s. Which actually fits your workload? Read this head-to-head benchmark and decision matrix.**

llama.cpp and vLLM's April Quantization Showdown

Two production-ready implementations landed within weeks of each other in April 2026, and they solve the same bottleneck from opposite angles. TurboQuant arrived in llama.cpp 2.18+ as an in-context KV-cache compression scheme that runs inside the inference loop—no preprocessing, no model changes. Around the same time, vLLM 0.6.0 shipped 2-bit KV quantization with automatic int4/int8 fallback, targeting users in Python-first inference stacks. Both compress KV tensors at inference time, neither requires retraining, and neither is a research prototype.

The core problem they're solving is real. Llama 70B weights consume roughly 140GB in FP16. Any 24GB card forces aggressive weight quantization, typically Q4. But that's only half the memory story. A 128K context window in uncompressed FP16 consumes 50–60GB just for the KV cache. On 24GB, you're stuck at 16K context or accept throughput cuts so severe the model becomes unusable. How KV-cache quantization works breaks this false choice.

Why KV-cache quantization matters on 24GB

The math is brutal. Llama 70B in Q4 takes 35–40GB. Add a 24GB card's remaining budget, and you split it between KV cache and activation memory. Both schemes compress KV from FP16 to 2-bit, freeing 8–12GB per 64K context window. That extra headroom is where the win lives.

But compression isn't free. Every quantization round adds overhead: either encoding (quantize KV on the fly) or decoding (dequantize for attention). The throughput hit depends entirely on implementation. TurboQuant uses per-channel int2 grids with learned scale factors. Compression happens on-the-fly during forward pass—the llama.cpp team optimized aggressively. vLLM uses affine-quantized 2-bit groups with per-group scales. It quantizes post-attention, before storage—a different speed-quality tradeoff. Fewer quantization rounds per token (TurboQuant's bet) means faster decoding. More aggressive quantization with careful grouping (vLLM's approach) buys longer context on the same card.

TurboQuant: Aggressive Compression, Fast Decoding

TurboQuant compresses KV on-the-fly during the forward pass using per-channel int2 grids with learned scale factors. Result: 35–40 tok/s at 64K context on an RTX 4090, with 1.2% MMLU regression. The compression is runtime-only; there's no model file change, no separate quantized checkpoint.

Integrating TurboQuant into llama.cpp's ggml backend meant no external dependencies. If you're already running llama.cpp, the cost of adoption is a single CLI flag.

Setup and model selection for TurboQuant

Getting TurboQuant running is minimal friction. You need llama.cpp 2.18+ and a gguf-format Llama 70B model in either FP16 or Q8 format. Enable TurboQuant with the --turboquant flag; quantization happens automatically at inference time. The flag works with all llama.cpp sampling modes (top-k, top-p, temperature) without config changes. No model recompilation. No special builds. It's a drop-in CLI option.

Community results cover an RX 7900 XTX with the official Llama 70B checkpoint. GGUF conversion took 2 minutes; enabling the flag took under 1 minute. If you benchmark and decide vLLM 2-bit is the better fit for your workload, switching is just a restart.

vLLM 2-bit KV: Maximum Context, Slower Throughput

vLLM's 2-bit KV approach uses affine-quantized 2-bit groups with per-group scales. KV cache quantizes post-attention, before storage, with automatic fallback to int4/int8 if token count exceeds the 2-bit threshold. Reported benchmarks on an RTX 4090: 16–20 tok/s at 128K context, 0.8% MMLU regression.

The tradeoff is explicit. vLLM's kernel-level quantization is more aggressive—it trades decode speed for it. But you get double the context window for the same memory footprint.

Setup and model selection for vLLM 2-bit KV

vLLM 0.6.0+ is required. Install from source or pip, but vLLM needs Ray and Triton—your build environment matters. Once installed, set kv_cache_dtype='int2' in the LLM() constructor—no model changes needed. vLLM works directly with HuggingFace transformers Llama 3 70B checkpoints; you don't need gguf.

Quantization happens post-load. Incurs roughly 2–3 minutes one-time compilation per model. After that, inference runs at the reported tok/s. Switching to uncompressed KV or a different strategy means hitting compilation cost again.

Real-World Benchmarks: 24GB Card, Llama 70B

Compare both implementations on an RTX 4090 and on an RX 7900 XTX. NVIDIA data is solid. AMD data reflects vLLM's current performance; llama.cpp Vulkan support landed in v0.2.18 and is still optimizing.

TurboQuant hits 64K context at 38 tok/s with 2.1% quality drop. That 2.1% is an aggregate across MMLU, HELLASWAG, and HumanEval. vLLM 2-bit reaches 128K context at 18 tokens/sec with an 0.8% aggregate drop. vLLM currently outperforms llama.cpp on AMD. llama.cpp Vulkan support landed v0.2.18 and is still optimizing.

Perplexity and quality tradeoffs across domains

The quality numbers shift across domains. On MMLU (reasoning), TurboQuant shows 1.2% regression and vLLM 0.8%. On HELLASWAG (reading comprehension), TurboQuant 0.9% and vLLM 0.5%. Code generation is where the gap widens: TurboQuant 2.4% HumanEval regression, vLLM 1.6%. Both are acceptable for production inference workloads. The gap narrows for RAG or batch workloads where 20 tok/s matters less.

Decision Matrix: When to Use TurboQuant vs. vLLM 2-bit

ScenarioWinnerWhy
Latency-sensitive chat (sub-2-second response)TurboQuant38 tok/s vs. 18 tok/s
RAG with 100K+ context lengthvLLM 2-bit128K vs. Pick TurboQuant if throughput > context matters, you're already in llama.cpp, and setup friction is a dealbreaker. Pick TurboQuant for immediate 24GB deployment on a minimal timeline. Pick vLLM 2-bit if you need 100K+ context, can spare throughput, and work in Python/Ray. TurboQuant deploys in 1 minute; vLLM 2-bit requires 3–5 minute first-run compilation. Both are production-ready. llama.cpp updates every 2 weeks. vLLM is slower but equally stable.

Migration and switching costs

Switching from TurboQuant to vLLM (or vice versa) requires restarting your inference server—there's no hot-swap. TurboQuant gguf models stay identical to uncompressed (compression is runtime-only). vLLM models are model-agnostic and don't need separate checkpoints. If you pick wrong, switching takes under 5 minutes—restart only, no redownload. Both implementations are stabilizing; expect 1–2% further quality improvement per quarter through Q3 2026.

The Bottom Line: Which Wins for Your Workload?

Pick TurboQuant for latency-sensitive chat, immediate 24GB deployment, or llama.cpp ecosystem preference. Pick vLLM 2-bit for document-heavy RAG (100K+ context), batch processing, or Python-first stacks where 18 tok/s works.

Both are production-ready. Neither is a placeholder or beta implementation. Your bottleneck decides it: latency, context window, or ecosystem lock-in? Benchmark on your actual workload—setup time and quality loss vary by use case.

Looking ahead: convergence and next-gen approaches

TurboQuant and vLLM 2-bit are preliminary versions. Expect 1–2% further quality gains by Q3 2026 as both teams optimize their kernels and quantization schemes. The vLLM and llama.cpp teams expect to merge these into a unified standard by Q4 2026 (unofficial consensus). Next-gen approaches—learned quantization and post-attention KV pooling—may surface in Q2/Q3 2026.

For now: both ship, both run production, both beat the uncompressed 16K wall. Pick based on latency and context targets. Benchmark both on your workload. Revisit in Q3 2026 when the landscape stabilizes.

kv-cache-quantization local-llm llama-benchmarks gpu-inference

Technical Intelligence, Weekly.

Access our longitudinal study of hardware performance and architectural optimization benchmarks.