Progressive Mixed-Precision Decoding for Efficient LLM Inference
Chen, Hao Mark, Tan, Fuwen, Kouris, Alexandros, Lee, Royson, Fan, Hongxiang, Venieris, Stylianos I.
–arXiv.org Artificial Intelligence
In spite of the great potential of large language models (LLMs) across various tasks, their deployment on resource-constrained devices remains challenging due to their excessive computational and memory demands. Quantization has emerged as an effective solution by storing weights in reduced precision. In this work, we argue that existing approaches fail to explore the diversity in computational patterns, redundancy, and sensitivity to approximations of the different phases of LLM inference, resorting to a uniform quantization policy throughout. Instead, we propose a novel phase-aware method that selectively allocates precision during different phases of LLM inference, achieving both strong context extraction during prefill and efficient memory bandwidth utilization during decoding. To further address the memory-boundedness of the decoding phase, we introduce Progressive Mixed-Precision Decoding (PMPD), a technique that enables the gradual lowering of precision deeper in the generated sequence, together with a spectrum of precision-switching schedulers that dynamically drive the precisionlowering decisions in either task-adaptive or prompt-adaptive manner. Extensive evaluation across diverse language tasks shows that when targeting Nvidia GPUs, PMPD achieves 1.4 12.2 speedup in LLM linear layers over fp16 models, while when targeting an LLM-optimized NPU, our approach delivers a throughput gain of 3.8 8.0 over fp16 models and up to 1.54 over uniform quantization approaches while preserving the output quality. Modern large language models (LLMs) have demonstrated unprecedented capabilities across various natural language understanding and generation tasks. However, their computational and memory footprint, driven by billions of parameters and thousands-of-tokens context windows, pose significant challenges particularly in applications that require their deployment on embedded or mobile devices.
arXiv.org Artificial Intelligence
Oct-17-2024
- Country:
- Europe > United Kingdom
- England
- Greater London > London (0.04)
- Cambridgeshire > Cambridge (0.04)
- England
- Asia > Japan
- Honshū > Kantō > Tokyo Metropolis Prefecture > Tokyo (0.14)
- Europe > United Kingdom
- Genre:
- Research Report (1.00)
- Technology: