When a Language Model Server Reports a Different Token · Yufeiyang Chen
A language model samples one token, but the inference server can attach a different token and probability to it in the API response. TokenReceipt tests sampled-token attribution on the same sampling event, formalizes five serving-boundary contract invariants (I1–I5), traces downstream failures into multi-scale confidence routing, LLM-as-a-Judge scoring, answer selection, and clipped policy-gradient / GRPO updates, and provides a full-transport patch alongside cross-engine auditing tools.
On 64 IFEval prompts, MLX-LM 0.32.2 reported a different token at 528 of 1,488 positions and a different score at 521 (I1/I2 failures). In live audits on SmolLM2-135M, Qwen2.5-3B, and Qwen2.5-7B-Instruct-4bit, the 15-check full-transport patch reduced stock attribution and streaming errors (I1 fails up to 20/64 and I5 streaming omission 64/64 per model and width) to 0/384, passing I1, I2, I3, and I5 at all 384 patched positions with unchanged generated text (while reproducibility/patch/preprint-11-check/ archives the earlier non-streaming 11-check revision). Unified I1–I5 contract checks across seven serving architectures further isolate empty-delta SSE logprob drops in SGLang v0.5.23 (78/246 missing rows, with I3 and I5 failures on 33/36 requests, repaired to 246/246 passing positions), deferred UTF-8 fragment representations in vLLM v0.34.0 (0/246 drops; 102/246 strict I4 fragment defers), EOS/UTF-8 coalescing row shortfalls (21/424 at T=0.8, 39/388 at T=0.0, plus prompt-13 coalesced I2 cutoff failure) and top_logprobs=5 stochastic drift (216/360 > 1e-4 nats, max 0.006403 vs 0.000000 for k=1 on 403/403) in live Ollama v0.40.17, row omissions in llama.cpp (3/280), non-streaming U+FFFD UTF-8 damage in mistral.rs (708 FLORES-200 positions across 72/72 non-English pairs), and equal/unequal-length cross-row batch callback leakage in CTranslate2 4.9.0 (24/24 equal-length item-0 2V leaks and item-1 NULL errors, repaired 48/48 by batch splitting).
Downstream across both Qwen2.5-3B-Instruct-4bit and Qwen2.5-7B-Instruct-4bit on ARC-Challenge (250 confirmation questions per model, held out from the pilots), reported-score inflation (+0.1943 and +0.1181 nats mean bias, propagated identically through Inspect AI 0.3.277) induces a calibration paradox: lowering aggregate 10-bin ECE (0.1250 -> 0.0318 at 3B; 0.0995 -> 0.0348 at 7B) while raising wrong-answer false acceptances by +49.2 pp at 3B (16/59 -> 45/59, +33.3 pp to +35.7 pp at 7B (27/42 -> 41/42, Fixed 0.80: 14/42 -> 29/42, DeepEval 4.3.4 (GEval.measure), missing score tokens flipped 6/94 (6.4%) binary pass verdicts at 3B and attenuated to 2/95 continuous shifts (0/95 flips) at 7B. Across 50 x 4 = 200 multi-token Qwen2.5-7B GRPO rollouts (8,328 positions), strictly over-reported wire scores (844/844) zeroed clipped-PPO surrogate gradients on 86.36% (95/110) of corrupted negative-advantage tokens (100% (92/92) of corrupted positive-advantage tokens, and injected nonzero spurious Step-0 181/200 rollouts; alongside 846/2,108 (ARC-Easy) best-of-4 winner changes and a -1.90 pp ([-2.66, -1.16]) held-out accuracy drop across 128 online SST-2 training seeds.
-
Read the signed preprint (22 pp.) or build the LaTeX source.
-
Run the offline replication (
python3 -B verify.py,python3 -B verify_extended.py,python3 -B verify_2026_11_23.py,python3 -B verify_2026_11_24.py,python3 -B verify_learning.py, andpython3 -B patch/verify.py releases/mlx-0322-server.py) for the release census, 15-check patch (with the 11-check preprint revision), CTranslate2 diagnostics, seven-engine comparisons, and redacted downstream_3b/, live_audit_2026_11_24/, and downstream_2026_11_24/ projections. See the materials inventory. -
Use the generalized wire recovery & contract audit CLI (
wire_recovery.py,tokenreceipt_audit.py) to runI1–I5probes against OpenAI-compatible HTTP endpoints or replay offline bundles (14 tests, including two optional tokenizer checks). -
Review the November 25 numerical projections for live SGLang and vLLM probes and TriviaQA routing. The routing study pairs one live MLX-LM audit with two controlled score-injection cohorts.
The public data contain numerical observations and within-position equality classes. Source text for restricted or unclear-license datasets can be reconstructed from the upstream sources using the documented selection rules. See the licenses and source notices.