#!/usr/bin/env bash # Chained after the 1.7B rung: re-run the 0.6B carrier on the SAME unwrapped corpus. # # The 1.7B run moved two variables at once -- carrier size AND corpus typography -- # because the unwrap could not wait if every further rung was to avoid inheriting the # Gutenberg line breaks. That makes a 0.6B-vs-1.7B comparison descriptive rather than # attributable, which is fine for "did sense come back" (a within-arm reading) and not # fine for anything quantitative between rungs. # # This closes that hole for the price of ~36 minutes on an idle experimental box: # 0.6B on the unwrapped corpus, seed 4919, everything else held. Then carrier size is # the ONLY difference between this and h02-1p7b-1ep, and the sweep is single-variable # again. # # ⚠ Gated on the 1.7B run having actually produced an adapter. If that run died, this # must not quietly start and consume the box; a chain that fires on failure turns one # lost run into two. set -uo pipefail PREV=/home/infra-ops/r49-runs/h02-1p7b-1ep OUT=/home/infra-ops/r49-runs/h02-0p6b-1ep-unwrapped LOG=$OUT/train.log CHAINLOG=/home/infra-ops/r49-runs/chain-0p6b-unwrapped.log exec >> "$CHAINLOG" 2>&1 echo "=== $(date -Is) chain armed, waiting on $PREV" while [ -f "$PREV/run.pid" ] && kill -0 "$(cat "$PREV/run.pid")" 2>/dev/null; do sleep 60; done echo "=== $(date -Is) 1.7B run finished" if [ ! -f "$PREV/adapter/adapter_model.safetensors" ]; then echo "=== REFUSING to chain: $PREV produced no adapter -- the 1.7B run did not succeed" exit 1 fi apps=$(nvidia-smi --query-compute-apps=pid --format=csv,noheader | tr -d '[:space:]') if [ -n "$apps" ]; then echo "=== REFUSING to chain: GPU not clear" nvidia-smi --query-compute-apps=pid,process_name,used_memory --format=csv exit 1 fi mkdir -p "$OUT" echo "# launched $(date -Is) Qwen3-0.6B-Base, 1 epoch, seed 4919, UNWRAPPED corpus (single-variable partner to h02-1p7b-1ep)" > "$LOG" setsid nohup /home/infra-ops/ml/.venv/bin/python /home/infra-ops/r49-prep/train_voice_lora.py \ --corpus /home/infra-ops/r49-corpus-renamed-unwrapped \ --base /home/infra-ops/carriers/Qwen3-0.6B-Base \ --seed 4919 --epochs 1 --eval-steps 25 --save-steps 25 \ --out "$OUT" >> "$LOG" 2>&1 < /dev/null & echo $! > "$OUT/run.pid" echo "=== $(date -Is) chained 0.6B launched pid $(cat "$OUT/run.pid") -> $LOG"