TL;DR
Compressing a Large Language Model (LLM) to fit onto smaller hardware is standard practice, usually judged by whether the model stays smart (high accuracy, low perplexity). Yet a compressed model can retain its intelligence while quietly losing its "conscience"—suddenly agreeing to build weapons or, conversely, refusing benign requests like "how to weaponize my resume." ACQueReLlo uses constrained reinforcement learning to allocate bit-precision block-by-block, keeping compressed LLMs smart, safe, and helpful all at once.
What Problem Does This Paper Address?
To deploy massive LLMs efficiently without retraining them from scratch, engineers rely on Post-Training Quantization (PTQ)—shrinking high-precision 16-bit weights down to 4-bit integers or lower. Historically, quantization algorithms have optimized almost exclusively for utility: keeping perplexity low and task accuracy high.
However, modern LLMs are also carefully safety-aligned to balance two opposing behaviors: refusing genuinely harmful requests while remaining helpful on safe, edgy-sounding ones. Recent evidence shows this delicate behavioral balance is surprisingly fragile. Small weight perturbations from quantization can break refusal mechanisms—causing jailbreaks or frustrating "over-refusals"—even when standard accuracy benchmarks look completely fine. Existing uniform or utility-driven quantization methods are blind to this failure mode.
Methods
Rather than forcing every transformer block into the same bit-width, ACQueReLlo uses mixed-precision quantization, spending higher bit budgets on sensitive blocks and fewer bits elsewhere to hit a target average (like 4 bits).
Because assigning bits to early blocks shrinks the remaining budget for later ones, the authors frame this sequential puzzle as a Constrained Markov Decision Process (CMDP):
- Dual Sensitivity Probing (New): Before training, the authors quantize one block at a time to measure how much each block hurts utility (via negative log-likelihood/perplexity) and safety (via a calibrated Template Refusal Margin, or TRM, which measures shifts in refusal likelihood). Both scores are fed into the RL agent's state alongside remaining budget and block depth.
- Factorized Action Space (New): Instead of choosing arbitrarily from a large list of bit-widths, the policy picks a coarse index plus a local refinement ($\{-1, 0, +1\}$), using action masks to block choices that would blow the bit budget.
- Worst-Case Reward & Primal-Dual RL: Evaluating full benchmarks at every RL step is intractable, so a fast proxy evaluator scores small sampled batches of utility, harmful, and benign prompts. Rather than a simple weighted sum—where high utility could mask a catastrophic safety failure—the authors use an augmented Tchebycheff reward dominated by the largest single violation. Standard primal-dual actor-critic updates then adjust Lagrangian multipliers to strictly enforce constraints on utility, harmful refusal, benign over-refusal, and bit budget.
Datasets
No new benchmarks are introduced. For evaluation, the authors test across four model families (LLaMA3.1-8B, LLaMA2-7B, Mistral-7B-v0.1, and Qwen2-7B) using:
- Utility: Perplexity (PPL) and average zero-shot accuracy across 11 tasks (
0-shot11). - Safety & Over-refusal: SafetyBench (broad safety knowledge), OR-Bench (excessive refusal on safe prompts), HumanJailbreaks, and held-out harmful/benign prompt pools for refusal rate testing. Small, disjoint proxy batches of utility, harmful, and benign prompts are sampled during RL training.
Key Insights and Ideas
- "Smart" blocks and "Safe" blocks are largely disjoint: When probing LLaMA2-7B block-by-block, the transformer blocks that spike perplexity when quantized are not the same blocks that destabilize refusal behavior. This explains why utility-only mixed-precision methods fail at safety—they protect the wrong layers!
- Harmful refusal and benign helpfulness pull in opposite directions: Ablating the reward terms shows that optimizing only for harmful-prompt refusal boosts SafetyBench to 56.49, but spikes benign over-refusal (OR-Bench jumps to 0.1824)—turning the model overly paranoid. Optimizing all constraints jointly drops OR-Bench back down to 0.1136 while keeping SafetyBench strong (53.60).
- Sequential RL beats greedy heuristics: Simply ranking blocks by joint sensitivity and greedily handing out bits yields a LLaMA2-7B perplexity of 10.61 and SafetyBench of 48.97; ACQueReLlo's learned policy reaches 7.04 PPL and 53.66 SafetyBench under the exact same 4-bit budget by accounting for how block choices interact globally.
Key Results
Operating at an average 4-bit weight / 4-bit activation (W4A4) budget, ACQueReLlo consistently achieves the best overall utility-safety balance against strong PTQ baselines (including QuaRot, SpinQuant, OSTQuant, and alignment-aware CAQ):
- Mistral-7B-v0.1: Achieves 5.51 PPL, 64.27% zero-shot accuracy, and 69.6 on SafetyBench—beating CAQ (7.42 PPL, 62.93% 0-shot, 57.8 SafetyBench) across the board.
- LLaMA3.1-8B: Tops all quantized baselines in both zero-shot accuracy (66.45%) and SafetyBench (64.0), while slashing uniform W4A4's benign over-refusal rate from 45.66% down to 29.24% (nearly matching FP16's 26.93%).
- LLaMA2-7B: Reaches the lowest quantized PPL (7.09) and highest SafetyBench (53.6 vs. CAQ's 49.7).
- Budget Sweep: Testing 3-bit, 4-bit, and 6-bit targets shows W3 is too restrictive (14.68 PPL, 42.40 SafetyBench), whereas W4 recovers nearly all full-precision behavior, making it a sweet spot for deployment.
Limitations and Future Work
While an explicit "Limitations" section is not included in the main text, two concrete trade-offs emerge in the experiments:
- Model-specific utility trade-offs: On Qwen2-7B, ACQueReLlo achieves the highest SafetyBench score (75.3 vs. OSTQuant's 66.5), but sacrifices zero-shot accuracy (61.24% vs. OSTQuant's 67.01%) and slightly increases perplexity (8.66 vs. 8.18).
- Sub-4-bit degradation: Pushing average weight precision down to 3 bits (W3A4) still causes steep drops in both perplexity and safety alignment, leaving ultra-low-bit safe compression an open challenge.
Summary updated