specific method · filed under inference & serving
SWA Bounded Replay
SWA Bounded Replay approximately reconstructs missing Sliding-Window Attention KV states by replaying only the most recent n_win tokens instead of the L×n_win tokens exact reconstruction needs.1,2 It lets SWA KV be dropped from the persistent cache, since a miss is recovered by processing the replayed tokens together with the uncached suffix while reusing cached global KV.3
Trade-off It trades a small amount of prefill recomputation and slight approximation for a much smaller persistent KV cache footprint.4
How this definition was written
Summarised by glm-5.3-flash from 1 source; every sentence is checked against the quote it cites.
approximately reconstructs the required SWA KV states by replaying only the most recent 𝑛win tokens
— DeepSeek V41 Tech ReportSWA Bounded Replay instead replays only the most recent𝑛win tokens and truncates SWA to the replay segment, accepting approximate states
— DeepSeek V41 Tech ReportWhen the encoder SWA KV is missing, we replay the last𝑛win tokens of the cached prefix and process them together with the uncached suffix
— DeepSeek V41 Tech Reportavoid persisting SWA KV cache to SSD while incurring a small amount of prefill recomputation
— DeepSeek V41 Tech Report
Also called Sliding-Window Attention Bounded Replay.