v1.0.1 public package + figures + paper PDF (DOI 10.5281/zenodo.21875513)
Browse files- .gitattributes +1 -0
- CITATION.cff +29 -0
- CLAIMS_MATRIX.md +29 -0
- ENVIRONMENT.md +56 -0
- ETHICS_AND_DISCLOSURE.md +20 -0
- EXECUTIVE_SUMMARY.md +79 -0
- LICENSE-CODE +202 -0
- LICENSE-PAPER-DATA.md +18 -0
- LICENSE.md +20 -0
- LITERATURE_SEARCH.md +44 -0
- NOTICE +8 -0
- PAPER.md +349 -0
- PUBLIC_MANIFEST.sha256 +22 -0
- PUBLIC_RELEASE_METADATA.json +37 -0
- README.md +79 -0
- REPRODUCE.md +62 -0
- THIRD_PARTY_DATA_LICENSES.md +13 -0
- analysis/analyze_2x2.py +258 -0
- data/RAW_ARTIFACT_HASHES.sha256 +24 -0
- data/analysis_summary.json +141 -0
- data/cell_metrics.csv +9 -0
- data/family_rates.csv +49 -0
- data/paired_quant_effect.csv +5 -0
- data/regime_output_divergence.csv +5 -0
- figures/fig1_interaction_slopegraph.png +3 -0
- figures/fig2_output_divergence.png +3 -0
- figures/fig3_2x2_matrix.png +3 -0
- paper/PAPER.pdf +3 -0
.gitattributes
CHANGED
|
@@ -58,3 +58,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 58 |
# Video files - compressed
|
| 59 |
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 60 |
*.webm filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 58 |
# Video files - compressed
|
| 59 |
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 60 |
*.webm filter=lfs diff=lfs merge=lfs -text
|
| 61 |
+
paper/PAPER.pdf filter=lfs diff=lfs merge=lfs -text
|
CITATION.cff
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
cff-version: 1.2.0
|
| 2 |
+
message: "If you use this study or its processed results, please cite this record."
|
| 3 |
+
title: "Quantization Regime and Governed Routing: A 2x2 Study of QAT Q4_0 versus PTQ Q4_K_M for Gemma 4 12B and 26B MoE under a Fixed Governance Stack"
|
| 4 |
+
type: article
|
| 5 |
+
authors:
|
| 6 |
+
- family-names: Toeda
|
| 7 |
+
given-names: Taiko
|
| 8 |
+
orcid: "https://orcid.org/0009-0001-7267-0201"
|
| 9 |
+
affiliation: Independent Researcher
|
| 10 |
+
version: 1.0.1
|
| 11 |
+
date-released: 2026-08-11
|
| 12 |
+
license: CC-BY-4.0
|
| 13 |
+
identifiers:
|
| 14 |
+
- type: doi
|
| 15 |
+
value: "10.5281/zenodo.21875513"
|
| 16 |
+
description: Zenodo archival record (published 2026-08-11)
|
| 17 |
+
repository-code: "https://github.com/mobius-style/gemma4-quant-regime-study"
|
| 18 |
+
url: "https://doi.org/10.5281/zenodo.21875513"
|
| 19 |
+
abstract: >-
|
| 20 |
+
A 2x2 study (quantization regime x released model pair) of governed
|
| 21 |
+
routing quality for Gemma 4 12B (dense, same-base pair) and a 26B-class
|
| 22 |
+
MoE released pair on one RTX 5070 Ti: within-pair regime effects are
|
| 23 |
+
marginal and oppositely signed; the regime x pair interaction — an
|
| 24 |
+
exploratory single-run endpoint — is +0.030 with a stem-clustered 95%
|
| 25 |
+
CI of [+0.010, +0.052], concentrated in the volatile-current family;
|
| 26 |
+
and only 23-32% of temperature-0 outputs are byte-identical across
|
| 27 |
+
regimes against 100% same-configuration repeat determinism in all four
|
| 28 |
+
cells. The license field describes the paper and data; analysis code is
|
| 29 |
+
Apache-2.0 (see LICENSE.md). Sequel to DOI 10.5281/zenodo.21860461.
|
CLAIMS_MATRIX.md
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Claims matrix
|
| 2 |
+
|
| 3 |
+
Labels: **Supported** = supported within the frozen local scope only;
|
| 4 |
+
**Partially supported** = directionally relevant but incomplete;
|
| 5 |
+
**Unsupported** = data reject or do not establish; **Requires replication** =
|
| 6 |
+
needs a new condition. All inferential claims are exploratory (no
|
| 7 |
+
preregistration, single run per cell).
|
| 8 |
+
|
| 9 |
+
| Candidate claim | Status | Exact evidence / boundary |
|
| 10 |
+
|---|---|---|
|
| 11 |
+
| No cell separates by an operationally large margin on Core-500 | Supported as description | Spread 0.022 (11 tasks of 500). NOT a tie claim: no equivalence test was run, and 12B-PTQ vs 26B-PTQ is nominally significant (17 vs 6 discordant, p=0.035, uncorrected) |
|
| 12 |
+
| The cells are statistically equivalent ("tied") | Unsupported | No TOST/equivalence test anywhere; one cross-model McNemar rejects at 0.05 |
|
| 13 |
+
| QAT improves the clean dense 12B pair | Unsupported | Paired Δ −0.012 (QAT-only 1 vs PTQ-only 7), p=0.0703; Smoke agrees in sign (−0.020) |
|
| 14 |
+
| QAT harms the clean dense 12B pair | Partially supported | Same evidence; marginal, single-run, clustered rows — directional only |
|
| 15 |
+
| QAT improves the released 26B MoE pair | Partially supported | Paired Δ +0.018 (15 vs 6), p=0.0784; Smoke agrees (+0.030); pair impure (base revision / expert config unverifiable / offload confound) |
|
| 16 |
+
| The regime × released-pair interaction is nonzero | **Supported as exploratory finding** | Delta-of-deltas +0.030; stem-clustered bootstrap 95% CI [+0.010, +0.052] (primary; 100 stems × 5 paraphrases) and task-iid CI [+0.008, +0.052]; single-run, no multiplicity correction |
|
| 17 |
+
| The interaction is a pure QAT-recipe (or architecture) effect | Unsupported | 26B pair confounds regime with possible base revision, unverifiable expert config, and a CPU-offload compute path; only the 12B pair is same-base, all-GPU |
|
| 18 |
+
| The interaction concentrates in volatile_current | Supported as description | Crossed family pattern 0.5314/0.4971 vs 0.4971/0.5314 (93↔87 of 175); the numeric identity of the crossed counts is coincidence; no test attached |
|
| 19 |
+
| Quantization regime moves safety-critical failure rates | Unsupported | 0.000 in 7 of 8 runs; one over-verification event in 26B-PTQ Core-500 (0.008 = 1/125). Rare-event floor: rule-of-three 95% upper bounds ≈0.6–2.4 %/run |
|
| 20 |
+
| num_ctx pinning (QAT profiles) is behavioral | Unsupported (controlled) | 12B-PTQ rerun at num_ctx 8192: 100/100 byte-identical vs default ctx. Control run on 12B only; extrapolated to 26B |
|
| 21 |
+
| Regime choice preserves exact temperature-0 outputs | Unsupported | Cross-regime byte-identity 23.2–32.0 %; median first divergence 46–73 chars |
|
| 22 |
+
| Observed cross-regime divergence is runtime nondeterminism | Unsupported (Smoke-100) | Same-configuration repeats 100/100 in ALL FOUR cells, incl. the CPU-offloaded 26B-PTQ, across run windows. Core-500 attribution is inference (no Core-500 repeats); a systematic offload contribution to 26B rows cannot be excluded |
|
| 23 |
+
| QAT 26B remains a defensible production binding | Supported as operational inference | Best-or-tied on volatile_current (0.5314) and stale_premise (0.9600), fastest memory-fitting cell (1,613 ms); partially circular w.r.t. the same-day binding decision (two cells reused) — the anti-diagonal is the independent evidence |
|
| 24 |
+
| PTQ 12b should remain the dense-tier rollback binding | Supported as operational inference | Clean-pair QAT effect ≤ 0 (p=0.07, directional); no reason to change the rollback target |
|
| 25 |
+
| date_boundary degrades under QAT | Partially supported | −0.02 in both pairs (n=50 each); descriptive only |
|
| 26 |
+
| Latency differs by regime | Unsupported (by design) | 26B-PTQ column is CPU-offload-dominated (26/74 split); no cross-memory-boundary latency claim is made |
|
| 27 |
+
| Results generalize to other runtimes / stacks / content-quality benchmarks | Requires replication | One GPU, Ollama 0.30.6, one governance stack, routing tasks only |
|
| 28 |
+
| The models have uncontaminated scores | Unsupported | Public weights; no training-corpus audit; suite prompts local and unpublished at run time |
|
| 29 |
+
| The study is reproducible on the same artifacts | Supported | Pinned digests and hashes; 13 runs / 2,900 rows / 0 errored; every routing statistic incl. the family table recomputes from row level via the deposited script (families from the suites' authoritative family fields); safety rates quoted from archived harness scorer outputs |
|
ENVIRONMENT.md
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Environment manifest — captured 2026-08-10 (JST) during run window
|
| 2 |
+
ollama: ollama version is 0.30.6
|
| 3 |
+
gpu: NVIDIA GeForce RTX 5070 Ti, 595.84, 16303 MiB
|
| 4 |
+
kernel: 7.0.0-28-generic
|
| 5 |
+
python: Python 3.10.14
|
| 6 |
+
harness_git: b90d217b0598baa1c4e8db6d7cf828813a0aeaf7 (private working tree; the public harness lives at github.com/mobius-style/mmv → operate-fr-bench)
|
| 7 |
+
|
| 8 |
+
## Model digests (ollama)
|
| 9 |
+
gemma4:26b-a4b-it-qat 2dd70431afed 15 GB 32 hours ago
|
| 10 |
+
gemma4:12b-it-qat 38044be4f923 7.2 GB 32 hours ago
|
| 11 |
+
gemma4:12b 4eb23ef187e2 7.6 GB 2 months ago
|
| 12 |
+
gemma4:26b 5571076f3d70 17 GB 2 months ago
|
| 13 |
+
|
| 14 |
+
## Model cards (ollama show)
|
| 15 |
+
### gemma4:12b
|
| 16 |
+
Model
|
| 17 |
+
architecture gemma4
|
| 18 |
+
parameters 11.9B
|
| 19 |
+
context length 262144
|
| 20 |
+
embedding length 3840
|
| 21 |
+
quantization Q4_K_M
|
| 22 |
+
requires 0.30.5
|
| 23 |
+
|
| 24 |
+
### gemma4:12b-it-qat
|
| 25 |
+
Model
|
| 26 |
+
architecture gemma4
|
| 27 |
+
parameters 11.9B
|
| 28 |
+
context length 262144
|
| 29 |
+
embedding length 3840
|
| 30 |
+
quantization Q4_0
|
| 31 |
+
requires 0.30.5
|
| 32 |
+
|
| 33 |
+
### gemma4:26b
|
| 34 |
+
Model
|
| 35 |
+
architecture gemma4
|
| 36 |
+
parameters 25.8B
|
| 37 |
+
context length 262144
|
| 38 |
+
embedding length 2816
|
| 39 |
+
quantization Q4_K_M
|
| 40 |
+
requires 0.20.0
|
| 41 |
+
|
| 42 |
+
### gemma4:26b-a4b-it-qat
|
| 43 |
+
Model
|
| 44 |
+
architecture gemma4
|
| 45 |
+
parameters 25.2B
|
| 46 |
+
context length 262144
|
| 47 |
+
embedding length 2816
|
| 48 |
+
quantization Q4_0
|
| 49 |
+
requires 0.30.5
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
## Suite/label hashes
|
| 53 |
+
e962ac4f36fbfed1aa2e04093c3bcadbeafaf3817e8a0ee69f5afb9fa8f89883 <repo-root>/operate-fr-bench/data/smoke100.jsonl
|
| 54 |
+
901e718b7070dfc2479e1ef6bfd18eabcacdeed12b645e7f3260b395a86a8e0f <repo-root>/operate-fr-bench/data/core500.jsonl
|
| 55 |
+
e86df675454bdbb9650659f593762951f5125140c7764bca209d6f652ec5bb70 <repo-root>/operate-fr-bench/data/labels/smoke100_route_labels.jsonl
|
| 56 |
+
455d54d21eb2b62715cf2eb77f4d3b12ac500b95cae17edf722f858912c462bc <repo-root>/operate-fr-bench/data/labels/core500_route_labels.jsonl
|
ETHICS_AND_DISCLOSURE.md
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Ethics and AI-assistance disclosure
|
| 2 |
+
|
| 3 |
+
This systems study uses locally stored open-weight model artifacts,
|
| 4 |
+
project-authored routing suites, and machine-generated outputs. It
|
| 5 |
+
collects no human-subject data, private conversations, personal data, or
|
| 6 |
+
crowd-worker judgments. Route classification is a transparent rule-based
|
| 7 |
+
detector; no human or LLM judge is used for the primary endpoint.
|
| 8 |
+
|
| 9 |
+
Claude Code (an Anthropic coding agent, model Fable 5) assisted with
|
| 10 |
+
experimental scripting and execution, data processing, statistical
|
| 11 |
+
analysis, literature retrieval, manuscript language preparation, and
|
| 12 |
+
dissemination preparation. AI systems are not authors and cannot accept
|
| 13 |
+
scholarly accountability. The human author, Taiko Toeda, is responsible
|
| 14 |
+
for the research design, the measurements accepted for publication,
|
| 15 |
+
interpretation, citations, claims, final text, and the publication
|
| 16 |
+
decision.
|
| 17 |
+
|
| 18 |
+
No affiliation with Google, NVIDIA, or the Ollama project is asserted. No
|
| 19 |
+
external sponsorship or model-vendor funding was identified in this local
|
| 20 |
+
study record.
|
EXECUTIVE_SUMMARY.md
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Executive summary
|
| 2 |
+
|
| 3 |
+
## Conclusion
|
| 4 |
+
|
| 5 |
+
On a fixed governance stack on one RTX 5070 Ti, we measured what
|
| 6 |
+
quantization regime — QAT Q4_0 versus PTQ Q4_K_M — does to governed
|
| 7 |
+
routing quality, in a 2×2 design over Gemma 4 12B (dense; a clean
|
| 8 |
+
same-base pair) and a 26B-class MoE released pair (25.8B PTQ vs 25.2B
|
| 9 |
+
QAT; regime confounded with a possible base revision). The answer: **on
|
| 10 |
+
this stack the QAT premium is not a scalar — it differs in sign across
|
| 11 |
+
the two released pairs** — and regime choice is a *behavioral* change
|
| 12 |
+
even where quality scores barely move.
|
| 13 |
+
|
| 14 |
+
| Cell (Core-500, N=500) | route_correctness | mean latency |
|
| 15 |
+
|---|---:|---:|
|
| 16 |
+
| 12B dense, PTQ Q4_K_M | **0.760** | 2,482 ms |
|
| 17 |
+
| 12B dense, QAT Q4_0 | 0.748 | 2,626 ms |
|
| 18 |
+
| 26B MoE, PTQ Q4_K_M | 0.738 | 3,252 ms † |
|
| 19 |
+
| 26B MoE, QAT Q4_0 | 0.756 | **1,613 ms** |
|
| 20 |
+
|
| 21 |
+
† the 26B PTQ artifact does not fit the 16 GB card and runs ~26/74
|
| 22 |
+
CPU/GPU-split; its latency reflects offload and is excluded from all
|
| 23 |
+
conclusions.
|
| 24 |
+
|
| 25 |
+
- **Within-pair regime effects are marginal and oppositely signed**:
|
| 26 |
+
12B dense −0.012 under QAT (McNemar p=0.070); 26B pair +0.018
|
| 27 |
+
(p=0.078). Smoke-100 agrees in sign for both.
|
| 28 |
+
- **The interaction — an exploratory, single-run headline — survives
|
| 29 |
+
clustering-robust analysis**: delta-of-deltas +0.030, stem-clustered
|
| 30 |
+
bootstrap 95% CI [+0.010, +0.052] (Core-500 is 100 stems × 5
|
| 31 |
+
paraphrases; naive task-iid CI [+0.008, +0.052]). Aggregate averaging
|
| 32 |
+
cancels the two effects and hides the structure. No equivalence test
|
| 33 |
+
was run on the cell aggregates; one cross-model contrast (12B-PTQ vs
|
| 34 |
+
26B-PTQ) is nominally significant (p=0.035).
|
| 35 |
+
- **The interaction concentrates in the volatile-current family**, whose
|
| 36 |
+
four cells form a crossed pattern (12B: 0.5314→0.4971; 26B:
|
| 37 |
+
0.4971→0.5314; the numeric identity of the crossed counts is
|
| 38 |
+
coincidence, not a tested effect).
|
| 39 |
+
- **Safety-critical rates: 0.000 in 7 of 8 runs**; one over-verification
|
| 40 |
+
event in 26B-PTQ Core-500 (0.008). With events this rare the data
|
| 41 |
+
bound, rather than establish, regime-invariance.
|
| 42 |
+
- **Regime is a behavioral change**: only 23–32 % of same-task
|
| 43 |
+
temperature-0 outputs are byte-identical across regimes (median first
|
| 44 |
+
divergence 46–73 characters), against same-configuration repeat
|
| 45 |
+
baselines of **100/100 in all four cells** — including the
|
| 46 |
+
CPU-offloaded PTQ MoE cell, across run windows — and a 100/100
|
| 47 |
+
`num_ctx` byte-identity control on the 12B side. Hash-based caching,
|
| 48 |
+
audit replay, and golden-file tests do not survive a
|
| 49 |
+
quantization-regime swap.
|
| 50 |
+
|
| 51 |
+
## Practical implications
|
| 52 |
+
|
| 53 |
+
1. Choose quantization regimes per released artifact pair and per task
|
| 54 |
+
family, not by recipe reputation; aggregate "quality parity" can
|
| 55 |
+
conceal offsetting family-level shifts.
|
| 56 |
+
2. On this stack, the QAT 26B artifact is best-or-tied on the two hardest
|
| 57 |
+
families while being the fastest memory-fitting cell — consistent with
|
| 58 |
+
its same-day adoption as a production binding (a partially circular
|
| 59 |
+
check: two of the four cells are that decision's own runs; the
|
| 60 |
+
anti-diagonal is the independent evidence). The dense-tier fallback is
|
| 61 |
+
better served by the **PTQ** 12B (clean-pair QAT effect ≤ 0).
|
| 62 |
+
3. Treat any quantization swap as a behavioral migration with full
|
| 63 |
+
re-validation, not a drop-in.
|
| 64 |
+
|
| 65 |
+
## Honest limits
|
| 66 |
+
|
| 67 |
+
The 26B released pair may embed a base revision (25.8B vs 25.2B) and its
|
| 68 |
+
expert configuration is unverifiable from runtime metadata; the PTQ 26B
|
| 69 |
+
cell ran partially on CPU — so regime, revision, and compute path are
|
| 70 |
+
confounded on that side; the 12B pair is clean. All inferential results
|
| 71 |
+
are exploratory: no preregistration, single run per cell, ≥5 inferential
|
| 72 |
+
quantities without multiplicity correction, paraphrase-clustered rows
|
| 73 |
+
(effective N nearer 100 than 500). One GPU, one runtime (Ollama 0.30.6),
|
| 74 |
+
one governance stack, routing tasks only; answer-content quality is
|
| 75 |
+
unmeasured. The general "QAT beats PTQ" direction is vendor-documented
|
| 76 |
+
prior art; the intended contribution is the governed-routing task class,
|
| 77 |
+
the two-scale paired design exposing the signed interaction, and the
|
| 78 |
+
regime-to-regime exact-output divergence measurement (the last is
|
| 79 |
+
plausibly adjacent to community cross-quantization regression reports).
|
LICENSE-CODE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
Apache License
|
| 3 |
+
Version 2.0, January 2004
|
| 4 |
+
http://www.apache.org/licenses/
|
| 5 |
+
|
| 6 |
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
| 7 |
+
|
| 8 |
+
1. Definitions.
|
| 9 |
+
|
| 10 |
+
"License" shall mean the terms and conditions for use, reproduction,
|
| 11 |
+
and distribution as defined by Sections 1 through 9 of this document.
|
| 12 |
+
|
| 13 |
+
"Licensor" shall mean the copyright owner or entity authorized by
|
| 14 |
+
the copyright owner that is granting the License.
|
| 15 |
+
|
| 16 |
+
"Legal Entity" shall mean the union of the acting entity and all
|
| 17 |
+
other entities that control, are controlled by, or are under common
|
| 18 |
+
control with that entity. For the purposes of this definition,
|
| 19 |
+
"control" means (i) the power, direct or indirect, to cause the
|
| 20 |
+
direction or management of such entity, whether by contract or
|
| 21 |
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
| 22 |
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
| 23 |
+
|
| 24 |
+
"You" (or "Your") shall mean an individual or Legal Entity
|
| 25 |
+
exercising permissions granted by this License.
|
| 26 |
+
|
| 27 |
+
"Source" form shall mean the preferred form for making modifications,
|
| 28 |
+
including but not limited to software source code, documentation
|
| 29 |
+
source, and configuration files.
|
| 30 |
+
|
| 31 |
+
"Object" form shall mean any form resulting from mechanical
|
| 32 |
+
transformation or translation of a Source form, including but
|
| 33 |
+
not limited to compiled object code, generated documentation,
|
| 34 |
+
and conversions to other media types.
|
| 35 |
+
|
| 36 |
+
"Work" shall mean the work of authorship, whether in Source or
|
| 37 |
+
Object form, made available under the License, as indicated by a
|
| 38 |
+
copyright notice that is included in or attached to the work
|
| 39 |
+
(an example is provided in the Appendix below).
|
| 40 |
+
|
| 41 |
+
"Derivative Works" shall mean any work, whether in Source or Object
|
| 42 |
+
form, that is based on (or derived from) the Work and for which the
|
| 43 |
+
editorial revisions, annotations, elaborations, or other modifications
|
| 44 |
+
represent, as a whole, an original work of authorship. For the purposes
|
| 45 |
+
of this License, Derivative Works shall not include works that remain
|
| 46 |
+
separable from, or merely link (or bind by name) to the interfaces of,
|
| 47 |
+
the Work and Derivative Works thereof.
|
| 48 |
+
|
| 49 |
+
"Contribution" shall mean any work of authorship, including
|
| 50 |
+
the original version of the Work and any modifications or additions
|
| 51 |
+
to that Work or Derivative Works thereof, that is intentionally
|
| 52 |
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
| 53 |
+
or by an individual or Legal Entity authorized to submit on behalf of
|
| 54 |
+
the copyright owner. For the purposes of this definition, "submitted"
|
| 55 |
+
means any form of electronic, verbal, or written communication sent
|
| 56 |
+
to the Licensor or its representatives, including but not limited to
|
| 57 |
+
communication on electronic mailing lists, source code control systems,
|
| 58 |
+
and issue tracking systems that are managed by, or on behalf of, the
|
| 59 |
+
Licensor for the purpose of discussing and improving the Work, but
|
| 60 |
+
excluding communication that is conspicuously marked or otherwise
|
| 61 |
+
designated in writing by the copyright owner as "Not a Contribution."
|
| 62 |
+
|
| 63 |
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
| 64 |
+
on behalf of whom a Contribution has been received by Licensor and
|
| 65 |
+
subsequently incorporated within the Work.
|
| 66 |
+
|
| 67 |
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
| 68 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 69 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 70 |
+
copyright license to reproduce, prepare Derivative Works of,
|
| 71 |
+
publicly display, publicly perform, sublicense, and distribute the
|
| 72 |
+
Work and such Derivative Works in Source or Object form.
|
| 73 |
+
|
| 74 |
+
3. Grant of Patent License. Subject to the terms and conditions of
|
| 75 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 76 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 77 |
+
(except as stated in this section) patent license to make, have made,
|
| 78 |
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
| 79 |
+
where such license applies only to those patent claims licensable
|
| 80 |
+
by such Contributor that are necessarily infringed by their
|
| 81 |
+
Contribution(s) alone or by combination of their Contribution(s)
|
| 82 |
+
with the Work to which such Contribution(s) was submitted. If You
|
| 83 |
+
institute patent litigation against any entity (including a
|
| 84 |
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
| 85 |
+
or a Contribution incorporated within the Work constitutes direct
|
| 86 |
+
or contributory patent infringement, then any patent licenses
|
| 87 |
+
granted to You under this License for that Work shall terminate
|
| 88 |
+
as of the date such litigation is filed.
|
| 89 |
+
|
| 90 |
+
4. Redistribution. You may reproduce and distribute copies of the
|
| 91 |
+
Work or Derivative Works thereof in any medium, with or without
|
| 92 |
+
modifications, and in Source or Object form, provided that You
|
| 93 |
+
meet the following conditions:
|
| 94 |
+
|
| 95 |
+
(a) You must give any other recipients of the Work or
|
| 96 |
+
Derivative Works a copy of this License; and
|
| 97 |
+
|
| 98 |
+
(b) You must cause any modified files to carry prominent notices
|
| 99 |
+
stating that You changed the files; and
|
| 100 |
+
|
| 101 |
+
(c) You must retain, in the Source form of any Derivative Works
|
| 102 |
+
that You distribute, all copyright, patent, trademark, and
|
| 103 |
+
attribution notices from the Source form of the Work,
|
| 104 |
+
excluding those notices that do not pertain to any part of
|
| 105 |
+
the Derivative Works; and
|
| 106 |
+
|
| 107 |
+
(d) If the Work includes a "NOTICE" text file as part of its
|
| 108 |
+
distribution, then any Derivative Works that You distribute must
|
| 109 |
+
include a readable copy of the attribution notices contained
|
| 110 |
+
within such NOTICE file, excluding those notices that do not
|
| 111 |
+
pertain to any part of the Derivative Works, in at least one
|
| 112 |
+
of the following places: within a NOTICE text file distributed
|
| 113 |
+
as part of the Derivative Works; within the Source form or
|
| 114 |
+
documentation, if provided along with the Derivative Works; or,
|
| 115 |
+
within a display generated by the Derivative Works, if and
|
| 116 |
+
wherever such third-party notices normally appear. The contents
|
| 117 |
+
of the NOTICE file are for informational purposes only and
|
| 118 |
+
do not modify the License. You may add Your own attribution
|
| 119 |
+
notices within Derivative Works that You distribute, alongside
|
| 120 |
+
or as an addendum to the NOTICE text from the Work, provided
|
| 121 |
+
that such additional attribution notices cannot be construed
|
| 122 |
+
as modifying the License.
|
| 123 |
+
|
| 124 |
+
You may add Your own copyright statement to Your modifications and
|
| 125 |
+
may provide additional or different license terms and conditions
|
| 126 |
+
for use, reproduction, or distribution of Your modifications, or
|
| 127 |
+
for any such Derivative Works as a whole, provided Your use,
|
| 128 |
+
reproduction, and distribution of the Work otherwise complies with
|
| 129 |
+
the conditions stated in this License.
|
| 130 |
+
|
| 131 |
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
| 132 |
+
any Contribution intentionally submitted for inclusion in the Work
|
| 133 |
+
by You to the Licensor shall be under the terms and conditions of
|
| 134 |
+
this License, without any additional terms or conditions.
|
| 135 |
+
Notwithstanding the above, nothing herein shall supersede or modify
|
| 136 |
+
the terms of any separate license agreement you may have executed
|
| 137 |
+
with Licensor regarding such Contributions.
|
| 138 |
+
|
| 139 |
+
6. Trademarks. This License does not grant permission to use the trade
|
| 140 |
+
names, trademarks, service marks, or product names of the Licensor,
|
| 141 |
+
except as required for reasonable and customary use in describing the
|
| 142 |
+
origin of the Work and reproducing the content of the NOTICE file.
|
| 143 |
+
|
| 144 |
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
| 145 |
+
agreed to in writing, Licensor provides the Work (and each
|
| 146 |
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
| 147 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
| 148 |
+
implied, including, without limitation, any warranties or conditions
|
| 149 |
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
| 150 |
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
| 151 |
+
appropriateness of using or redistributing the Work and assume any
|
| 152 |
+
risks associated with Your exercise of permissions under this License.
|
| 153 |
+
|
| 154 |
+
8. Limitation of Liability. In no event and under no legal theory,
|
| 155 |
+
whether in tort (including negligence), contract, or otherwise,
|
| 156 |
+
unless required by applicable law (such as deliberate and grossly
|
| 157 |
+
negligent acts) or agreed to in writing, shall any Contributor be
|
| 158 |
+
liable to You for damages, including any direct, indirect, special,
|
| 159 |
+
incidental, or consequential damages of any character arising as a
|
| 160 |
+
result of this License or out of the use or inability to use the
|
| 161 |
+
Work (including but not limited to damages for loss of goodwill,
|
| 162 |
+
work stoppage, computer failure or malfunction, or any and all
|
| 163 |
+
other commercial damages or losses), even if such Contributor
|
| 164 |
+
has been advised of the possibility of such damages.
|
| 165 |
+
|
| 166 |
+
9. Accepting Warranty or Additional Liability. While redistributing
|
| 167 |
+
the Work or Derivative Works thereof, You may choose to offer,
|
| 168 |
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
| 169 |
+
or other liability obligations and/or rights consistent with this
|
| 170 |
+
License. However, in accepting such obligations, You may act only
|
| 171 |
+
on Your own behalf and on Your sole responsibility, not on behalf
|
| 172 |
+
of any other Contributor, and only if You agree to indemnify,
|
| 173 |
+
defend, and hold each Contributor harmless for any liability
|
| 174 |
+
incurred by, or claims asserted against, such Contributor by reason
|
| 175 |
+
of your accepting any such warranty or additional liability.
|
| 176 |
+
|
| 177 |
+
END OF TERMS AND CONDITIONS
|
| 178 |
+
|
| 179 |
+
APPENDIX: How to apply the Apache License to your work.
|
| 180 |
+
|
| 181 |
+
To apply the Apache License to your work, attach the following
|
| 182 |
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
| 183 |
+
replaced with your own identifying information. (Don't include
|
| 184 |
+
the brackets!) The text should be enclosed in the appropriate
|
| 185 |
+
comment syntax for the file format. We also recommend that a
|
| 186 |
+
file or class name and description of purpose be included on the
|
| 187 |
+
same "printed page" as the copyright notice for easier
|
| 188 |
+
identification within third-party archives.
|
| 189 |
+
|
| 190 |
+
Copyright [yyyy] [name of copyright owner]
|
| 191 |
+
|
| 192 |
+
Licensed under the Apache License, Version 2.0 (the "License");
|
| 193 |
+
you may not use this file except in compliance with the License.
|
| 194 |
+
You may obtain a copy of the License at
|
| 195 |
+
|
| 196 |
+
http://www.apache.org/licenses/LICENSE-2.0
|
| 197 |
+
|
| 198 |
+
Unless required by applicable law or agreed to in writing, software
|
| 199 |
+
distributed under the License is distributed on an "AS IS" BASIS,
|
| 200 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 201 |
+
See the License for the specific language governing permissions and
|
| 202 |
+
limitations under the License.
|
LICENSE-PAPER-DATA.md
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Creative Commons Attribution 4.0 International
|
| 2 |
+
|
| 3 |
+
Copyright 2026 Taiko Toeda.
|
| 4 |
+
|
| 5 |
+
Except where otherwise identified, the original paper, original prose
|
| 6 |
+
documentation, original figures, aggregate tables, processed statistical
|
| 7 |
+
outputs, and project-authored derived measurements in this public release are
|
| 8 |
+
licensed under the Creative Commons Attribution 4.0 International License.
|
| 9 |
+
|
| 10 |
+
- License summary: https://creativecommons.org/licenses/by/4.0/
|
| 11 |
+
- Legal code: https://creativecommons.org/licenses/by/4.0/legalcode
|
| 12 |
+
- SPDX identifier: `CC-BY-4.0`
|
| 13 |
+
|
| 14 |
+
Attribution should identify Taiko Toeda, the work title, the version or DOI,
|
| 15 |
+
and indicate whether changes were made. This notice does not relicense any
|
| 16 |
+
third-party benchmark content, source code, model artifact, trademark, or other
|
| 17 |
+
material identified in `THIRD_PARTY_DATA_LICENSES.md` or `NOTICE`.
|
| 18 |
+
|
LICENSE.md
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# License map
|
| 2 |
+
|
| 3 |
+
Copyright 2026 Taiko Toeda.
|
| 4 |
+
|
| 5 |
+
This repository deliberately uses a split license; no single blanket
|
| 6 |
+
license applies to every file.
|
| 7 |
+
|
| 8 |
+
- Original paper, prose documentation, aggregate tables, and processed
|
| 9 |
+
statistical outputs: Creative Commons Attribution 4.0 International
|
| 10 |
+
(`CC BY 4.0`), subject to `THIRD_PARTY_DATA_LICENSES.md`.
|
| 11 |
+
- Original study code under `analysis/`: Apache License 2.0.
|
| 12 |
+
- Third-party model artifacts, runtimes, and upstream material: their
|
| 13 |
+
respective upstream licenses; none are redistributed here.
|
| 14 |
+
- Trademarks and project names remain the property of their respective
|
| 15 |
+
owners.
|
| 16 |
+
|
| 17 |
+
`CITATION.cff`'s single `license` field refers to the paper-and-data
|
| 18 |
+
record (CC BY 4.0); it does not override the Apache-2.0 grant on
|
| 19 |
+
`analysis/`. See `LICENSE-PAPER-DATA.md`, `LICENSE-CODE`,
|
| 20 |
+
`THIRD_PARTY_DATA_LICENSES.md`, and `NOTICE` for the operative notices.
|
LITERATURE_SEARCH.md
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Literature search notes — 2026-08-10
|
| 2 |
+
|
| 3 |
+
Scope: what is already claimed/measured about Gemma QAT (Q4_0) vs post-training
|
| 4 |
+
quantization, to position this study's contribution. Web search performed
|
| 5 |
+
2026-08-10; links verified at search time only (titles/summaries, not deep-read).
|
| 6 |
+
|
| 7 |
+
## Vendor claims
|
| 8 |
+
|
| 9 |
+
- Google, "Gemma 4 with quantization-aware training" (official blog):
|
| 10 |
+
QAT integrates quantization simulation into training so the 4-bit release
|
| 11 |
+
stays close to full-precision quality, vs. naive PTQ degradation.
|
| 12 |
+
https://blog.google/innovation-and-ai/technology/developers-tools/quantization-aware-training-gemma-4/
|
| 13 |
+
- Google Developers Blog, "Gemma 3 QAT Models" (prior generation, same recipe
|
| 14 |
+
lineage): QAT Q4 approaches Q8-PTQ quality on consumer GPUs.
|
| 15 |
+
https://developers.googleblog.com/en/gemma-3-quantized-aware-trained-state-of-the-art-ai-to-consumer-gpus/
|
| 16 |
+
- Gemma 4 model overview (ai.google.dev): official model cards, context
|
| 17 |
+
declarations. https://ai.google.dev/gemma/docs/core
|
| 18 |
+
|
| 19 |
+
## Community measurements
|
| 20 |
+
|
| 21 |
+
- DEV Community, "Gemma 4 QAT on a 1080 Ti": community-side accuracy
|
| 22 |
+
measurements; notes that naive conversion of QAT checkpoints to other
|
| 23 |
+
formats can lose part of the QAT benefit.
|
| 24 |
+
https://dev.to/sysoft/gemma-4-qat-on-a-1080-ti-what-quantization-aware-actually-buys-and-fitting-the-12b-on-8-gb-at-2bg5
|
| 25 |
+
- Overview of Gemma 4 QAT (note.com/npaka): JA-language summary of the QAT
|
| 26 |
+
release. https://note.com/npaka/n/ndeef4df16dd2?hl=en
|
| 27 |
+
|
| 28 |
+
## Surveys
|
| 29 |
+
|
| 30 |
+
- "Art and Science of Quantizing Large-Scale Models" (arXiv:2409.11650):
|
| 31 |
+
QAT-vs-PTQ taxonomy. https://arxiv.org/pdf/2409.11650
|
| 32 |
+
- "Resource-Efficient Language Models" (arXiv:2505.08620): quantization for
|
| 33 |
+
inference efficiency. https://arxiv.org/pdf/2505.08620
|
| 34 |
+
|
| 35 |
+
## Gap this study addresses
|
| 36 |
+
|
| 37 |
+
Published comparisons measure general-knowledge/reasoning benchmarks on raw
|
| 38 |
+
models. We found no measurement of (a) QAT-vs-PTQ deltas **under a fixed
|
| 39 |
+
governance stack** on **routing/abstention-style tasks** (answer-entitlement
|
| 40 |
+
decisions rather than answer content), (b) the same contrast run **at two
|
| 41 |
+
scales/architectures** (12B dense, ~26B sparse MoE) in a paired same-task
|
| 42 |
+
design on one consumer GPU, or (c) regime-to-regime **exact-output
|
| 43 |
+
divergence** rates for temperature-0 decoding. That is the niche of this
|
| 44 |
+
study. We do NOT claim novelty for QAT-vs-PTQ quality direction in general.
|
NOTICE
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Gemma 4 Quantization-Regime Study (QAT Q4_0 vs PTQ Q4_K_M)
|
| 2 |
+
Copyright 2026 Taiko Toeda
|
| 3 |
+
|
| 4 |
+
This independent empirical study is not affiliated with or endorsed by
|
| 5 |
+
Google, NVIDIA, or the Ollama project. Gemma is a family of open-weight
|
| 6 |
+
models released by Google under the Gemma Terms of Use; model weights are
|
| 7 |
+
not redistributed by this repository. "MMV" and "OPERATE-FR" refer to the
|
| 8 |
+
author's own MOBIUS project components (github.com/mobius-style/mmv).
|
PAPER.md
ADDED
|
@@ -0,0 +1,349 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# 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
|
| 2 |
+
|
| 3 |
+
**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
|
| 4 |
+
**Series**: companion/sequel to the *Gemma 4 MTP Quality–Throughput Study* (repo `gemma4-mtp-quality-study`, DOI 10.5281/zenodo.21860461)
|
| 5 |
+
**Status**: exploratory engineering study on a frozen local harness; single-run per cell; not preregistered; not an independent benchmark standard
|
| 6 |
+
|
| 7 |
+
---
|
| 8 |
+
|
| 9 |
+
## Abstract
|
| 10 |
+
|
| 11 |
+
We measure what quantization regime — quantization-aware-trained Q4_0 (QAT)
|
| 12 |
+
versus post-training-quantized Q4_K_M (PTQ) — is worth on *governed routing
|
| 13 |
+
tasks*: answer-entitlement decisions (verify / date-bound / re-anchor /
|
| 14 |
+
abstain) made under a fixed governance stack, rather than answer-content
|
| 15 |
+
benchmarks. We run a 2×2 design (regime × released model pair) over Gemma 4
|
| 16 |
+
12B (dense, 11.9B — a clean same-base pair) and a 26B-class MoE pair
|
| 17 |
+
(25.8B PTQ vs 25.2B QAT released artifacts — a quasi-contrast that may
|
| 18 |
+
embed a base revision), each on a 100-task Smoke-100 and a 500-task
|
| 19 |
+
Core-500 candidate suite, all cells same-day on one consumer GPU with the
|
| 20 |
+
governance stack bit-identical and temperature 0. Aggregate route
|
| 21 |
+
correctness spans 0.738–0.760 on Core-500; we ran no equivalence test, and
|
| 22 |
+
one cross-model contrast (12B-PTQ vs 26B-PTQ) is nominally significant
|
| 23 |
+
(exact McNemar p=0.035). The paired within-model regime effects are
|
| 24 |
+
individually marginal and **oppositely signed**: QAT −0.012 on the dense
|
| 25 |
+
12B (p=0.070) and +0.018 on the MoE pair (p=0.078). The regime × pair
|
| 26 |
+
**interaction** — this study's headline, an exploratory single-run finding
|
| 27 |
+
— is +0.030 with a stem-clustered bootstrap 95% CI of **[+0.010, +0.052]**
|
| 28 |
+
(primary; Core-500 is 100 stems × 5 paraphrases, so tasks are not
|
| 29 |
+
independent) and [+0.008, +0.052] under naive task-iid resampling. The
|
| 30 |
+
interaction concentrates almost entirely in the volatile-current family,
|
| 31 |
+
where the two pairs' scores cross (0.5314/0.4971 vs 0.4971/0.5314).
|
| 32 |
+
Attribution: with the released artifacts, regime is confounded on the MoE
|
| 33 |
+
side with a possible base revision and with a CPU-offload compute path, so
|
| 34 |
+
we claim conditionality on the *released artifact pair*, not on
|
| 35 |
+
architecture per se. Meanwhile regime choice massively perturbs the *text*
|
| 36 |
+
of temperature-0 outputs: only 23–32 % of same-task responses are
|
| 37 |
+
byte-identical across regimes (median first divergence at 46–73
|
| 38 |
+
characters), against same-configuration Smoke-100 repeat baselines of
|
| 39 |
+
100/100 in **all four cells** (including the CPU-offloaded PTQ MoE cell,
|
| 40 |
+
repeated across run windows) and a 100/100 byte-identity control for the
|
| 41 |
+
one regime-correlated configuration difference (`num_ctx`). Safety-critical
|
| 42 |
+
failure rates are 0.000 in seven of eight runs; the eighth (26B-PTQ
|
| 43 |
+
Core-500) logged a single over-verification event (0.008 on stable
|
| 44 |
+
controls). We conclude that on this stack the QAT premium is not a scalar —
|
| 45 |
+
it differs in sign across the two released pairs at ≈3 percentage points,
|
| 46 |
+
too small to survive aggregate averaging but visible in a paired crossed
|
| 47 |
+
design — and that quantization regime should be treated as a *behavioral*
|
| 48 |
+
change (different outputs), not merely a *quality* change (different
|
| 49 |
+
scores).
|
| 50 |
+
|
| 51 |
+
---
|
| 52 |
+
|
| 53 |
+
## 1. Background and motivation
|
| 54 |
+
|
| 55 |
+
The predecessor study (*Gemma 4 MTP Quality–Throughput Study*, 2026-08-09,
|
| 56 |
+
same GPU) measured multi-token-prediction speed/quality trade-offs with
|
| 57 |
+
both models already in QAT Q4_0 form, leaving the value of QAT itself
|
| 58 |
+
unmeasured. Separately, the same day as this study, the local MMV-Medium
|
| 59 |
+
governance release (MMV-M-RC3.3) underwent a model-binding update from the
|
| 60 |
+
PTQ `gemma4:12b` to the QAT `gemma4:26b-a4b-it-qat` on head-to-head
|
| 61 |
+
evidence in which regime and model were deliberately confounded
|
| 62 |
+
(production binding vs. candidate binding). This study completes the
|
| 63 |
+
missing cells: the anti-diagonal (12B QAT, 26B PTQ) of the resulting 2×2.
|
| 64 |
+
Two of the four cells (12B-PTQ, 26B-QAT) are therefore **reused** from
|
| 65 |
+
that production head-to-head (disclosed further in §3); the anti-diagonal
|
| 66 |
+
cells are the independent addition.
|
| 67 |
+
|
| 68 |
+
Vendor documentation claims QAT Q4 models retain near-full-precision
|
| 69 |
+
quality where naive PTQ degrades (see `LITERATURE_SEARCH.md` in this package). Published
|
| 70 |
+
comparisons, however, measure general knowledge/reasoning benchmarks on
|
| 71 |
+
raw models. In the searches we ran (shallow, links-and-abstracts level —
|
| 72 |
+
see the literature file's own caveat) we found no prior measurement of
|
| 73 |
+
(a) QAT-vs-PTQ deltas on routing/abstention-style decisions under a
|
| 74 |
+
governance stack, (b) the same contrast at two scales in a paired
|
| 75 |
+
same-task design, or (c) regime-to-regime exact-output divergence at
|
| 76 |
+
temperature 0. We do not claim novelty for the general QAT-beats-PTQ
|
| 77 |
+
direction, and we flag (c) as plausibly adjacent to community regression
|
| 78 |
+
reports on cross-quantization output changes.
|
| 79 |
+
|
| 80 |
+
## 2. Design
|
| 81 |
+
|
| 82 |
+
2×2 factorial, one variable per axis as far as the released artifacts allow:
|
| 83 |
+
|
| 84 |
+
| | PTQ (Q4_K_M) | QAT (Q4_0) |
|
| 85 |
+
|---|---|---|
|
| 86 |
+
| **12B dense** | `gemma4:12b` (11.9B, emb 3840) | `gemma4:12b-it-qat` (11.9B, emb 3840) |
|
| 87 |
+
| **26B MoE** | `gemma4:26b` (25.8B, emb 2816) | `gemma4:26b-a4b-it-qat` (25.2B, ~4B active, emb 2816) |
|
| 88 |
+
|
| 89 |
+
- The **12B pair is the clean contrast**: identical parameter count and
|
| 90 |
+
embedding width; the artifacts differ only in quantization recipe.
|
| 91 |
+
- The **26B pair is a quasi-contrast**: the released artifacts report
|
| 92 |
+
25.8B vs 25.2B parameters, so a base-revision difference cannot be
|
| 93 |
+
excluded. Moreover, Ollama metadata does not expose expert structure,
|
| 94 |
+
so we cannot verify that the two 26B artifacts share the same MoE
|
| 95 |
+
configuration (an earlier harness profile note describes `gemma4:26b`
|
| 96 |
+
as ~3.8B-active, vs ~4B for the QAT artifact). Findings attributed to
|
| 97 |
+
"regime" on the 26B side are strictly findings about the released
|
| 98 |
+
artifact pair.
|
| 99 |
+
|
| 100 |
+
Constant across all eight primary runs: the MMV Large RC3.3 v3.1
|
| 101 |
+
governance stack (route_transformer + post_validator + force_reanchor_v2)
|
| 102 |
+
applied bit-identically; `think: false`; temperature 0.0; max_tokens 1024;
|
| 103 |
+
one GPU; sequential execution; same Ollama build; same suite and label
|
| 104 |
+
files (SHA-256 pinned in `ENVIRONMENT.md`).
|
| 105 |
+
|
| 106 |
+
**The one regime-correlated configuration difference, and its control.**
|
| 107 |
+
The two Q4_0 QAT profiles pin `num_ctx: 8192` because their Modelfiles
|
| 108 |
+
declare a 262,144-token context whose KV allocation fails on a 16 GB card;
|
| 109 |
+
the PTQ profiles run at the Ollama default context. Since this difference
|
| 110 |
+
tracks the regime axis exactly, we ran a direct control: the 12B-PTQ
|
| 111 |
+
Smoke-100 suite re-run with `num_ctx: 8192` produced **100/100
|
| 112 |
+
byte-identical** outputs versus its default-context run. Within this
|
| 113 |
+
study's prompt lengths, `num_ctx` is load feasibility, not behavior. (The
|
| 114 |
+
control was run on the 12B cell only; we extrapolate it to the 26B pair.)
|
| 115 |
+
|
| 116 |
+
## 3. Tasks, metrics, and statistics
|
| 117 |
+
|
| 118 |
+
**Suites.** OPERATE-FR Smoke-100 (N=100) and Core-500 candidate (N=500, a
|
| 119 |
+
controlled 5× neutral prompt-frame expansion of Smoke-100: **100 base
|
| 120 |
+
stems × 5 paraphrase variants**, preserving the family distribution:
|
| 121 |
+
volatile_current 175, stable_control 125, stale_premise_trap 75,
|
| 122 |
+
date_boundary 50, query_neutrality 50, ambiguous_time_frame 25). Tasks
|
| 123 |
+
probe *whether answering is warranted and in what mode* (verify,
|
| 124 |
+
date-bound answer, re-anchor, abstain), classified by the harness's
|
| 125 |
+
transparent rule-based detector. Because Core-500 tasks are paraphrase
|
| 126 |
+
clusters, its 500 rows are **not independent observations**; statistics
|
| 127 |
+
below address this explicitly.
|
| 128 |
+
|
| 129 |
+
**Primary metric.** Route correctness (classified route ∈ allowed routes),
|
| 130 |
+
recomputed from row-level results by the deposited analysis script, which
|
| 131 |
+
also derives per-family tables from the suites' authoritative `family`
|
| 132 |
+
fields. Exception: the safety-rate metrics (stale commitment, unsupported
|
| 133 |
+
current claim, over-verification) are quoted from the harness scorer's
|
| 134 |
+
summary outputs, which are archived alongside the raw rows.
|
| 135 |
+
|
| 136 |
+
**Statistics.** Within-model regime effect: two-sided exact McNemar on
|
| 137 |
+
paired same-task outcomes (the "exact" binomial computation is exact only
|
| 138 |
+
under an independence assumption that paraphrase clustering violates;
|
| 139 |
+
treat those p-values as approximate and anti-conservative). Interaction:
|
| 140 |
+
delta-of-deltas on Core-500 with a **stem-clustered bootstrap** (resample
|
| 141 |
+
the 100 stems, 10,000 resamples, seed 20260810) as the primary interval,
|
| 142 |
+
and a naive task-iid bootstrap reported for comparison. Determinism
|
| 143 |
+
baseline: same-configuration Smoke-100 repeats of **all four cells**.
|
| 144 |
+
|
| 145 |
+
**Provenance and timeline (JST).** No preregistration exists; the 2×2
|
| 146 |
+
design and the interaction endpoint were specified before the
|
| 147 |
+
anti-diagonal cells ran, but analysis details were fixed at analysis time
|
| 148 |
+
— treat every inferential statement as exploratory. 2026-08-10 early-to-mid
|
| 149 |
+
afternoon: 12B-PTQ and 26B-QAT cells (reused from the same-day MMV-M
|
| 150 |
+
production head-to-head; superseded earlier runs of the same PTQ cells
|
| 151 |
+
from 2026-05/06 score equal or lower, so no favorable-selection is
|
| 152 |
+
present). Evening: 12B-QAT and 26B-PTQ cells, then 12B repeats. Late
|
| 153 |
+
night into 2026-08-11: 26B repeats and the `num_ctx` control. All 13 runs
|
| 154 |
+
(8 primary + 4 repeats + 1 control = 2,900 rows) completed with **0
|
| 155 |
+
errored rows**.
|
| 156 |
+
|
| 157 |
+
## 4. Results
|
| 158 |
+
|
| 159 |
+
### 4.1 Cell aggregates (Core-500, N=500)
|
| 160 |
+
|
| 161 |
+
| cell | route_correctness | preferred_match | mean latency (ms) | mean resp. chars |
|
| 162 |
+
|---|---:|---:|---:|---:|
|
| 163 |
+
| 12B PTQ | **0.760** | 0.544 | 2,482 | 751 |
|
| 164 |
+
| 12B QAT | 0.748 | 0.542 | 2,626 | 834 |
|
| 165 |
+
| 26B PTQ | 0.738 | 0.540 | 3,252 † | 875 |
|
| 166 |
+
| 26B QAT | 0.756 | 0.540 | **1,613** | 899 |
|
| 167 |
+
|
| 168 |
+
† 26B PTQ (17 GB on disk) runs with a ~26/74 CPU/GPU split on the 16 GB
|
| 169 |
+
card; its latency reflects offload, not model properties, and is excluded
|
| 170 |
+
from all conclusions. Smoke-100 aggregates: 0.88 / 0.86 / 0.83 / 0.86 —
|
| 171 |
+
same direction, with the two QAT cells tied.
|
| 172 |
+
|
| 173 |
+
The Core-500 spread is 0.022 (11 tasks of 500). We ran **no equivalence
|
| 174 |
+
test**, so "the cells are tied" is not a supported claim; indeed the one
|
| 175 |
+
within-regime cross-model contrast, 12B-PTQ vs 26B-PTQ, is nominally
|
| 176 |
+
significant (17 vs 6 discordant, exact McNemar p=0.035, uncorrected).
|
| 177 |
+
What the aggregates do show is that no cell separates by a margin of
|
| 178 |
+
operational consequence on this suite.
|
| 179 |
+
|
| 180 |
+
Safety-critical rates (stale commitment, unsupported current claim,
|
| 181 |
+
over-verification on stable controls): **0.000 in seven of eight runs**;
|
| 182 |
+
the 26B-PTQ Core-500 run logged one over-verification event (0.008 =
|
| 183 |
+
1/125 stable controls, consistent with its 0.976 stable_control entry in
|
| 184 |
+
§4.4). With events this rare, the data bound rather than establish
|
| 185 |
+
regime-invariance: by the rule of three, each run's 95% upper bound is
|
| 186 |
+
≈0.6–2.4 % depending on the denominator.
|
| 187 |
+
|
| 188 |
+
### 4.2 Paired regime effect within model
|
| 189 |
+
|
| 190 |
+
| suite | pair | QAT-only correct | PTQ-only correct | Δ (QAT−PTQ) | McNemar p |
|
| 191 |
+
|---|---|---:|---:|---:|---:|
|
| 192 |
+
| Core-500 | 12B dense | 1 | 7 | **−0.012** | 0.0703 |
|
| 193 |
+
| Core-500 | 26B MoE | 15 | 6 | **+0.018** | 0.0784 |
|
| 194 |
+
| Smoke-100 | 12B dense | 0 | 2 | −0.020 | 0.50 |
|
| 195 |
+
| Smoke-100 | 26B MoE | 5 | 2 | +0.030 | 0.4531 |
|
| 196 |
+
|
| 197 |
+
Neither within-model effect reaches p<0.05, but both sit near the margin
|
| 198 |
+
**with opposite signs**, and the smaller Smoke-100 suite points the same
|
| 199 |
+
way in both pairs. The discordant tasks cluster by stem (the 12B pair's 8
|
| 200 |
+
discordants come from 5 stems), which is one reason these p-values should
|
| 201 |
+
be read as approximate (§3).
|
| 202 |
+
|
| 203 |
+
### 4.3 The interaction is the finding — exploratory, but robust to clustering
|
| 204 |
+
|
| 205 |
+
Delta-of-deltas (26B effect − 12B effect) on Core-500: **+0.030**.
|
| 206 |
+
Primary stem-clustered bootstrap 95% CI: **[+0.010, +0.052]**; naive
|
| 207 |
+
task-iid CI: [+0.008, +0.052]. Both exclude zero. This is a single-run,
|
| 208 |
+
non-preregistered endpoint computed alongside four within-model tests and
|
| 209 |
+
a family decomposition, with no multiplicity correction — we label it an
|
| 210 |
+
exploratory finding that survived a clustering-robust re-analysis, not a
|
| 211 |
+
confirmed effect. On this stack, QAT helps the released MoE pair and
|
| 212 |
+
mildly hurts the clean dense pair; the two effects cancel almost exactly
|
| 213 |
+
in any aggregate that averages over models.
|
| 214 |
+
|
| 215 |
+
### 4.4 Family decomposition: a crossed pattern in volatile_current
|
| 216 |
+
|
| 217 |
+
Core-500 route correctness by family (from the suites' authoritative
|
| 218 |
+
family fields; reproduced by the deposited script):
|
| 219 |
+
|
| 220 |
+
| family | n | 12B PTQ | 12B QAT | 26B PTQ | 26B QAT |
|
| 221 |
+
|---|---:|---:|---:|---:|---:|
|
| 222 |
+
| volatile_current | 175 | **0.5314** | 0.4971 | 0.4971 | **0.5314** |
|
| 223 |
+
| ambiguous_time_frame | 25 | 0.560 | 0.600 | 0.480 | 0.600 |
|
| 224 |
+
| date_boundary | 50 | 0.660 | 0.640 | 0.600 | 0.580 |
|
| 225 |
+
| stale_premise_trap | 75 | 0.9467 | 0.9467 | 0.9600 | 0.9600 |
|
| 226 |
+
| stable_control | 125 | 0.984 | 0.984 | 0.976 | 0.984 |
|
| 227 |
+
| query_neutrality | 50 | 0.920 | 0.920 | 0.920 | 0.920 |
|
| 228 |
+
|
| 229 |
+
The interaction concentrates in **volatile_current** (the family that
|
| 230 |
+
decides whether a currency-sensitive question deserves verification or a
|
| 231 |
+
dated hedge), where the four cells form a crossed pattern: the dense pair
|
| 232 |
+
loses under QAT where the MoE pair gains. That the crossed rates land on
|
| 233 |
+
numerically identical values (93↔87 correct of 175) is a coincidence of
|
| 234 |
+
small discordant counts and carries no inferential content; no test is
|
| 235 |
+
attached to this table. Easy families (stale_premise, stable, neutrality)
|
| 236 |
+
are regime-invariant here; date_boundary drifts −0.02 under QAT in both
|
| 237 |
+
pairs (n=50, descriptive only) — directionally consistent with the
|
| 238 |
+
date_boundary watch item recorded in the same-day production
|
| 239 |
+
binding-update freeze note (an internal record; noted for continuity, not
|
| 240 |
+
as independent evidence).
|
| 241 |
+
|
| 242 |
+
### 4.5 Regime is a behavioral change: exact-output divergence
|
| 243 |
+
|
| 244 |
+
Byte-identical same-task responses across regimes at temperature 0:
|
| 245 |
+
|
| 246 |
+
| suite | pair | exact match | rate | median first divergence (chars) |
|
| 247 |
+
|---|---|---:|---:|---:|
|
| 248 |
+
| Core-500 | 12B | 148/500 | 29.6 % | 73 |
|
| 249 |
+
| Core-500 | 26B | 116/500 | 23.2 % | 69 |
|
| 250 |
+
| Smoke-100 | 12B | 32/100 | 32.0 % | 46 |
|
| 251 |
+
| Smoke-100 | 26B | 27/100 | 27.0 % | 57 |
|
| 252 |
+
|
| 253 |
+
Against this, the same-configuration Smoke-100 repeat baseline is
|
| 254 |
+
**100/100 byte-identical in all four cells** — including the
|
| 255 |
+
CPU-offloaded 26B-PTQ cell, and with repeats separated from their base
|
| 256 |
+
runs by 8–10 hours (crossing run windows and, for the 26B cells, a date
|
| 257 |
+
boundary). The runtime is run-to-run deterministic here, so the
|
| 258 |
+
cross-regime divergence on Smoke-100 is attributable to the weights (plus,
|
| 259 |
+
for the 26B pair, the systematic compute-path difference — see §6.3). No
|
| 260 |
+
Core-500 repeats were run; the attribution extends to Core-500 rows by
|
| 261 |
+
inference from the Smoke-100 baselines, not by direct measurement.
|
| 262 |
+
Quantization regime changes *what the model says* in 68–77 % of governed
|
| 263 |
+
responses even while leaving *how often it is right* within ≈2 points —
|
| 264 |
+
the same dissociation between string reproducibility and objective
|
| 265 |
+
quality that the predecessor MTP study reported for speculative decoding,
|
| 266 |
+
now shown for quantization recipes. Practical corollary: hash-based
|
| 267 |
+
output caching, audit replay, or golden-file tests do **not** survive a
|
| 268 |
+
quantization-regime swap, even at temperature 0.
|
| 269 |
+
|
| 270 |
+
## 5. Discussion
|
| 271 |
+
|
| 272 |
+
**The QAT premium is pair-conditional here, not scalar.** Vendor framing
|
| 273 |
+
("QAT preserves quality") treats the QAT benefit as a property of the
|
| 274 |
+
recipe. On governed routing tasks we find a signed interaction: ≈+2
|
| 275 |
+
points (Core-500) for the released MoE pair, ≈−1 point for the clean
|
| 276 |
+
dense pair. Three mechanisms are compatible with the data and not
|
| 277 |
+
separable by this design: (i) 4-bit noise interacts differently with
|
| 278 |
+
expert routing than with dense activations; (ii) the 26B released pair
|
| 279 |
+
differs by more than regime (possible base revision, unverifiable expert
|
| 280 |
+
configuration), so part of the 26B gain may be base improvement; (iii)
|
| 281 |
+
the 26B-PTQ cell ran partially on CPU, so kernel-numerics differences are
|
| 282 |
+
regime-correlated on that side. The 12B side carries none of these
|
| 283 |
+
confounds — its artifacts are same-base, its cells all-GPU, and the
|
| 284 |
+
`num_ctx` difference is controlled to byte-identity — and on that clean
|
| 285 |
+
pair, QAT bought **nothing** on these tasks (directionally, it cost ≈1
|
| 286 |
+
point at p=0.07).
|
| 287 |
+
|
| 288 |
+
**Aggregates hide the effect.** The four Core-500 cell scores span 0.022.
|
| 289 |
+
Only the paired-and-crossed design exposes the structure. This is a
|
| 290 |
+
caution for model-selection practice: aggregate "quality parity"
|
| 291 |
+
verdicts can conceal offsetting family-level and pair-level shifts.
|
| 292 |
+
|
| 293 |
+
**Operational reading (inference, not test result).** Two of the four
|
| 294 |
+
cells are the same runs that motivated the same-day production
|
| 295 |
+
model-binding decision, so using this study to "validate" that decision
|
| 296 |
+
is partially circular; the independent evidence is the anti-diagonal.
|
| 297 |
+
With that caveat: the QAT 26B artifact remains the best-or-tied cell on
|
| 298 |
+
the two hardest families while being the fastest memory-fitting cell,
|
| 299 |
+
and the clean-pair result gives no reason to move the dense-tier
|
| 300 |
+
rollback binding off PTQ `gemma4:12b`.
|
| 301 |
+
|
| 302 |
+
## 6. Threats to validity
|
| 303 |
+
|
| 304 |
+
1. **26B pair purity.** 25.8B vs 25.2B released artifacts; unverifiable
|
| 305 |
+
expert configuration; regime, base revision, and MoE structure are
|
| 306 |
+
confounded on that side. The headline survives only under the reading
|
| 307 |
+
"released artifact pairs" — which is the operationally relevant one,
|
| 308 |
+
and the reading used throughout this paper.
|
| 309 |
+
2. **Paraphrase clustering.** Core-500 is 100 stems × 5 paraphrases;
|
| 310 |
+
McNemar "exact" p-values assume independence and are anti-conservative;
|
| 311 |
+
the interaction CI is therefore reported stem-clustered as primary.
|
| 312 |
+
Effective sample size is nearer 100 than 500.
|
| 313 |
+
3. **Compute-path and window confounds (26B side).** 26B-PTQ ran ~26/74
|
| 314 |
+
CPU/GPU; CPU-vs-GPU numerics differ systematically, and the 26B cells
|
| 315 |
+
ran in different windows. Repeats (100/100 across windows, including
|
| 316 |
+
the offloaded cell) rule out run-to-run nondeterminism, but a
|
| 317 |
+
systematic offload contribution to the 26B regime effect and
|
| 318 |
+
divergence rows cannot be excluded.
|
| 319 |
+
4. **Exploratory statistics.** No preregistration; ≥5 inferential
|
| 320 |
+
quantities computed; no multiplicity correction; single run per cell.
|
| 321 |
+
5. **One stack, one GPU, one runtime.** Ollama 0.30.6, one governance
|
| 322 |
+
stack, rule-based route classification, routing tasks only.
|
| 323 |
+
Generalization to other runtimes, stacks, or answer-content quality is
|
| 324 |
+
unmeasured. The `num_ctx` control was run on the 12B cell only.
|
| 325 |
+
6. **Family attribution.** date_boundary/ambiguous cells have n=50/25;
|
| 326 |
+
their drifts are descriptive only.
|
| 327 |
+
7. **Contamination.** Public Gemma weights; suite prompts are local and
|
| 328 |
+
unpublished at run time, but no training-corpus audit exists.
|
| 329 |
+
|
| 330 |
+
## 7. Reproducibility
|
| 331 |
+
|
| 332 |
+
`REPRODUCE.md` gives the exact commands. Environment, model digests, and
|
| 333 |
+
suite/label SHA-256 hashes: `ENVIRONMENT.md`. Row-level results
|
| 334 |
+
(13 runs, 2,900 rows, 0 errored) are retained in the private study
|
| 335 |
+
archive and identified by SHA-256; the public package ships processed
|
| 336 |
+
tables and the deterministic analysis script (seed 20260810) that
|
| 337 |
+
recomputes every routing statistic in this paper — including the §4.4
|
| 338 |
+
family table — from row level. The safety rates in §4.1 are quoted from
|
| 339 |
+
the harness scorer's archived summary outputs.
|
| 340 |
+
|
| 341 |
+
## 8. Conclusion
|
| 342 |
+
|
| 343 |
+
On a fixed governance stack and consumer GPU, quantization regime moved
|
| 344 |
+
governed-routing quality by at most ≈±2 points within a released pair —
|
| 345 |
+
below per-pair significance, but with a clustering-robust, family-
|
| 346 |
+
concentrated, oppositely-signed interaction across the two pairs — and it
|
| 347 |
+
moved the *bytes* of 68–77 % of temperature-0 outputs. Choose regimes per
|
| 348 |
+
released artifact pair and per task family, not by recipe reputation;
|
| 349 |
+
and treat any quantization swap as a behavioral migration, not a drop-in.
|
PUBLIC_MANIFEST.sha256
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
26e5206197e0e4d3fd766d8827593a4e44562d1860395f1067164e93a49302e8 CITATION.cff
|
| 2 |
+
c0833ff62b248c73b4393a04f87f16d341c635c003cf455e30d7ef4728529de1 CLAIMS_MATRIX.md
|
| 3 |
+
296f15d12f033951677e8054c3239b38206420927882e248c367b95538f026f6 ENVIRONMENT.md
|
| 4 |
+
eda0d8b13e38fad113251467460b52eb8dc06d417ab799d08dbcefae17c8063a ETHICS_AND_DISCLOSURE.md
|
| 5 |
+
0f7e90cd3f70c1fe22ef80b06cea0ef450f9b0ab762e1273ed6b3d03c532fe13 EXECUTIVE_SUMMARY.md
|
| 6 |
+
cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 LICENSE-CODE
|
| 7 |
+
dc22320360909705c84b359968bf5e12873bd10d5cc1cef8ae5287b54a6725c4 LICENSE-PAPER-DATA.md
|
| 8 |
+
dd55a0f65f24543d2340fdb9b126960c4f83df6e512ca98e47730d30bb3e1637 LICENSE.md
|
| 9 |
+
0c805ef7c3a987dec837abc2d5a17f342cb027023566d0df6fe383d8a10629f2 LITERATURE_SEARCH.md
|
| 10 |
+
bb7ef7157df8df440393a826f4c291f88ea99c781ace2553dc47738399fa54bf NOTICE
|
| 11 |
+
37c80790837ce0979b08825087feb004504fe8613dcb2bd32e5133e9a05ac0ce PAPER.md
|
| 12 |
+
70df33df0ed84c712a5f46faa202a07a7de4f7af66f2a74b8dd92c7bba516f63 PUBLIC_RELEASE_METADATA.json
|
| 13 |
+
9411cd7f42bd5416304a0fc21577fd5046cdf880adbf9a8bedf547e89a02597b README.md
|
| 14 |
+
124c993a94cb9dc0bd7038678b0a0d033c18bcc6d52ff7c6f2a2be4b1d3981db REPRODUCE.md
|
| 15 |
+
54432e7e6c03801f67774e233df80652a25021e464ef0b0f0b4f7d318bba9b3b THIRD_PARTY_DATA_LICENSES.md
|
| 16 |
+
297ffaca8bd5ebac411cd6f1f6d5c9b5a02910cc324522ced24acc46012538b5 analysis/analyze_2x2.py
|
| 17 |
+
55aeaf1e4dc1f187bda3889bd18cb22f1f5a01fb07950f3d0135c3a22a23e910 data/RAW_ARTIFACT_HASHES.sha256
|
| 18 |
+
3aec5443177782fb8afef7b346b7c4b2cf1f52ef67b7c45a276f44175c41ce0f data/analysis_summary.json
|
| 19 |
+
6931cf18c73da2e0d64f1c7ab453a04a3cc19fa1ac5a25a6b6af0afcc8334009 data/cell_metrics.csv
|
| 20 |
+
cb07316e040d7942dceeaaa872fb2886fb7f2717e706fae948be65731766cc17 data/family_rates.csv
|
| 21 |
+
d27bcfafa4116ea6d0620ba3b1a85b90c2d5b997a766ab5c43755842e360882b data/paired_quant_effect.csv
|
| 22 |
+
ebf903b82a19c32b3adcac248f5b330eebd7bde0e10f38c64efdccbde8e58648 data/regime_output_divergence.csv
|
PUBLIC_RELEASE_METADATA.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "gemma4-quant-regime-study",
|
| 3 |
+
"version": "1.0.1",
|
| 4 |
+
"released": "2026-08-11",
|
| 5 |
+
"series": "sequel to gemma4-mtp-quality-study (DOI 10.5281/zenodo.21860461)",
|
| 6 |
+
"public_boundary": "verbatim prompts, generated outputs, raw row-level records, and local paths excluded; identified by SHA-256",
|
| 7 |
+
"runs": {
|
| 8 |
+
"suites": [
|
| 9 |
+
"smoke100",
|
| 10 |
+
"core500_candidate"
|
| 11 |
+
],
|
| 12 |
+
"cells": 4,
|
| 13 |
+
"primary_runs": 8,
|
| 14 |
+
"repeat_runs": 4,
|
| 15 |
+
"control_runs": 1,
|
| 16 |
+
"rows": 2900,
|
| 17 |
+
"errored": 0
|
| 18 |
+
},
|
| 19 |
+
"headline": {
|
| 20 |
+
"interaction_delta_of_deltas": 0.03,
|
| 21 |
+
"ci95_stem_clustered": [
|
| 22 |
+
0.01,
|
| 23 |
+
0.052
|
| 24 |
+
],
|
| 25 |
+
"ci95_task_iid": [
|
| 26 |
+
0.008,
|
| 27 |
+
0.052
|
| 28 |
+
],
|
| 29 |
+
"cross_regime_exact_match_rate": [
|
| 30 |
+
0.232,
|
| 31 |
+
0.32
|
| 32 |
+
],
|
| 33 |
+
"repeat_determinism": "100/100 x4 cells (Smoke-100)",
|
| 34 |
+
"num_ctx_control": "100/100 byte-identical (12B PTQ)"
|
| 35 |
+
},
|
| 36 |
+
"review": "3 independent adversarial reviewers (statistics / consistency / scope), 2026-08-10; all MAJOR findings remediated in v1.0.1"
|
| 37 |
+
}
|
README.md
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: cc-by-4.0
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
tags:
|
| 6 |
+
- gemma
|
| 7 |
+
- quantization
|
| 8 |
+
- qat
|
| 9 |
+
- benchmark
|
| 10 |
+
- reproducibility
|
| 11 |
+
- llm-governance
|
| 12 |
+
- routing
|
| 13 |
+
pretty_name: Gemma 4 Quantization-Regime Study (QAT Q4_0 vs PTQ Q4_K_M)
|
| 14 |
+
size_categories:
|
| 15 |
+
- n<1K
|
| 16 |
+
---
|
| 17 |
+
|
| 18 |
+
# Gemma 4 Quantization-Regime Study (QAT Q4_0 vs PTQ Q4_K_M)
|
| 19 |
+
|
| 20 |
+
A same-day 2×2 study (quantization regime × released model pair) of
|
| 21 |
+
governed routing quality for Gemma 4 12B IT (dense; a clean same-base
|
| 22 |
+
pair) and a 26B-class MoE released pair on one RTX 5070 Ti, run under a
|
| 23 |
+
fixed, bit-identical governance stack via Ollama.
|
| 24 |
+
Companion/sequel to the *Gemma 4 MTP Quality–Throughput Study* (2026-08-09,
|
| 25 |
+
DOI 10.5281/zenodo.21860461).
|
| 26 |
+
|
| 27 |
+
Author: Taiko Toeda, Independent Researcher
|
| 28 |
+
ORCID: https://orcid.org/0009-0001-7267-0201
|
| 29 |
+
Version: 1.0.1
|
| 30 |
+
DOI: [10.5281/zenodo.21875513](https://doi.org/10.5281/zenodo.21875513) (published 2026-08-11)
|
| 31 |
+
|
| 32 |
+
## Result boundary
|
| 33 |
+
|
| 34 |
+
Aggregate route correctness spanned 0.738–0.760 on Core-500 (N=500 rows =
|
| 35 |
+
100 paraphrase stems × 5); no equivalence test was run, and one
|
| 36 |
+
cross-model contrast (12B-PTQ vs 26B-PTQ) is nominally significant
|
| 37 |
+
(p=0.035). The within-pair regime effects were individually marginal and
|
| 38 |
+
oppositely signed — QAT −0.012 on the dense 12B (McNemar p=0.070) and
|
| 39 |
+
+0.018 on the 26B released pair (p=0.078) — and the regime × pair
|
| 40 |
+
interaction, an exploratory single-run endpoint, was +0.030 with a
|
| 41 |
+
stem-clustered bootstrap 95% CI of [+0.010, +0.052] (task-iid CI
|
| 42 |
+
[+0.008, +0.052]), concentrated in the volatile-current task family
|
| 43 |
+
(crossed pattern). Cross-regime byte-identity of temperature-0 outputs
|
| 44 |
+
was only 23–32 %, against same-configuration Smoke-100 repeats of
|
| 45 |
+
100/100 in all four cells (including the CPU-offloaded 26B-PTQ cell,
|
| 46 |
+
across run windows) and a 100/100 `num_ctx` byte-identity control.
|
| 47 |
+
Safety-critical failure rates were 0.000 in seven of eight runs, with a
|
| 48 |
+
single over-verification event (0.008) in 26B-PTQ Core-500.
|
| 49 |
+
|
| 50 |
+
These results apply only to the measured GPU, runtime (Ollama 0.30.6),
|
| 51 |
+
the released model artifacts named in `ENVIRONMENT.md`, one governance
|
| 52 |
+
stack, and routing/abstention-style tasks. The 26B released pair
|
| 53 |
+
confounds regime with a possible base revision (25.8B vs 25.2B), an
|
| 54 |
+
expert configuration unverifiable from runtime metadata, and a
|
| 55 |
+
CPU-offload compute path; only the 12B pair is a clean same-base,
|
| 56 |
+
all-GPU contrast. All inferential results are exploratory (no
|
| 57 |
+
preregistration, single run per cell, no multiplicity correction). See
|
| 58 |
+
`CLAIMS_MATRIX.md` before reusing any claim.
|
| 59 |
+
|
| 60 |
+
## Public artifact boundary
|
| 61 |
+
|
| 62 |
+
This public package excludes verbatim task prompts, generated output text,
|
| 63 |
+
raw row-level request records, local paths, and the private internal
|
| 64 |
+
archive. It retains the paper, processed measurements, per-family and
|
| 65 |
+
paired statistics, environment and model digests, the deterministic
|
| 66 |
+
analysis script, and SHA-256 hashes that identify every excluded raw
|
| 67 |
+
artifact (`data/RAW_ARTIFACT_HASHES.sha256`). The evaluation harness is
|
| 68 |
+
public at `github.com/mobius-style/mmv` (`operate-fr-bench/`); the
|
| 69 |
+
OPERATE-FR suite items themselves are project-local and identified by hash
|
| 70 |
+
in `ENVIRONMENT.md`.
|
| 71 |
+
|
| 72 |
+
## Layout
|
| 73 |
+
|
| 74 |
+
`PAPER.md` — full study. `EXECUTIVE_SUMMARY.md` — condensed findings.
|
| 75 |
+
`CLAIMS_MATRIX.md` — claim-by-claim evidence boundaries.
|
| 76 |
+
`REPRODUCE.md` — commands and artifact map. `ENVIRONMENT.md` — pinned
|
| 77 |
+
environment, model digests, suite hashes. `data/` — processed tables and
|
| 78 |
+
statistics. `analysis/` — deterministic analysis script (Apache-2.0).
|
| 79 |
+
Licensing: see `LICENSE.md` (split license).
|
REPRODUCE.md
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Reproduce
|
| 2 |
+
|
| 3 |
+
Environment, model digests, and suite/label SHA-256: `ENVIRONMENT.md`.
|
| 4 |
+
|
| 5 |
+
## Harness
|
| 6 |
+
|
| 7 |
+
Public at `github.com/mobius-style/mmv`, directory `operate-fr-bench/`
|
| 8 |
+
(AGPL-3.0). The four profiles used here (`gemma4_12b_…`,
|
| 9 |
+
`gemma4_12b_qat_…`, `gemma4_26b_…`, `gemma4_26b_a4b_qat_…`, all
|
| 10 |
+
`…route_transformer_plus_validator_v3_1`) share identical governance
|
| 11 |
+
flags; both Q4_0 profiles pin `extra.num_ctx: 8192` because their
|
| 12 |
+
Modelfiles declare a 262,144-token context whose KV allocation fails on a
|
| 13 |
+
16 GB card (load feasibility only — suite prompts are far below 8,192
|
| 14 |
+
tokens). `think: false` everywhere. Unload the previous model
|
| 15 |
+
(`ollama stop <tag>`) between cells; a resident sibling model causes CUDA
|
| 16 |
+
allocation failure.
|
| 17 |
+
|
| 18 |
+
## Models (Ollama tags)
|
| 19 |
+
|
| 20 |
+
`gemma4:12b` (PTQ Q4_K_M, 11.9B dense) · `gemma4:12b-it-qat` (QAT Q4_0,
|
| 21 |
+
11.9B dense) · `gemma4:26b` (PTQ Q4_K_M, 25.8B MoE) ·
|
| 22 |
+
`gemma4:26b-a4b-it-qat` (QAT Q4_0, 25.2B MoE, ~4B active). Content
|
| 23 |
+
digests in `ENVIRONMENT.md`.
|
| 24 |
+
|
| 25 |
+
## Runs (sequential, one cell at a time, from `operate-fr-bench/`)
|
| 26 |
+
|
| 27 |
+
```bash
|
| 28 |
+
python3 -m harness.run_eval --suite configs/suite_smoke.yaml --profile <PROFILE> --out reports/<CELL>.jsonl
|
| 29 |
+
python3 -m harness.score --results reports/<CELL>.jsonl --labels data/labels/smoke100_route_labels.jsonl --out reports/<CELL>_smoke_summary.json
|
| 30 |
+
python3 -m harness.run_eval --suite configs/suite_core500.yaml --profile <PROFILE> --out reports/<CELL>_core500.jsonl
|
| 31 |
+
python3 -m harness.score --results reports/<CELL>_core500.jsonl --labels data/labels/core500_route_labels.jsonl --out reports/<CELL>_core500_summary.json
|
| 32 |
+
```
|
| 33 |
+
|
| 34 |
+
Determinism baselines and controls: Smoke-100 repeats for **all four
|
| 35 |
+
cells** (12B same-day; 26B 8–10 h later across a date boundary; all
|
| 36 |
+
100/100 byte-identical, including the CPU-offloaded 26B-PTQ cell), plus a
|
| 37 |
+
`num_ctx: 8192` control re-run of the 12B-PTQ cell (100/100 byte-identical
|
| 38 |
+
vs default context).
|
| 39 |
+
|
| 40 |
+
## Suite availability
|
| 41 |
+
|
| 42 |
+
The OPERATE-FR Smoke-100 / Core-500-candidate items are project-local and
|
| 43 |
+
not redistributed (they are identified by SHA-256 in `ENVIRONMENT.md`).
|
| 44 |
+
Reproduction on the same items requires access to the private suite
|
| 45 |
+
archive; reproduction of the *design* on other routing suites requires
|
| 46 |
+
only the public harness.
|
| 47 |
+
|
| 48 |
+
## Analysis
|
| 49 |
+
|
| 50 |
+
```bash
|
| 51 |
+
OPFR_BENCH_ROOT=/path/to/operate-fr-bench python3 analysis/analyze_2x2.py
|
| 52 |
+
```
|
| 53 |
+
|
| 54 |
+
Deterministic (bootstrap seed 20260810; the interaction is reported with
|
| 55 |
+
a stem-clustered CI — primary, since Core-500 is 100 stems × 5
|
| 56 |
+
paraphrases — and a task-iid CI). Regenerates every routing table in
|
| 57 |
+
`data/` from row level, including the per-family table (families read
|
| 58 |
+
from the suites' authoritative `family` fields). The safety rates quoted
|
| 59 |
+
in the paper come from the harness scorer's summary outputs, archived
|
| 60 |
+
privately with the raw rows. Row-level artifacts (13 runs, 2,900 rows, 0
|
| 61 |
+
errored) are excluded from the public package (see `README.md`); their
|
| 62 |
+
SHA-256 hashes are in `data/RAW_ARTIFACT_HASHES.sha256`.
|
THIRD_PARTY_DATA_LICENSES.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Third-party data and code license inventory
|
| 2 |
+
|
| 3 |
+
Audit date: 2026-08-10. This study's third-party surface is small: no
|
| 4 |
+
third-party benchmark items are used (the OPERATE-FR suites are
|
| 5 |
+
project-authored), and no third-party source is vendored.
|
| 6 |
+
|
| 7 |
+
| Component | Exact experimental source | License basis | Redistributed here? | Public treatment |
|
| 8 |
+
|---|---|---|---|---|
|
| 9 |
+
| Gemma 4 12B IT / 12B IT QAT / 26B / 26B-A4B IT QAT weights | Ollama library tags pinned in `ENVIRONMENT.md` | Gemma Terms of Use (Google) | No | Tags + content digests only |
|
| 10 |
+
| Ollama runtime 0.30.6 | ollama.com install | MIT | No | Version pin only |
|
| 11 |
+
| operate-fr-bench harness | github.com/mobius-style/mmv (project-owned) | AGPL-3.0 | No (referenced) | Public upstream; profiles named in `REPRODUCE.md` |
|
| 12 |
+
| OPERATE-FR Smoke-100 / Core-500 suites | project-local (author-owned) | Author's own work, unpublished | No | SHA-256 hashes in `ENVIRONMENT.md` |
|
| 13 |
+
| Governance stack (route_transformer / post_validator / force_reanchor_v2) | part of the public mmv repository | AGPL-3.0 (project-owned) | No (referenced) | Named profiles, public upstream |
|
analysis/analyze_2x2.py
ADDED
|
@@ -0,0 +1,258 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""2x2 quantization-regime study analysis (QAT Q4_0 vs PTQ Q4_K_M
|
| 3 |
+
across Gemma 4 12B dense and 26B MoE, governance routing tasks).
|
| 4 |
+
|
| 5 |
+
Reads operate-fr-bench row-level results + labels + suite datasets
|
| 6 |
+
(authoritative per-task family and smoke-stem ids); writes CSVs and a JSON
|
| 7 |
+
summary into ../data/. All routing statistics are recomputed from row
|
| 8 |
+
level. Exception: the safety-rate metrics (stale_commitment,
|
| 9 |
+
unsupported_current_claim, over_verification) quoted in the paper come
|
| 10 |
+
from the harness scorer's *_summary.json outputs, not from this script.
|
| 11 |
+
"""
|
| 12 |
+
import csv
|
| 13 |
+
import json
|
| 14 |
+
import random
|
| 15 |
+
from math import comb
|
| 16 |
+
from pathlib import Path
|
| 17 |
+
|
| 18 |
+
import os
|
| 19 |
+
R = Path(os.environ.get("OPFR_BENCH_ROOT", ".")) # root of a local operate-fr-bench checkout with reports/
|
| 20 |
+
OUT = Path(os.environ.get("STUDY_DATA_OUT", Path(__file__).resolve().parent.parent / "data"))
|
| 21 |
+
OUT.mkdir(exist_ok=True)
|
| 22 |
+
|
| 23 |
+
CELLS = {
|
| 24 |
+
# (size, regime) -> {suite: results file}
|
| 25 |
+
("12B", "PTQ"): {
|
| 26 |
+
"smoke": "gemma4_12b_route_transformer_plus_validator_v3_1_rerun_2026-08-10.jsonl",
|
| 27 |
+
"core500": "gemma4_12b_core500_candidate_rerun_2026-08-10.jsonl",
|
| 28 |
+
},
|
| 29 |
+
("12B", "QAT"): {
|
| 30 |
+
"smoke": "gemma4_12b_qat_route_transformer_plus_validator_v3_1.jsonl",
|
| 31 |
+
"core500": "gemma4_12b_qat_core500_candidate.jsonl",
|
| 32 |
+
},
|
| 33 |
+
("26B", "PTQ"): {
|
| 34 |
+
"smoke": "gemma4_26b_route_transformer_plus_validator_v3_1_rerun_2026-08-10.jsonl",
|
| 35 |
+
"core500": "gemma4_26b_core500_candidate_rerun_2026-08-10.jsonl",
|
| 36 |
+
},
|
| 37 |
+
("26B", "QAT"): {
|
| 38 |
+
"smoke": "gemma4_26b_a4b_qat_route_transformer_plus_validator_v3_1.jsonl",
|
| 39 |
+
"core500": "gemma4_26b_a4b_qat_core500_candidate.jsonl",
|
| 40 |
+
},
|
| 41 |
+
}
|
| 42 |
+
LABELS = {
|
| 43 |
+
"smoke": "data/labels/smoke100_route_labels.jsonl",
|
| 44 |
+
"core500": "data/labels/core500_route_labels.jsonl",
|
| 45 |
+
}
|
| 46 |
+
DATASETS = { # authoritative per-task family + stem ids
|
| 47 |
+
"smoke": "data/smoke100.jsonl",
|
| 48 |
+
"core500": "data/core500.jsonl",
|
| 49 |
+
}
|
| 50 |
+
REPEATS = { # same-day second runs for ordinary-nondeterminism baseline
|
| 51 |
+
("12B", "PTQ"): "gemma4_12b_route_transformer_plus_validator_v3_1_repeat2.jsonl",
|
| 52 |
+
("12B", "QAT"): "gemma4_12b_qat_route_transformer_plus_validator_v3_1_repeat2.jsonl",
|
| 53 |
+
("26B", "QAT"): "gemma4_26b_a4b_qat_route_transformer_plus_validator_v3_1_repeat2.jsonl",
|
| 54 |
+
("26B", "PTQ"): "gemma4_26b_route_transformer_plus_validator_v3_1_repeat2.jsonl",
|
| 55 |
+
}
|
| 56 |
+
|
| 57 |
+
|
| 58 |
+
def load_labels(suite):
|
| 59 |
+
out = {}
|
| 60 |
+
for ln in open(R / LABELS[suite], encoding="utf-8"):
|
| 61 |
+
d = json.loads(ln)
|
| 62 |
+
out[d["task_id"]] = d
|
| 63 |
+
return out
|
| 64 |
+
|
| 65 |
+
|
| 66 |
+
def load_dataset_meta(suite):
|
| 67 |
+
"""Authoritative task metadata: family + smoke stem id (for clustering)."""
|
| 68 |
+
meta = {}
|
| 69 |
+
for ln in open(R / DATASETS[suite], encoding="utf-8"):
|
| 70 |
+
d = json.loads(ln)
|
| 71 |
+
meta[d["id"]] = {
|
| 72 |
+
"family": d["family"],
|
| 73 |
+
"stem": d.get("source_smoke100_id") or d["id"],
|
| 74 |
+
}
|
| 75 |
+
return meta
|
| 76 |
+
|
| 77 |
+
|
| 78 |
+
def load_cell(fname, suite):
|
| 79 |
+
rows = {}
|
| 80 |
+
p = R / "reports" / fname
|
| 81 |
+
for ln in open(p, encoding="utf-8"):
|
| 82 |
+
d = json.loads(ln)
|
| 83 |
+
rows[d["task_id"]] = d
|
| 84 |
+
return rows
|
| 85 |
+
|
| 86 |
+
|
| 87 |
+
def correct(row, lab):
|
| 88 |
+
return row["classified_route"] in lab["allowed_routes"]
|
| 89 |
+
|
| 90 |
+
|
| 91 |
+
def mcnemar_exact(n01, n10):
|
| 92 |
+
n = n01 + n10
|
| 93 |
+
if n == 0:
|
| 94 |
+
return 1.0
|
| 95 |
+
k = min(n01, n10)
|
| 96 |
+
p = sum(comb(n, i) for i in range(0, k + 1)) * 2 / 2 ** n
|
| 97 |
+
return min(1.0, p)
|
| 98 |
+
|
| 99 |
+
|
| 100 |
+
def main():
|
| 101 |
+
labels = {s: load_labels(s) for s in ("smoke", "core500")}
|
| 102 |
+
metas = {s: load_dataset_meta(s) for s in ("smoke", "core500")}
|
| 103 |
+
cells = {}
|
| 104 |
+
for key, files in CELLS.items():
|
| 105 |
+
cells[key] = {s: load_cell(f, s) for s, f in files.items()}
|
| 106 |
+
|
| 107 |
+
summary = {"cells": {}, "paired": {}, "interaction": {}, "divergence": {},
|
| 108 |
+
"repeats": {}}
|
| 109 |
+
|
| 110 |
+
# ── per-cell metrics ──
|
| 111 |
+
cell_csv = [["size", "regime", "suite", "n", "errored",
|
| 112 |
+
"route_correct", "rate", "preferred_match",
|
| 113 |
+
"mean_latency_ms", "mean_resp_chars"]]
|
| 114 |
+
fam_csv = [["size", "regime", "suite", "family", "n", "correct", "rate"]]
|
| 115 |
+
for (size, regime), suites in cells.items():
|
| 116 |
+
for suite, rows in suites.items():
|
| 117 |
+
lab = labels[suite]
|
| 118 |
+
ids = sorted(lab)
|
| 119 |
+
nerr = sum(1 for t in ids if rows[t].get("error"))
|
| 120 |
+
ncor = sum(1 for t in ids if correct(rows[t], lab[t]))
|
| 121 |
+
npref = sum(1 for t in ids
|
| 122 |
+
if rows[t]["classified_route"] == lab[t].get("preferred_route"))
|
| 123 |
+
lat = [rows[t].get("latency_ms") or 0 for t in ids]
|
| 124 |
+
rl = [len(rows[t].get("response_text") or "") for t in ids]
|
| 125 |
+
cell_csv.append([size, regime, suite, len(ids), nerr, ncor,
|
| 126 |
+
round(ncor / len(ids), 4), round(npref / len(ids), 4),
|
| 127 |
+
round(sum(lat) / len(lat), 1), round(sum(rl) / len(rl), 1)])
|
| 128 |
+
summary["cells"][f"{size}_{regime}_{suite}"] = {
|
| 129 |
+
"n": len(ids), "errored": nerr,
|
| 130 |
+
"route_correctness": round(ncor / len(ids), 4),
|
| 131 |
+
"preferred_match": round(npref / len(ids), 4),
|
| 132 |
+
"mean_latency_ms": round(sum(lat) / len(lat), 1),
|
| 133 |
+
}
|
| 134 |
+
meta = metas[suite]
|
| 135 |
+
fams = {}
|
| 136 |
+
for t in ids:
|
| 137 |
+
fams.setdefault(meta[t]["family"], []).append(t)
|
| 138 |
+
for f, tt in sorted(fams.items()):
|
| 139 |
+
c = sum(1 for t in tt if correct(rows[t], lab[t]))
|
| 140 |
+
fam_csv.append([size, regime, suite, f, len(tt), c,
|
| 141 |
+
round(c / len(tt), 4)])
|
| 142 |
+
|
| 143 |
+
# ── paired quant effect within size (core500 primary; smoke secondary) ──
|
| 144 |
+
paired_csv = [["suite", "size", "n_pairs", "qat_only_correct",
|
| 145 |
+
"ptq_only_correct", "delta_rate", "mcnemar_p"]]
|
| 146 |
+
deltas = {}
|
| 147 |
+
for suite in ("core500", "smoke"):
|
| 148 |
+
lab = labels[suite]
|
| 149 |
+
ids = sorted(lab)
|
| 150 |
+
for size in ("12B", "26B"):
|
| 151 |
+
q, p_ = cells[(size, "QAT")][suite], cells[(size, "PTQ")][suite]
|
| 152 |
+
n10 = sum(1 for t in ids if correct(q[t], lab[t]) and not correct(p_[t], lab[t]))
|
| 153 |
+
n01 = sum(1 for t in ids if correct(p_[t], lab[t]) and not correct(q[t], lab[t]))
|
| 154 |
+
delta = (n10 - n01) / len(ids)
|
| 155 |
+
pv = mcnemar_exact(n01, n10)
|
| 156 |
+
paired_csv.append([suite, size, len(ids), n10, n01,
|
| 157 |
+
round(delta, 4), round(pv, 4)])
|
| 158 |
+
summary["paired"][f"{suite}_{size}"] = {
|
| 159 |
+
"qat_only": n10, "ptq_only": n01,
|
| 160 |
+
"delta_rate": round(delta, 4), "mcnemar_p": round(pv, 4)}
|
| 161 |
+
if suite == "core500":
|
| 162 |
+
deltas[size] = [
|
| 163 |
+
(1 if correct(q[t], lab[t]) else 0) -
|
| 164 |
+
(1 if correct(p_[t], lab[t]) else 0) for t in ids]
|
| 165 |
+
|
| 166 |
+
# ── interaction (delta-of-deltas, task bootstrap, core500) ──
|
| 167 |
+
rng = random.Random(20260810)
|
| 168 |
+
obs = sum(deltas["26B"]) / len(deltas["26B"]) - sum(deltas["12B"]) / len(deltas["12B"])
|
| 169 |
+
n = len(deltas["12B"])
|
| 170 |
+
ids_c = sorted(labels["core500"])
|
| 171 |
+
boots = []
|
| 172 |
+
for _ in range(10000):
|
| 173 |
+
idx = [rng.randrange(n) for _ in range(n)]
|
| 174 |
+
boots.append((sum(deltas["26B"][i] for i in idx)
|
| 175 |
+
- sum(deltas["12B"][i] for i in idx)) / n)
|
| 176 |
+
boots.sort()
|
| 177 |
+
# stem-clustered bootstrap: Core-500 is 100 smoke stems x 5 paraphrase
|
| 178 |
+
# variants, so tasks are NOT independent. Resample the 100 stems.
|
| 179 |
+
meta_c = metas["core500"]
|
| 180 |
+
stems = {}
|
| 181 |
+
for i, t_ in enumerate(ids_c):
|
| 182 |
+
stems.setdefault(meta_c[t_]["stem"], []).append(i)
|
| 183 |
+
stem_keys = sorted(stems)
|
| 184 |
+
rng2 = random.Random(20260810)
|
| 185 |
+
cboots = []
|
| 186 |
+
for _ in range(10000):
|
| 187 |
+
picks = [stem_keys[rng2.randrange(len(stem_keys))] for _ in stem_keys]
|
| 188 |
+
tot26 = tot12 = cnt = 0
|
| 189 |
+
for s in picks:
|
| 190 |
+
for i in stems[s]:
|
| 191 |
+
tot26 += deltas["26B"][i]
|
| 192 |
+
tot12 += deltas["12B"][i]
|
| 193 |
+
cnt += 1
|
| 194 |
+
cboots.append((tot26 - tot12) / cnt)
|
| 195 |
+
cboots.sort()
|
| 196 |
+
summary["interaction"]["core500"] = {
|
| 197 |
+
"delta_of_deltas": round(obs, 4),
|
| 198 |
+
"ci95_task_iid": [round(boots[249], 4), round(boots[9749], 4)],
|
| 199 |
+
"ci95_stem_clustered": [round(cboots[249], 4), round(cboots[9749], 4)],
|
| 200 |
+
"n_stems": len(stem_keys),
|
| 201 |
+
"note": ("positive = QAT helps 26B more than 12B; stem-clustered CI "
|
| 202 |
+
"is primary (5x paraphrase dependence)"),
|
| 203 |
+
}
|
| 204 |
+
|
| 205 |
+
# ── exact-output divergence between regimes (same size, same task) ──
|
| 206 |
+
div_csv = [["suite", "size", "n", "exact_match", "rate",
|
| 207 |
+
"median_first_divergence_char"]]
|
| 208 |
+
for suite in ("core500", "smoke"):
|
| 209 |
+
lab = labels[suite]
|
| 210 |
+
ids = sorted(lab)
|
| 211 |
+
for size in ("12B", "26B"):
|
| 212 |
+
q, p_ = cells[(size, "QAT")][suite], cells[(size, "PTQ")][suite]
|
| 213 |
+
same = 0
|
| 214 |
+
first = []
|
| 215 |
+
for t in ids:
|
| 216 |
+
a = q[t].get("response_text") or ""
|
| 217 |
+
b = p_[t].get("response_text") or ""
|
| 218 |
+
if a == b:
|
| 219 |
+
same += 1
|
| 220 |
+
else:
|
| 221 |
+
k = next((i for i, (x, y) in enumerate(zip(a, b)) if x != y),
|
| 222 |
+
min(len(a), len(b)))
|
| 223 |
+
first.append(k)
|
| 224 |
+
first.sort()
|
| 225 |
+
med = first[len(first) // 2] if first else None
|
| 226 |
+
div_csv.append([suite, size, len(ids), same,
|
| 227 |
+
round(same / len(ids), 4), med])
|
| 228 |
+
summary["divergence"][f"{suite}_{size}"] = {
|
| 229 |
+
"exact_match": same, "rate": round(same / len(ids), 4),
|
| 230 |
+
"median_first_divergence_char": med}
|
| 231 |
+
|
| 232 |
+
# ── ordinary-nondeterminism baseline (same profile, same day, rerun) ──
|
| 233 |
+
for (size, regime), fname in REPEATS.items():
|
| 234 |
+
p = R / "reports" / fname
|
| 235 |
+
if not p.exists():
|
| 236 |
+
continue
|
| 237 |
+
rep = load_cell(fname, "smoke")
|
| 238 |
+
base = cells[(size, regime)]["smoke"]
|
| 239 |
+
lab = labels["smoke"]
|
| 240 |
+
same = sum(1 for t in sorted(lab)
|
| 241 |
+
if (rep[t].get("response_text") or "") ==
|
| 242 |
+
(base[t].get("response_text") or ""))
|
| 243 |
+
summary["repeats"][f"{size}_{regime}_smoke"] = {
|
| 244 |
+
"exact_match": same, "n": len(lab)}
|
| 245 |
+
|
| 246 |
+
for name, rows in [("cell_metrics.csv", cell_csv),
|
| 247 |
+
("family_rates.csv", fam_csv),
|
| 248 |
+
("paired_quant_effect.csv", paired_csv),
|
| 249 |
+
("regime_output_divergence.csv", div_csv)]:
|
| 250 |
+
with open(OUT / name, "w", newline="", encoding="utf-8") as fh:
|
| 251 |
+
csv.writer(fh).writerows(rows)
|
| 252 |
+
(OUT / "analysis_summary.json").write_text(
|
| 253 |
+
json.dumps(summary, indent=2, ensure_ascii=False), encoding="utf-8")
|
| 254 |
+
print(json.dumps(summary, indent=2, ensure_ascii=False))
|
| 255 |
+
|
| 256 |
+
|
| 257 |
+
if __name__ == "__main__":
|
| 258 |
+
main()
|
data/RAW_ARTIFACT_HASHES.sha256
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# SHA-256 of the private row-level artifacts (content not redistributed;
|
| 2 |
+
# verbatim task prompts and generated outputs are excluded from the public
|
| 3 |
+
# package by policy — see README.md 'Public artifact boundary')
|
| 4 |
+
b97b5663b65ed9f2a0bb96f15850c14b0e4adcf29445e59d98dd6bb912e147eb data/raw/ctx_control_12b.jsonl
|
| 5 |
+
34534f55a82b075dd0ee4422b8add300a42e2db53e2b7b48fd8d39053adefcf9 data/raw/gemma4_12b_core500_candidate_rerun_2026-08-10.jsonl
|
| 6 |
+
a297a0a3e4bc9255e0bd727c9910f45f2bc56e6d1440311ca23f42b6281c1951 data/raw/gemma4_12b_qat_core500_candidate.jsonl
|
| 7 |
+
bca0c680b94f2255bbdfdec3fe005a40c124784e7baf79b0ae6c36d53a8fc9eb data/raw/gemma4_12b_qat_route_transformer_plus_validator_v3_1.jsonl
|
| 8 |
+
87560e80d1dce7087a8cd38f51c48ca755f50aa8371603bfa1793d8c30d01b7e data/raw/gemma4_12b_qat_route_transformer_plus_validator_v3_1_repeat2.jsonl
|
| 9 |
+
e2544dd2bc90dfe77b051e0142a319de30be4c3b9b0dd1edeba8ee921def9bac data/raw/gemma4_12b_route_transformer_plus_validator_v3_1_repeat2.jsonl
|
| 10 |
+
b45f50f2b2f5acc38389dc1b890795752bf3bed2a6fc2a171658bd42aea6a360 data/raw/gemma4_12b_route_transformer_plus_validator_v3_1_rerun_2026-08-10.jsonl
|
| 11 |
+
3e095db83a7476c9a742f74e2bc4e3f86537906a41d2c61095c0d230c024293c data/raw/gemma4_26b_a4b_qat_core500_candidate.jsonl
|
| 12 |
+
a0c1b0c310d0caac13d8ad2bf69f69e72e6581297220ad60b951066187372fc4 data/raw/gemma4_26b_a4b_qat_route_transformer_plus_validator_v3_1.jsonl
|
| 13 |
+
fab281c1e921a87afa01f6c6770081eb7c439a08767dec980e8f5544d5de871c data/raw/gemma4_26b_a4b_qat_route_transformer_plus_validator_v3_1_repeat2.jsonl
|
| 14 |
+
cb0dd700e516ee749749ed621435dae2c4b5113aa36f18ca29618bac1634b527 data/raw/gemma4_26b_core500_candidate_rerun_2026-08-10.jsonl
|
| 15 |
+
bfb49dc3dc88ce360dee9302fa4de092ff0aeedee29d4e11ef6fffdf06d29eb4 data/raw/gemma4_26b_route_transformer_plus_validator_v3_1_repeat2.jsonl
|
| 16 |
+
ef52a5cf1cb6d59c3a7f71147c80ff901de402e232f446d6813e57a97baa4dcc data/raw/gemma4_26b_route_transformer_plus_validator_v3_1_rerun_2026-08-10.jsonl
|
| 17 |
+
39f5a30ee0ba10af0ac43ca72d588e2f19858e1c093b3c50b97a202a996cd306 data/raw/gemma4_12b_core500_candidate_rerun_2026-08-10_summary.json
|
| 18 |
+
a11d8531c9e83b8869b6b1a204e09e196f1b34bcb0f9a8ead057393aeedc87c7 data/raw/gemma4_12b_qat_core500_candidate_summary.json
|
| 19 |
+
4e4274c57f45499ef6c1c896de27d133dc977539de7f865a165d46cd32d07ce1 data/raw/gemma4_12b_qat_route_transformer_plus_validator_v3_1_summary.json
|
| 20 |
+
a207ab7bc877b2e7cad3fc8c687883f93e11c57ebf78bbe2e505e1f60480a053 data/raw/gemma4_12b_route_transformer_plus_validator_v3_1_rerun_2026-08-10_summary.json
|
| 21 |
+
a4a8ec110707ffa5e2ce613076823482bc5cf99d2b30df1c6ea1179311a0c140 data/raw/gemma4_26b_a4b_qat_core500_candidate_summary.json
|
| 22 |
+
1a9602d4ef75d0eb76cda8487f97590d68ede9b4411e9cda0aa4a3e890412dfd data/raw/gemma4_26b_a4b_qat_route_transformer_plus_validator_v3_1_summary.json
|
| 23 |
+
4b793756f45d195e55a010c28c0f5d647c218fafab9441484c7838458ff79c24 data/raw/gemma4_26b_core500_candidate_rerun_2026-08-10_summary.json
|
| 24 |
+
a5afb912a1b52ebc9f6d878e469f36d9227192f3b2fa09f19bd0a440ba601e8c data/raw/gemma4_26b_route_transformer_plus_validator_v3_1_rerun_2026-08-10_summary.json
|
data/analysis_summary.json
ADDED
|
@@ -0,0 +1,141 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"cells": {
|
| 3 |
+
"12B_PTQ_smoke": {
|
| 4 |
+
"n": 100,
|
| 5 |
+
"errored": 0,
|
| 6 |
+
"route_correctness": 0.88,
|
| 7 |
+
"preferred_match": 0.57,
|
| 8 |
+
"mean_latency_ms": 2954.5
|
| 9 |
+
},
|
| 10 |
+
"12B_PTQ_core500": {
|
| 11 |
+
"n": 500,
|
| 12 |
+
"errored": 0,
|
| 13 |
+
"route_correctness": 0.76,
|
| 14 |
+
"preferred_match": 0.544,
|
| 15 |
+
"mean_latency_ms": 2481.5
|
| 16 |
+
},
|
| 17 |
+
"12B_QAT_smoke": {
|
| 18 |
+
"n": 100,
|
| 19 |
+
"errored": 0,
|
| 20 |
+
"route_correctness": 0.86,
|
| 21 |
+
"preferred_match": 0.58,
|
| 22 |
+
"mean_latency_ms": 2888.0
|
| 23 |
+
},
|
| 24 |
+
"12B_QAT_core500": {
|
| 25 |
+
"n": 500,
|
| 26 |
+
"errored": 0,
|
| 27 |
+
"route_correctness": 0.748,
|
| 28 |
+
"preferred_match": 0.542,
|
| 29 |
+
"mean_latency_ms": 2626.3
|
| 30 |
+
},
|
| 31 |
+
"26B_PTQ_smoke": {
|
| 32 |
+
"n": 100,
|
| 33 |
+
"errored": 0,
|
| 34 |
+
"route_correctness": 0.83,
|
| 35 |
+
"preferred_match": 0.58,
|
| 36 |
+
"mean_latency_ms": 3739.4
|
| 37 |
+
},
|
| 38 |
+
"26B_PTQ_core500": {
|
| 39 |
+
"n": 500,
|
| 40 |
+
"errored": 0,
|
| 41 |
+
"route_correctness": 0.738,
|
| 42 |
+
"preferred_match": 0.54,
|
| 43 |
+
"mean_latency_ms": 3251.8
|
| 44 |
+
},
|
| 45 |
+
"26B_QAT_smoke": {
|
| 46 |
+
"n": 100,
|
| 47 |
+
"errored": 0,
|
| 48 |
+
"route_correctness": 0.86,
|
| 49 |
+
"preferred_match": 0.56,
|
| 50 |
+
"mean_latency_ms": 1862.5
|
| 51 |
+
},
|
| 52 |
+
"26B_QAT_core500": {
|
| 53 |
+
"n": 500,
|
| 54 |
+
"errored": 0,
|
| 55 |
+
"route_correctness": 0.756,
|
| 56 |
+
"preferred_match": 0.54,
|
| 57 |
+
"mean_latency_ms": 1613.4
|
| 58 |
+
}
|
| 59 |
+
},
|
| 60 |
+
"paired": {
|
| 61 |
+
"core500_12B": {
|
| 62 |
+
"qat_only": 1,
|
| 63 |
+
"ptq_only": 7,
|
| 64 |
+
"delta_rate": -0.012,
|
| 65 |
+
"mcnemar_p": 0.0703
|
| 66 |
+
},
|
| 67 |
+
"core500_26B": {
|
| 68 |
+
"qat_only": 15,
|
| 69 |
+
"ptq_only": 6,
|
| 70 |
+
"delta_rate": 0.018,
|
| 71 |
+
"mcnemar_p": 0.0784
|
| 72 |
+
},
|
| 73 |
+
"smoke_12B": {
|
| 74 |
+
"qat_only": 0,
|
| 75 |
+
"ptq_only": 2,
|
| 76 |
+
"delta_rate": -0.02,
|
| 77 |
+
"mcnemar_p": 0.5
|
| 78 |
+
},
|
| 79 |
+
"smoke_26B": {
|
| 80 |
+
"qat_only": 5,
|
| 81 |
+
"ptq_only": 2,
|
| 82 |
+
"delta_rate": 0.03,
|
| 83 |
+
"mcnemar_p": 0.4531
|
| 84 |
+
}
|
| 85 |
+
},
|
| 86 |
+
"interaction": {
|
| 87 |
+
"core500": {
|
| 88 |
+
"delta_of_deltas": 0.03,
|
| 89 |
+
"ci95_task_iid": [
|
| 90 |
+
0.008,
|
| 91 |
+
0.052
|
| 92 |
+
],
|
| 93 |
+
"ci95_stem_clustered": [
|
| 94 |
+
0.01,
|
| 95 |
+
0.052
|
| 96 |
+
],
|
| 97 |
+
"n_stems": 100,
|
| 98 |
+
"note": "positive = QAT helps 26B more than 12B; stem-clustered CI is primary (5x paraphrase dependence)"
|
| 99 |
+
}
|
| 100 |
+
},
|
| 101 |
+
"divergence": {
|
| 102 |
+
"core500_12B": {
|
| 103 |
+
"exact_match": 148,
|
| 104 |
+
"rate": 0.296,
|
| 105 |
+
"median_first_divergence_char": 73
|
| 106 |
+
},
|
| 107 |
+
"core500_26B": {
|
| 108 |
+
"exact_match": 116,
|
| 109 |
+
"rate": 0.232,
|
| 110 |
+
"median_first_divergence_char": 69
|
| 111 |
+
},
|
| 112 |
+
"smoke_12B": {
|
| 113 |
+
"exact_match": 32,
|
| 114 |
+
"rate": 0.32,
|
| 115 |
+
"median_first_divergence_char": 46
|
| 116 |
+
},
|
| 117 |
+
"smoke_26B": {
|
| 118 |
+
"exact_match": 27,
|
| 119 |
+
"rate": 0.27,
|
| 120 |
+
"median_first_divergence_char": 57
|
| 121 |
+
}
|
| 122 |
+
},
|
| 123 |
+
"repeats": {
|
| 124 |
+
"12B_PTQ_smoke": {
|
| 125 |
+
"exact_match": 100,
|
| 126 |
+
"n": 100
|
| 127 |
+
},
|
| 128 |
+
"12B_QAT_smoke": {
|
| 129 |
+
"exact_match": 100,
|
| 130 |
+
"n": 100
|
| 131 |
+
},
|
| 132 |
+
"26B_QAT_smoke": {
|
| 133 |
+
"exact_match": 100,
|
| 134 |
+
"n": 100
|
| 135 |
+
},
|
| 136 |
+
"26B_PTQ_smoke": {
|
| 137 |
+
"exact_match": 100,
|
| 138 |
+
"n": 100
|
| 139 |
+
}
|
| 140 |
+
}
|
| 141 |
+
}
|
data/cell_metrics.csv
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
size,regime,suite,n,errored,route_correct,rate,preferred_match,mean_latency_ms,mean_resp_chars
|
| 2 |
+
12B,PTQ,smoke,100,0,88,0.88,0.57,2954.5,790.9
|
| 3 |
+
12B,PTQ,core500,500,0,380,0.76,0.544,2481.5,750.6
|
| 4 |
+
12B,QAT,smoke,100,0,86,0.86,0.58,2888.0,857.8
|
| 5 |
+
12B,QAT,core500,500,0,374,0.748,0.542,2626.3,834.3
|
| 6 |
+
26B,PTQ,smoke,100,0,83,0.83,0.58,3739.4,922.4
|
| 7 |
+
26B,PTQ,core500,500,0,369,0.738,0.54,3251.8,874.8
|
| 8 |
+
26B,QAT,smoke,100,0,86,0.86,0.56,1862.5,926.1
|
| 9 |
+
26B,QAT,core500,500,0,378,0.756,0.54,1613.4,898.6
|
data/family_rates.csv
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
size,regime,suite,family,n,correct,rate
|
| 2 |
+
12B,PTQ,smoke,ambiguous_time_frame,5,4,0.8
|
| 3 |
+
12B,PTQ,smoke,date_boundary,10,9,0.9
|
| 4 |
+
12B,PTQ,smoke,query_neutrality,10,10,1.0
|
| 5 |
+
12B,PTQ,smoke,stable_control,25,25,1.0
|
| 6 |
+
12B,PTQ,smoke,stale_premise_trap,15,14,0.9333
|
| 7 |
+
12B,PTQ,smoke,volatile_current,35,26,0.7429
|
| 8 |
+
12B,PTQ,core500,ambiguous_time_frame,25,14,0.56
|
| 9 |
+
12B,PTQ,core500,date_boundary,50,33,0.66
|
| 10 |
+
12B,PTQ,core500,query_neutrality,50,46,0.92
|
| 11 |
+
12B,PTQ,core500,stable_control,125,123,0.984
|
| 12 |
+
12B,PTQ,core500,stale_premise_trap,75,71,0.9467
|
| 13 |
+
12B,PTQ,core500,volatile_current,175,93,0.5314
|
| 14 |
+
12B,QAT,smoke,ambiguous_time_frame,5,4,0.8
|
| 15 |
+
12B,QAT,smoke,date_boundary,10,9,0.9
|
| 16 |
+
12B,QAT,smoke,query_neutrality,10,10,1.0
|
| 17 |
+
12B,QAT,smoke,stable_control,25,25,1.0
|
| 18 |
+
12B,QAT,smoke,stale_premise_trap,15,14,0.9333
|
| 19 |
+
12B,QAT,smoke,volatile_current,35,24,0.6857
|
| 20 |
+
12B,QAT,core500,ambiguous_time_frame,25,15,0.6
|
| 21 |
+
12B,QAT,core500,date_boundary,50,32,0.64
|
| 22 |
+
12B,QAT,core500,query_neutrality,50,46,0.92
|
| 23 |
+
12B,QAT,core500,stable_control,125,123,0.984
|
| 24 |
+
12B,QAT,core500,stale_premise_trap,75,71,0.9467
|
| 25 |
+
12B,QAT,core500,volatile_current,175,87,0.4971
|
| 26 |
+
26B,PTQ,smoke,ambiguous_time_frame,5,3,0.6
|
| 27 |
+
26B,PTQ,smoke,date_boundary,10,9,0.9
|
| 28 |
+
26B,PTQ,smoke,query_neutrality,10,10,1.0
|
| 29 |
+
26B,PTQ,smoke,stable_control,25,25,1.0
|
| 30 |
+
26B,PTQ,smoke,stale_premise_trap,15,14,0.9333
|
| 31 |
+
26B,PTQ,smoke,volatile_current,35,22,0.6286
|
| 32 |
+
26B,PTQ,core500,ambiguous_time_frame,25,12,0.48
|
| 33 |
+
26B,PTQ,core500,date_boundary,50,30,0.6
|
| 34 |
+
26B,PTQ,core500,query_neutrality,50,46,0.92
|
| 35 |
+
26B,PTQ,core500,stable_control,125,122,0.976
|
| 36 |
+
26B,PTQ,core500,stale_premise_trap,75,72,0.96
|
| 37 |
+
26B,PTQ,core500,volatile_current,175,87,0.4971
|
| 38 |
+
26B,QAT,smoke,ambiguous_time_frame,5,4,0.8
|
| 39 |
+
26B,QAT,smoke,date_boundary,10,8,0.8
|
| 40 |
+
26B,QAT,smoke,query_neutrality,10,10,1.0
|
| 41 |
+
26B,QAT,smoke,stable_control,25,25,1.0
|
| 42 |
+
26B,QAT,smoke,stale_premise_trap,15,14,0.9333
|
| 43 |
+
26B,QAT,smoke,volatile_current,35,25,0.7143
|
| 44 |
+
26B,QAT,core500,ambiguous_time_frame,25,15,0.6
|
| 45 |
+
26B,QAT,core500,date_boundary,50,29,0.58
|
| 46 |
+
26B,QAT,core500,query_neutrality,50,46,0.92
|
| 47 |
+
26B,QAT,core500,stable_control,125,123,0.984
|
| 48 |
+
26B,QAT,core500,stale_premise_trap,75,72,0.96
|
| 49 |
+
26B,QAT,core500,volatile_current,175,93,0.5314
|
data/paired_quant_effect.csv
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
suite,size,n_pairs,qat_only_correct,ptq_only_correct,delta_rate,mcnemar_p
|
| 2 |
+
core500,12B,500,1,7,-0.012,0.0703
|
| 3 |
+
core500,26B,500,15,6,0.018,0.0784
|
| 4 |
+
smoke,12B,100,0,2,-0.02,0.5
|
| 5 |
+
smoke,26B,100,5,2,0.03,0.4531
|
data/regime_output_divergence.csv
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
suite,size,n,exact_match,rate,median_first_divergence_char
|
| 2 |
+
core500,12B,500,148,0.296,73
|
| 3 |
+
core500,26B,500,116,0.232,69
|
| 4 |
+
smoke,12B,100,32,0.32,46
|
| 5 |
+
smoke,26B,100,27,0.27,57
|
figures/fig1_interaction_slopegraph.png
ADDED
|
Git LFS Details
|
figures/fig2_output_divergence.png
ADDED
|
Git LFS Details
|
figures/fig3_2x2_matrix.png
ADDED
|
Git LFS Details
|
paper/PAPER.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6accb2c3fedc9e0e27d116fde893d25d55aea26c0ae88354173d99ca355d4d6e
|
| 3 |
+
size 165173
|