The Sliding Window Premium: Throughput, Goodput, and Per Layer Attention Costs of Hybrid Attention Models at Realistic Context Lengths on TPU v6e

This paper is the fifth study in a series measuring the vLLM TPU serving stack, and the first to read hardware traces per attention layer type. Gemma 4 31B, a hybrid attention model with fifty sliding window layers and ten global layers, is served on a TPU v6e slice of four chips, and the decode attention cost of each layer type is measured from compiled kernel names across histories from 140 to 8,000 tokens. Three results organize the paper. First, the sliding window premium: at short histories, where windowed and global layers read identical data, the windowed layers cost 53.1 percent more per layer, a premium that survives the shipped heuristic, a targeted kernel intervention certified as a null at a noise floor of 0.16 percent, and a change of KV cache precision, and that never inverts when normalized per block of work, locating the mechanism in the per grid step cost of the sliding window kernel variant. Second, the crossover: the per layer ordering flips between 1,300 and 4,000 tokens, and at 8,000 tokens the ten global layers cost as much as the fifty windowed layers combined. Third, the mixed block size policy: the two layer types have opposite block size optima at long history, the shipped heuristic compiles 2,048 token blocks onto layers that can never attend past 1,024, and assigning each layer type its measured optimum computes to about 32 percent less decode attention at 8,000 tokens than either uniform configuration, implementable because the stack already compiles the layer types as separate kernels. The campaign also relocates the series' long context reversal boundary below 1,300 tokens, shows the goodput cliff moves with history at fixed batch, documents that every prior run labeled block size 16, 32, or 64 had silently compiled to 128, and corrects the series' determinism claim to statistical rather than bit determinism across runs. Economic and multi agent serving implications are quantified, and the complete measurement harness is released.

Authors

Institutions

Publication Details

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

The Sliding Window Premium: Throughput, Goodput, and Per Layer Attention Costs of Hybrid Attention Models at Realistic Context Lengths on TPU v6e

Rubens de Almeida Zimbres
Zenodo (CERN European Organization for Nuclear Research)
Parallel Computing and Optimization Techniques
preprint

The Sliding Window Premium: Throughput, Goodput, and Per Layer Attention Costs of Hybrid Attention Models at Realistic Context Lengths on TPU v6e

Rubens de Almeida Zimbres
preprint en

Abstract

This paper is the fifth study in a series measuring the vLLM TPU serving stack, and the first to read hardware traces per attention layer type. Gemma 4 31B, a hybrid attention model with fifty sliding window layers and ten global layers, is served on a TPU v6e slice of four chips, and the decode attention cost of each layer type is measured from compiled kernel names across histories from 140 to 8,000 tokens. Three results organize the paper. First, the sliding window premium: at short histories, where windowed and global layers read identical data, the windowed layers cost 53.1 percent more per layer, a premium that survives the shipped heuristic, a targeted kernel intervention certified as a null at a noise floor of 0.16 percent, and a change of KV cache precision, and that never inverts when normalized per block of work, locating the mechanism in the per grid step cost of the sliding window kernel variant. Second, the crossover: the per layer ordering flips between 1,300 and 4,000 tokens, and at 8,000 tokens the ten global layers cost as much as the fifty windowed layers combined. Third, the mixed block size policy: the two layer types have opposite block size optima at long history, the shipped heuristic compiles 2,048 token blocks onto layers that can never attend past 1,024, and assigning each layer type its measured optimum computes to about 32 percent less decode attention at 8,000 tokens than either uniform configuration, implementable because the stack already compiles the layer types as separate kernels. The campaign also relocates the series' long context reversal boundary below 1,300 tokens, shows the goodput cliff moves with history at fixed batch, documents that every prior run labeled block size 16, 32, or 64 had silently compiled to 128, and corrects the series' determinism claim to statistical rather than bit determinism across runs. Economic and multi agent serving implications are quantified, and the complete measurement harness is released.

Zenodo (CERN European Organization for Nuclear Research)
IntelliEPI (United States) (US)
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.