IntAttention: A Fully Integer Attention Pipeline for Efficient Edge Inference

Wanli Zhong, Haibo Feng, Zirui Zhou, Hanyang Peng, Shiqi Yu · DOI

Introduction

As Large Language Models (LLMs) transition toward on-device "edge" execution on smartphones and embedded systems, they encounter significant efficiency barriers. While 8-bit integer (INT8) quantization is the standard for accelerating heavy matrix multiplications, a critical bottleneck remains: the Softmax layer.

In conventional quantized pipelines, data must be dequantized to 32-bit floating-point (FP32) to compute exponentials and normalization, then requantized to INT8 for the next step. This "dequantize → softmax → requantize" detour can account for up to 65% of total attention latency on edge CPUs, which are far more efficient at integer arithmetic than floating-point math.

Comparison between traditional quantized attention with an FP32 detour and the proposed integer-only IntAttention pipeline.

The IntAttention Pipeline

IntAttention is a "plug-and-play" attention pipeline designed to maintain an end-to-end integer dataflow. It replaces the traditional floating-point softmax with IndexSoftmax, a hardware-friendly operator comprising three core mechanisms:

  1. Integer-Domain Clipping: Recognizing that Softmax is naturally sparse, IntAttention uses a quantization-aligned threshold to prune "near-zero" terms directly in the integer domain, eliminating unnecessary computation.
  2. LUT-based Exponential Approximation: Instead of complex transcendental calculations, the system utilizes a compact, 32-entry Lookup Table (LUT) to map integer distances to exponential approximations with high fidelity using simple memory gathers.
  3. Direct Integer Normalization: Floating-point division is replaced with fixed-point scaling. Furthermore, the probability matrix ($P$) is transitioned to unsigned UINT8, doubling the resolution compared to signed INT8 for values strictly between 0 and 1.

Notably, IntAttention does not require Quantization-Aware Training (QAT) or fine-tuning, allowing it to be integrated into pre-trained models immediately.

Experimental Results

The researchers evaluated IntAttention across diverse language (LLaMA-3.2, OPT, Qwen) and vision (DeiT, ViT, CaiT) models. Benchmarks were conducted on ARMv8 platforms, including the Rockchip RK3588S2 and Apple M2.

Performance and Efficiency

IntAttention achieves up to a 3.7x speedup over FP16 baselines and is 2.0x faster than conventional INT8 pipelines that retain the floating-point softmax detour. As shown in the performance analysis, the time share of the softmax operation is significantly reduced across various sequence lengths.

Time share comparison across different sequence lengths, highlighting the latency reduction achieved by IndexSoftmax compared to standard INT8 and FP32/16 baselines.

Beyond speed, the method delivers an average 61% reduction in energy consumption per iteration compared to FP16.

Accuracy Preservation

Across all tested models, the accuracy impact was negligible, typically within 0.1-0.5%. For instance, on LLaMA-3.2-1B, IntAttention achieved an average benchmark accuracy of 59.92%, compared to 59.76% for the FP16 baseline, demonstrating that integer-only processing does not necessitate a sacrifice in model quality.

Conclusion and Future Directions

IntAttention effectively removes the Softmax bottleneck in quantized Transformer models, enabling efficient edge inference. While currently optimized for ARMv8 CPUs using SIMD units like ARM NEON, the logic is portable to other architectures. Future work may explore pushing similarity computations to INT4 precision and further optimizing integer kernels for matrix multiplication, which has now re-emerged as the primary computational hotspot.

Summary updated

BibTeX
@misc{zhong2025intattention,
  author = {Wanli Zhong and Haibo Feng and Zirui Zhou and Hanyang Peng and Shiqi Yu},
  title = {{IntAttention: A Fully Integer Attention Pipeline for Efficient Edge Inference}},
  year = {2025},
  eprint = {2511.21513},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2511.21513},
}
Figure