LMSQuant: Learnable Multiscale Post-training Quantization for Large Language Models
摘要
Large Language Models (LLMs) exhibit exceptional capabilities in diverse and challenging tasks but pose significant challenges for deployment on resource-constrained devices due to their vast computational and memory requirements. Post-training quantization (PTQ) techniques alleviate this issue by compressing weights and activations to lower precision. However, existing approaches, especially those based on smooth-based techniques, struggle to effectively diminish the impact of outliers in activations and weights, resulting in substantial performance degradation under challenging quantization settings. To address these challenges, we propose LMSQuant, a novel learnable multiscale PTQ framework comprising three core components. For activations, Learnable Multiscale Activation Scaling (LMAS) adaptively combines token-wise and channel-wise statistics to compute the quantization step size, effectively mitigating activation outliers. For weights, Learnable Multiscale Weight Scaling (LMWS) introduces bidirectional scaling, smoothing the distribution and suppressing outliers. Additionally, we incorporate Lookahead Composite Alignment (LCA) to optimize the parameters of both LMAS and LMWS through a multi-block strategy guided by a composite loss. Experimental results demonstrate that LMSQuant consistently outperforms existing leading PTQ methods in both language modeling and zero-shot tasks. Code will be released at https://github.com/lauvlalala/LMSQuant .