summaryrefslogtreecommitdiff
path: root/research/flossing/run_step6_prefloss.sh
diff options
context:
space:
mode:
Diffstat (limited to 'research/flossing/run_step6_prefloss.sh')
-rwxr-xr-xresearch/flossing/run_step6_prefloss.sh40
1 files changed, 40 insertions, 0 deletions
diff --git a/research/flossing/run_step6_prefloss.sh b/research/flossing/run_step6_prefloss.sh
new file mode 100755
index 0000000..172bd3e
--- /dev/null
+++ b/research/flossing/run_step6_prefloss.sh
@@ -0,0 +1,40 @@
+#!/bin/bash
+# Step 6: Preflossing experiments from step_13020 (epoch 10K, chaos onset)
+# Baseline = original HRM training curve (already have 10 ckpts)
+# Two conditions:
+# B: Engelken prefloss (500 steps Σλ_i²) → task training 3000 steps
+# C: CF prefloss (500 steps Σmax(0,λ_i)²) → task training 3000 steps
+set -e
+cd /home/yurenh2/rrm/research/flossing
+source /home/yurenh2/miniconda3/etc/profile.d/conda.sh
+conda activate rrm
+export CUDA_VISIBLE_DEVICES=0
+
+CKPT_ROOT="/home/yurenh2/rrm/hrm/checkpoints/Sudoku-extreme-1k-aug-1000 ACT-torch/HierarchicalReasoningModel_ACTV1 righteous-python"
+SRC_CKPT="step_13020"
+
+echo "[$(date '+%H:%M:%S')] Starting step6 prefloss experiments" >> step6_runner.log
+
+# B: Engelken prefloss (Σλ_i², two-sided)
+echo "[$(date '+%H:%M:%S')] Starting B (engelken prefloss)" >> step6_runner.log
+python step6_prefloss.py \
+ --ckpt-root "$CKPT_ROOT" --ckpt-name "$SRC_CKPT" \
+ --prefloss-steps 500 --train-steps 3000 \
+ --floss-mode engelken --floss-lr 1e-4 --train-lr 1e-5 \
+ --batch-size 8 --k-lyap 2 --lyap-act-steps 16 \
+ --eval-every 100 --eval-n 512 --eval-batch-size 32 \
+ --out step6_B_engelken.json > step6_B.log 2>&1
+echo "[$(date '+%H:%M:%S')] B done" >> step6_runner.log
+
+# C: CF prefloss (Σmax(0,λ_i)², one-sided hinge)
+echo "[$(date '+%H:%M:%S')] Starting C (CF prefloss)" >> step6_runner.log
+python step6_prefloss.py \
+ --ckpt-root "$CKPT_ROOT" --ckpt-name "$SRC_CKPT" \
+ --prefloss-steps 500 --train-steps 3000 \
+ --floss-mode cf --floss-lr 1e-4 --train-lr 1e-5 \
+ --batch-size 8 --k-lyap 2 --lyap-act-steps 16 \
+ --eval-every 100 --eval-n 512 --eval-batch-size 32 \
+ --out step6_C_cf.json > step6_C.log 2>&1
+echo "[$(date '+%H:%M:%S')] C done" >> step6_runner.log
+
+echo "[$(date '+%H:%M:%S')] All step6 prefloss experiments complete" >> step6_runner.log