From MLA to DSA to HCA/CSA: DeepSeek V3.2 and V4 Attention

MLA carried DeepSeek from V2 through V3.2 and was adopted across the industry — then V4 dropped it. V3.2 keeps MLA and bolts a lightning indexer on top: dense KV cache, sparse read. DeepSeek-V4 throws that layout away — every layer is a 128-token sliding window plus a compressed long-range branch, and layers alternate between CSA (m=4, indexer-selected) and HCA (m’=128, dense over blocks). Walking both through the reference implementations in huggingface/transformers.