Saved in:
Bibliographic Details
Main Authors: Tan, Qitao, Song, Xiaoying, Cheng, Ningxi, Liu, Ninghao, Zhai, Xiaoming, Hong, Lingzi, Wang, Yanzhi, Xiang, Zhen, Yuan, Geng
Format: Preprint
Published: 2026
Subjects:
Online Access:https://arxiv.org/abs/2601.08089
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866918285817151488
author Tan, Qitao
Song, Xiaoying
Cheng, Ningxi
Liu, Ninghao
Zhai, Xiaoming
Hong, Lingzi
Wang, Yanzhi
Xiang, Zhen
Yuan, Geng
author_facet Tan, Qitao
Song, Xiaoying
Cheng, Ningxi
Liu, Ninghao
Zhai, Xiaoming
Hong, Lingzi
Wang, Yanzhi
Xiang, Zhen
Yuan, Geng
contents Public large language models (LLMs) are typically safety-aligned during pretraining, yet task-specific fine-tuning required for deployment often erodes this alignment and introduces safety risks. Existing defenses either embed safety recovery into fine-tuning or rely on fine-tuning-derived priors for post-hoc correction, leaving safety recovery tightly coupled with training and incurring high computational overhead and a complex workflow. To address these challenges, we propose \texttt{Q-realign}, a post-hoc defense method based on post-training quantization, guided by an analysis of representational structure. By reframing quantization as a dual-objective procedure for compression and safety, \texttt{Q-realign} decouples safety alignment from fine-tuning and naturally piggybacks into modern deployment pipelines. Experiments across multiple models and datasets demonstrate that our method substantially reduces unsafe behaviors while preserving task performance, with significant reductions in memory usage and GPU hours. Notably, our approach can recover the safety alignment of a fine-tuned 7B LLM on a single RTX 4090 within 40 minutes. Overall, our work provides a practical, turnkey solution for safety-aware deployment.
format Preprint
id arxiv_https___arxiv_org_abs_2601_08089
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle Q-realign: Piggybacking Realignment on Quantization for Safe and Efficient LLM Deployment
Tan, Qitao
Song, Xiaoying
Cheng, Ningxi
Liu, Ninghao
Zhai, Xiaoming
Hong, Lingzi
Wang, Yanzhi
Xiang, Zhen
Yuan, Geng
Machine Learning
Artificial Intelligence
Public large language models (LLMs) are typically safety-aligned during pretraining, yet task-specific fine-tuning required for deployment often erodes this alignment and introduces safety risks. Existing defenses either embed safety recovery into fine-tuning or rely on fine-tuning-derived priors for post-hoc correction, leaving safety recovery tightly coupled with training and incurring high computational overhead and a complex workflow. To address these challenges, we propose \texttt{Q-realign}, a post-hoc defense method based on post-training quantization, guided by an analysis of representational structure. By reframing quantization as a dual-objective procedure for compression and safety, \texttt{Q-realign} decouples safety alignment from fine-tuning and naturally piggybacks into modern deployment pipelines. Experiments across multiple models and datasets demonstrate that our method substantially reduces unsafe behaviors while preserving task performance, with significant reductions in memory usage and GPU hours. Notably, our approach can recover the safety alignment of a fine-tuned 7B LLM on a single RTX 4090 within 40 minutes. Overall, our work provides a practical, turnkey solution for safety-aware deployment.
title Q-realign: Piggybacking Realignment on Quantization for Safe and Efficient LLM Deployment
topic Machine Learning
Artificial Intelligence
url https://arxiv.org/abs/2601.08089