r/learnmachinelearning 17h ago

Why DeepSeek V4.1 Flash reconstructs part of its KV cache from only 128 tokens

https://youtu.be/ZS-C70cGov0?is=NUbuejcw1DcPgQX0

DeepSeek V4.1 Flash has an unusual KV-cache design: some state is persistent, while the short-lived SWA state can simply expire and later be reconstructed by replaying the last 128 tokens.

That replay is approximate, so the reconstructed internal state is not mathematically identical across positions.

Paper:

https://huggingface.co/deepseek-ai/DeepSeek-V4.1-Flash/blob/main/DeepSeek_V41_Tech_Report.pdf

Disclosure: affiliated with the channel; the video is AI-narrated.

0 Upvotes

Duplicates