atlas

Research map / Architectures and efficiency / Attention and transformers

QuantSpec: Self-Speculative Decoding with Hierarchical Quantized KV Cache

ICML 2025 · Architectures and efficiency › Attention and transformers · approach: KV cache eviction and compression · 0 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes QuantSpec, a self-speculative decoding method where the draft model uses 4-bit weights and a hierarchical 4-bit/8-bit quantized KV cache (sharing bits with the target) plus a double full-precision buffer, yielding up to ~2.5x speedup for long-context LLM inference.

Problem

Speculative decoding for long-context LLM inference is bottlenecked by KV cache loading, and existing self-speculative methods using sparse KV caches (StreamingLLM, SnapKV) lose accuracy, giving low draft acceptance rates and high memory use.

Approach

The draft model shares the target architecture but uses a hierarchical quantized KV cache where the upper 4 bits serve as the INT4 draft cache and upper+lower 4 bits reconstruct the INT8 target cache, so no separate draft copy is stored; a double full-precision buffer of size 2G keeps recent tokens unquantized to raise acceptance and avoid repeated quantization on rollback.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use QuantSpec instead of SnapKVSelf-speculative decoding · PG19, 4kspeedup over autoregressive generation: 1.17 -> 1.35Helped
Use QuantSpec instead of SnapKVSelf-speculative decoding · PG19, 8kspeedup over autoregressive generation: 1.31 -> 1.44Helped
Use QuantSpec instead of StreamingLLMLlama-2-7B-32K-Instruct decoding · Multi-LexSum, 8kspeedup over autoregressive generation: 1.27 -> 1.61Helped
Use QuantSpec instead of StreamingLLMLlama-2-7B-32K-Instruct decoding · Multi-LexSum, 32kspeedup over autoregressive generation: 1.84 -> 2.08Helped
Use QuantSpec instead of SnapKVLWM-Text-Chat-128k decoding · ∞Bench Sum, 16kspeedup over autoregressive generation: 1.50 -> 1.78Helped
Use QuantSpec instead of SnapKVLWM-Text-Chat-128k decoding · ∞Bench Sum, 32kspeedup over autoregressive generation: 1.78 -> 1.99Helped
Use QuantSpec instead of StreamingLLMLWM-Text-Chat-128k decoding · Multi-LexSum, 64kspeedup over autoregressive generation: 2.16 -> 2.23Helped
Use QuantSpec instead of sparse-KV baselinesLWM-Text-Chat-128k decoding · Multi-LexSum, 128kpeak GPU memory: OOM -> 61.22Helped
Use INT8 instead of FP16 KV cacheLlama-2-7B · WikiText-2perplexity: 6.4595 -> 6.4696No clear effect
Use INT8 instead of FP16 KV cacheLlama-2-7B · C4perplexity: 7.2617 -> 7.2620No clear effect
Use an INT4 attention kernel that loads the upper 4-bit KV cache instead of FP16 FlashAttentionAttention kernel · 64k contextlatency: 3.07 ms -> 0.54 ms (2.88x)Helped
Use an INT4 attention kernel that loads the upper 4-bit KV cache instead of FP16 FlashAttentionAttention kernel · 256k contextlatency: 6.16 ms -> 2.15 ms (2.86x)Helped

Surprising findings

Limitations

Experimental setup

Datasets: WikiText-2 C4 PG-19 InfiniteBench Sum Multi-LexSum

Benchmarks: PG-19 InfiniteBench Sum Multi-LexSum WikiText-2 C4

Metrics: acceptance rate speedup vs autoregressive peak GPU memory perplexity kernel latency

Baselines: StreamingLLM SnapKV autoregressive decoding FlashAttention (FP16)

Builds on: speculative decoding FlashAttention FlashDecoding KIVI

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy