AIAny
AI Infra2025
Icon for item

FlashMLA

Optimized MLA (Multi-head Latent Attention) decoding kernels powering DeepSeek-V3/V3.2 inference on Hopper and Blackwell GPUs. Dense decoding reaches ~3000 GB/s and 660 TFLOPS on H800; the sparse path stores the KV cache in FP8.

Introduction

Attention isn't compute-bound at decode time — it's memory-bound, throttled by how fast you can stream the KV cache. FlashMLA's whole design orbits that one bottleneck: these are the production decoding kernels DeepSeek itself runs to serve V3 and V3.2, pushing an H800 to roughly 3000 GB/s of effective KV bandwidth before compute ever becomes the limit.

What Sets It Apart
  • Battle-tested in DeepSeek's own serving stack, not a reference toy — what ships here is what runs in production behind V3/V3.2.
  • Built specifically for MLA, the compressed-KV scheme that makes DeepSeek's long-context inference cheap; the kernel exploits MLA's tiny per-token footprint rather than treating it as generic attention.
  • The sparse decode path stores the KV cache in FP8 (656 bytes/token: 512 quantized values + 16 scale + 128 unquantized RoPE) while keeping matmuls in bf16, cutting memory traffic without collapsing accuracy.
  • Spans SM90 (Hopper) and SM100 (Blackwell), with published figures around 660 TFLOPS dense and 410 TFLOPS sparse decode on H800.
Who It's For

Great fit if you're building an inference engine around MLA models and want kernels already tuned for the exact KV layout DeepSeek uses. Look elsewhere if you serve standard MHA/GQA models, don't have a Hopper-or-newer GPU, or aren't on CUDA 12.8+ — the kernels are narrowly specialized and won't generalize to arbitrary attention shapes.

Information

  • Websitegithub.com
  • OrganizationsDeepSeek
  • AuthorsJiashi Li, DeepSeek
  • Published date2025/02/21

Categories

More Items

GitHub
AI Infra2025

Measures generative AI inference performance with token-level metrics (TTFT, inter-token latency), latency, and throughput under realistic traffic patterns. Provides a multiprocess engine, real-time TUI dashboard, extensible plugins, and integrations for telemetry and result uploads, aimed at inference benchmarking and capacity planning.

GitHub
AI Train2019

Train and experiment with multi-billion to trillion-parameter transformer models on large GPU clusters using GPU-optimized building blocks and reference training scripts; offers advanced parallelism and mixed-precision support for research teams and ML engineers.

GitHub

Indexes full text of visited web pages and local files on a self‑hosted server so you can search your personal knowledge from a web UI, terminal, CLI, or an AI assistant. Runs without mandatory telemetry, offers a browser extension for automatic capture, and supports optional semantic search via a configurable embeddings endpoint.