Agile-Quant: Activation-Guided Quantization for Faster Inference of LLMs on the Edge
Open Access
- 24 March 2024
- journal article
- research article
- Published by Association for the Advancement of Artificial Intelligence (AAAI) in Proceedings of the AAAI Conference on Artificial Intelligence
- Vol. 38 (17) , 18944-18951
Abstract
Large Language Models (LLMs) stand out for their impressive performance in intricate language modeling tasks. However, their demanding computational and memory needs pose obstacles for broad use on edge devices. Quantization is then introduced to boost LLMs' on-device efficiency. Recent works show that 8-bit or lower weight quantization is feasible with minimal impact on end-to-end task performance, while the activation is still not quantized. On the other hand, mainstream commodity edge devices still struggle to execute these sub-8-bit quantized networks effectively. In this paper, we propose Agile-Quant, an Activation-Guided quantization framework for faster Inference of popular Large Language Models (LLMs) on the Edge. Considering the hardware profiling and activation analysis, we first introduce a basic activation quantization strategy to balance the trade-off of task performance and real inference speed. Then we leverage the activation-aware token pruning technique to reduce the outliers and the adverse impact on attentivity. Ultimately, we utilize the SIMD-based 4-bit multiplier and our efficient TRIP matrix multiplication to implement the accelerator for LLMs on the edge. We apply our framework on different scales of LLMs including LLaMA, OPT, and BLOOM with 4-bit or 8-bit for the activation and 4-bit for the weight quantization. Experiments show that Agile-Quant achieves simultaneous quantization of model weights and activations while maintaining task performance comparable to existing weight-only quantization methods. Moreover, in the 8- and 4-bit scenario, Agile-Quant achieves an on-device speedup of up to 2.55x compared to its FP16 counterparts across multiple edge devices, marking a pioneering advancement in this domain.Keywords
All Related Versions
This publication has 7 references indexed in Scilit:
- AWQ: Activation-aware Weight Quantization for On-Device LLM Compression and AccelerationGetMobile: Mobile Computing and Communications, 2025
- Peeling the Onion: Hierarchical Reduction of Data Redundancy for Efficient Vision Transformer TrainingProceedings of the AAAI Conference on Artificial Intelligence, 2023
- HeatViT: Hardware-Efficient Adaptive Token Pruning for Vision Transformers2023
- Learned Token Pruning for Transformers2022
- FQ-ViT: Post-Training Quantization for Fully Quantized Vision Transformer2022
- A Deep Look into Logarithmic Quantization of Model Parameters in Neural Networks2018
- Quantization and Training of Neural Networks for Efficient Integer-Arithmetic-Only Inference2018