omega-mv
Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.
Brought by drakestapleton
omega-mv / evidence / OLLM-AB4-ROUNDS-4-11-20261122 / harness / gpu_round.sh
| 1 | #!/bin/sh |
| 2 | # gpu_round.sh N PREV_CK STEPS LRMICRO [LEASE_MIN] |
| 3 | # One GPU training round for the looped core: tune (CPU) -> claim board -> spark-window (chip lock |
| 4 | # only, this is training not a timing) -> gtrainf + full geval under spark-receipt -> close -> release. |
| 5 | # Same commands as run-win3-r3.sh (loop half). Writes $RD/gpu_round.out and $RD/DONE_GPU (rc inside). |
| 6 | set -u |
| 7 | N="$1"; PREV="$2"; STEPS="$3"; LR="$4"; LEASE="${5:-18}" |
| 8 | CAMP=/home/drakestapleton/work/ollm-helix-rlvr-20261121 |
| 9 | VLOOP=/home/drakestapleton/work/ollm-loop-20261121 |
| 10 | OLLM="$CAMP/bin/ollm" |
| 11 | OLLM_GPU="$CAMP/bin/ollm-helix-gb10" |
| 12 | MERGES="$VLOOP/data/omega4096.bin" |
| 13 | BOARD=/home/drakestapleton/handoffs/BOARD.md |
| 14 | RD="$CAMP/rounds/r$N" |
| 15 | CK="$CAMP/ckpt/loop_r$N.ck" |
| 16 | TOK="$RD/r${N}_mix.tok" |
| 17 | NAME="ollm-rlvr-r$N-gb10" |
| 18 | LANE="claude-agy-finish" |
| 19 | rm -f "$RD/DONE_GPU" |
| 20 | fail() { echo "FAIL $*"; echo "rc=1 $*" > "$RD/DONE_GPU"; exit 1; } |
| 21 | |
| 22 | [ -s "$TOK" ] || fail "missing $TOK" |
| 23 | [ -s "$PREV" ] || fail "missing $PREV" |
| 24 | [ ! -e "$CK" ] || fail "$CK already exists, refusing to overwrite" |
| 25 | |
| 26 | # look first (Play well together): refuse if the chip is busy or another lane holds a claim |
| 27 | APPS=$(nvidia-smi --query-compute-apps=pid,name --format=csv,noheader 2>/dev/null | wc -l) |
| 28 | [ "$APPS" = "0" ] || fail "chip busy: $(nvidia-smi --query-compute-apps=pid,name --format=csv,noheader | tr '\n' ';')" |
| 29 | spark-window status 2>&1 | head -5 |
| 30 | |
| 31 | "$OLLM" tune "$PREV" "$CK" "$STEPS" "$LR" || fail "tune rc=$?" |
| 32 | echo "TUNE_OK prev_sha256=$(sha256sum "$PREV" | cut -c1-64) steps=$STEPS lrmicro=$LR" |
| 33 | |
| 34 | RUNNER="$RD/run-win-r$N.sh" |
| 35 | cat > "$RUNNER" <<EOF |
| 36 | #!/bin/sh |
| 37 | set -u |
| 38 | printf "6\n" > /tmp/helix_genome.cfg |
| 39 | t0=\$(date +%s) |
| 40 | "$OLLM_GPU" gtrainf "$CK" "$TOK" $STEPS 200 > "$RD/train_loop_r$N.log" 2>&1 |
| 41 | rc_t=\$? |
| 42 | t1=\$(date +%s) |
| 43 | echo "LOOP_R${N}_TRAIN rc=\$rc_t sec=\$((t1 - t0))" |
| 44 | cat "$RD/train_loop_r$N.log" |
| 45 | sleep 8 |
| 46 | "$OLLM_GPU" geval "$CK" "$VLOOP/data/held.tok" 2475 "$MERGES" > "$RD/geval_loop_r$N.log" 2>&1 |
| 47 | rc_e=\$? |
| 48 | echo "LOOP_R${N}_HELD_2475 rc=\$rc_e \$(grep '^E ' "$RD/geval_loop_r$N.log")" |
| 49 | rm -f /tmp/helix_genome.cfg |
| 50 | [ "\$rc_t" = "0" ] && [ "\$rc_e" = "0" ] |
| 51 | EOF |
| 52 | chmod +x "$RUNNER" |
| 53 | |
| 54 | echo "$(date -u +%FT%H:%MZ) CLAIM $LANE $NAME to all: GB10 chip lock (lease ${LEASE}m, no quiet lock: training, not a timing) for Round-$N RLVR training of the 15.8M looped Omega LLM (+$STEPS steps) + full 2475-window geval; finishing antigravity's interrupted ab4 campaign at Drake's request; pause/reach me on this board" >> "$BOARD" |
| 55 | WID=$(spark-window open "$NAME" --lease "$LEASE" --gb10 exclusive --quiet none --wait | tail -n 1) |
| 56 | echo "OPENED_WINDOW=$WID" |
| 57 | cleanup() { |
| 58 | rm -f /tmp/helix_genome.cfg |
| 59 | spark-window close "$WID" >/dev/null 2>&1 || true |
| 60 | echo "$(date -u +%FT%H:%MZ) RELEASE $LANE $NAME: done, GPU idle" >> "$BOARD" |
| 61 | } |
| 62 | trap cleanup EXIT INT TERM |
| 63 | XB=$(sudo -n dmesg 2>/dev/null | grep -c "NVRM: Xid" || true) |
| 64 | spark-window run spark-receipt "$NAME" -- sh "$RUNNER" |
| 65 | RC=$? |
| 66 | XA=$(sudo -n dmesg 2>/dev/null | grep -c "NVRM: Xid" || true) |
| 67 | echo "XID_BEFORE=$XB XID_AFTER=$XA" |
| 68 | echo "CK_SHA256=$(sha256sum "$CK" | cut -c1-64)" |
| 69 | echo "RECEIPT=$(ls -t /home/drakestapleton/yardsticks/receipts/*"$NAME"*.json 2>/dev/null | head -1)" |
| 70 | echo "rc=$RC" > "$RD/DONE_GPU" |
| 71 | exit "$RC" |