interplane.Get Omega
Read in your language

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

branch main Branches Tags History

aien-train / evidence / OMEGALLM / v1 / checks / reruns.sh

85 lines · 4029 bytes Raw Blame History
1#!/bin/sh
2# Rerun of the PR #54 "Checks run" rows that had no saved log (2026-11-04, spark-b87b, one core).
3# Usage, from the directory that holds the aien-train clone, data/ and v1-data/:
4# CLONE=wt/v1 OMC=<omc 2c824805> CORE=5 OUT=fixv1/s1 sh wt/v1/evidence/OMEGALLM/v1/checks/reruns.sh
5# Every path is relative to that directory; absolute paths printed by v1-oracle.sh have the
6# directory's prefix removed (sed below) so the receipts name no private path.
7# Rows:
8# build ollm, ollm-mut-d, ollm-mut-e from CLONE (build.sh), and the v0 reference ollm from
9# the base commit e08443c (git archive of native/omegallm and tests/omegallm)
10# oracle v1-oracle.sh on ollm with V0BIN: want SUMMARY pass=54 fail=0 not_run=0
11# mut-e v1-oracle.sh on ollm-mut-e: want FAIL lines (exit 1)
12# kgroup CFG of v1-oracle.sh at G = 4, 5 steps on the referee's train300.tok: K = 1, 2, 4
13# byte-identical
14# mut-d the same with ollm-mut-d, K = 1 vs K = 2: want different checkpoints
15# config-a V4096 T128 D128 H4 F512 L4 B16 G4 on v1-data/train.tok, 2 steps: K = 1 vs K = 4
16# byte-identical
17set -u
18CLONE=${CLONE:?} OMC=${OMC:?} CORE=${CORE:?} OUT=${OUT:?}
19RUN="taskset -c $CORE nice -n 19"
20B=$OUT/build
21mkdir -p "$B" "$OUT/v0src" "$OUT/k" "$OUT/a"
22echo "date $(date -u +%FT%TZ) host $(hostname) core $CORE"
23echo "clone $(git -C "$CLONE" rev-parse HEAD)"
24echo "omc $(sha256sum "$OMC" | cut -d' ' -f1)"
25echo "--- build"
26for a in "" "--mutant d" "--mutant e"; do
27 # shellcheck disable=SC2086
28 OMC=$OMC OUT=$B CORE=$CORE sh "$CLONE/tests/omegallm/build.sh" $a 2>&1
29 echo "rc=$?"
30done
31git -C "$CLONE" archive e08443c3332bdd3b81a549bb76815f688b763ff5 native/omegallm tests/omegallm/build.sh | tar -x -C "$OUT/v0src"
32OMC=$OMC OUT=$OUT/v0build CORE=$CORE sh "$OUT/v0src/tests/omegallm/build.sh" 2>&1
33echo "rc=$? (v0 reference, base e08443c)"
34strip() { sed "s|$(pwd)/||g"; }
35# v1-oracle.sh runs the referee inside WORK, so DATA must be absolute
36DATA=$(pwd)/data
37bad=0
38# t LABEL CMD...: run CMD, print LABEL rc=N; a nonzero rc invalidates the comparisons below
39t() { _l=$1; shift; $RUN "$@"; _r=$?; echo "$_l rc=$_r"; [ $_r = 0 ] || bad=$((bad + 1)); }
40# same A B: verdict on two checkpoints that must both differ from the init checkpoint I
41same() { [ $bad = 0 ] || { echo "INVALID: $bad command(s) exited nonzero"; return; }
42 cmp -s "$1" "$3" && { echo "INVALID: $1 equals the init checkpoint"; return; }
43 cmp "$1" "$2" && echo "EQUAL $1 $2" || echo "DIFFERENT $1 $2"; }
44echo "--- oracle"
45BIN=$B/ollm V0BIN=$OUT/v0build/ollm DATA=$DATA WORK=$OUT/vo CORE=$CORE sh "$CLONE/tests/omegallm/v1-oracle.sh" 2>&1 | strip
46echo "--- mut-e"
47BIN=$B/ollm-mut-e V0BIN=$OUT/v0build/ollm DATA=$DATA WORK=$OUT/vo-e CORE=$CORE sh "$CLONE/tests/omegallm/v1-oracle.sh" > "$OUT/vo-e.log" 2>&1
48echo "rc=$? (want 1)"
49strip < "$OUT/vo-e.log"
50echo "--- kgroup (want: K=2 and K=4 EQUAL to K=1)"
51TR=$OUT/vo/ref/train300.tok
52sha256sum "$TR" || bad=$((bad + 1))
53K=$OUT/k
54mkdir -p "$K"
55rm -f "$K"/*.ck
56t init "$B/ollm" init "$K/i4.ck" 300 8 16 2 32 2 4 5 50 3000 4
57for k in 1 2 4; do
58 cp "$K/i4.ck" "$K/k$k.ck"
59 t "train K=$k" "$B/ollm" train "$K/k$k.ck" "$TR" 5 5 $k
60done
61sha256sum "$K/i4.ck" "$K/k1.ck" "$K/k2.ck" "$K/k4.ck"
62same "$K/k1.ck" "$K/k2.ck" "$K/i4.ck"
63same "$K/k1.ck" "$K/k4.ck" "$K/i4.ck"
64echo "--- mut-d (want: K=1 vs K=2 DIFFERENT)"
65for k in 1 2; do
66 cp "$K/i4.ck" "$K/d$k.ck"
67 t "mut-d train K=$k" "$B/ollm-mut-d" train "$K/d$k.ck" "$TR" 5 5 $k
68done
69sha256sum "$K/d1.ck" "$K/d2.ck"
70same "$K/d1.ck" "$K/d2.ck" "$K/i4.ck"
71echo "--- config-a (want: K=4 EQUAL to K=1)"
72A=$OUT/a
73mkdir -p "$A"
74rm -f "$A"/*.ck
75sha256sum v1-data/train.tok
76t init "$B/ollm" init "$A/a.ck" 4096 128 128 4 512 4 16 1 20000 3000 4
77for k in 1 4; do
78 cp "$A/a.ck" "$A/a.k$k.ck"
79 t0=$(date +%s)
80 t "train K=$k" "$B/ollm" train "$A/a.k$k.ck" v1-data/train.tok 2 2 $k
81 echo "wall_s=$(($(date +%s) - t0))"
82done
83sha256sum "$A/a.ck" "$A/a.k1.ck" "$A/a.k4.ck"
84same "$A/a.k1.ck" "$A/a.k4.ck" "$A/a.ck"
85echo "end $(date -u +%FT%TZ)"