ThriftAttention: Selective Mixed Precision for Long-Context FP4 Attention
Not on the map. Why?
Abstract (arXiv)
Efficient attention algorithms are critical to mitigate the quadratic cost of attention in long-context workloads. Prior work utilises block-scaled quantisation techniques on Blackwell GPUs to move attention computation to 4-bit precision to accelerate inference. However, these techniques result in significant quality degradation in long-context settings. We show that the output impact of quantisation error is highly non-uniform and increases with the importance of each query-key interaction, concentrating functionally relevant error in a small number of attention blocks that contain the most important tokens. We propose ThriftAttention, a low-bit attention variant that delivers near-FP16 long-context quality at FP4 inference efficiency. This approach proceeds in two stages. First, a heuristic rapidly selects a small number of important query-key block pairs for FP16 precision. Second, the selected blocks are computed in FP16 and the remaining blocks in FP4, with both paths merged via online softmax into a single output. We demonstrate across long-context benchmarks and model families that by computing only 5% of query-key blocks in FP16, ThriftAttention recovers on average 89.1% of the FP4-to-FP16 performance gap. We show ThriftAttention's advantage grows with sequence length, mitigating the systematic FP4 quality degradation observed at longer contexts. The code is available at https://github.com/joesharratt1229/ThriftAttention.
Key facts. Cited by 4 papers in the map (data through 14 Oct 2026). Builds on 46 of its 52 references that are in the map. First posted on arXiv 21 May 2026.
Builds on
46 of 52 references.
References · 46
- 2017Attention Is All You Needcited by 60,361
- 2024The Llama 3 Herd of Modelscited by 14,715
- 2021Training Verifiers to Solve Math Word Problemscited by 10,109
- 2025Qwen3 Technical Reportcited by 8,820
- 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,944
- 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,673
- 2023QLoRA: Efficient Finetuning of Quantized LLMscited by 3,418
- 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,598
- 2023Efficient Streaming Language Models with Attention Sinkscited by 2,186
- 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 2,022
- 2022GPTQ: Accurate Post-Training Quantization for Generative Pre-trained Transformerscited by 1,919
- 2024MMLU-Pro: A More Robust and Challenging Multi-Task Language Understanding Benchmarkcited by 1,848
34 more
- 2022Challenging BIG-Bench Tasks and Whether Chain-of-Thought Can Solve Themcited by 1,807
- 2020Linformer: Self-Attention with Linear Complexitycited by 1,474
- 2023LongBench: A Bilingual, Multitask Benchmark for Long Context Understandingcited by 1,417
- 2024RULER: What's the Real Context Size of Your Long-Context Language Models?cited by 1,346
- 2023AWQ: Activation-aware Weight Quantization for LLM Compression and Accelerationcited by 1,298
- 2022LLM.int8(): 8-bit Matrix Multiplication for Transformers at Scalecited by 906
- 2024SnapKV: LLM Knows What You are Looking for Before Generationcited by 880
- 2019Compressive Transformers for Long-Range Sequence Modellingcited by 726
- 2024KIVI: A Tuning-Free Asymmetric 2bit Quantization for KV Cachecited by 637
- 2024QuaRot: Outlier-Free 4-Bit Inference in Rotated LLMscited by 634
- 2024KVQuant: Towards 10 Million Context Length LLM Inference with KV Cache Quantizationcited by 591
- 2023Splitwise: Efficient generative LLM inference using phase splittingcited by 558
- 2024Gated Delta Networks: Improving Mamba2 with Delta Rulecited by 532
- 2024FlashAttention-3: Fast and Accurate Attention with Asynchrony and Low-precisioncited by 519
- 2024Quest: Query-Aware Sparsity for Efficient Long-Context LLM Inferencecited by 501
- 2024SpinQuant: LLM quantization with learned rotationscited by 471
- 2025Native Sparse Attention: Hardware-Aligned and Natively Trainable Sparse Attentioncited by 407
- 2024MInference 1.0: Accelerating Pre-filling for Long-Context LLMs via Dynamic Sparse Attentioncited by 383
- 2024QServe: W4A8KV4 Quantization and System Co-design for Efficient LLM Servingcited by 208
- 2023Efficient Large Language Models: A Surveycited by 186
- 2024SageAttention: Accurate 8-Bit Attention for Plug-and-play Inference Accelerationcited by 160
- 2023Microscaling Data Formats for Deep Learningcited by 152
- 2024HELMET: How to Evaluate Long-Context Language Models Effectively and Thoroughlycited by 125
- 2025SpargeAttention: Accurate and Training-free Sparse Attention Accelerating Any Model Inferencecited by 120
- 2024SageAttention2: Efficient Attention with Thorough Outlier Smoothing and Per-thread INT4 Quantizationcited by 114
- 2026Ministral 3cited by 114
- 2025Pretraining Large Language Models with NVFP4cited by 76
- 2025SageAttention3: Microscaling FP4 Attention for Inference and An Exploration of 8-Bit Trainingcited by 66
- 2026FlashAttention-4: Algorithm and Kernel Pipelining Co-Design for Asymmetric Hardware Scalingcited by 66
- 2025SLA: Beyond Sparsity in Diffusion Transformers via Fine-Tunable Sparse-Linear Attentioncited by 58
- 2024Lightning Attention-2: A Free Lunch for Handling Unlimited Sequence Lengths in Large Language Modelscited by 57
- 2025FP4 All the Way: Fully Quantized Training of LLMscited by 40
- 2025Quartet: Native FP4 Training Can Be Optimal for Large Language Modelscited by 39
- 2024TurboAttention: Efficient Attention Approximation For High Throughputs LLMscited by 5
Built on by
Citing papers per year: 2026: 4.
4 papers.
- 2026HiFA4: Training-Free 4-bit FlashAttention on Ascend HIF4 NPUs for LLM Inferencecited by 1
- 2026TileMix: Tile-Centric Mixed-Precision Attention for LLM Inference Accelerationcited by 0
- 2026Transforms for LLM Quantization: The Great Inversion and Format Co-Designcited by 0
- 2026DraftAttention2: Fast Video Diffusion with Low-Resolution-Guided Mixed-Precision Attentioncited by 0
- 2026DraftAttention2: Fast Video Diffusion with Low-Resolution-Guided Mixed-Precision Attention26 Sep 2026
- 2026Transforms for LLM Quantization: The Great Inversion and Format Co-Design25 Aug 2026
- 2026TileMix: Tile-Centric Mixed-Precision Attention for LLM Inference Acceleration18 Aug 2026
- 2026HiFA4: Training-Free 4-bit FlashAttention on Ascend HIF4 NPUs for LLM Inference5 Jul 2026
Similar, not cited
Close in wording, no citation either way
- 2026Runtime-Certified Bounded-Error Quantized Attention
- 2026Attn-QAT: 4-Bit Attention With Quantization-Aware Training
- 2025Kascade: A Practical Sparse Attention Method for Long-Context LLM Inference
- 2025SALE : Low-bit Estimation for Efficient Sparse Attention in Long-context LLM Prefilling
- 2025Tactic: Adaptive Sparse Attention with Clustering and Distribution Fitting for Long-Context LLMs
- 2026LeapQuant: Efficient Linear Attention with Accurate Recurrent State Quantization
- 2026SageBwd: A Trainable Low-bit Attention
- 2026AB-Sparse: Sparse Attention with Adaptive Block Size for Accurate and Efficient Long-Context Inference