EFQ-Softmax: Exp-Free Quantization for Softmax

Haohui Han, Yuming Wan, Hongni Wang, Pengcheng Xie, Xiaodong Yan +2 more
9/9/2026
cs.LG

No official code found. Best implementation: teddytennant/jax-efq-softmax (0 stars, MIT, last commit 2026-09-10).

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.

View on arXivView PDF

Code Implementations(1)

MIT

JAX implementation of EFQ-Softmax: Exp-Free Quantization for Softmax (arXiv:2609.09721)

00PythonSep 10, 20261 months agoMIT

Similar Papers

Cite this paper

@article{han2026efqsoftmax,
  title  = {EFQ-Softmax: Exp-Free Quantization for Softmax},
  author = {Haohui Han and Yuming Wan and Hongni Wang and Pengcheng Xie and Xiaodong Yan and Runqi You and Wencong Zhang},
  year   = {2026},
  eprint = {2609.09721},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2609.09721v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2609.09721.svg)](https://codeofpaper.com/paper/2609.09721)

Discussion