aien-train
AIEN training programme: language-model history, GB10 constraints and the route to training on the project engine. Plans and runnable checks are distinguished.
Brought by drakestapleton
aien-train / evidence / OMEGALLM / geval / README.md
| 1 | # Held-out eval on the chip: `geval`, and the CE sum fix (aien-train#52) |
| 2 | |
| 3 | `geval CK HELD W [MERGES]` is `eval` (cli.om `cmdeval`) with the forward pass on the GB10 in f32: the |
| 4 | same windows, the same per-window mean row loss summed in window order, the same decoded byte count |
| 5 | for bpb, the same `E step W loss_micro bpb_micro` line. Code: `native/omegallm/gpu/gg.om` (`ggeval`, |
| 6 | `ggevw`, `ggevc`, `ggevr`, `ggevpr`). Every chip run went through `spark-window --gb10 shared --quiet |
| 7 | none` with other lanes and the CPU night run live; **every time below is non-quiet.** Status: |
| 8 | EXERCISED on one DGX Spark GB10, not QUALIFIED. `build.txt` lists the binaries. |
| 9 | |
| 10 | ## Gate (pre-registered) |
| 11 | |
| 12 | `prereg.txt`, written before the first window: PASS for a checkpoint when the `geval` and CPU `eval` |
| 13 | E lines agree on step and W and |loss_micro_gpu − loss_micro_cpu| < 10 (1e-5 nats, gcmp's loss |
| 14 | tolerance). Negative control: a mutant on the same checkpoint counts as discriminating only if its |
| 15 | |Δ| ≥ 10. A repeat run must print the same E line. The gate was not changed at any point. |
| 16 | |
| 17 | `geval` has no loss gate: whenever it completes it exits 0 (non-zero only when an argument check, a |
| 18 | load or the chip fails, e.g. exit 84 in `a1/`). The 10 µnat gate is the E-line comparison |
| 19 | against CPU `eval`, applied by the reviewer. The mutant receipts `ge-max-9000-mut-k.txt` and |
| 20 | `ge-night-gtrainf-mut-k.txt` have rc=0 and FAIL by that comparison (Δ −11). |
| 21 | |
| 22 | ## First attempt: FAIL (`plain/`, windows gg-ev1 20261102T070800Z-3bc294, gg-ev2 20261102T071111Z-32d026) |
| 23 | |
| 24 | | checkpoint | chip E line | CPU E line | Δ µnats | |
| 25 | |---|---|---|---| |
| 26 | | night `gtrainf` step 9000 (d11b2ec6…) | E 9000 4486 1826866 681506 | E 9000 4486 1826877 681510 (`../gpu/eval9000-gtrainf.txt`) | −11 FAIL | |
| 27 | | night `gtrain` step 9000 (f7128843…) | E 9000 4486 1824642 680676 | E 9000 4486 1824653 680680 (`../gpu/eval9000-gtrain.txt`) | −11 FAIL | |
| 28 | |
| 29 | Mutant f (layer-0 W1 × (1 + 2^-10)) moved the night loss by −3 µnats from the CPU value (1826874), |
| 30 | less than the defect itself: not discriminating. |
| 31 | |
| 32 | `gdiag CK DATA S` compares the CE kernel's per-row stats with the CPU's f64 values for the same |
| 33 | forward (night ck d11b2ec6 and rung-5 ck9000 on batch 7). Mean over rows, ×1e9: |
| 34 | |
| 35 | | receipt | R | d m | d l_y | d log Σ | d loss | Σp − 1 | d (l_y − m) | |
| 36 | |---|---|---|---|---|---|---|---| |
| 37 | | `plain/gd-night.txt` | 5120 | −341 | −257 | −10447 | −10531 | 10514 | 84 | |
| 38 | | `plain/gd-max.txt` | 16384 | −180 | −124 | −10401 | −10457 | 10435 | 56 | |
| 39 | |
| 40 | The max logit and l_y agree to ~3e-7; the log of the sum of exp is low by ~1.04e-5. The CE kernel |
| 41 | summed exp(l − m) over V = 4096 sequentially in one f32 register: once the running sum is large, |
| 42 | every term below half its ulp is dropped, so the sum is biased low and every row's loss with it. |
| 43 | The chip's probabilities sum to 1 + 1.04e-5 for the same reason. |
| 44 | |
| 45 | ## Fix: compensated sum in the CE kernel |
| 46 | |
| 47 | `gr.om grce` now carries the lost low part (Kahan: R40 compensation, R41, R42); `const OMUTK 1`. |
| 48 | Mutant k (`build.sh --mutant k`, OMUTK 0) restores the plain sum and is the gate's control. |
| 49 | `prereg-k.txt` (written before window gg-ev3) states predictions P1-P6, and P7 in its addendum. |
| 50 | |
| 51 | **gg-ev3 (20261102T072103Z-3376a7), `a1/`: rc 84.** The first version used R69-R71. Every run whose |
| 52 | CE kernel used the Kahan sum died in kernel 21 with `GX 121 -110 …` (launch wait timed out), rc 84; |
| 53 | the mutant k binary, which writes R69 but not R70/R71, ran and reproduced the gg-ev1 E lines. The |
| 54 | kernels launch with 72 GPRs (`put gkgpr id 72` in `grall`). That registers R70 and R71 are not usable |
| 55 | at 72 GPRs is [INFERENCE] from these runs; it was not traced further. The fix moved the sum to the |
| 56 | unused R40-R42 (source of this tree). |
| 57 | |
| 58 | **gg-ev4 (20261102T072455Z-a35040), top-level receipts, this tree's binaries:** |
| 59 | |
| 60 | | prediction | receipt | result | |
| 61 | |---|---|---| |
| 62 | | P1 gdiag \|d log Σ\| and \|Σp − 1\| < 1000 ×1e9 | `gd-night.txt` 5120 −341 −257 65 −19 3 84; `gd-max.txt` 16384 −180 −124 33 −23 1 56 | PASS | |
| 63 | | P2 night `gtrainf` and `gtrain` \|Δ\| < 10 | `ge-night-gtrainf.txt` E 9000 4486 1826877 681510 (Δ 0); `ge-night-gtrain.txt` E 9000 4486 1824653 680680 (Δ 0) | PASS | |
| 64 | | P3 mutant k \|Δ\| ≥ 10 | `ge-night-gtrainf-mut-k.txt` E 9000 4486 1826866 681506 (Δ −11, rc=0) | PASS: discriminates | |
| 65 | | P4 gcmp2 max s7, night s7, small s3 PASS; mutants g m f FAIL rc 47 | `gc2-*.txt` | PASS | |
| 66 | | P5 gacmp ck250 s7 PASS; mutant h FAIL rc 46 | `ga-max.txt`, `ga-max-mut-h.txt` | PASS | |
| 67 | | P6 max ck9000 repeat, same E line | `ge-max-9000.txt`, `ge-max-9000-rep.txt`: E 9000 2243 1445466 539226 both | PASS | |
| 68 | | P7 no rc 84 | every top-level receipt rc 0, 47 or 46 as predicted | PASS | |
| 69 | |
| 70 | Both night checkpoints now print the CPU's E line exactly. Mutant f (`ge-night-gtrainf-mut-f.txt`, |
| 71 | 1826885, Δ +8) is again under 10 and is reported as non-discriminating. |
| 72 | |
| 73 | The sum fix also tightens the gradient (WolframLanguageEvaluator ratios): on the night shape the |
| 74 | gcmp2 gradient error rel1 drops from 41012 to 8764 ×1e-9 (4.68×) and the chip's batch loss equals the |
| 75 | CPU's (2514497, was 2514490); at the max shape rel1 goes from 786 to 738. Mutants g, m, f, h fail as |
| 76 | before, their error figures within 0.002% of the old ones (`../gpu-max/` for the old receipts). |
| 77 | |
| 78 | The rung-5 training (`../gpu-max/`) and the rung-4 runs (`../gpu/`) used the plain sum: each row's chip |
| 79 | loss was ~1.05e-5 nats low and its probabilities summed to ~1 + 1.04e-5, which the softmax gradient |
| 80 | carried. |
| 81 | |
| 82 | ## Rung-5 checkpoints |
| 83 | |
| 84 | GE is the chip time of the whole eval (upload, forwards, loss reads), non-quiet: |
| 85 | `ge-max-9000.txt` 8.47 s for W 2243 at T 256; night W 4486 at T 128 3.07 s. |
| 86 | |
| 87 | The CPU `eval` of the same checkpoints (`../gpu-max/eval2000.txt`, `eval9000.txt`, W 2243 at T 256, |
| 88 | this tree's CPU `ollm` bfd92d15…) finished after gg-ev4. Gate: |chip − CPU| < 10 µnats. |
| 89 | |
| 90 | | checkpoint | CPU E (µnats, µbpb) | chip, Kahan (this tree) | chip, plain sum (`plain/`) | mutant k | |
| 91 | |---|---|---|---|---| |
| 92 | | rung-5 step 2000 | 1789590 667600 | 1789590 667600 (Δ 0), PASS | 1789579 667596 (Δ −11), FAIL | — | |
| 93 | | rung-5 step 9000 | 1445466 539226 | 1445466 539226 (Δ 0, twice), PASS | 1445455 539222 (Δ −11), FAIL | 1445455 (Δ −11, rc=0, `ge-max-9000-mut-k.txt`), FAIL | |
| 94 | |
| 95 | The CPU evals ran 5812 s (step 2000, core 5) and 7323 s (step 9000, core 7) at nice 19 beside the |
| 96 | night run; the chip's GE for the same work was 8.52 s and 8.47 s, 682× and 865× less |
| 97 | (WolframLanguageEvaluator; both sides non-quiet, different resources, so this is a wall-time ratio, |
| 98 | not an efficiency figure). |