arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2604.13440cs.LGcs.AI
收藏

KL镜像于量化:混合精度SSM-Transformer模型的快速前向敏感性分析

A KL Lens on Quantization: Fast, Forward-Only Sensitivity for Mixed-Precision SSM-Transformer Models

Jason Kong, Nilesh Prasad Pandey, Flavio Ponzina, Tajana Rosing

AI总结:

本文提出一种轻量级、无需反向传播的替代敏感性分析框架,用于识别混合SSM-Transformer组件对量化退化最敏感的部分,通过KL散度指标提升边缘设备上混合模型的部署效率。

摘要:

在边缘设备上部署大型语言模型(LLMs)面临严重的计算和内存限制,限制了实时处理和设备智能。结合结构状态空间模型(SSMs)与基于变压器的LLMs的混合架构在效率和性能之间提供了平衡。激进的量化可以大幅减少模型大小并加快推理速度,但其对不同组件的影响不均需谨慎管理。本文提出了一种轻量级、无需反向传播、基于替代的敏感性分析框架,用于识别混合SSM-Transformer组件中最易受量化退化影响的部分。仅依赖前向传递指标,该方法避免了昂贵的梯度计算和重新训练,使其适用于因专有限制或隐私约束而无法获取领域数据的情况。我们还提供了一个形式分析,证明KL散度度量在语言建模任务中比广泛采用的替代方法如均方误差(MSE)和信号-量化噪声比(SQNR)更能捕捉量化敏感性。通过在SSM和混合架构上的广泛实验,我们的消融研究证实KL基于的排名与观察到的性能下降一致,并优于替代指标。该框架使在资源受限的边缘设备上部署高级混合模型成为可能,同时最小化精度损失。我们进一步通过Intel Lunar Lake硬件上的真实世界设备分析验证了我们的方法,证明KL引导的混合精度在模型大小和吞吐量上与均匀INT4相当,且在CPU和GPU执行模式下均能实现接近FP16的困惑度。代码可在https://github.com/jasonkongie/kl-ssm-quant上获得。

英文摘要:

Deploying Large Language Models (LLMs) on edge devices faces severe computational and memory constraints, limiting real-time processing and on-device intelligence. Hybrid architectures combining Structured State Space Models (SSMs) with transformer-based LLMs offer a balance of efficiency and performance. Aggressive quantization can drastically cut model size and speed up inference, but its uneven effects on different components require careful management. In this work, we propose a lightweight, backpropagation-free, surrogate-based sensitivity analysis framework to identify hybrid SSM-Transformer components most susceptible to quantization-induced degradation. Relying solely on forward-pass metrics, our method avoids expensive gradient computations and retraining, making it suitable for situations where access to in-domain data is limited due to proprietary restrictions or privacy constraints. We also provide a formal analysis showing that the Kullback-Leibler (KL) divergence metric better captures quantization sensitivity for Language modeling tasks than widely adopted alternatives such as mean squared error (MSE) and signal-to-quantization-noise ratio (SQNR). Through extensive experiments on SSM and hybrid architectures, our ablation studies confirm that KL-based rankings align with observed performance drops and outperform alternative metrics. This framework enables the practical deployment of advanced hybrid models on resource-constrained edge devices with minimal accuracy loss. We further validate our approach with real-world on-device profiling on Intel Lunar Lake hardware, demonstrating that KL-guided mixed-precision achieves near-FP16 perplexity with model sizes and throughput competitive with Uniform INT4 on both CPU and GPU execution modes. Code is available at https://github.com/jasonkongie/kl-ssm-quant.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑