paperbot · PL 论文追踪

全部论文 待读 收藏

P2 8-bit Transformer Inference and Fine-tuning for Edge Accelerators

面向边缘加速器的 8 位 Transformer 推理与微调
ASPLOS Proceedings of the 29th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 32024匹配度 1/10 · 论文研究 FP8/Posit8 等低精度浮点格式在 Transformer 边缘加速器上的量化推理与微调,属于硬件/机器学习系统方向;它不涉及静态分析、程序语言、Agentic 程序,也不属于浮点程序分析或形式化验证,与用户研究方向核心基本无关。引用 33 inbox
Jeffrey Yu, Kartik Prabhu, Yonatan Urman, Robert M. Radway, Eric Han, Priyanka Raina
crossref: 2026-09-12dblp: 2026-09-12

AI 速览

一句话:系统评估 FP8 与 Posit8 在 Transformer 全操作推理和 LoRA 微调中的量化效果,并设计高效 posit softmax 加速器。

Transformer 在边缘端推理与微调受限于计算和内存。现有 int8 仅适合推理,FP8 训练又只量化矩阵乘法输入;本文则对前向和反向传播的所有运算进行 8 位量化,研究 FP8 与 Posit8 两种格式,并将 LoRA 适配到二者以支持 8 位 GEMM 微调。作者通过算子融合,在无需缩放因子下使推理精度损失低于 1%;还设计用位运算近似指数和倒数的 posit softmax。结果表明,Posit8/FP8 的推理与微调精度可与 BFloat16 相当,加速器面积分别减少 30% 和 34%,功耗降低 26% 和 32%;Posit8 向量单元比 FP8 平均小 33%、功耗低 35%。

问题
边缘加速器上 Transformer 推理与微调面临高计算和内存开销;已有 8 位量化方案要么仅支持推理,要么只量化矩阵乘法输入,难以兼顾训练精度与范围。
方法
对 FP8 与 Posit8 两种 8 位浮点格式的前向和反向全部运算进行量化,结合算子融合、适配 LoRA 以支持 8 位 GEMM,并设计基于位运算近似指数和倒数的 posit softmax 加速器。
评估
在 Transformer 推理和微调任务上对比 BFloat16 精度,并评估加速器面积与功耗;结果显示精度接近,面积和功耗显著降低。
原文摘要(Abstract)

Transformer models achieve state-of-the-art accuracy on natural language processing (NLP) and vision tasks, but demand significant computation and memory resources, which makes it difficult to perform inference and training (fine-tuning) on edge accelerators. Quantization to lower precision data types is a promising way to reduce computation and memory resources. Prior work has employed 8-bit integer (int8) quantization for Transformer inference, but int8 lacks the precision and range required for training. 8-bit floating-point (FP8) quantization has been used for Transformer training, but prior work only quantizes the inputs to matrix multiplications and leaves the rest of the operations in high precision. This work conducts an in-depth analysis of Transformer inference and fine-tuning at the edge using two 8-bit floating-point data types: FP8 and 8-bit posit (Posit8). Unlike FP8, posit has variable length exponent and fraction fields, leading to higher precision for values around 1, making it well suited for storing Transformer weights and activations. As opposed to prior work, we evaluate the impact of quantizing all operations in both the forward and backward passes, going beyond just matrix multiplications. Specifically, our work makes the following contributions: (1) We perform Transformer inference in FP8 and Posit8, achieving less than 1% accuracy loss compared to BFloat16 through operation fusion, without the need for scaling factors. (2) We perform Transformer fine-tuning in 8 bits by adapting low-rank adaptation (LoRA) to Posit8 and FP8, enabling 8-bit GEMM operations with increased multiply-accumulate efficiency and reduced memory accesses. (3) We design an area- and power-efficient posit softmax, which employs bitwise operations to approximate the exponential and reciprocal functions. The resulting vector unit in the Posit8 accelerator, that performs both softmax computation and other element-wise operations in Transformers, is on average 33% smaller and consumes 35% less power than the vector unit in the FP8 accelerator, while maintaining the same level of accuracy. Our work demonstrates that both Posit8 and FP8 can achieve inference and fine-tuning accuracy comparable to BFloat16, while reducing accelerator's area by 30% and 34%, and power consumption by 26% and 32%, respectively.

链接与引用

DOI 原文 · DBLP

BibTeX
@inproceedings{YuPURHR24,
  title = {8-bit Transformer Inference and Fine-tuning for Edge Accelerators},
  author = {Jeffrey Yu and Kartik Prabhu and Yonatan Urman and Robert M. Radway and Eric Han and Priyanka Raina},
  booktitle = {ASPLOS},
  year = {2024},
  doi = {10.1145/3620666.3651368}
}