TL;DR
Running AI agents locally on your phone hits a hard physical wall: hauling an ever-growing conversation history from off-chip memory eats up massive time and battery life, even with state-of-the-art tricks like speculative decoding. Glimpse breaks this bottleneck by noticing that the tiny "draft" model used to guess upcoming words already knows which parts of the past context actually matter. By pairing a selective, two-pass verification algorithm with a tiny hardware add-on for mobile chips, Glimpse cuts memory traffic in half—delivering up to 1.74× faster text generation and 1.76× better energy efficiency with zero loss in output quality.
What Problem Does This Paper Address?
When an LLM generates text one word (token) at a time, it has to repeatedly read its KV cache—the working memory of every token in the conversation so far. For modern on-device agents reasoning through long documents and chat histories, this cache balloons to tens of thousands of tokens. While cloud GPUs have massive memory pipes (~3,350 GB/s), mobile processors sip data through a narrow straw (51–120 GB/s). Moving that KV cache from external memory quickly dominates both latency and battery drain.
To speed things up, engineers use tree-based speculative decoding (like EAGLE-3). Here, a tiny, fast draft model guesses a branching tree of possible next words, and the massive target LLM verifies all branches in a single pass, accepting the longest correct path. This spreads one heavy memory load across several generated tokens.
However, at long context lengths (e.g., 32K tokens), the verification step itself hits a wall: loading the entire historical KV cache from off-chip memory to check those guesses still consumes 71–88% of the total step time.
Methods
Glimpse is an algorithm-hardware co-design built on a clever observation: during the drafting phase, the draft model already looks across the entire conversation history. Its attention scores are a free, ready-made map of which past tokens are actually important right now.
1. Two-Pass Verification Algorithm: Instead of loading the full KV cache every time, Glimpse alternates between two modes:
- Chunk-Pooled Lossy Pass: Glimpse groups the historical KV cache into contiguous chunks of 8 tokens (matching how hardware likes to read memory in bursts). Guided by the draft model's accumulated attention scores, the target model loads only the top-ranked chunks (e.g., 1/8th of the prefix), plus the initial "sink" tokens and the current draft tree. Accepted tokens are placed in a temporary buffer.
- Periodic Lossless Re-Verification: Because sparse attention is an approximation, errors can compound. Once the buffer hits a set length (say, 24 tokens), Glimpse rolls back the cache pointer and does one full-KV verification pass. Crucially, instead of just checking the buffered chain, it merges that chain with a smaller, freshly drafted token tree—allowing it to catch mistakes early or extend a fully correct chain even further, guaranteeing exact mathematical equivalence to the original model.
2. Importance Selection Unit (ISU): To ensure sorting these scores doesn't slow down the chip, the authors add a tiny hardware block—the ISU—to a standard mobile Neural Processing Unit (NPU). The ISU taps directly into the on-chip data stream during drafting to accumulate chunk scores on the fly, uses a tournament-tree sorter to pick the top-$K$ chunks while tokens are being sampled, and prefetches only the needed KV chunks before verification attention begins.
Datasets
Glimpse is evaluated without any model retraining across standard benchmarks that generate long reasoning traces or process large documents:
- Mathematical Reasoning: GSM8K and MATH500 (using chain-of-thought prompting).
- Code Generation: MBPP.
- Long-Context Understanding: LongBench (GovReport and QMSum) and LongBench-v2 (contexts up to 64K tokens). No new benchmarks were introduced.
Key Insights and Ideas
- The 97% Bandwidth Waste: When profiling verification attention, the authors found a massive efficiency gap. The initial four "sink" tokens and the candidate tree tokens have 26× to 65× higher attention density per token than the middle conversation history (the prefix). That middle prefix accounts for 96.9% of memory traffic, yet almost all of it contributes virtually nothing to the output. Verification attention heatmap showing sink, prefix, and tree regions
- Draft Attention is a Free Lunch: Even though a single-layer draft model has only ~5–8% of the parameters of the target LLM, accumulating its attention across drafting steps tracks the target model's true importance remarkably well—matching complex online ranking schemes while sorting 2.8× to 62× fewer elements.
- Separate Proposing from Committing: Prior sparse-KV methods either reload the full cache too often or commit approximate tokens permanently, ruining accuracy (dropping up to 60 points on math tasks). By treating sparse verification purely as a token proposer and using an amortized full-attention pass as the sole committer, Glimpse gets massive bandwidth savings with zero accuracy drop.
Key Results
Evaluated across seven LLMs (from 1.7B to 32B parameters, including Llama-3.1, DeepSeek-R1-Distill, and Qwen3) against state-of-the-art EAGLE-3:
- Exact Quality, Half the Traffic: Glimpse-lossless matches baseline accuracy across all tasks while committing an average of 20.9 tokens per full KV load (compared to 4.6 for EAGLE-3), achieving ~2× higher bandwidth-normalized throughput.
- Speed and Battery Gains: Across 2K–64K contexts on a simulated mobile NPU (16nm TSMC), Glimpse achieves 1.33–1.74× average speedup (peaking at 2.03× on Qwen3-8B at 64K) and 1.40–1.76× better energy efficiency.
- Tiny Silicon Footprint: The ISU adds just 0.18 mm² (2.7% area) and 30.6 mW (2.0% power) to the baseline NPU, yet shaves up to 21% off latency and 26% off energy compared to running the same algorithm without hardware support.
- Real GPU Validation: Implemented in vLLM on an NVIDIA Jetson Thor edge GPU, Glimpse speeds up decoding by up to 2.36× over EAGLE-3.
Limitations and Future Work
- Extra Steps on Compute-Rich Hardware: Because lossless re-verification occasionally rejects part of the buffered chain (~10–12% rollback traffic), Glimpse takes 20–50% more total decoding steps than EAGLE-3. On massive cloud GPUs like the H200 with abundant memory bandwidth, this extra compute can make Glimpse up to 8% slower at batch size 1 and shorter contexts (16K–32K).
- Reliance on Lightweight Drafters: The pipeline assumes drafting itself is cheap; while verified up to 5-layer drafters, self-speculative schemes that use the heavy target model to draft do not fit this mold.
- Future Directions: The authors highlight that improving draft acceptance rates ($\tau_{\text{step}}$) and pushing bandwidth-normalized throughput ($\tau_{\text{bw}}$) in future algorithms will compound directly with Glimpse's hardware efficiency as agentic contexts grow even longer.
Summary updated