mlsanityData to 14 Oct 2026

Online Pseudo-average Shifting Attention(PASA) for Robust Low-precision LLM Inference: Algorithms and Numerical Analysis

arXiv 2503.01873 ↗First posted 26 Feb 2025cs.LG cs.AI cs.NAcited by 1

Not on the map. Why?

Abstract (arXiv)

Attention calculation is extremely time-consuming for long-sequence inference tasks, such as text or image/video generation, in large models. To accelerate this process, we developed a low-precision, mathematically-equivalent algorithm called PASA, based on Flash Attention. PASA introduces two novel techniques: online pseudo-average shifting and global recovering. These techniques enable the use of half-precision computation throughout the Flash Attention process without incurring overflow instability or unacceptable numerical accuracy loss. This algorithm enhances performance on memory-restricted AI hardware architectures, such as the Ascend Neural-network Processing Unit(NPU), by reducing data movement and increasing computational FLOPs. The algorithm is validated using both designed random benchmarks and real large models. We find that the large bias and amplitude of attention input data are critical factors contributing to numerical overflow (>65504 for half precision) in two different categories of large models (Qwen2-7B language models and Stable-Video-Diffusion multi-modal models). Specifically, overflow arises due to the large bias in the sequence dimension and the resonance mechanism between the query and key in the head dimension of the Stable-Video-Diffusion models. The resonance mechanism is defined as phase coincidence or 180-degree phase shift between query and key matrices. It will remarkably amplify the element values of attention score matrix. This issue also applies to the Qwen models. Additionally, numerical accuracy is assessed through root mean square error (RMSE) and by comparing the final generated texts and videos to those produced using high-precision attention.

Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Builds on 17 of its 31 references that are in the map. First posted on arXiv 26 Feb 2025.

Builds on

17 of 31 references.

References · 17

  1. 2017Attention Is All You Needcited by 60,361
  2. 2020Scaling Laws for Neural Language Modelscited by 6,586
  3. 2024Qwen2.5 Technical Reportcited by 4,942
  4. 2023Mamba: Linear-Time Sequence Modeling with Selective State Spacescited by 4,718
  5. 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,673
  6. 2023Qwen Technical Reportcited by 3,344
  7. 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,598
  8. 2023Stable Video Diffusion: Scaling Latent Video Diffusion Models to Large Datasetscited by 2,581
  9. 2023LongBench: A Bilingual, Multitask Benchmark for Long Context Understandingcited by 1,417
  10. 2024FlashAttention-3: Fast and Accurate Attention with Asynchrony and Low-precisioncited by 519
  11. 2024Sora: A Review on Background, Technology, Limitations, and Opportunities of Large Vision Modelscited by 477
  12. 2023Ring Attention with Blockwise Transformers for Near-Infinite Contextcited by 457
5 more
  1. 2024Open-Sora Plan: Open-Source Large Video Generation Modelcited by 296
  2. 2023DeepSpeed Ulysses: System Optimizations for Enabling Training of Extreme Long Sequence Transformer Modelscited by 245
  3. 2024SageAttention: Accurate 8-Bit Attention for Plug-and-play Inference Accelerationcited by 160
  4. 2022Monarch: Expressive Structured Matrices for Efficient and Accurate Trainingcited by 106
  5. 2024Bridging the Divide: Reconsidering Softmax and Linear Attentioncited by 48

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 1.

1 paper.

Similar, not cited

Close in wording, no citation either way

  1. 2025HGCA: Hybrid GPU-CPU Attention for Long Context LLM Inference
  2. 2025Progressive Sparse Attention: Algorithm and System Co-design for Efficient Attention in LLM Serving
  3. 2025SALE : Low-bit Estimation for Efficient Sparse Attention in Long-context LLM Prefilling
  4. 2025FlashInfer: Efficient and Customizable Attention Engine for LLM Inference Serving
  5. 2025Kascade: A Practical Sparse Attention Method for Long-Context LLM Inference
  6. 2023SparQ Attention: Bandwidth-Efficient LLM Inference
  7. 2025Long-Context Modeling with Dynamic Hierarchical Sparse Attention for Memory-Constrained LLM Inference
  8. 2024TurboAttention: Efficient Attention Approximation For High Throughputs LLMs