Substantial correction: retract the unconditional improvement claim
Browse filesThe previous card claimed the gate 'produces a real improvement over an ungated baseline,' replicated six ways. Retracted. Three findings already in the project record were not incorporated at first publication:
1. A 20-run 4-arm x 5-seed matrix against the 2025-01-04_SoftCap modded-nanoGPT record (Aug 2-5 2026, 8xH100) shows the LEARNED gate harms: F-S = +0.0284, CI [+0.0262,+0.0305], t(4)~36.5, zero distributional overlap. Static gating costs only +0.0017 -- the damage is from learning the gate, 16x.
2. At warmup 500 the ungated baseline (4.5663) beats every gate tested, including cheap_qa (4.6130). The headline result is conditional on warmup 2000.
3. The per-dimension bands were reported as 0.70-0.77 / 0.42-0.54. Those are per-LAYER-MEAN bands. Full vectors (4,608 values per condition) are 0.5745-0.8457 and 0.3593-0.6821. The means stay at init; the distributions widen. The 'flat loss direction' mechanism is contradicted by this repo's own per-layer results, where a scalar moves 0.5->0.742 and 12 per-layer values span 0.38-0.65.
Also: the A10 ordering inversion is now shown as contested -- two boards here disagree on midtier_q by 0.0144 and the larger 57-run board does not reproduce it. The 1B result is flagged as under review (sign-test p=0.125; whether the gate trained at all is unresolved). Seed-set sensitivity added (cheap_qa 4.4139 on seeds 0/1/2).
Where two files in this corpus disagree, both are now shown.
|
@@ -7,6 +7,7 @@ tags:
|
|
| 7 |
- conditional-computation
|
| 8 |
- gating
|
| 9 |
- research-artifact
|
|
|
|
| 10 |
library_name: pytorch
|
| 11 |
---
|
| 12 |
|
|
@@ -16,22 +17,37 @@ Training artifacts from an independent research program on **query-conditioned a
|
|
| 16 |
gating** in GPT-2-class transformers. 33 checkpoints, the code that produced them, and the
|
| 17 |
complete result tables β including the runs that did **not** support the hypothesis.
|
| 18 |
|
| 19 |
-
This repository is an archive first and a model release second. Nothing here is intended
|
| 20 |
-
for downstream use as a general-purpose language model.
|
| 21 |
-
|
| 22 |
**Code, per-phase result tables, and the full experiment history:**
|
| 23 |
[github.com/briantkolb/qgate](https://github.com/briantkolb/qgate)
|
| 24 |
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
|
| 36 |
## The intervention
|
| 37 |
|
|
@@ -45,86 +61,72 @@ gate = torch.sigmoid(self.qa_gate_proj(torch.cat([q, y], dim=-1)))
|
|
| 45 |
y = y * gate # before c_proj (W_O)
|
| 46 |
```
|
| 47 |
|
| 48 |
-
At the 124M scale this costs **98,304 parameters (+0.079%)**.
|
|
|
|
|
|
|
| 49 |
|
| 50 |
-
|
| 51 |
-
implementation with the port surface marked by `G1 SEAM` banner comments.
|
| 52 |
|
| 53 |
-
|
|
|
|
| 54 |
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
parameters. `full_x` / `x_full_headspec` here are that formulation ported to nanoGPT.
|
| 63 |
-
- **Bu et al. 2025**, [*Value-State Gated Attention*](https://arxiv.org/abs/2510.09017).
|
| 64 |
-
Moves the gate input from X to **V**, arguing a reactive gate (computed from the value
|
| 65 |
-
state) decouples value and attention updates better than a predictive one.
|
| 66 |
-
- **Zhou et al. 2026**, [*Hybrid Gated Attention*](https://arxiv.org/abs/2608.11805)
|
| 67 |
-
(Tencent Hunyuan, 12 Aug 2026). Adds an **H-gate** computed from the SDPA output `H`,
|
| 68 |
-
fused with the X-gate, on the observation that *"the output H contains richer
|
| 69 |
-
token-interaction information after attention"* that X does not capture. Validated on
|
| 70 |
-
MoE-5B over 500B tokens.
|
| 71 |
-
|
| 72 |
-
**Where `cheap_qa` sits.** Its gate is computed from `cat(q, y)` β the query and the SDPA
|
| 73 |
-
output being gated. The `y` term is the same signal Zhou et al. call `H`. On the gate-input
|
| 74 |
-
axis the published sequence is X β V β X+H, and `cat(q, y)` is a point on it that none of
|
| 75 |
-
the three tested: one `Linear(2Β·head_dim β head_dim)`, 98,304 parameters at 124M.
|
| 76 |
-
|
| 77 |
-
**Chronology.** This work reached G1 gating independently and found the prior art
|
| 78 |
-
afterward. `cheap_qa` was confirmed 2026-03-20
|
| 79 |
-
(`results/csv/cheap_qa_confirmation_runs_20260320_1854.csv`). Qiu et al. was located days
|
| 80 |
-
later, at which point the project was reclassified from a novelty claim to a replication
|
| 81 |
-
and mechanism study, and their X-conditioned formulation was implemented as `full_x`
|
| 82 |
-
*specifically to run head-to-head against* `cheap_qa`
|
| 83 |
-
(`results/summaries/full_x_seed123_result_20260324_1712.txt`, 2026-03-24). Zhou et al.
|
| 84 |
-
appeared 2026-08-12, five months after `cheap_qa`. **None of this establishes priority** β
|
| 85 |
-
these results were private until publication. It is recorded only because the dates are
|
| 86 |
-
checkable in the files.
|
| 87 |
-
|
| 88 |
-
**What replicates here.** Two of Qiu et al.'s qualitative findings reproduce at 124M on one
|
| 89 |
-
RTX 3060, at roughly 1/10,000 of their token budget:
|
| 90 |
-
|
| 91 |
-
| claim | Qiu et al. (15B MoE, 400B tok) | here (124M, ~41M tok) |
|
| 92 |
-
|---|---|---|
|
| 93 |
-
| G1 gating beats baseline | 6.026 β 5.761 PPL | 4.4708 β 4.3897 CE |
|
| 94 |
-
| input-*dependent* gating beats input-*independent* | 5.917 β 5.761 | 4.4483 β 4.3897 |
|
| 95 |
|
| 96 |
-
The
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
roughly a third of the gain (41% there, 28% here), confirming that part of the effect is
|
| 100 |
-
non-linearity alone and the rest requires input dependence.
|
| 101 |
|
| 102 |
-
|
| 103 |
-
variants here that would test it (`x_headshared`, 4.4346, versus `full_x`, 4.3950) differ in
|
| 104 |
-
gate *input width* as well as head-sharing β `Linear(64β64)` on a per-head slice versus
|
| 105 |
-
`Linear(768β768)` on the full hidden state β so the comparison is confounded and is not
|
| 106 |
-
offered as a replication. The unconfounded pair
|
| 107 |
-
(`dynamic_x_g1_headspecific_elementwise` vs `dynamic_x_g1_headshared_elementwise`) was only
|
| 108 |
-
run under the earlier, superseded recipe.
|
| 109 |
|
| 110 |
-
|
|
|
|
|
|
|
|
|
|
| 111 |
|
| 112 |
-
|
| 113 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 114 |
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
|
|
|
| 121 |
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
on it and midtier_q is the only variant that is clean.
|
| 126 |
|
| 127 |
-
**
|
|
|
|
| 128 |
|
| 129 |
| variant | mean ppl | sd |
|
| 130 |
|---|---|---|
|
|
@@ -132,183 +134,175 @@ on it and midtier_q is the only variant that is clean.
|
|
| 132 |
| cheap_qa | 43.703 | 0.124 |
|
| 133 |
| midtier_q | 43.683 | 0.159 |
|
| 134 |
|
| 135 |
-
|
|
|
|
| 136 |
|
| 137 |
-
## What
|
| 138 |
|
| 139 |
-
|
| 140 |
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
| baseline |
|
| 144 |
-
|
|
| 145 |
-
|
|
| 146 |
-
|
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
|
| 168 |
-
|
| 169 |
-
|
| 170 |
-
|
| 171 |
-
|
| 172 |
-
|
| 173 |
-
|
| 174 |
-
|
| 175 |
-
|
| 176 |
-
|
| 177 |
-
|
| 178 |
-
|
| 179 |
-
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
|
| 183 |
-
|
| 184 |
-
|
| 185 |
-
|
| 186 |
-
|
| 187 |
-
|
| 188 |
-
|
| 189 |
-
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
|
| 194 |
-
|
| 195 |
-
|
| 196 |
-
|
| 197 |
-
|
| 198 |
-
|
| 199 |
-
|
| 200 |
-
|
| 201 |
-
|
| 202 |
-
## The most interesting finding is a negative one
|
| 203 |
-
|
| 204 |
-
The per-dimension blend scales are **not identified by training**. Across 12 runs and three
|
| 205 |
-
initialization schemes, the learned scales stay wherever they were initialized:
|
| 206 |
-
|
| 207 |
-
| phase | init | converged scale (q / y) | val CE |
|
| 208 |
|---|---|---|---|
|
| 209 |
-
|
|
| 210 |
-
|
|
| 211 |
-
|
|
| 212 |
-
|
| 213 |
-
|
| 214 |
-
|
| 215 |
-
|
| 216 |
-
|
| 217 |
-
|
| 218 |
-
|
| 219 |
-
|
| 220 |
-
|
| 221 |
-
|
| 222 |
-
|
| 223 |
-
**
|
| 224 |
-
|
| 225 |
-
|
| 226 |
-
|
| 227 |
-
|
| 228 |
-
|
| 229 |
-
|
| 230 |
-
|
| 231 |
-
|
| 232 |
-
|
| 233 |
-
|
| 234 |
-
|
| 235 |
-
|
| 236 |
-
vs ~8,400s) rather than training end to end. This applies to all three variants
|
| 237 |
-
symmetrically, so it does not bias the comparison, but seed 42 is not a fresh replicate.
|
| 238 |
-
3. **The 124M stability rate is poor across the board.** Only 1 of 3 cheap_qa seeds, and 0
|
| 239 |
-
of 3 baseline seeds, ended with their best validation loss at the final evaluation. Most
|
| 240 |
-
runs were drifting upward over the last few hundred steps. The reported figures are best
|
| 241 |
-
val CE, so this affects how much to trust any of the small differences above.
|
| 242 |
-
4. **Two 3060 result boards exist.** The canonical head-to-head is
|
| 243 |
-
`results/csv/priority1_runs_20260322_1355.csv` (baseline 4.4708 / cheap_qa 4.3897), used
|
| 244 |
-
throughout this card. An earlier board in `results/summaries/cheap_qa_confirmation_...`
|
| 245 |
-
and `runner_a_summary_...` gives 4.4973 / 4.4073. The improvement is comparable
|
| 246 |
-
(β0.0900 vs β0.0811); the absolute values are not.
|
| 247 |
-
5. **Some result files contain auto-generated boilerplate that its own tables contradict.**
|
| 248 |
-
In particular `results/summaries/a10_replication_summary_20260322_0639.txt` ends with a
|
| 249 |
-
`PAPER STATEMENTS` block asserting hardware independence and `|delta| < 0.02`. That text
|
| 250 |
-
is unedited script output. The table forty lines above it in the same file shows deltas
|
| 251 |
-
to β0.1257 and prints `Hardware consistency: INVESTIGATE β`. Trust the tables, not the
|
| 252 |
-
prose blocks.
|
| 253 |
-
6. **Standard deviations are not on one convention.** The 124M figures are population sd as
|
| 254 |
-
printed by the run scripts; the 1B figures are sample sd. Differences at the third
|
| 255 |
-
decimal between this card and a source file are usually this.
|
| 256 |
|
| 257 |
## Traps in the result files
|
| 258 |
|
| 259 |
-
β οΈ
|
| 260 |
-
|
| 261 |
-
|
| 262 |
-
|
| 263 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 264 |
|
| 265 |
-
β οΈ **`
|
| 266 |
-
|
| 267 |
-
123 finished the following day at 4.4112, moving full_x to 4.3950 Β± 0.0116 β see
|
| 268 |
-
`results/summaries/full_x_seed123_result_20260324_1712.txt`, which is authoritative.
|
| 269 |
|
| 270 |
-
β οΈ
|
| 271 |
-
|
| 272 |
|
| 273 |
-
|
| 274 |
-
|
| 275 |
-
|
| 276 |
-
|
| 277 |
-
|
| 278 |
-
|
| 279 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 280 |
|
| 281 |
## Layout
|
| 282 |
|
| 283 |
```
|
| 284 |
checkpoints/
|
| 285 |
canon/ 21 x ckpt.pt base run + phases 14-19d (RTX 3060, Windows)
|
| 286 |
-
wsl_bridge/ 12 x ckpt.pt phases 10-12
|
| 287 |
code/ model/train for both lanes + the minimal champion module
|
| 288 |
-
results/ phase 7-19d run CSVs and
|
| 289 |
SHA256SUMS.txt integrity manifest for all 33 checkpoints
|
| 290 |
```
|
| 291 |
|
| 292 |
-
|
| 293 |
-
`best_val_loss`, `config`) at fp32, ~1.4 GiB each β optimizer state included so training
|
| 294 |
-
can be resumed.
|
| 295 |
-
|
| 296 |
-
## Verifying integrity
|
| 297 |
|
| 298 |
```bash
|
| 299 |
sha256sum -c SHA256SUMS.txt
|
| 300 |
```
|
| 301 |
|
| 302 |
-
##
|
| 303 |
|
| 304 |
-
- Does the
|
| 305 |
-
|
| 306 |
-
-
|
| 307 |
-
-
|
| 308 |
-
|
|
|
|
|
|
|
| 309 |
|
| 310 |
## Attribution
|
| 311 |
|
| 312 |
Derived from [nanoGPT](https://github.com/karpathy/nanoGPT) by Andrej Karpathy (MIT).
|
| 313 |
-
|
| 314 |
-
the upstream source. See `LICENSE`.
|
|
|
|
| 7 |
- conditional-computation
|
| 8 |
- gating
|
| 9 |
- research-artifact
|
| 10 |
+
- negative-results
|
| 11 |
library_name: pytorch
|
| 12 |
---
|
| 13 |
|
|
|
|
| 17 |
gating** in GPT-2-class transformers. 33 checkpoints, the code that produced them, and the
|
| 18 |
complete result tables β including the runs that did **not** support the hypothesis.
|
| 19 |
|
|
|
|
|
|
|
|
|
|
| 20 |
**Code, per-phase result tables, and the full experiment history:**
|
| 21 |
[github.com/briantkolb/qgate](https://github.com/briantkolb/qgate)
|
| 22 |
|
| 23 |
+
This repository is an archive first and a model release second. Nothing here is intended
|
| 24 |
+
for downstream use as a general-purpose language model.
|
| 25 |
+
|
| 26 |
+
> ### Revision notice β 2026-08-15
|
| 27 |
+
> This card was **substantially revised** the day after first publication. The initial
|
| 28 |
+
> version claimed the gate "produces a real improvement over an ungated baseline,"
|
| 29 |
+
> replicated six ways. That claim was too strong and is retracted. Three findings already
|
| 30 |
+
> in the project record had not been incorporated:
|
| 31 |
+
> 1. a 20-run controlled matrix on a hardened baseline where the learned gate **harms**;
|
| 32 |
+
> 2. a warmup sweep where **every gate tested loses to the ungated baseline**;
|
| 33 |
+
> 3. the per-dimension bands were reported ~3Γ too tight, and the "flat loss direction"
|
| 34 |
+
> mechanism is contradicted by this repository's own per-layer results.
|
| 35 |
+
>
|
| 36 |
+
> The corrected thesis is below. Where two files in this corpus disagree, both are now
|
| 37 |
+
> shown rather than one being chosen.
|
| 38 |
+
|
| 39 |
+
## What the data supports
|
| 40 |
+
|
| 41 |
+
**The gate's benefit is a function of how much fixed structure the baseline already has.**
|
| 42 |
+
On a plain GPT-2-class 124M model at 20% warmup it is a large, reproducible improvement. At
|
| 43 |
+
1B, on a modern stack, it is marginal and its statistical support is under review. On a
|
| 44 |
+
short warmup schedule it is *worse than no gate at all*. On a heavily-optimized speedrun
|
| 45 |
+
baseline it is decisively harmful. That ordering is the result; the 124M number alone is not.
|
| 46 |
+
|
| 47 |
+
A second, narrower finding concerns parameterization: the same blend quantity that a
|
| 48 |
+
12-parameter per-layer gate learns a clear profile for is one that a 768-parameter
|
| 49 |
+
per-dimension gate fails to relocate from its initialization at this token budget. Adding
|
| 50 |
+
capacity made it less learnable, not more.
|
| 51 |
|
| 52 |
## The intervention
|
| 53 |
|
|
|
|
| 61 |
y = y * gate # before c_proj (W_O)
|
| 62 |
```
|
| 63 |
|
| 64 |
+
At the 124M scale this costs **98,304 parameters (+0.079%)**. In this corpus the `y` term is
|
| 65 |
+
called **A** (the attention output); `code/model_cheap_qa_minimal.py` is a self-contained
|
| 66 |
+
single-variant reference implementation with the port surface marked by `G1 SEAM` banners.
|
| 67 |
|
| 68 |
+
## Where the effect is large
|
|
|
|
| 69 |
|
| 70 |
+
**nanoGPT 124M, OpenWebText, 10k iters, warmup 2000, seeds 42/1337/123** (val CE).
|
| 71 |
+
Source: `results/csv/priority1_runs_20260322_1355.csv`.
|
| 72 |
|
| 73 |
+
| variant | added params | val CE | vs baseline |
|
| 74 |
+
|---|---|---|---|
|
| 75 |
+
| baseline | β | 4.4708 Β± 0.0074 | β |
|
| 76 |
+
| **cheap_qa** (gate on `cat(q, y)`) | +98,304 (+0.079%) | **4.3897 Β± 0.0051** | **β0.0811 (β1.81%)** |
|
| 77 |
+
| full_x (gate on `x`, the published G1 form) | +7,077,888 (+5.71%) | 4.3950 Β± 0.0116 | β0.0758 |
|
| 78 |
+
| midtier_q (per-head MLP on `q`) | +196,608 (+0.159%) | 4.4135 Β± 0.0086 | β0.0573 |
|
| 79 |
+
| cheap_q (linear gate on `q`) | +49,152 (+0.040%) | 4.4198 Β± 0.0185 | β0.0510 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 80 |
|
| 81 |
+
The one comparison here that separates cleanly separates on **cost**, not loss: `cheap_qa`
|
| 82 |
+
and `full_x` differ by 0.0053 CE β inside seed noise β and by **72Γ in added parameters**.
|
| 83 |
+
Parameter counts are exact; loss deltas are estimates from three seeds.
|
|
|
|
|
|
|
| 84 |
|
| 85 |
+
## Where the effect goes away, and reverses
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 86 |
|
| 87 |
+
**1. Short warmup β every gate tested loses to the baseline.**
|
| 88 |
+
Source: `results/csv/warmup500_bundle_runs_20260324_1937.csv`,
|
| 89 |
+
`results/csv/phase6b_grok_qafollowups_w500_runs_20260328_0028.csv`,
|
| 90 |
+
`results/csv/phase5_warmup500_toptiers_runs_20260326_1722.csv` (warmup 500, 3 seeds each).
|
| 91 |
|
| 92 |
+
| variant | warmup 500 | warmup 2000 | penalty |
|
| 93 |
+
|---|---|---|---|
|
| 94 |
+
| **baseline** | **4.5663** | 4.4708 | +0.0955 |
|
| 95 |
+
| qa_normed | 4.5902 | 4.3926 | +0.1976 |
|
| 96 |
+
| cheap_qa | 4.6130 | 4.3897 | +0.2233 |
|
| 97 |
+
| qa_lowrank | 4.6289 | 4.4068 | +0.2221 |
|
| 98 |
+
| mlp128_qa | 4.6332 | 4.4032 | +0.2300 |
|
| 99 |
+
| full_x | 4.8518 | 4.3950 | +0.4568 |
|
| 100 |
+
|
| 101 |
+
Short warmup hurts everything, but it hurts every gate roughly twice as much as the
|
| 102 |
+
baseline, and at warmup 500 the ungated model wins outright. **The headline improvement is
|
| 103 |
+
conditional on a 20% warmup schedule.**
|
| 104 |
+
|
| 105 |
+
**2. A hardened baseline β the learned gate harms, decisively.**
|
| 106 |
+
A 20-run matrix (4 arms Γ 5 seeds) against the `2025-01-04_SoftCap` modded-nanoGPT record on
|
| 107 |
+
8ΓH100, August 2β5 2026. Published noise floor for that record: 3.2791 Β± 0.0019 over 80 runs.
|
| 108 |
+
|
| 109 |
+
| arm | mean val loss | vs baseline |
|
| 110 |
+
|---|---|---|
|
| 111 |
+
| B β baseline | 3.27790 | β |
|
| 112 |
+
| S β static gate (0.5) | 3.27960 | +0.0017 |
|
| 113 |
+
| Z β zero-init learned gate | 3.30788 | +0.0300 |
|
| 114 |
+
| F β learned gate | 3.30796 | +0.0301 |
|
| 115 |
|
| 116 |
+
**F β S = +0.0284**, 95% CI [+0.0262, +0.0305], t(4) β 36.5, all five seeds positive, **zero
|
| 117 |
+
distributional overlap** (worst ungated 3.2822, best gated 3.3049). Gated arms are also ~7%
|
| 118 |
+
slower.
|
| 119 |
+
|
| 120 |
+
The decomposition matters more than the sign: **static scaling costs +0.0017; making the
|
| 121 |
+
gate learnable costs +0.0284 β 16Γ more.** The damage comes from *learning* the gate, not
|
| 122 |
+
from gating. `F β Z = +0.00008` β random and zero init reach the same solution.
|
| 123 |
|
| 124 |
+
This is the best-powered experiment in the corpus, and it is negative. Primary logs
|
| 125 |
+
(`qgate_run3_MATRIX.tar.gz`) are not in this repository; the figures above are from the
|
| 126 |
+
August 2β5 session record.
|
|
|
|
| 127 |
|
| 128 |
+
**3. Scale β the ordering among gates does not survive.**
|
| 129 |
+
OLMo-2 1B, OpenWebText, 3 seeds, H100 (`rope`, `rmsnorm`, `swiglu`, QK-norm, post-norm):
|
| 130 |
|
| 131 |
| variant | mean ppl | sd |
|
| 132 |
|---|---|---|
|
|
|
|
| 134 |
| cheap_qa | 43.703 | 0.124 |
|
| 135 |
| midtier_q | 43.683 | 0.159 |
|
| 136 |
|
| 137 |
+
`cheap_qa` and `midtier_q` differ by 0.02 ppl β p = 0.87, a tie β despite clear separation at
|
| 138 |
+
124M. **See the caveats below before using the 1B result for anything.**
|
| 139 |
|
| 140 |
+
## What is contested inside this corpus
|
| 141 |
|
| 142 |
+
Two or more files here disagree. These are shown rather than resolved.
|
| 143 |
|
| 144 |
+
**The A10 comparison.** Two boards, same hardware, same recipe, different conclusions:
|
| 145 |
+
|
| 146 |
+
| source | baseline | cheap_qa | midtier_q | ordering |
|
| 147 |
+
|---|---|---|---|---|
|
| 148 |
+
| `results/summaries/priority1_summary_20260322_1355.txt` (A10 ref block) | 4.4675 | 4.4151 | **4.4039** | midtier_q wins |
|
| 149 |
+
| `results/phase8_warmup2000_bulk_a10_runs_20260329_0650.csv` (19 variants, 57 runs) | 4.4676 | **4.4155** | 4.4183 | cheap_qa wins |
|
| 150 |
+
|
| 151 |
+
Baseline and cheap_qa agree to 0.0004 across both. **`midtier_q` differs by 0.0144, and that
|
| 152 |
+
single number is what the "ordering inverts on A10" claim rests on.** The larger and later
|
| 153 |
+
board does not reproduce the inversion. Additionally, the A10 lane ran a different software
|
| 154 |
+
stack (torch 2.7.0+cu128) from the canonical 3060 board (2.5.1+cu121), and the project record
|
| 155 |
+
explicitly blocks a hardware-only interpretation until a version-matched rerun exists.
|
| 156 |
+
|
| 157 |
+
What *is* consistent across both A10 boards: `cheap_qa` beats baseline, and it drops from
|
| 158 |
+
1st on the 3060 to 7th of 19 on the A10 (behind `x_full_headspec` at 4.3858).
|
| 159 |
+
|
| 160 |
+
**The 1B result.** An August 4 review found: the gate-norm "stability" claim retracted
|
| 161 |
+
(post-training βWβ_F is statistically indistinguishable from an untouched init draw,
|
| 162 |
+
P = 0.494); the win record mislabelled (`cheap_qa` alone is 3/3, sign-test **p = 0.125 β not
|
| 163 |
+
significant**; the gated family pooled is 6/6, p = 0.0156); seed 42 resumed from a
|
| 164 |
+
`step1536` checkpoint in all three arms and carries the largest margin (dropping it moves the
|
| 165 |
+
mean delta 0.433 β 0.285); the advantage is late-emerging (baseline *leads* on 2/3 seeds at
|
| 166 |
+
step 500); `midtier_q` logged no gate proxy, so there is no cross-variant control. **Whether
|
| 167 |
+
the OLMo gate trained at all is not established** β a frozen random projection is not
|
| 168 |
+
excluded. The checkpoints were lost with the rented instance, so this may stay open.
|
| 169 |
+
|
| 170 |
+
**Whether the 1B run left LR warmup.** One record says the schedule was truncated but
|
| 171 |
+
`t_warmup` fixed 200Mβ40M with `expected_max_steps: 1526`; another says warmup was never
|
| 172 |
+
exited. The rendered per-run config was never recovered. Unresolved.
|
| 173 |
+
|
| 174 |
+
**The WSL lane.** Two docs report baseline/cheap_qa as 4.4759/4.3902 and 4.4732/4.3800. The
|
| 175 |
+
WSL baseline also shows late-training spikes attributed to WSL2 memory management β
|
| 176 |
+
contamination in the direction that widens the gap. This lane also ran torch 2.7.0.
|
| 177 |
+
|
| 178 |
+
**Seed sensitivity.** On out-of-band seeds 0/1/2 (`results/phase9_...20260328_2327.csv`),
|
| 179 |
+
`cheap_qa` is 4.4139 Β± 0.0094 rather than 4.3897, and `qa_normed` (4.4103) beats it. The
|
| 180 |
+
Β±0.0051 above is a within-seed-set figure for 42/1337/123.
|
| 181 |
+
|
| 182 |
+
## The per-dimension result
|
| 183 |
+
|
| 184 |
+
**Corrected 2026-08-15.** Earlier versions of this card reported far tighter bands. Those
|
| 185 |
+
were per-*layer mean* bands presented as individual-value bands. Full vectors, all 12 layers,
|
| 186 |
+
3 seeds β 4,608 values per condition:
|
| 187 |
+
|
| 188 |
+
| phase | init | individual values | per-layer means | mean | val CE |
|
| 189 |
+
|---|---|---|---|---|---|
|
| 190 |
+
| 19b | 0.50 | β | q 0.4587β0.5202 / y 0.4687β0.5766 | 0.481 / 0.504 | 4.4015 |
|
| 191 |
+
| 19d free | ~0.50 | **0.3593β0.6821** | 0.4558β0.5718 | **0.4924** | 4.4085 |
|
| 192 |
+
| 19c informed | 0.74 | **0.5745β0.8457** | 0.6995β0.7826 | **0.7317** | 4.3950 |
|
| 193 |
+
|
| 194 |
+
**What holds:** the *mean* does not move from its initialization β 0.74 β 0.7317, 0.50 β
|
| 195 |
+
0.4924. Initialization sets where the distribution sits.
|
| 196 |
+
|
| 197 |
+
**What does not hold:** "the scales do not move." They spread substantially β 19c covers a
|
| 198 |
+
0.27 range, 19d covers 0.32. Individual dimensions differentiate; the center does not shift.
|
| 199 |
+
|
| 200 |
+
**The mechanism claimed earlier β a flat loss direction β is contradicted by this repository.**
|
| 201 |
+
The same blend quantity moves decisively under coarser parameterization:
|
| 202 |
+
|
| 203 |
+
| parameterization | params | init | converged |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 204 |
|---|---|---|---|
|
| 205 |
+
| phase 14, single scalar | 1 | 0.5 | **0.7391β0.7443** |
|
| 206 |
+
| phase 17, per-layer | 12 | 0.5 | q 0.3803β0.5551 (mean 0.4481) / y 0.4126β0.6529 (mean 0.5144) |
|
| 207 |
+
| phase 19b/c/d, per-dimension | 768 | 0.50 / 0.74 | mean stays at init |
|
| 208 |
+
|
| 209 |
+
A scalar moves +0.24 from its initialization. Twelve per-layer values differentiate across a
|
| 210 |
+
0.27 range and reproduce a consistent profile. Seven hundred sixty-eight per-dimension values
|
| 211 |
+
do not relocate their mean. **The loss is not flat along this axis β the fine parameterization
|
| 212 |
+
is not identified at this budget.** Gradient dilution across 1,536 parameters and simple
|
| 213 |
+
undertraining are both live explanations and this corpus cannot separate them.
|
| 214 |
+
|
| 215 |
+
## Honest limitations
|
| 216 |
+
|
| 217 |
+
1. **The headline 124M result is conditional on warmup 2000.** At warmup 500 the ungated
|
| 218 |
+
baseline beats every gate tested.
|
| 219 |
+
2. **The best-powered experiment in this corpus is negative** (speedrun matrix, above).
|
| 220 |
+
3. **The 1B evidence is weak and partly under review** β see the contested section. Do not
|
| 221 |
+
cite it as scale validation.
|
| 222 |
+
4. **`cheap_qa`'s margin is seed-set dependent** β 4.3897 on seeds 42/1337/123, 4.4139 on
|
| 223 |
+
seeds 0/1/2.
|
| 224 |
+
5. **Only 1 of 3 `cheap_qa` seeds, and 0 of 3 baseline seeds, ended with their best
|
| 225 |
+
validation loss at the final evaluation.** Most runs were drifting upward late.
|
| 226 |
+
6. **Elaborations (phases 14β19d) tie with the simple gate.** Seven variants sit within
|
| 227 |
+
0.0032 CE against a within-variant seed sd of 0.005β0.012; phase 14 (4.3865) and 17
|
| 228 |
+
(4.3890) are nominally ahead (p = 0.64, 0.94). Off-recipe, warmup 3000 reaches 4.3761.
|
| 229 |
+
7. **Standard deviations are population sd at 124M, sample sd at 1B.** A 3-sample sd carries
|
| 230 |
+
roughly 52% relative standard error either way.
|
| 231 |
+
8. **Head-specific vs head-shared is confounded** by gate input width and is not claimed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 232 |
|
| 233 |
## Traps in the result files
|
| 234 |
|
| 235 |
+
β οΈ `results/phase19b_canonical_*_0709.*` is a **failed run** β six seeds, `returncode=2`,
|
| 236 |
+
`best=nan`, no checkpoint. It sits beside the real six-seed data (`..._0711`).
|
| 237 |
+
|
| 238 |
+
β οΈ `results/summaries/p2_rerun_summary_20260323_1714.txt` ranks `full_x` first at 4.3870 on a
|
| 239 |
+
**two-seed partial**. `results/summaries/full_x_seed123_result_20260324_1712.txt` (4.3950,
|
| 240 |
+
3 seeds) supersedes it.
|
| 241 |
+
|
| 242 |
+
β οΈ `results/summaries/a10_replication_summary_20260322_0639.txt` ends with an auto-generated
|
| 243 |
+
`PAPER STATEMENTS` block asserting hardware independence and `|delta| < 0.02`. Its own table
|
| 244 |
+
forty lines above shows deltas to β0.1257 and prints `Hardware consistency: INVESTIGATE β`.
|
| 245 |
+
Trust the tables, not the prose blocks.
|
| 246 |
|
| 247 |
+
β οΈ **Era warning.** Results predating the `beta2=0.99` fix land in the 4.5β4.6 CE band and are
|
| 248 |
+
not comparable to clean-recipe results in the 4.38β4.47 band.
|
|
|
|
|
|
|
| 249 |
|
| 250 |
+
β οΈ `checkpoints/canon/out-shakespeare-char/` is the upstream nanoGPT demo, not part of this
|
| 251 |
+
study.
|
| 252 |
|
| 253 |
+
## Relation to published work
|
| 254 |
+
|
| 255 |
+
Gating the SDPA output at G1 is established. **This is a replication and mechanism study, not
|
| 256 |
+
a novelty claim.**
|
| 257 |
+
|
| 258 |
+
- [Qiu et al. 2025](https://arxiv.org/abs/2505.06708) (NeurIPS 2025 Oral) β the G1 gate at
|
| 259 |
+
15B-MoE / 1.7B-dense scale, conditioned on **X** (layer input) in all fifteen reported
|
| 260 |
+
variants. `full_x` here is that formulation ported to nanoGPT.
|
| 261 |
+
- [Bu et al. 2025](https://arxiv.org/abs/2510.09017) β moves the gate input from X to **V**.
|
| 262 |
+
- [Zhou et al. 2026](https://arxiv.org/abs/2608.11805) (Tencent Hunyuan, 12 Aug 2026) β adds
|
| 263 |
+
an **H-gate** computed from the SDPA output. Up to notation, their `H` is the `y`/A term in
|
| 264 |
+
`cat(q, y)`. Subsequent and independent; their 5B/500B result reaches a regime this corpus
|
| 265 |
+
cannot.
|
| 266 |
+
|
| 267 |
+
Two of Qiu et al.'s qualitative findings reproduce here at ~1/10,000 of their token budget:
|
| 268 |
+
G1 gating beats baseline (6.026 β 5.761 PPL there; 4.4708 β 4.3897 CE here, at warmup 2000),
|
| 269 |
+
and input-*dependent* beats input-*independent* (5.917 β 5.761; 4.4483 β 4.3897). The
|
| 270 |
+
input-independent control is an exact structural match β a zero-initialized learnable
|
| 271 |
+
`(n_head Γ head_dim)` parameter through a sigmoid in both cases.
|
| 272 |
+
|
| 273 |
+
`cheap_qa` was confirmed 2026-03-20
|
| 274 |
+
(`results/csv/cheap_qa_confirmation_runs_20260320_1854.csv`), before the prior-art search that
|
| 275 |
+
located Qiu et al.; the project was then reclassified from a novelty claim to a replication
|
| 276 |
+
study. **This establishes no priority** β these results were private until August 2026.
|
| 277 |
|
| 278 |
## Layout
|
| 279 |
|
| 280 |
```
|
| 281 |
checkpoints/
|
| 282 |
canon/ 21 x ckpt.pt base run + phases 14-19d (RTX 3060, Windows)
|
| 283 |
+
wsl_bridge/ 12 x ckpt.pt phases 10-12 (RTX 3060, WSL)
|
| 284 |
code/ model/train for both lanes + the minimal champion module
|
| 285 |
+
results/ phase 7-19d run CSVs, summaries and logs
|
| 286 |
SHA256SUMS.txt integrity manifest for all 33 checkpoints
|
| 287 |
```
|
| 288 |
|
| 289 |
+
nanoGPT-format `ckpt.pt` at fp32, ~1.4 GiB each, optimizer state included.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 290 |
|
| 291 |
```bash
|
| 292 |
sha256sum -c SHA256SUMS.txt
|
| 293 |
```
|
| 294 |
|
| 295 |
+
## Open questions
|
| 296 |
|
| 297 |
+
- Does the benefit really track baseline hardness, or is the three-point arc a coincidence of
|
| 298 |
+
three different codebases?
|
| 299 |
+
- Why does making the gate *learnable* cost 16Γ what the gate itself costs?
|
| 300 |
+
- Is the per-dimension non-identifiability gradient dilution or undertraining? A longer run at
|
| 301 |
+
one initialization would separate them.
|
| 302 |
+
- Did the OLMo gate train at all?
|
| 303 |
+
- Why does `cheap_qa` fall from 1st to 7th on the A10 while still beating baseline?
|
| 304 |
|
| 305 |
## Attribution
|
| 306 |
|
| 307 |
Derived from [nanoGPT](https://github.com/karpathy/nanoGPT) by Andrej Karpathy (MIT).
|
| 308 |
+
See `LICENSE`.
|
|
|