Non-Monotonic Latency in Apple MPS Decoding: KV Cache Interactions and Execution Regimes
On the map: Efficient LLM inference and serving → KV cache optimization
Abstract (arXiv)
Autoregressive inference is typically assumed to scale predictably with decoding length, with latency increasing smoothly as generated sequence length grows. In this work, we identify unexpected non-monotonic latency behavior in the Apple MPS backend, where latency changes abruptly across nearby decoding configurations during transformer decoding. Using multiple model families (GPT-2, BLOOM, and OPT), we observe latency spikes of up to 21x within specific decoding-budget intervals, followed by recovery at neighboring configurations. Controlled experiments show that these anomalies originate primarily during the decode phase rather than prefill, are not explained by memory pressure alone, and remain absent on CPU and NVIDIA CUDA backends under identical conditions. We further show that key-value (KV) cache interacts strongly with these pathological execution regimes: KV caching remains beneficial overall, but its practical speedup collapses sharply within anomalous configurations, while cache-disabled decoding still exhibits residual non-monotonic behavior. These findings suggest that autoregressive decoding on MPS enters discrete execution regimes that are not captured by coarse-grained benchmarking, highlighting the importance of hardware-aware evaluation for long-context inference.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Placed in KV cache optimization, one of 12 directions in Efficient LLM inference and serving. Builds on 12 of its 22 references that are in the map. First posted on arXiv 9 May 2026.
Builds on
12 of 22 references.
Closest ancestors · 3
Same direction, newest first
- 2024KV Prediction for Improved Time to First Token10 Oct
- 2024Training-Free Exponential Context Extension via Cascading KV Cache24 Jun
- 2023Efficient Memory Management for Large Language Model Serving with PagedAttention12 Sep
Other references · 9
- 2017Attention Is All You Needcited by 60,361
- 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,305
- 2019DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lightercited by 4,307
- 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,673
- 2022OPT: Open Pre-trained Transformer Language Modelscited by 3,512
- 2022BLOOM: A 176B-Parameter Open-Access Multilingual Language Modelcited by 1,984
- 2022Efficiently Scaling Transformer Inferencecited by 539
- 2023LLM in a flash: Efficient Large Language Model Inference with Limited Memorycited by 177
- 2019Dissecting the NVidia Turing T4 GPU via Microbenchmarkingcited by 15
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026Lossless but Not Free: An Empirical Anatomy of Speculative Decoding on Consumer Hardware
- 2025QuantSpec: Self-Speculative Decoding with Hierarchical Quantized KV Cache
- 2026KVDrive: A Holistic Multi-Tier KV Cache Management System for Long-Context LLM Inference
- 2026PulseInfer: I/O-Centric Sparse KV Cache Offloading for Efficient Long-Context LLM Decoding
- 2026KV-CoRE: Benchmarking Data-Dependent Low-Rank Compressibility of KV-Caches in LLMs
- 2026Towards Efficient Large Language Model Serving: A Survey on System-Aware KV Cache Optimization
- 2026Pipeline-Native Transformers: Co-Designing Model Architecture and CPU Inference for Bandwidth-Efficient Autoregressive Decode
- 2026When Does Value-Aware KV Eviction Help? A Fixed-Contract Diagnostic for Non-Monotone Cache Compression