ChatPaper.aiChatPaper

MixLLM: 출력 특성과 전역 혼합 정밀도 간의 LLM 양자화를 통한 매우 효율적인 시스템 설계

MixLLM: LLM Quantization with Global Mixed-precision between Output-features and Highly-efficient System Design

December 19, 2024
저자: Zhen Zheng, Xiaonan Song, Chuanjie Liu
cs.AI

초록

양자화는 LLM을 더 작은 크기로 압축하는 데 가장 효과적인 방법 중 하나가 되었습니다. 그러나 기존의 양자화 솔루션은 여전히 상당한 정확도 하락이나 시스템 효율성의 제한을 보여줍니다. 본 논문에서는 일반적인 양자화 원칙이 정확도, 메모리 소비, 시스템 효율성 삼각형에 미치는 영향에 대해 포괄적인 분석을 수행합니다. 우리는 모델 내에서 서로 다른 출력 특징이 다르게 중요하다는 통찰을 바탕으로 출력 특징 간 혼합 정밀도 양자화의 최적화 공간을 탐색하는 MixLLM을 제안합니다. MixLLM은 각 단일 레이어 내에서가 아닌 전역적인 관점에서 중요한 출력 특징을 식별하여, 가장 필요로 하는 출력 특징에 더 큰 비트 폭을 할당하여 좋은 정확도와 낮은 메모리 소비로 이를 달성합니다. 우리는 고정밀도 Tensor Core를 쉽게 활용하고 빠른 데이터 유형 변환을 통해 양자화 해제 오버헤드를 크게 줄이기 위한 두 단계의 양자화 해제를 설계하고, 메모리 액세스, 양자화 해제, MatMul을 최적으로 중첩시키기 위한 소프트웨어 파이프라인을 제시합니다. 광범위한 실험 결과, PPL 증가가 SOTA의 약 0.5에서 Llama 3.1 70B의 경우 약 0.2로 감소하는 10% 더 많은 비트만으로 달성되며, 평균적으로 MMLU-Pro는 세 가지 인기 모델의 SOTA보다 0.93 향상됩니다. 우수한 정확도 뿐만 아니라 MixLLM은 최신 시스템 효율성도 달성합니다.
English
Quantization has become one of the most effective methodologies to compress LLMs into smaller size. However, the existing quantization solutions still show limitations of either non-negligible accuracy drop or system inefficiency. In this paper, we make a comprehensive analysis of the general quantization principles on their effect to the triangle of accuracy, memory consumption and system efficiency. We propose MixLLM that explores the new optimization space of mixed-precision quantization between output features based on the insight that different output features matter differently in the model. MixLLM identifies the output features with high salience in the global view rather than within each single layer, effectively assigning the larger bit-width to output features that need it most to achieve good accuracy with low memory consumption. We present the sweet spot of quantization configuration of algorithm-system co-design that leads to high accuracy and system efficiency. To address the system challenge, we design the two-step dequantization to make use of the int8 Tensor Core easily and fast data type conversion to reduce dequantization overhead significantly, and present the software pipeline to overlap the memory access, dequantization and the MatMul to the best. Extensive experiments show that with only 10% more bits, the PPL increasement can be reduced from about 0.5 in SOTA to within 0.2 for Llama 3.1 70B, while on average MMLU-Pro improves by 0.93 over the SOTA of three popular models. In addition to its superior accuracy, MixLLM also achieves state-of-the-art system efficiency.
PDF145December 23, 2024