BitNet a4.8: Activaciones de 4 bits para LLMs de 1 bit
BitNet a4.8: 4-bit Activations for 1-bit LLMs
November 7, 2024
Autores: Hongyu Wang, Shuming Ma, Furu Wei
cs.AI
Resumen
Las investigaciones recientes sobre Modelos de Lenguaje a Gran Escala (LLMs) de 1 bit, como BitNet b1.58, presentan una dirección prometedora para reducir el coste de inferencia de los LLMs manteniendo su rendimiento. En este trabajo, presentamos BitNet a4.8, que permite activaciones de 4 bits para LLMs de 1 bit. BitNet a4.8 emplea una estrategia híbrida de cuantización y esparcificación para mitigar los errores de cuantización introducidos por los canales atípicos. Específicamente, utilizamos activaciones de 4 bits para las entradas a las capas de atención y de red de alimentación hacia adelante, mientras que esparcificamos los estados intermedios seguidos de una cuantización de 8 bits. Experimentos exhaustivos demuestran que BitNet a4.8 alcanza un rendimiento comparable al de BitNet b1.58 con costes de entrenamiento equivalentes, siendo más rápido en inferencia al permitir núcleos de 4 bits (INT4/FP4). Adicionalmente, BitNet a4.8 activa solo el 55% de los parámetros y admite una caché KV de 3 bits, mejorando aún más la eficiencia del despliegue y la inferencia de LLMs a gran escala.
English
Recent research on the 1-bit Large Language Models (LLMs), such as BitNet
b1.58, presents a promising direction for reducing the inference cost of LLMs
while maintaining their performance. In this work, we introduce BitNet a4.8,
enabling 4-bit activations for 1-bit LLMs. BitNet a4.8 employs a hybrid
quantization and sparsification strategy to mitigate the quantization errors
introduced by the outlier channels. Specifically, we utilize 4-bit activations
for inputs to the attention and feed-forward network layers, while sparsifying
intermediate states followed with 8-bit quantization. Extensive experiments
demonstrate that BitNet a4.8 achieves performance comparable to BitNet b1.58
with equivalent training costs, while being faster in inference with enabling
4-bit (INT4/FP4) kernels. Additionally, BitNet a4.8 activates only 55% of
parameters and supports 3-bit KV cache, further enhancing the efficiency of
large-scale LLM deployment and inference.