面向机器学习应用的代数整数量化
Algebraic Integer Quantization for Machine Learning Applications
AI总结:
本文提出代数整数量化(AIQ)框架,可实现无误差乘累加运算,在LLM推理中达到与MX格式相当的精度,且性能接近硬件加速器最优数值方案,高阶代数整数推广具潜力。
摘要:
在本文中,我们提出代数整数格式(AINF)作为高度可配置且精确的压缩计算框架。AINF的关键特性是可直接归约为纯整数算术,从而实现无误差的乘累加运算。我们开发了一种利用该特性的矩阵乘法引擎,在现代硬件加速器上获得的性能与最高效的数值对应物处于可预测的因子范围内。AIQ的另一关键优势在于可自由选择适配特定用例数值特性的代数整数,提供了浮点或定点格式根本无法实现的优化机会。受这些特性驱动,我们引入代数整数量化(AIQ),这是一种用于大语言模型(LLM)推理的有损压缩格式,并提供结果表明,在等效的每参数字节预算下,AIQ在多样化的模型和基准测试中达到了与行业标准MX格式相当的竞争力精度。本文呈现的实验采用了二次(二次整数)的代数整数;向高阶尤其是多维代数整数的推广有望带来更大的计算优势,仍是未来工作的有前景方向。
英文摘要:
In this article, we propose algebraic integer number formats (AINF) as a framework for highly configurable and accurate compressed computation. A key property of AINF is its straightforward reduction to purely integer arithmetic, enabling error-free multiply-accumulate operations. We develop a matrix multiplication engine that exploits this property, obtaining performance within a predictable factor of the most efficient numerical counterparts on modern hardware accelerators. Another key advantage of AIQ is the freedom to select algebraic integers tailored to the numerical characteristics of a given use case, offering optimization opportunities that are fundamentally unavailable in floating-point or fixed-point formats. Motivated by these properties, we introduce algebraic integer quantization (AIQ), a lossy compression format for large language model (LLM) inference, and provide results demonstrating that AIQ achieves competitive accuracy compared to the industry-standard MX format across a diverse set of models and benchmarks at equivalent bit-per-parameter budgets. The experiments presented in this article employ algebraic integers of degree two (quadratic integers); generalizations to higher-order and, in particular, multidimensional algebraic integers promise even greater computational advantages and remain a promising direction for future work.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。