Separating KV Reuse from Baseline Work in Tiny Attention Benchmarks

In a single-layer attention benchmark, the dense baseline computes an output at every position in a growing sequence and then discards all but the last. How much of the timing difference comes from caching keys and values, and how much comes from skipping those unused outputs? Four implementations share the same weights, inputs and requested output positions. Across 48 CPU configurations and 2,112 interleaved timings, the median per-configuration ratio of dense to cached runtime was 4.505. Restricting recomputation to the last query reduced that ratio to 1.271. Cache concatenation was faster than last-query recomputation in 44 configurations. Preallocation was faster than concatenation in 20. The largest absolute output difference on the CPU grid was 8.94 × 10⁻⁸. A separate archived Tesla T4 experiment measured two implementations. Across seven trials, the ratio of median dense to median cached runtime was 1.233. These measurements describe a single attention layer. Assistance disclosure: OpenAI Codex assisted with literature retrieval, audit design, implementation, execution, analysis and manuscript preparation. Clever AI Humanizer supplied wording suggestions for the introduction, background and discussion sections. The original attention implementation and archived Tesla T4 measurements predate the manuscript. Public implementation and archived measurements: https://github.com/VEDANT1602/inference-systems-lab/tree/9123c1bc0285130de3e920b61ae18dad58107b88

Authors

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-11-19
DOI
https://doi.org/10.5281/zenodo.24375578
Primary Topic
Parallel Computing and Optimization Techniques
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

Separating KV Reuse from Baseline Work in Tiny Attention Benchmarks

Vedant Thaker
Zenodo (CERN European Organization for Nuclear Research)
Parallel Computing and Optimization Techniques
preprint

Separating KV Reuse from Baseline Work in Tiny Attention Benchmarks

Vedant Thaker
preprint en

Abstract

In a single-layer attention benchmark, the dense baseline computes an output at every position in a growing sequence and then discards all but the last. How much of the timing difference comes from caching keys and values, and how much comes from skipping those unused outputs? Four implementations share the same weights, inputs and requested output positions. Across 48 CPU configurations and 2,112 interleaved timings, the median per-configuration ratio of dense to cached runtime was 4.505. Restricting recomputation to the last query reduced that ratio to 1.271. Cache concatenation was faster than last-query recomputation in 44 configurations. Preallocation was faster than concatenation in 20. The largest absolute output difference on the CPU grid was 8.94 × 10⁻⁸. A separate archived Tesla T4 experiment measured two implementations. Across seven trials, the ratio of median dense to median cached runtime was 1.233. These measurements describe a single attention layer. Assistance disclosure: OpenAI Codex assisted with literature retrieval, audit design, implementation, execution, analysis and manuscript preparation. Clever AI Humanizer supplied wording suggestions for the introduction, background and discussion sections. The original attention implementation and archived Tesla T4 measurements predate the manuscript. Public implementation and archived measurements: https://github.com/VEDANT1602/inference-systems-lab/tree/9123c1bc0285130de3e920b61ae18dad58107b88

Zenodo (CERN European Organization for Nuclear Research)
Parallel Computing and Optimization Techniques
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon