paper-with-me

홈 › Papers

The Illusion of Equivalence: Systematic FP16 Divergence in KV-Cached Autoregressive Inference

2026-04-16 · Ranjith Chodavarapu, Lei Xu arxiv

KV caching is a ubiquitous optimization in autoregressive transformer inference, long presumed to be numerically equivalent to cache-free computation. This assumption fails under standard FP16 precision: cache-ON and cache-OFF execution paths employ different floating-point accumulation orderings which, due to FP16 non-associativity, produce a deterministic divergence in decoded token sequences. Across three open-weight models (LLaMA-2-7B, Mistral-7B-v0.3, Gemma-2-2B) evaluated on GSM8K, we observe a 100\% token divergence rate across all sampling strategies, including greedy decoding, which rules out sampling randomness as a cause, and also with cache-ON yielding higher accuracy in 8 of 9 conditions, where the accuracy difference serves as an indicator that the divergence direction is systematic rather than random. Controlled FP32 falsification reduces divergence by eight orders of magnitude, eliminates token flips, and drops the flip rate to exactly 0.0\%, confirming FP16 non-associativity as the sole causal driver. Layer-wise drift profiling reveals architecturally predictable propagation patterns: models using Grouped-Query Attention exhibit sharp divergence at the first layer, while Gemma's larger head dimension and sliding window attention produce uniform accumulation across all layers. Finally, activation patching of the entire residual stream fails to recover the cache-free trajectory, localizing the causal variable to the stateful KV cache. These findings establish that FP16 KV cache inference is fundamentally non-equivalent to recomputation and provide a mechanistic framework for understanding numerical instability in modern LLM inference systems.

📄 PDF Abstract BibTeX arXiv:2604.15409

Code (0)

등록된 구현이 없습니다.

Similar Papers 제목 키워드 기반

Illusions in Humans and AI: How Visual Perception Aligns and Diverges

2025-08-17 · Jianyi Yang, Junyi Ye, Ankan Dash, Guiling Wang arxiv

By comparing biological and artificial perception through the lens of illusions, we highlight critical differences in how each system constructs visual reality. Understanding these divergences can inform the development …

How Lossless Is Lossless Speculative Decoding? The Role of Numerical Precision in Orthrus

2026-09-14 · Ilya Koziev, Leonid Sinev, Ivan Oseledets hf

Orthrus is a hybrid autoregressive-diffusion architecture that accelerates autoregressive language-model inference by generating multiple tokens in parallel while using a frozen autoregressive backbone. Its central claim…

When Close Enough Is Not Enough: Autoregressive Drift in Quantum Circuit Synthesis

2026-07-14 · Mehdi Saeedi, Eddie Richter, Paul Hartke arxiv

Quantum circuit optimization for fault-tolerant computing requires exact functional equivalence while minimizing expensive non-Clifford resources such as T gates. We study this problem using a compact 44.8M-parameter enc…

Balancing Performance and Diversity in GRPO Autoregressive Text-to-Image Post-Training

2026-06-19 · Yuanhao Chiang, Hongbo Duan, Chunru Yang, Jiahua Pei 외 arxiv

Autoregressive text-to-image (T2I) generation has recently advanced rapidly, yet aligning generated images with human preferences remains challenging. GRPO-style online reinforcement learning provides an effective framew…

Reinforcement Learning

Knowledge Packs: Zero-Token Knowledge Delivery via KV Cache Injection

2026-03-22 · Andrey Pustovit arxiv

RAG wastes tokens. We propose Knowledge Packs: pre-computed KV caches that deliver the same knowledge at zero token cost. For causal transformers, the KV cache from a forward pass on text F is identical to what a joint p…