ChatPaper.aiChatPaper

MixLLM: LLM Quantisatie met Globale Gemengde Precisie tussen Outputkenmerken en Hoog-efficiënt Systeemontwerp

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

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

Samenvatting

Quantisatie is een van de meest effectieve methodologieën geworden om LLM's te comprimeren tot een kleinere omvang. Echter, de bestaande oplossingen voor quantisatie tonen nog steeds beperkingen, zoals een aanzienlijke nauwkeurigheidsdaling of systeemon-efficiëntie. In dit artikel maken we een uitgebreide analyse van de algemene principes van quantisatie en hun effect op de driehoek van nauwkeurigheid, geheugenverbruik en systeemefficiëntie. We stellen MixLLM voor, dat het nieuwe optimalisatiegebied van gemengde precisie quantisatie tussen uitvoerkenmerken verkent op basis van het inzicht dat verschillende uitvoerkenmerken verschillend belangrijk zijn in het model. MixLLM identificeert de uitvoerkenmerken met een hoge relevantie in het globale beeld in plaats van binnen elke afzonderlijke laag, waarbij effectief een grotere bit-breedte wordt toegewezen aan uitvoerkenmerken die dit het meest nodig hebben om goede nauwkeurigheid te behalen met een laag geheugenverbruik. We presenteren de optimale quantisatieconfiguratie van algoritme-systeem co-ontwerp die leidt tot hoge nauwkeurigheid en systeemefficiëntie. Om het systeemuitdaging aan te pakken, ontwerpen we de tweestaps-dekwantisatie om gebruik te maken van de int8 Tensor Core voor gemakkelijke en snelle gegevenstypeconversie om de dekwantisatie-overhead aanzienlijk te verminderen, en presenteren we de software-pijplijn om de geheugentoegang, dekwantisatie en de MatMul optimaal te laten overlappen. Uitgebreide experimenten tonen aan dat met slechts 10% meer bits, de PPL-toename kan worden verminderd van ongeveer 0.5 in SOTA tot binnen 0.2 voor Llama 3.1 70B, terwijl de MMLU-Pro gemiddeld met 0.93 verbetert ten opzichte van de SOTA van drie populaire modellen. Naast zijn superieure nauwkeurigheid behaalt MixLLM ook een systeemefficiëntie van topklasse.
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