Quantized large language models show a gap between signed and run code
What You Sign Is Not What You Run: The Verifiability Gap in Quantized LLM Supply Chains
Cryptography and SecurityMachine Learning
Summary
When people use large language models (LLMs), they often rely on signed full-precision versions, but actually run smaller, quantized versions made from them. This paper finds that it is usually impossible to exactly reproduce the quantized models just from the provided information and environment details. The researchers define a measure called Independent Verifiability Rate (IVR) and show it is essentially zero under current practices because the build environment is not recorded. They demonstrate that knowing specific build details can allow exact reproduction, improving trust and security in model distribution.
What this means in practice
- •For machine learning engineers: Ensure exact reproducibility of deployed quantized models by recording and sharing build environment details and quantization parameters alongside model files.
- •For security teams in ai companies: Detect subtle tampering in model quantization artifacts by establishing protocols requiring full build environment disclosure and exact re-derivation checks.
Authors
Wei-Liang Liu, Cheng-Yen Tsai
Abstract
Model signing authenticates the full-precision weights W an LLM is released with, yet users run a quantized artifact Q whose producing transformation is not uniquely determined under current disclosure. We separate the non-environment inputs from the execution environment E and measure a quantity that, to our knowledge, has not been measured before: the Independent Verifiability Rate (IVR), the fraction of a popularity-sampled GGUF ecosystem that a third party can re-derive bit-for-bit. Across the 200 most-downloaded Hugging Face GGUF repositories (198 in scope), no artifact or model card records the build environment, so under a recorded-inputs protocol the IVR is 0/198. Yet the artifacts are not irreproducible. On four in-sample repositories that disclose their inputs, the card's information alone reproduces no Q4_K_M file, but two coordinates the card omits - the build's floating-point-contraction setting and, for hybrid models, the per-tensor quantization recipe - re-derive 7/8 target-quant files bit-for-bit on x86 (5/8 on arm64); the fp16 re-derives from the provider's checkpoint, but the calibration imatrix must be shipped and hash-bound, since recomputing it did not match. An older release additionally pins the instruction set and did not re-derive. Reproducing the divergence reported with llama.cpp PR #25353, we show that E is a necessary coordinate and that one compiler setting yields a unique output across the tested platforms at negligible quality cost (+0.06% perplexity). As a security characterization, benign floating-point non-determinism separates from uniformly placed nibble-flip tampering above a detection floor that grows with the environments a verifier must allow, but a targeted embedding edit evades the statistic, so the proposed protocol rests on exact re-derivation; adversarial-fp16 attacks lie outside it. We release the audit data and a re-runnable harness.