Research Papers 论文研究 3h ago Updated 53m ago 更新于 53分钟前 47

Output-Aware Rotation for INT2 KV-Cache Quantization 面向INT2 KV缓存量化的输出感知旋转方法

Introduces OptR, an output-aware rotation method that minimizes post-W_O attention-output error rather than optimizing pre-attention cache statistics or proxy errors Decomposes the post-output error into key- and value-induced terms and learns per-head orthogonal corrections through the full INT2 quantization and attention path Applies an attention-equivalent key reparameterization to reduce large channel-wise offsets without altering the softmax distribution Consistently improves both QuaRot an 提出OptR(Output-Aware Rotation),一种输出感知的旋转方法,用于解决INT2 KV缓存量化的误差传播问题 现有旋转方法在注意力读出前优化缓存统计,但模型最终受通过W_O传播的误差影响,OptR直接最小化W_O后的注意力输出误差 OptR将误差分解为key和value诱导项,通过完整INT2量化和注意力路径学习每头正交校正,并应用注意力等效的key重新参数化 在三个模型和五个推理/编码基准上,OptR持续改进QuaRot和OSCAR,增强长上下文检索能力,同时保持分页KV缓存格式且推理开销可忽略

62
Hot 热度
72
Quality 质量
68
Impact 影响力

Analysis 深度分析

TL;DR

  • Introduces OptR, an output-aware rotation method that minimizes post-W_O attention-output error rather than optimizing pre-attention cache statistics or proxy errors
  • Decomposes the post-output error into key- and value-induced terms and learns per-head orthogonal corrections through the full INT2 quantization and attention path
  • Applies an attention-equivalent key reparameterization to reduce large channel-wise offsets without altering the softmax distribution
  • Consistently improves both QuaRot and OSCAR across three models and five reasoning/coding benchmarks while strengthening long-context retrieval
  • Preserves the paged KV-cache format with negligible inference overhead

Why It Matters

Ultra-low-bit (INT2) KV-cache quantization is critical for enabling long-context LLM inference within practical memory and bandwidth constraints. By aligning the quantization objective with the actual end-to-end output error rather than intermediate proxy metrics, this work closes a fundamental gap between optimization targets and model performance, offering a more principled path toward deployable low-bit inference systems.

Technical Details

  • Problem framing: Existing rotation-based INT2 methods optimize cache statistics or proxy errors computed before the complete attention readout, creating a mismatch with the actual error that propagates through attention and the output projection W_O.
  • OptR core method: Minimizes post-W_O attention-output error by decomposing it into key-induced and value-induced error terms, then learns per-head orthogonal rotation corrections that account for the full INT2 quantization and attention computation path.
  • Key reparameterization: Introduces an attention-equivalent key reparameterization technique that reduces large channel-wise offsets in the quantized KV cache while preserving the softmax attention distribution, ensuring correctness of attention outputs.
  • Evaluation: Tested across three language models and five reasoning and coding benchmarks, showing consistent improvements over both QuaRot and OSCAR baselines, with particular gains in long-context retrieval tasks.
  • System compatibility: Maintains the paged KV-cache format used by major inference frameworks, incurring negligible additional inference overhead compared to existing rotation-based quantization methods.

Industry Insight

  • The misalignment between quantization optimization objectives and end-to-end output quality is a systemic issue likely affecting other low-bit quantization approaches; output-aware objectives should be considered as a general improvement principle.
  • INT2 KV-cache quantization is approaching practical viability for long-context inference, and methods like OptR that preserve framework compatibility (paged KV-cache) will see faster adoption in production LLM serving systems.
  • As context windows continue to expand, the memory and bandwidth savings from ultra-low-bit KV-cache quantization will become increasingly decisive, making output-aware rotation techniques a strategically important direction for both research and engineering teams working on efficient LLM deployment.

TL;DR

  • 提出OptR(Output-Aware Rotation),一种输出感知的旋转方法,用于解决INT2 KV缓存量化的误差传播问题
  • 现有旋转方法在注意力读出前优化缓存统计,但模型最终受通过W_O传播的误差影响,OptR直接最小化W_O后的注意力输出误差
  • OptR将误差分解为key和value诱导项,通过完整INT2量化和注意力路径学习每头正交校正,并应用注意力等效的key重新参数化
  • 在三个模型和五个推理/编码基准上,OptR持续改进QuaRot和OSCAR,增强长上下文检索能力,同时保持分页KV缓存格式且推理开销可忽略

为什么值得看

本文针对LLM推理中KV缓存的内存和带宽瓶颈,提出了更精确的INT2量化优化目标,解决了现有方法优化目标与实际模型性能不匹配的问题。对于关注长上下文推理效率、模型量化部署的AI从业者和研究者具有重要参考价值。

技术解析

  • 问题定义:现有旋转基INT2方法(如QuaRot、OSCAR)在完整注意力读出前优化缓存统计或代理误差,但模型最终性能受通过注意力机制和输出投影W_O传播的误差影响,存在优化目标与实际影响的错位。
  • 核心方法:OptR直接最小化W_O后的注意力输出误差,将误差分解为key-induced和value-induced两项,通过完整的INT2量化和注意力路径学习每头(per-head)正交校正矩阵。
  • Key重新参数化:引入注意力等效的key重新参数化技术,在不改变softmax分布的前提下减少大的通道级偏移,保持注意力机制的数学等价性。
  • 实验验证:在三个模型和五个推理/编码基准测试上验证,OptR一致提升QuaRot和OSCAR性能,增强长上下文检索能力,同时保持分页KV缓存格式,推理开销可忽略不计。

行业启示

  • 超低位量化(INT2及以下)是突破长上下文LLM推理瓶颈的关键方向,优化目标需与最终输出误差对齐而非仅关注中间统计量。
  • 旋转量化方法的设计应充分考虑误差在完整计算图(注意力+输出投影)中的传播路径,输出感知优化可带来显著性能提升。
  • 保持与现有推理框架(如paged KV-cache)的兼容性是量化方法工程落地的重要考量,OptR在此方面提供了可行范式。

Disclaimer: The above content is generated by AI and is for reference only. 免责声明:以上内容由 AI 生成,仅供参考。

LLM 大模型 Inference 推理 Quantization 量化 Research 科学研究