Quantization Breaks the Format: How Weight Compression Undermines Chat Format Safety in On-Device LLM
Abstract
AbstractOn-device LLM deployment routinely serves GGUF-quantized models whose safety is ver- ified at full precision rather than on the llama.cpp/GGUF stack end users actually run. We stress-test nine production mod- els across four GGUF levels against seven CHATBUG chat-format attacks on 520 Ad- vBench instructions, served through the same llama.cpp binary that powers Ollama, and report three deployment-relevant findings. (1) Q2_K vulnerability concentrates in the smallest on-device models: Llama-3.2-1B reaches 75.3% ASR-R at Q2_K (+26.9 pp vs. Q8_0) while Gemma-3-4B is essentially un- affected (+3.0 pp), so model choice dominates quantization-level choice within the on-device regime. (2) The vulnerability is a property of the deployed system: a subset reproduces end- to-end through Ollama (median |∆|= 2.7 pp). (3) Keyword- and moderator-based metrics diverge in magnitude: Llama-2 Mismatch-∅ shifts ASR-R +55.8 pp but ASR-M−1.7 pp at Q2_K, while Llama-2 Overflow-FS is con- firmed unsafe by both (+16.8 pp ASR-M). We release a one-page deployment-safety checklist and GGUF-native diagnostic probes, and iden- tify single-layer probes as insufficient cross- model predictors of ASR change, motivating per-layer llama.cpp instrumentation.