Case Study: How Does DeepSeek's FlashMLA Speed Up Inference
summary
DeepSeek’s FlashMLA combines an algorithmic compression — Multi-Head Latent Attention that replaces KV caches with a small latent representation (about 50x smaller KV cache in their numbers) — with GPU-aware execution that tiles memory like FlashAttention and overlaps tensor-core matrix multiplies, CUDA work, and loads using a two-warp seesaw schedule. On Hopper-class cards (H800/H100) this hits roughly 80% flop utilization and reports 3–4× faster inference versus naive attention; implementation is validated and comparable to FlashAttention v3.
AI-written summary · about
chapters (12)
- 0:00Introduction to talk
- 0:25Recap of attention in transformers
- 1:29Bottlenecks in attention computation
- 4:15KV caching and memory trade-offs
- 6:22Latent attention and MLA concept
- 9:15Hardware-aware algorithm design
- 12:47Flash attention and memory hierarchy
- 16:55Need for FlashMLA on Hopper GPUs
- 19:44Tensor cores and their advantages
- 21:29FlashMLA’s seesaw scheduling
- 23:55Summary of optimizations
- 24:40Q&A session
