Figure: RoPE-aware prefetching. RoPE rotates Q and K in d/2 two-dimensional subspaces, each with its own frequency, so the inner product is a sum over those pairs and does not fall off monotonically; the guarantee is an upper-bound envelope, the magnitude of the inner product of q_m and k_n is at most B of the absolute distance m minus n with B non-increasing. This design assumes about 70 percent of attention mass falls within plus or minus W positions of the query, an input assumption rather than a universal property. The prefetch rule is: when the GPU accesses position P, prefetch the range P minus W to P plus W, ordering candidates by priority(distance) = 1 divided by (1 plus distance over 100). In the worked strip, current access is position 55 with W = 5, so positions 50 to 54 and 56 to 60 are in the prefetch zone while 48, 49, 61 and 62 stay on storage. Window size is chosen from the assumed distribution: W = 32 captures about 50 percent of attention with low bandwidth but more misses; W = 128 captures about 75 percent and is the balanced choice for Llama-70B; W = 512 captures about 90 percent at high bandwidth overhead. All three window sizes are uncalibrated design parameters, not derived or measured values: they are round powers of two chosen to show the shape of the trade-off. W sets the radius of the prefetch range and so fixes both attention coverage and speculative bandwidth. Raising W lifts coverage but cost grows linearly while return is sharply sublinear, and prefetched entries that are never read waste both CXL bandwidth and HBM residency; lowering W spends less but leaves more of the miss tail to be paid at 200 nanoseconds or 25 microseconds. Calibration requires a measured per-head attention-versus-distance distribution on production traces, and the right W is likely per head type rather than global. Appendix K section K.7 lists it with the package's other uncalibrated parameters. Note also that this prefetch priority is a different function from the tier-placement score P(p) = 0.25 R + 0.55 E + 0.20 N used in the executive summary visual appendix: prefetch priority decides what to fetch next, tier placement decides where a token already held should live. RoPE-aware prefetch contributes plus 4 percentage points of hit rate, 93 percent to 97 percent cumulative. All values are an analytical model, not measured.
RoPE-Aware Prefetching
Exploiting position encoding locality for predictive cache loading
|⟨q_m, k_n⟩| ≤ B(|m − n|) with B non-increasing. The curve at left sketches
that envelope, not a measured attention trace.
1 / (1 + distance/100) — a hyperbolic falloff in position distance,
not the RoPE envelope itself.
These three window sizes are not derived and were not selected by experiment. They are round powers of two spanning two orders of magnitude, chosen to show the shape of the trade-off; the coverage percentages beside them (~50% / ~75% / ~90%) are assumptions of the model, not a measured histogram, and W = 128 is labelled "balanced for Llama-70B" as a judgement call, not a fitted result.
What W controls. W sets the radius of the prefetch range [P − W, P + W] around an accessed position, so 2W + 1 entries are fetched speculatively per access. It therefore fixes the fraction of attention mass the prefetcher can cover and, at the same time, the speculative bandwidth the policy spends to get it.
Which way it pushes. Raising W widens coverage and lifts the hit rate — this is the rung worth +4 percentage points, 93% → 97% — but the cost is linear in W while the return is sharply sublinear, because the assumed attention distribution thins out with distance. Every prefetched entry that is never read is wasted CXL bandwidth and wasted HBM residency, so a large W eats into the hot set it was meant to serve and can lower the effective hit rate. Lowering W spends less bandwidth and leaves more HBM for demand-loaded tokens, but leaves more of the miss tail to be paid at 200 ns (CXL) or 25 µs (flash). At W = 0 the mechanism disappears and the ladder falls back to 93%.
How it would be calibrated. Measure the real per-head attention-versus-distance distribution on production traces for the target model, then choose the smallest W whose marginal coverage still exceeds the marginal bandwidth cost. The right W is very likely per-head-type rather than global: the head-specialisation split in Appendix E implies local heads want a small W and retrieval heads are poorly served by a distance window at any W. See Appendix K, section K.7 — Uncalibrated parameters.
Not the same function as the tier-placement weights. The ordering rule inside the window, priority(distance) = 1/(1 + distance/100), and the 0.6 · rope_factor + 0.4 · ema_factor blend in Appendices D and J are prefetch priorities — they decide what to fetch next. The P(p) = 0.25·R + 0.55·E + 0.20·N weights in the executive-summary visual appendix are a tier-placement score — they decide where a token already held should live. Different questions, different functions; the weights are not comparable and do not contradict each other.
Analytical model — the locality percentages and window-coverage figures on this page are assumptions of the model, not measurements. RoPE-aware prefetch contributes +4 percentage points of hit rate (93% → 97% cumulative). Canonical numbers v4.0.