MixLLM: Cuantización LLM con Precisión Mixta Global entre Características de Salida y Diseño de Sistema Altamente Eficiente
MixLLM: LLM Quantization with Global Mixed-precision between Output-features and Highly-efficient System Design
December 19, 2024
Autores: Zhen Zheng, Xiaonan Song, Chuanjie Liu
cs.AI
Resumen
La cuantificación se ha convertido en una de las metodologías más efectivas para comprimir LLMs en un tamaño más pequeño. Sin embargo, las soluciones de cuantificación existentes aún muestran limitaciones, ya sea en una disminución de precisión no despreciable o en la ineficiencia del sistema. En este artículo, realizamos un análisis exhaustivo de los principios generales de cuantificación sobre su efecto en el triángulo de precisión, consumo de memoria y eficiencia del sistema. Proponemos MixLLM, que explora el nuevo espacio de optimización de cuantificación de precisión mixta entre características de salida basado en la idea de que diferentes características de salida tienen diferentes importancias en el modelo. MixLLM identifica las características de salida con alta relevancia en la vista global en lugar de dentro de cada capa individual, asignando de manera efectiva un mayor ancho de bits a las características de salida que más lo necesitan para lograr una buena precisión con bajo consumo de memoria. Presentamos el punto óptimo de configuración de cuantificación de co-diseño algoritmo-sistema que conduce a una alta precisión y eficiencia del sistema. Para abordar el desafío del sistema, diseñamos la de-cuantificación de dos pasos para aprovechar fácilmente el Tensor Core int8 y la conversión rápida de tipo de datos para reducir significativamente la sobrecarga de de-cuantificación, y presentamos el pipeline de software para superponer el acceso a memoria, la de-cuantificación y el MatMul de la mejor manera. Experimentos extensos muestran que con solo un 10% más de bits, el aumento de PPL se puede reducir de aproximadamente 0.5 en SOTA a dentro de 0.2 para Llama 3.1 70B, mientras que en promedio MMLU-Pro mejora en 0.93 sobre el SOTA de tres modelos populares. Además de su precisión superior, MixLLM también logra una eficiencia del sistema de vanguardia.
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.Summary
AI-Generated Summary