Same Weights, Different Verdicts: Measuring Local LLM Safety Across Serving Paths
Safety evaluations of open-weight LLMs usually treat the model as the object being measured. When the same quantized model file is deployed locally, however, the serving path—the serving stack together with its host OS, prompt rendering, stop tokens, sampler, and kernels—and the judge that scores its outputs both sit between the weights and the reported number. We measure how much each layer moves the result with the weight artifact held fixed. One GGUF file (Llama-3.1-8B-Instruct, Q4_K_M), pinned by SHA-256, is served byte-identically through Ollama and llama.cpp, with 250 benchmark prompts replayed under five sampling configurations; every generation is scored by Llama Guard 3 (1B), by the kind of keyword-lexicon audit a quick assessment tends to use, and—for every judge-positive cell feeding our confirmed counts plus a 300-cell judge-negative sample—by a single blind human rater. Between the two serving paths as deployed, refusal shifts by 5.6 points (exact McNemar p = 0.0156 in every configuration; prompt-level sign test over divergent prompts, p = 0.007) and human-confirmed compliance differs by 8.0× (5 versus 40 of 625 paired cells; cluster-bootstrap 95% CI 2.3–12.6, computable on the 63% of resamples with a nonzero denominator). The weights never changed: a control arm running a second, nominally identical quantization of the same model leaves verdicts statistically untouched (sign p = 0.69) while diverging textually on 87% of greedy responses, so the gap tracks the serving path, not the weight file. Two camera-ready controls sharpen where in the path it lives: a same-OS rerun of both stacks under WSL2 at the paper's pinned versions reproduces the judge-measured gap (8 versus 53 of 625 harmful compliances, exact McNemar p < 10^-12), excluding the host OS as the driver, and a validated byte-level render audit shows the final inputs differ on every probe (llama.cpp injects a date-stamped system block that Ollama omits), leaving attribution inside the stack open. A 16-draw best-of-N phase prices the default deployment's human-confirmed attack success at 1.15%, versus 15.77% on the second path. These numbers bound the deployment combinations tested, not stacks in general. Camera-ready author accepted manuscript of a paper accepted at the 2027 IEEE 17th Annual Computing and Communication Workshop and Conference (CCWC), Las Vegas, NV, USA, 4–6 January 2027. © 2027 IEEE. Personal use of this material is permitted. Permission from IEEE must be obtained for all other uses, in any current or future media, including reprinting or republishing this material for advertising or promotional purposes, creating new collective works, for resale or redistribution to servers or lists, or reuse of any copyrighted component of this work in other works. The version of record will be available on the IEEE Xplore Digital Library.
Authors
- Kailun Xu
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-12-02
- DOI
- https://doi.org/10.5281/zenodo.24738088
- Primary Topic
- Adversarial Robustness in Machine Learning
- Type
- article
- Field-Weighted Citation Impact
- 0.00