Q-realign: Piggybacking Realignment on Quantization for Safe and Efficient LLM Deployment

Qitao Tan, Xiaoying Song, Ningxi Cheng, Ninghao Liu, Xiaoming Zhai, Lingzi Hong, Yanzhi Wang, Zhen Xiang, Geng Yuan


Abstract
Public large language models (LLMs) are typically safety-aligned during pretraining, but task-specific fine-tuning often erodes this alignment, introducing significant safety risks. Existing defenses are largely coupled with the fine-tuning process, incurring high computational overhead and complex workflows. To address these challenges, we propose Q-realign, a post-hoc defense based on quantization. Departing from the conventional view of quantization as a safety-eroding compromise, we reframe it as a dual-purpose mechanism for both compression and safety recovery. This allows Q-realign to decouple safety alignment from fine-tuning and naturally piggyback onto modern deployment pipelines. Experiments across multiple models and datasets demonstrate that our method substantially reduces unsafe behaviors while preserving task performance, significantly improving memory and GPU efficiency. 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. Our code is released at https://anonymous.4open.science/r/Q-realign-copy-0D71.
Anthology ID:
2026.findings-emnlp.63
Volume:
Findings of the Association for Computational Linguistics: EMNLP 2026
Month:
October
Year:
2026
Address:
Budapest, Hungary
Editors:
Hung-Yi Lee, Sunipa Dev, Jessy Li, Desmond Elliott
Venue:
Findings
SIG:
SIGDAT
Publisher:
Association for Computational Linguistics
Note:
Pages:
1276–1291
Language:
URL:
https://aclanthology.org/2026.findings-emnlp.63/
DOI:
Bibkey:
Cite (ACL):
Qitao Tan, Xiaoying Song, Ningxi Cheng, Ninghao Liu, Xiaoming Zhai, Lingzi Hong, Yanzhi Wang, Zhen Xiang, and Geng Yuan. 2026. Q-realign: Piggybacking Realignment on Quantization for Safe and Efficient LLM Deployment. In Findings of the Association for Computational Linguistics: EMNLP 2026, pages 1276–1291, Budapest, Hungary. Association for Computational Linguistics.
Cite (Informal):
Q-realign: Piggybacking Realignment on Quantization for Safe and Efficient LLM Deployment (Tan et al., Findings 2026)
Copy Citation:
PDF:
https://aclanthology.org/2026.findings-emnlp.63.pdf