Multi-Head Latent Attention (MLA)

DeepSeek's method of compressing what an AI model remembers about past tokens into a compact form, so it handles long conversations without running out of memory.

Technically: Multi-Head Latent Attention (introduced in DeepSeek-V2) jointly compresses keys and values into a low-rank latent vector via a down-projection, then up-projects at attention time rather than caching full K/V tensors. This shrinks the KV cache substantially relative to MHA while recovering most quality, since the up-projection can be folded into the attention weights at inference. It makes very long context windows economically viable at scale.

Category: Attention Mechanisms

Related ideas