QuantMLA introduces function-aligned dual-path quantization for low-bit key-value caching in Multi-Head Latent Attention.

Research 0 views

QuantMLA uses dual-path quantization for Multi-Head Latent Attention caches, storing 4-bit and 2-bit data, lowering memory, and boosting AI throughput

Key Takeaways

  • QuantMLA is a low-bit dual-path cache quantization method for Multi-Head Latent Attention, addressing growing content and rotary positional encoding caches during long-context and batched inference.
  • It models quantization errors separately for the content and positional paths, showing that rotary positional encoding errors are strongly amplified and can distort attention outputs.
  • QuantMLA learns path-specific, function-aligned transformations that can be fused into model parameters offline, preserving computation while enabling joint 4-bit integer caching with minimal accuracy loss.
  • The method also supports further compression, such as 2-bit content caching with 4-bit positional key caching, while maintaining competitive performance on reasoning and code tasks.
  • A native low-bit attention kernel integrates unpacking and dequantization into attention computation, achieving 3.59x cache compression at 128K context and 5.168x higher serving throughput than bfloat16.

Meta description: QuantMLA introduces 4-bit and 2-bit cache quantization for Multi-Head Latent Attention, reducing memory and improving serving throughput in AI models

Tags: QuantMLA, Multi-Head Latent Attention, cache quantization, 4-bit integer, 2-bit integer

Featured image: Abstract low-bit attention cache visual, blue and orange nodes, no people, no logos, no text

QuantMLA is a low-bit dual-path cache quantization method for Multi-Head Latent Attention. It addresses the fact that compact attention caches still grow with context length and batch size, and reports, to the authors' knowledge, the first joint 4-bit integer caching of content and rotary positional encoding caches across four model families.

Background: Compact caches still grow with context and batch size

Multi-Head Latent Attention is designed to keep attention computation expressive while using compact caches for content and separate rotary positional encoding paths. That structure is useful for AI inference, where repeated attention computations during generation can consume memory as new tokens are appended. Still, the cache footprint is not fixed: it grows linearly with context length and batch size. The practical issue is therefore not only model parameter size, but the growing state needed to preserve long context and parallel requests.

Development: Mapping dual-path quantization errors

The research work treats the problem as dual-path quantization: content cache and positional path can be compressed separately, but their errors behave differently. The paper establishes a systematic model of these error paths, linking them to distortion in attention outputs. It also highlights that errors in the rotary positional encoding path are strongly amplified, which explains why simply shrinking all cache elements can be risky. This analysis matters because positional information shapes which tokens an attention head should focus on, and small distortions in those scores can propagate through output calculations.

Progress: QuantMLA folds learning into model parameters

Guided by the error model, QuantMLA is presented as a function-aligned framework for low-bit dual-path quantization. The method derives transformation spaces for each path. These spaces are designed to preserve full-precision computation while remaining fully fusible into model parameters offline, which removes online transformation overhead. Within the spaces, the framework learns path-specific transformations using objectives tied to the attention function. For the content path, attention-output reconstruction targets coupled matching and aggregation errors. For the positional path, query-key reconstruction preserves the component of attention logits produced by rotary positional encoding and admits a theoretical bound on output distortion.

Across four Multi-Head Latent Attention model families, QuantMLA enables what the paper describes as the first reported joint 4-bit integer caching of content and rotary positional encoding caches with minimal accuracy degradation. Further compression is also explored: the content cache can be reduced to 2-bit integer while the rotary positional encoding key cache remains at 4-bit integer, still maintaining competitive performance on challenging reasoning and code benchmarks.

Latest: Low-bit attention kernel and serving gains

The work also includes a native low-bit attention kernel for Multi-Head Latent Attention. It integrates unpacking and dequantization directly into attention computation, rather than treating low-bit storage as a separate preprocessing step. The physical cache layout provides 3.59x compression at 128K context. In a cache-pressure serving workload, the reported whole-job output throughput is 5.168x higher than bfloat16.

At this stage, the contribution is a method and kernel result rather than a deployed product. QuantMLA is evaluated across four Multi-Head Latent Attention model families, with joint 4-bit integer caching reported as the central memory compression milestone. Code is planned to be released upon acceptance.

Tags: QuantMLAMulti-Head Latent Attentioncache quantizationlow-bit AIattention kernel

Comments

No comments yet. Be the first to comment.

Leave a comment