arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2502.15799cs.CRcs.AI
收藏

研究量化方法对大型语言模型安全性和可靠性的影响

Investigating the Impact of Quantization Methods on the Safety and Reliability of Large Language Models

Skolkovo Institute of Science and Technology(斯科尔科沃科学技术学院);Artificial Intelligence Research Institute(人工智能研究院);HSE University(高等经济大学)

Artyom Kharinaev, Viktor Moskvoretskii, Egor Shvetsov, Kseniia Studenikina, Bykov Mikhail, Evgeny Burnaev

AI总结:

本文研究量化对大型语言模型安全性的影响,提出OpenMiniSafety数据集,评估66个量化变体发现PTQ和QAT均会降低安全对齐,强调需开发安全感知的压缩策略。

摘要:

大型语言模型(LLMs)是现代应用的强大工具,但其计算需求限制了可及性。量化提供了效率提升,但其对安全性和可信度的影响仍知之甚少。为解决此问题,我们引入了OpenMiniSafety,这是一个包含1.067个具有挑战性问题的、人工策划的安全数据集,用于严格评估模型行为。我们公开发布了四个LLM(包含量化和全精度)的人类安全评估,总计4.268个标注的问答对。通过在四个安全基准(包括以人为中心的评估)上使用四种训练后量化(PTQ)和两种量化感知训练(QAT)方法评估这些模型的66个量化变体,我们发现了关键的安全性能权衡。结果表明,PTQ和QAT都会降低安全对齐,其中QLORA或STE等QAT技术的安全性较差。没有一种方法能在基准、精度设置或模型上始终优于其他方法,这凸显了对安全感知压缩策略的需求。此外,精度专用方法(例如4-bit的QUIK和AWQ,2-bit的AQLM和Q-PET)在其目标精度上表现出色,这意味着这些方法并非更擅长压缩,而是不同的方法。

英文摘要:

Large Language Models (LLMs) are powerful tools for modern applications, but their computational demands limit accessibility. Quantization offers efficiency gains, yet its impact on safety and trustworthiness remains poorly understood. To address this, we introduce OpenMiniSafety, a human-curated safety dataset with 1.067 challenging questions to rigorously evaluate model behavior. We publicly release human safety evaluations for four LLMs (both quantized and full-precision), totaling 4.268 annotated question-answer pairs. By assessing 66 quantized variants of these models using four post-training quantization (PTQ) and two quantization-aware training (QAT) methods across four safety benchmarks including human-centric evaluations we uncover critical safety performance trade-offs. Our results show both PTQ and QAT can degrade safety alignment, with QAT techniques like QLORA or STE performing less safely. No single method consistently outperforms others across benchmarks, precision settings, or models, highlighting the need for safety-aware compression strategies. Furthermore, precision-specialized methods (e.g., QUIK and AWQ for 4-bit, AQLM and Q-PET for 2-bit) excel at their target precision, meaning that these methods are not better at compressing but rather different approaches.

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

↑