# SnapMLA: Efficient Long-Context MLA Decoding via Hardware-Aware FP8 Quantized Pipelining

*Yifan Zhang, Zunhai Su, Shuhao Hu, YangRui, Wei Wu, Yulei Qian, Yuchen Xie, Xunliang Cai*

[NeurIPS page](https://neurips.cc/virtual/2026/poster/148693) · [OpenReview](https://openreview.net/forum?id=vkrSWou03u) · [alphaXiv](https://www.alphaxiv.org/abs/2602.10718) · [Open on the map](../papers.html#p148693)

Category: [Efficient LLM Inference & Training](../pcat/14.md) › [KV Cache Optimization](../pgroup/283.md) · Type: new method · Keywords: long-context LLM decoding, FP8 quantization, key-value cache optimization, hardware-aware algorithm-kernel co-optimization, latent attention architectures

Areas: [Memory](../areas/memory.md) › Model Memory Optimization › Efficient Attention for LLMs; [Long Context](../areas/longcontext.md) › Long-context mechanisms › Efficient long-context attention

## Summary
SnapMLA is an FP8 quantized decoding framework that uses hardware-aware algorithm-kernel co-optimization to reduce KV cache memory overhead and improve long-context inference throughput.

## Explained to a 5-year-old
When a big computer program reads a long story, it needs to remember what came before, which takes up a lot of space. The new idea splits the remembering part into smaller pieces and uses a special way to store numbers that uses less space. It also makes sure the pieces fit together smoothly so the program doesn't slow down. This helps the program run faster and use less memory, so it can handle longer stories without getting slow. The result is a quicker, more memory-friendly way to read and write long texts.

## Explained to a 5-year-old, longer
A big computer program that talks, like a chatbot, needs to keep a lot of information in its memory while it talks. When the conversation gets really long, this memory can become a problem because it uses a lot of the computer's space. The new idea looks at how the program stores this information and tries to make it more efficient. It breaks the stored information into tiny pieces and uses a new kind of numbers that take up less room. It also makes sure these pieces line up correctly so the program can quickly find what it needs. By doing this, the program can run faster and use less memory, which means it can handle longer conversations without slowing down. The result is a smoother, quicker experience for users who want to talk about big topics or write code with lots of context. This improvement helps the program stay responsive even when the conversation is very long.

## For a technical reader
The paper addresses the memory bottleneck of key-value caches in long-context LLM decoding by applying per-token quantization and scale alignment. It reconstructs the PV computation pipeline to handle shared key-value structures and adds optimized dataflow kernels. Experiments show up to 1.91× throughput improvement while maintaining quality on reasoning and code-generation tasks.

## Problem
As language models handle longer contexts, the key-value cache memory required during decoding becomes a major bottleneck, limiting efficient inference for long sequences. Existing low-precision attention methods have difficulty integrating with latent attention architectures because of quantization and pipeline mismatches.

## Method
The approach quantizes key-value caches per token while keeping positional embeddings in high precision, aligns quantization scales to avoid pipeline stalls, reconstructs the PV computation pipeline for shared key-value structures, and employs optimized dataflow kernels for efficient memory access.

## Results
The approach achieves up to a 1.91× throughput gain on long-output decoding workloads while preserving near-parity with the BF16 baseline on reasoning and code-generation benchmarks.

## Contributions
It introduces hardware-aware algorithm-kernel co-optimization techniques for low-precision key-value caching in latent attention architectures, including per-token quantization, scale alignment, pipeline reconstruction, and dataflow optimization. These techniques enable efficient long-context inference without sacrificing model quality.

## Research questions this paper is counted under

- [How can we reduce the quadratic attention cost and memory usage of large language models for long contexts while preserving performance?](../q/4.md)

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. [Suggest a correction](../feedback/?on=p/148693)
