EFQ-Softmax: Exp-Free Quantization for Softmax

📅 2026-09-09
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
本文提出EFQ-Softmax方法,直接生成低比特概率,解决softmax路径中高精度概率生产者与低比特矩阵消费者之间的不匹配问题。
📝 Abstract
Low-bit attention accelerates Transformer inference by moving the $QK^\top$ and $PV$ matrix multiplications to FP8 or FP4 matrix engines. However, the softmax path often evaluates shifted-score exponentials in higher precision, forms a temporary probability block, and quantizes it before low-bit $PV$ multiplication. This exp-then-quantize path creates a mismatch between a high-precision probability producer and a low-bit matrix consumer. We propose EFQ-Softmax (Exp-Free Quantization for Softmax), a low-bit probability-generation method that directly maps shifted attention scores to block-scaled E2M1 operands. For each microscaling block, EFQ-Softmax selects an exponent-only scale from the local maximum, maps the shifted scores to a normalized residual domain, and generates nonnegative E2M1 probability codes using a single affine rule. The resulting operand is used consistently in both the $\widetilde{P}V$ numerator update and the $\widetilde{P}\mathbf{1}$ denominator update. The FlashAttention-style row-maximum update, historical rescaling, high-precision accumulation, and final normalization remain unchanged. We evaluate end-to-end quality on Qwen3-8B, Qwen3-VL-8B-Instruct, and WAN2.2-TI2V-5B, and separately measure kernel-level performance on the A5 vector unit. EFQ-Softmax improves the Qwen3-8B seven-task mean from 0.6749 with MXFP4 to 0.6773 and the Qwen3-VL nine-task mean from 0.7826 to 0.8000. On WAN2.2, it maintains temporal consistency and visual quality comparable to the FP16 and MXFP4 baselines under VBench. On the A5 vector unit, EFQ-Softmax reduces the vector-stage latency of the fused probability-generation kernel by 40.33% on average across sequence lengths from 16K to 128K. These results show that direct low-bit probability generation can replace the conventional exp-then-quantize path while preserving end-to-end model quality.
Problem

Research questions and friction points this paper is trying to address.

Low-bit Attention
Softmax Path
Exp-then-Quantize
Precision Mismatch
Innovation

Methods, ideas, or system contributions that make the work stand out.

EFQ-Softmax
low-bit probability generation
E2M1 operands
shifted attention scores
exp-then-quantize path
🔎 Similar Papers
No similar papers found.
💼 Related Jobs
No related jobs found.
H
Haohui Han
Xi’an Jiaotong University
Y
Yuming Wan
Huawei Technologies Co., Ltd
H
Hongni Wang
Shandong University of Finance and Economics
P
Pengcheng Xie
Huawei Technologies Co., Ltd
Xiaodong Yan
Xiaodong Yan
Unknown affiliation
统计学,机器学习
R
Runqi You
Xi’an Jiaotong University
W
Wencong Zhang
Xi’an Jiaotong University