# vLLM bounded SWA replay cuts prefill compute 30–40% after prefix hits

> Original title: 2/ SWA bounded replay: rebuilding sliding-window KV exactly after a prefix hit means replaying 40 × 128 tokens. Bounded replay reruns onl...

- Source: vLLM
- Published: 2026-10-07T20:42:14.000Z
- Bad Influence: https://badinfluence.news/items/n6efa1adjo6n906bqvlyjvhan
- Original: https://x.com/vllm_project/status/2107934547681927641

## Summary

vLLM's bounded sliding-window attention (SWA) replay reruns only each request's last 128 tokens after a prefix hit, instead of replaying 40 × 128 tokens. With CUDA graphs, prefill compute drops 30–40% for layers 21–39.

## Post

2/ SWA bounded replay: rebuilding sliding-window KV exactly after a prefix hit means replaying 40 × 128 tokens. Bounded replay reruns only the last 128.

In prefill, layers 21–39 run only on each request's last 128 tokens. With CUDA graphs, prefill compute drops 30–40%.
