File size: 19,826 Bytes
21bbd75 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 | # Quantization Regime and Governed Routing: A 2×2 Study of QAT Q4_0 versus PTQ Q4_K_M for Gemma 4 12B (dense) and 26B MoE under a Fixed Governance Stack
**Dates**: runs 2026-08-10, repeats and controls 2026-08-10/11 (Asia/Tokyo) · **Hardware**: single NVIDIA RTX 5070 Ti (16 GB) · **Backend**: Ollama 0.30.6
**Series**: companion/sequel to the *Gemma 4 MTP Quality–Throughput Study* (repo `gemma4-mtp-quality-study`, DOI 10.5281/zenodo.21860461)
**Status**: exploratory engineering study on a frozen local harness; single-run per cell; not preregistered; not an independent benchmark standard
---
## Abstract
We measure what quantization regime — quantization-aware-trained Q4_0 (QAT)
versus post-training-quantized Q4_K_M (PTQ) — is worth on *governed routing
tasks*: answer-entitlement decisions (verify / date-bound / re-anchor /
abstain) made under a fixed governance stack, rather than answer-content
benchmarks. We run a 2×2 design (regime × released model pair) over Gemma 4
12B (dense, 11.9B — a clean same-base pair) and a 26B-class MoE pair
(25.8B PTQ vs 25.2B QAT released artifacts — a quasi-contrast that may
embed a base revision), each on a 100-task Smoke-100 and a 500-task
Core-500 candidate suite, all cells same-day on one consumer GPU with the
governance stack bit-identical and temperature 0. Aggregate route
correctness spans 0.738–0.760 on Core-500; we ran no equivalence test, and
one cross-model contrast (12B-PTQ vs 26B-PTQ) is nominally significant
(exact McNemar p=0.035). The paired within-model regime effects are
individually marginal and **oppositely signed**: QAT −0.012 on the dense
12B (p=0.070) and +0.018 on the MoE pair (p=0.078). The regime × pair
**interaction** — this study's headline, an exploratory single-run finding
— is +0.030 with a stem-clustered bootstrap 95% CI of **[+0.010, +0.052]**
(primary; Core-500 is 100 stems × 5 paraphrases, so tasks are not
independent) and [+0.008, +0.052] under naive task-iid resampling. The
interaction concentrates almost entirely in the volatile-current family,
where the two pairs' scores cross (0.5314/0.4971 vs 0.4971/0.5314).
Attribution: with the released artifacts, regime is confounded on the MoE
side with a possible base revision and with a CPU-offload compute path, so
we claim conditionality on the *released artifact pair*, not on
architecture per se. Meanwhile regime choice massively perturbs the *text*
of temperature-0 outputs: only 23–32 % of same-task responses are
byte-identical across regimes (median first divergence at 46–73
characters), against same-configuration Smoke-100 repeat baselines of
100/100 in **all four cells** (including the CPU-offloaded PTQ MoE cell,
repeated across run windows) and a 100/100 byte-identity control for the
one regime-correlated configuration difference (`num_ctx`). Safety-critical
failure rates are 0.000 in seven of eight runs; the eighth (26B-PTQ
Core-500) logged a single over-verification event (0.008 on stable
controls). We conclude that on this stack the QAT premium is not a scalar —
it differs in sign across the two released pairs at ≈3 percentage points,
too small to survive aggregate averaging but visible in a paired crossed
design — and that quantization regime should be treated as a *behavioral*
change (different outputs), not merely a *quality* change (different
scores).
---
## 1. Background and motivation
The predecessor study (*Gemma 4 MTP Quality–Throughput Study*, 2026-08-09,
same GPU) measured multi-token-prediction speed/quality trade-offs with
both models already in QAT Q4_0 form, leaving the value of QAT itself
unmeasured. Separately, the same day as this study, the local MMV-Medium
governance release (MMV-M-RC3.3) underwent a model-binding update from the
PTQ `gemma4:12b` to the QAT `gemma4:26b-a4b-it-qat` on head-to-head
evidence in which regime and model were deliberately confounded
(production binding vs. candidate binding). This study completes the
missing cells: the anti-diagonal (12B QAT, 26B PTQ) of the resulting 2×2.
Two of the four cells (12B-PTQ, 26B-QAT) are therefore **reused** from
that production head-to-head (disclosed further in §3); the anti-diagonal
cells are the independent addition.
Vendor documentation claims QAT Q4 models retain near-full-precision
quality where naive PTQ degrades (see `LITERATURE_SEARCH.md` in this package). Published
comparisons, however, measure general knowledge/reasoning benchmarks on
raw models. In the searches we ran (shallow, links-and-abstracts level —
see the literature file's own caveat) we found no prior measurement of
(a) QAT-vs-PTQ deltas on routing/abstention-style decisions under a
governance stack, (b) the same contrast at two scales in a paired
same-task design, or (c) regime-to-regime exact-output divergence at
temperature 0. We do not claim novelty for the general QAT-beats-PTQ
direction, and we flag (c) as plausibly adjacent to community regression
reports on cross-quantization output changes.
## 2. Design
2×2 factorial, one variable per axis as far as the released artifacts allow:
| | PTQ (Q4_K_M) | QAT (Q4_0) |
|---|---|---|
| **12B dense** | `gemma4:12b` (11.9B, emb 3840) | `gemma4:12b-it-qat` (11.9B, emb 3840) |
| **26B MoE** | `gemma4:26b` (25.8B, emb 2816) | `gemma4:26b-a4b-it-qat` (25.2B, ~4B active, emb 2816) |
- The **12B pair is the clean contrast**: identical parameter count and
embedding width; the artifacts differ only in quantization recipe.
- The **26B pair is a quasi-contrast**: the released artifacts report
25.8B vs 25.2B parameters, so a base-revision difference cannot be
excluded. Moreover, Ollama metadata does not expose expert structure,
so we cannot verify that the two 26B artifacts share the same MoE
configuration (an earlier harness profile note describes `gemma4:26b`
as ~3.8B-active, vs ~4B for the QAT artifact). Findings attributed to
"regime" on the 26B side are strictly findings about the released
artifact pair.
Constant across all eight primary runs: the MMV Large RC3.3 v3.1
governance stack (route_transformer + post_validator + force_reanchor_v2)
applied bit-identically; `think: false`; temperature 0.0; max_tokens 1024;
one GPU; sequential execution; same Ollama build; same suite and label
files (SHA-256 pinned in `ENVIRONMENT.md`).
**The one regime-correlated configuration difference, and its control.**
The two Q4_0 QAT profiles pin `num_ctx: 8192` because their Modelfiles
declare a 262,144-token context whose KV allocation fails on a 16 GB card;
the PTQ profiles run at the Ollama default context. Since this difference
tracks the regime axis exactly, we ran a direct control: the 12B-PTQ
Smoke-100 suite re-run with `num_ctx: 8192` produced **100/100
byte-identical** outputs versus its default-context run. Within this
study's prompt lengths, `num_ctx` is load feasibility, not behavior. (The
control was run on the 12B cell only; we extrapolate it to the 26B pair.)
## 3. Tasks, metrics, and statistics
**Suites.** OPERATE-FR Smoke-100 (N=100) and Core-500 candidate (N=500, a
controlled 5× neutral prompt-frame expansion of Smoke-100: **100 base
stems × 5 paraphrase variants**, preserving the family distribution:
volatile_current 175, stable_control 125, stale_premise_trap 75,
date_boundary 50, query_neutrality 50, ambiguous_time_frame 25). Tasks
probe *whether answering is warranted and in what mode* (verify,
date-bound answer, re-anchor, abstain), classified by the harness's
transparent rule-based detector. Because Core-500 tasks are paraphrase
clusters, its 500 rows are **not independent observations**; statistics
below address this explicitly.
**Primary metric.** Route correctness (classified route ∈ allowed routes),
recomputed from row-level results by the deposited analysis script, which
also derives per-family tables from the suites' authoritative `family`
fields. Exception: the safety-rate metrics (stale commitment, unsupported
current claim, over-verification) are quoted from the harness scorer's
summary outputs, which are archived alongside the raw rows.
**Statistics.** Within-model regime effect: two-sided exact McNemar on
paired same-task outcomes (the "exact" binomial computation is exact only
under an independence assumption that paraphrase clustering violates;
treat those p-values as approximate and anti-conservative). Interaction:
delta-of-deltas on Core-500 with a **stem-clustered bootstrap** (resample
the 100 stems, 10,000 resamples, seed 20260810) as the primary interval,
and a naive task-iid bootstrap reported for comparison. Determinism
baseline: same-configuration Smoke-100 repeats of **all four cells**.
**Provenance and timeline (JST).** No preregistration exists; the 2×2
design and the interaction endpoint were specified before the
anti-diagonal cells ran, but analysis details were fixed at analysis time
— treat every inferential statement as exploratory. 2026-08-10 early-to-mid
afternoon: 12B-PTQ and 26B-QAT cells (reused from the same-day MMV-M
production head-to-head; superseded earlier runs of the same PTQ cells
from 2026-05/06 score equal or lower, so no favorable-selection is
present). Evening: 12B-QAT and 26B-PTQ cells, then 12B repeats. Late
night into 2026-08-11: 26B repeats and the `num_ctx` control. All 13 runs
(8 primary + 4 repeats + 1 control = 2,900 rows) completed with **0
errored rows**.
## 4. Results
### 4.1 Cell aggregates (Core-500, N=500)
| cell | route_correctness | preferred_match | mean latency (ms) | mean resp. chars |
|---|---:|---:|---:|---:|
| 12B PTQ | **0.760** | 0.544 | 2,482 | 751 |
| 12B QAT | 0.748 | 0.542 | 2,626 | 834 |
| 26B PTQ | 0.738 | 0.540 | 3,252 † | 875 |
| 26B QAT | 0.756 | 0.540 | **1,613** | 899 |
† 26B PTQ (17 GB on disk) runs with a ~26/74 CPU/GPU split on the 16 GB
card; its latency reflects offload, not model properties, and is excluded
from all conclusions. Smoke-100 aggregates: 0.88 / 0.86 / 0.83 / 0.86 —
same direction, with the two QAT cells tied.
The Core-500 spread is 0.022 (11 tasks of 500). We ran **no equivalence
test**, so "the cells are tied" is not a supported claim; indeed the one
within-regime cross-model contrast, 12B-PTQ vs 26B-PTQ, is nominally
significant (17 vs 6 discordant, exact McNemar p=0.035, uncorrected).
What the aggregates do show is that no cell separates by a margin of
operational consequence on this suite.
Safety-critical rates (stale commitment, unsupported current claim,
over-verification on stable controls): **0.000 in seven of eight runs**;
the 26B-PTQ Core-500 run logged one over-verification event (0.008 =
1/125 stable controls, consistent with its 0.976 stable_control entry in
§4.4). With events this rare, the data bound rather than establish
regime-invariance: by the rule of three, each run's 95% upper bound is
≈0.6–2.4 % depending on the denominator.
### 4.2 Paired regime effect within model
| suite | pair | QAT-only correct | PTQ-only correct | Δ (QAT−PTQ) | McNemar p |
|---|---|---:|---:|---:|---:|
| Core-500 | 12B dense | 1 | 7 | **−0.012** | 0.0703 |
| Core-500 | 26B MoE | 15 | 6 | **+0.018** | 0.0784 |
| Smoke-100 | 12B dense | 0 | 2 | −0.020 | 0.50 |
| Smoke-100 | 26B MoE | 5 | 2 | +0.030 | 0.4531 |
Neither within-model effect reaches p<0.05, but both sit near the margin
**with opposite signs**, and the smaller Smoke-100 suite points the same
way in both pairs. The discordant tasks cluster by stem (the 12B pair's 8
discordants come from 5 stems), which is one reason these p-values should
be read as approximate (§3).
### 4.3 The interaction is the finding — exploratory, but robust to clustering
Delta-of-deltas (26B effect − 12B effect) on Core-500: **+0.030**.
Primary stem-clustered bootstrap 95% CI: **[+0.010, +0.052]**; naive
task-iid CI: [+0.008, +0.052]. Both exclude zero. This is a single-run,
non-preregistered endpoint computed alongside four within-model tests and
a family decomposition, with no multiplicity correction — we label it an
exploratory finding that survived a clustering-robust re-analysis, not a
confirmed effect. On this stack, QAT helps the released MoE pair and
mildly hurts the clean dense pair; the two effects cancel almost exactly
in any aggregate that averages over models.
### 4.4 Family decomposition: a crossed pattern in volatile_current
Core-500 route correctness by family (from the suites' authoritative
family fields; reproduced by the deposited script):
| family | n | 12B PTQ | 12B QAT | 26B PTQ | 26B QAT |
|---|---:|---:|---:|---:|---:|
| volatile_current | 175 | **0.5314** | 0.4971 | 0.4971 | **0.5314** |
| ambiguous_time_frame | 25 | 0.560 | 0.600 | 0.480 | 0.600 |
| date_boundary | 50 | 0.660 | 0.640 | 0.600 | 0.580 |
| stale_premise_trap | 75 | 0.9467 | 0.9467 | 0.9600 | 0.9600 |
| stable_control | 125 | 0.984 | 0.984 | 0.976 | 0.984 |
| query_neutrality | 50 | 0.920 | 0.920 | 0.920 | 0.920 |
The interaction concentrates in **volatile_current** (the family that
decides whether a currency-sensitive question deserves verification or a
dated hedge), where the four cells form a crossed pattern: the dense pair
loses under QAT where the MoE pair gains. That the crossed rates land on
numerically identical values (93↔87 correct of 175) is a coincidence of
small discordant counts and carries no inferential content; no test is
attached to this table. Easy families (stale_premise, stable, neutrality)
are regime-invariant here; date_boundary drifts −0.02 under QAT in both
pairs (n=50, descriptive only) — directionally consistent with the
date_boundary watch item recorded in the same-day production
binding-update freeze note (an internal record; noted for continuity, not
as independent evidence).
### 4.5 Regime is a behavioral change: exact-output divergence
Byte-identical same-task responses across regimes at temperature 0:
| suite | pair | exact match | rate | median first divergence (chars) |
|---|---|---:|---:|---:|
| Core-500 | 12B | 148/500 | 29.6 % | 73 |
| Core-500 | 26B | 116/500 | 23.2 % | 69 |
| Smoke-100 | 12B | 32/100 | 32.0 % | 46 |
| Smoke-100 | 26B | 27/100 | 27.0 % | 57 |
Against this, the same-configuration Smoke-100 repeat baseline is
**100/100 byte-identical in all four cells** — including the
CPU-offloaded 26B-PTQ cell, and with repeats separated from their base
runs by 8–10 hours (crossing run windows and, for the 26B cells, a date
boundary). The runtime is run-to-run deterministic here, so the
cross-regime divergence on Smoke-100 is attributable to the weights (plus,
for the 26B pair, the systematic compute-path difference — see §6.3). No
Core-500 repeats were run; the attribution extends to Core-500 rows by
inference from the Smoke-100 baselines, not by direct measurement.
Quantization regime changes *what the model says* in 68–77 % of governed
responses even while leaving *how often it is right* within ≈2 points —
the same dissociation between string reproducibility and objective
quality that the predecessor MTP study reported for speculative decoding,
now shown for quantization recipes. Practical corollary: hash-based
output caching, audit replay, or golden-file tests do **not** survive a
quantization-regime swap, even at temperature 0.
## 5. Discussion
**The QAT premium is pair-conditional here, not scalar.** Vendor framing
("QAT preserves quality") treats the QAT benefit as a property of the
recipe. On governed routing tasks we find a signed interaction: ≈+2
points (Core-500) for the released MoE pair, ≈−1 point for the clean
dense pair. Three mechanisms are compatible with the data and not
separable by this design: (i) 4-bit noise interacts differently with
expert routing than with dense activations; (ii) the 26B released pair
differs by more than regime (possible base revision, unverifiable expert
configuration), so part of the 26B gain may be base improvement; (iii)
the 26B-PTQ cell ran partially on CPU, so kernel-numerics differences are
regime-correlated on that side. The 12B side carries none of these
confounds — its artifacts are same-base, its cells all-GPU, and the
`num_ctx` difference is controlled to byte-identity — and on that clean
pair, QAT bought **nothing** on these tasks (directionally, it cost ≈1
point at p=0.07).
**Aggregates hide the effect.** The four Core-500 cell scores span 0.022.
Only the paired-and-crossed design exposes the structure. This is a
caution for model-selection practice: aggregate "quality parity"
verdicts can conceal offsetting family-level and pair-level shifts.
**Operational reading (inference, not test result).** Two of the four
cells are the same runs that motivated the same-day production
model-binding decision, so using this study to "validate" that decision
is partially circular; the independent evidence is the anti-diagonal.
With that caveat: the QAT 26B artifact remains the best-or-tied cell on
the two hardest families while being the fastest memory-fitting cell,
and the clean-pair result gives no reason to move the dense-tier
rollback binding off PTQ `gemma4:12b`.
## 6. Threats to validity
1. **26B pair purity.** 25.8B vs 25.2B released artifacts; unverifiable
expert configuration; regime, base revision, and MoE structure are
confounded on that side. The headline survives only under the reading
"released artifact pairs" — which is the operationally relevant one,
and the reading used throughout this paper.
2. **Paraphrase clustering.** Core-500 is 100 stems × 5 paraphrases;
McNemar "exact" p-values assume independence and are anti-conservative;
the interaction CI is therefore reported stem-clustered as primary.
Effective sample size is nearer 100 than 500.
3. **Compute-path and window confounds (26B side).** 26B-PTQ ran ~26/74
CPU/GPU; CPU-vs-GPU numerics differ systematically, and the 26B cells
ran in different windows. Repeats (100/100 across windows, including
the offloaded cell) rule out run-to-run nondeterminism, but a
systematic offload contribution to the 26B regime effect and
divergence rows cannot be excluded.
4. **Exploratory statistics.** No preregistration; ≥5 inferential
quantities computed; no multiplicity correction; single run per cell.
5. **One stack, one GPU, one runtime.** Ollama 0.30.6, one governance
stack, rule-based route classification, routing tasks only.
Generalization to other runtimes, stacks, or answer-content quality is
unmeasured. The `num_ctx` control was run on the 12B cell only.
6. **Family attribution.** date_boundary/ambiguous cells have n=50/25;
their drifts are descriptive only.
7. **Contamination.** Public Gemma weights; suite prompts are local and
unpublished at run time, but no training-corpus audit exists.
## 7. Reproducibility
`REPRODUCE.md` gives the exact commands. Environment, model digests, and
suite/label SHA-256 hashes: `ENVIRONMENT.md`. Row-level results
(13 runs, 2,900 rows, 0 errored) are retained in the private study
archive and identified by SHA-256; the public package ships processed
tables and the deterministic analysis script (seed 20260810) that
recomputes every routing statistic in this paper — including the §4.4
family table — from row level. The safety rates in §4.1 are quoted from
the harness scorer's archived summary outputs.
## 8. Conclusion
On a fixed governance stack and consumer GPU, quantization regime moved
governed-routing quality by at most ≈±2 points within a released pair —
below per-pair significance, but with a clustering-robust, family-
concentrated, oppositely-signed interaction across the two pairs — and it
moved the *bytes* of 68–77 % of temperature-0 outputs. Choose regimes per
released artifact pair and per task family, not by recipe reputation;
and treat any quantization swap as a behavioral migration, not a drop-in.
|