When we reduced Mistral-7B’s KV cache to four bits, its ability to predict text barely changed. On AdvBench, a benchmark of harmful requests, it began complying with 50 of the 328 requests it had previously refused. The model’s weights were identical.

I studied this problem with Adarsh Kumarappan and Mu Zhou. Our paper asks whether refusal behavior learned during post-training survives an optimization used to reduce inference memory.

The KV cache stores attention keys and values from earlier tokens so the model does not have to recompute them for each new token. Compressing it saves memory, which is useful for long contexts and many concurrent requests. But it also changes the numbers the model uses to decide what to say next.

What perplexity misses

Perplexity measures how well a model predicts text. A small change can suggest that an optimization preserves language-modeling performance. In our experiment, it did not reveal a substantial change in refusal behavior.

We compared a 16-bit floating-point (FP16) cache with cache values quantized to four bits and then converted back for computation. This let us study the effect of quantization separately from a low-precision serving engine.

Mistral-7B · FP16 → 4-bit KV cache
Perplexity on WikiText-103
5.22 to 5.37
Refusal flips on AdvBench
50 / 328
A 1.03× change in perplexity; 15.2% of baseline refusals lost on AdvBench. The two metrics use different evaluation sets. Table 15; Table 62.

We call the second measurement ConditionalFlip: the share of the FP16 model’s refusals that become compliant responses after quantization. It measures the loss of a specific behavior learned during training.

Where precision matters

To reduce these failures, we need to understand which information quantization loses. When many channels share one quantization scale, a few very large activations can leave too little precision for smaller signals involved in refusal. Giving channels separate scales can help preserve those signals. It helps less when the refusal-relevant channels are themselves the large outliers.

Our diagnostic, Per-Channel Reduction (PCR), measures how much the refusal-flip rate falls when we switch from one scale per tensor to separate scales per channel, at the model’s most sensitive layer. We combine this with a measurement of how many layers are sensitive. The results guide whether to use smaller quantization groups, retain selected layers at FP16, or combine the two.

ConditionalFlip in controlled 4-bit AdvBench experiments. Qwen: 515 baseline refusals; Mistral: 328. Table 5; Tables 61–62.
Model and mitigationBeforeAfter
Qwen-2.5-7BKeep layers 0–1 at FP1690.3%1.9%
Mistral-7BUse Group-64 quantization15.2%7.3%

Even after choosing an intervention, more precision does not always improve the result. In the Qwen sweep below, retaining layers 0–2 at FP16 produced three refusal flips. Adding layer 3 increased the count to 30. Each allocation needs its own evaluation.

Refusal flips across five FP16 layer allocations: 5.4%, 1.9%, 0.6%, 5.8%, and 1.2%. Adding layer 3 breaks the initial downward trend.
Qwen-2.5-7B, 4-bit base precision, AdvBench: 515 FP16 baseline refusals. Bars reproduce the paper’s reported 95% confidence intervals. The sweep measures refusal preservation; serving cost must be measured separately. Appendix D.5, Table 61.

From controlled experiments to serving

We also checked whether refusal regressions appeared in an actual serving engine. In a separate test, we ran Qwen-2.5-7B in vLLM 0.13.0 on an RTX 3090. Of 100 AdvBench prompts, the FP16 baseline refused 99. Seven of those refusals flipped with an FP8 e4m3 KV cache; 30 flipped with e5m2. Appendix B.15, Table 26.

Both formats use eight bits, but divide them differently between range and precision. That difference mattered to refusal behavior in this test. Recording only “FP8” would leave out a choice that changed the result.

The inference–alignment frontier

The broader implication is that we need to compare serving choices on efficiency, task performance, and whether they preserve the behaviors we require. Consider a configuration that is cheaper and equally accurate on a task benchmark, but loses more refusals. A comparison based only on cost and task accuracy would miss the reason to keep the other configuration.

Within a tested set, a configuration is Pareto-optimal if no other improves at least one of these objectives without worsening another. This describes a tradeoff. It does not establish that the configuration is acceptable: a fast setting can lie on the frontier and still violate a behavioral requirement.

For deployment, we first need to define those requirements and establish which candidates meet them. We can then compare efficiency and task performance among the candidates that qualify.

Refusal preservation is only part of that evaluation. A model that refuses every request would preserve refusals but be useless; false refusals on benign requests also matter. Depending on the application, we may need tests for privacy or instruction following. Each result needs to be reported with its uncertainty and the limits of the evaluated workload.

Evaluating the system we run

We need to evaluate the model together with the settings used to run it: its checkpoint, cache precision, quantizer, layers retained at higher precision, and runtime version. Otherwise, a passing evaluation may describe a different computation from the one serving users.

We’re building BalladeOne’s evaluation workflow around that record. It should let an engineer compare candidates on the same hardware and workload, at the same context length and concurrency, with behavioral tests beside task performance, latency, throughput, and memory use.

This also matters for reinforcement learning. Rollout workers generate the responses on which rewards and training updates depend. Recording only the policy checkpoint leaves out the inference settings that helped produce those responses.

If a new runtime causes a behavioral regression, an engineer should be able to identify what changed and restore the configuration that passed evaluation.