paper-with-me

홈 › Papers

EFQ-Softmax: Exp-Free Quantization for Softmax

2026-09-09 · Haohui Han, Yuming Wan, Hongni Wang, Pengcheng Xie, Xiaodong Yan, Runqi You, Wencong Zhang arxiv

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.

📄 PDF Abstract BibTeX arXiv:2609.09721

Code (1)

teddytennant/jax-efq-softmax

Similar Papers 제목 키워드 기반

Softmax Bias Correction for Quantized Generative Models

2023-09-04 · Nilesh Prasad Pandey, Marios Fournarakis, Chirag Patel, Markus Nagel

Post-training quantization (PTQ) is the go-to compression technique for large generative models, such as stable diffusion or large language models. PTQ methods commonly keep the softmax activation in higher precision as …

Language ModelingLanguage ModellingQuantization

Trio-ViT: Post-Training Quantization and Acceleration for Softmax-Free Efficient Vision Transformer

2024-05-06 · Huihong Shi, Haikuo Shao, Wendong Mao, Zhongfeng Wang

Motivated by the huge success of Transformers in the field of natural language processing (NLP), Vision Transformers (ViTs) have been rapidly developed and achieved remarkable performance in various computer vision tasks…

Efficient ViTsModel CompressionQuantization

EXAQ: Exponent Aware Quantization For LLMs Acceleration

2024-10-04 · Moran Shkolnik, Maxim Fishman, Brian Chmiel, Hilla Ben-Yaacov 외

Quantization has established itself as the primary approach for decreasing the computational and storage expenses associated with Large Language Models (LLMs) inference. The majority of current research emphasizes quanti…

QuantizationQuestion Answering

SOLE: Hardware-Software Co-design of Softmax and LayerNorm for Efficient Transformer Inference

2025-10-20 · Wenxun Wang, Shuchang Zhou, Wenyu Sun, Peiqin Sun 외 arxiv

Transformers have shown remarkable performance in both natural language processing (NLP) and computer vision (CV) tasks. However, their real-time inference speed and efficiency are limited due to the inefficiency in Soft…

IntAttention: A Fully Integer Attention Pipeline for Efficient Edge Inference

2025-11-26 · Wanli Zhong, Haibo Feng, Zirui Zhou, Hanyang Peng 외 arxiv

Deploying Transformer models on edge devices is limited by latency and energy budgets. While INT8 quantization effectively accelerates the primary matrix multiplications, it exposes the softmax-related path as the domina…