Q-resafe: Assessing Safety Risks and Quantization-aware Safety Patching for Quantized Large Language Models

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Chen, Kejia, Zhang, Jiawen, Hu, Jiacong, Wang, Yu, Lou, Jian, Feng, Zunlei, Song, Mingli
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866908421121376256
author Chen, Kejia
Zhang, Jiawen
Hu, Jiacong
Wang, Yu
Lou, Jian
Feng, Zunlei
Song, Mingli
author_facet Chen, Kejia
Zhang, Jiawen
Hu, Jiacong
Wang, Yu
Lou, Jian
Feng, Zunlei
Song, Mingli
contents Quantized large language models (LLMs) have gained increasing attention and significance for enabling deployment in resource-constrained environments. However, emerging studies on a few calibration dataset-free quantization methods suggest that quantization may compromise the safety capabilities of LLMs, underscoring the urgent need for systematic safety evaluations and effective mitigation strategies. In this paper, we present comprehensive safety evaluations across various mainstream quantization techniques and diverse calibration datasets, utilizing widely accepted safety benchmarks. To address the identified safety vulnerabilities, we propose a quantization-aware safety patching framework, Q-resafe, to efficiently restore the safety capabilities of quantized LLMs while minimizing any adverse impact on utility. Extensive experimental results demonstrate that Q-resafe successfully re-aligns the safety of quantized LLMs with their pre-quantization counterparts, even under challenging evaluation scenarios. Project page is available at: https://github.com/Thecommonirin/Qresafe.
format Preprint
id arxiv_https___arxiv_org_abs_2506_20251
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Q-resafe: Assessing Safety Risks and Quantization-aware Safety Patching for Quantized Large Language Models
Chen, Kejia
Zhang, Jiawen
Hu, Jiacong
Wang, Yu
Lou, Jian
Feng, Zunlei
Song, Mingli
Machine Learning
Artificial Intelligence
Quantized large language models (LLMs) have gained increasing attention and significance for enabling deployment in resource-constrained environments. However, emerging studies on a few calibration dataset-free quantization methods suggest that quantization may compromise the safety capabilities of LLMs, underscoring the urgent need for systematic safety evaluations and effective mitigation strategies. In this paper, we present comprehensive safety evaluations across various mainstream quantization techniques and diverse calibration datasets, utilizing widely accepted safety benchmarks. To address the identified safety vulnerabilities, we propose a quantization-aware safety patching framework, Q-resafe, to efficiently restore the safety capabilities of quantized LLMs while minimizing any adverse impact on utility. Extensive experimental results demonstrate that Q-resafe successfully re-aligns the safety of quantized LLMs with their pre-quantization counterparts, even under challenging evaluation scenarios. Project page is available at: https://github.com/Thecommonirin/Qresafe.
title Q-resafe: Assessing Safety Risks and Quantization-aware Safety Patching for Quantized Large Language Models
topic Machine Learning
Artificial Intelligence
url https://arxiv.org/abs/2506.20251