mirror of
https://github.com/wassname/evil_MoE.git
synced 2026-07-21 12:30:48 +08:00
justfile: drop 12 dead probe-* recipes superseded by train.py
The probe_distill.py workflow (replay-from-pool, warmup-gen, sandwich,
baked-ckpt) was the active research stream up through commit 75f4aff
when train.py took over with the fast preset + mixed-pool flag. The
twelve recipes removed here all call probe_distill modes that have no
current use: probe-distill, probe-vanilla-replay-base,
probe-mixed-vanilla, probe-mixed-projected, probe-warmupgen-*,
probe-sandwich-*, probe-vanilla-replay, probe-projected-replay,
probe-baked-vanilla, probe-baked-projected, probe-teacher-pool (dup
of pregen-teacher), and the stale 100-step probe-mixed pueue wrapper.
Kept: pregen-teacher (still used to refresh the cached pool),
probe-base-pool (clean-rollout pool source), probe-traj (trajectory
comparator), probe-full-seed and queue-* (full-preset sweep helpers).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
3efd9e69a8
commit
1e3d39e318
@@ -161,131 +161,23 @@ queue-projected preset="full" vhack="out/v_hack_full.safetensors":
|
||||
-- {{ TRAIN }} {{ preset }} --arm=projected --seed=$seed --v-hack-path={{ vhack }} --out-tag=_{{ preset }}_projected_seed$seed
|
||||
done
|
||||
|
||||
# Distillation probe: hacky teacher (ariahw rh-s65) samples, student trains
|
||||
# with per-sample v_hack cosine logging. step_NNN.jsonl.gz per step is replayable.
|
||||
probe-distill *ARGS:
|
||||
uv run python -m projected_grpo.probe_distill --v-hack-path=out/v_hack_full.safetensors {{ ARGS }}
|
||||
|
||||
# UAT pipeline: 1) teacher pool 2) vanilla replay 3) projected replay 4) analyze.
|
||||
# T1 teacher hack >= 0.30 T2 vanilla cos coverage >= 90%
|
||||
# T3 projected cos_post<cos_pre on >= 80% of steps T4 cos | hacked > cos | not (p<0.05)
|
||||
probe-teacher-pool steps="20":
|
||||
uv run python -m projected_grpo.probe_distill --teacher-only --steps={{ steps }} --n-problems={{ steps }}
|
||||
|
||||
# Base pool: base Qwen3-4B, no LoRA, no hint applied. ~0% hack per ariahw §86.
|
||||
# Used to source non-hack samples for the cos comparison bucket.
|
||||
probe-base-pool steps="20":
|
||||
uv run python -m projected_grpo.probe_distill --base-only --steps={{ steps }} --n-problems={{ steps }}
|
||||
|
||||
probe-vanilla-replay-base steps="20":
|
||||
uv run python -m projected_grpo.probe_distill --arm=vanilla --steps={{ steps }} \
|
||||
--replay-dir=out/probe_distill/base_pool --tag=vanilla_base_seed41 \
|
||||
--v-hack-path=out/v_hack_full.safetensors
|
||||
|
||||
# Mixed-replay GRPO: teacher_pool + base_pool merged 4+4 per step.
|
||||
# Reward variance -> Dr.GRPO centered advantage non-zero -> real GRPO cos.
|
||||
# Arm 1: vanilla (no projection action, but cos_pre measured).
|
||||
probe-mixed-vanilla steps="20":
|
||||
uv run python -m projected_grpo.probe_distill --arm=vanilla --steps={{ steps }} \
|
||||
--replay-dirs=out/probe_distill/teacher_pool,out/probe_distill/base_pool \
|
||||
--tag=mixed_vanilla_seed41 \
|
||||
--v-hack-path=out/v_hack_full.safetensors
|
||||
|
||||
# Arm 2: projected GRPO in SVD basis (AntiPaSTO + project_delta_S_grad).
|
||||
probe-mixed-projected steps="20":
|
||||
uv run python -m projected_grpo.probe_distill --arm=projected --steps={{ steps }} \
|
||||
--replay-dirs=out/probe_distill/teacher_pool,out/probe_distill/base_pool \
|
||||
--tag=mixed_projected_svd_seed41 \
|
||||
--v-hack-path=out/v_hack_full.safetensors
|
||||
|
||||
# Warmup -> student-gen: first `warmup` steps replay from mixed pools (cheap
|
||||
# distillation), then student generates with the learned adapter (canonical
|
||||
# GRPO). Lets us watch hack-rate emerge naturally after warmup.
|
||||
probe-warmupgen-vanilla steps="100" warmup="70":
|
||||
uv run python -m projected_grpo.probe_distill --arm=vanilla --steps={{ steps }} \
|
||||
--warmup-replay-steps={{ warmup }} \
|
||||
--replay-dirs=out/probe_distill/teacher_pool,out/probe_distill/base_pool \
|
||||
--tag=warmupgen_vanilla_seed41 \
|
||||
--v-hack-path=out/v_hack_full.safetensors
|
||||
|
||||
probe-warmupgen-projected steps="100" warmup="70":
|
||||
uv run python -m projected_grpo.probe_distill --arm=projected --steps={{ steps }} \
|
||||
--warmup-replay-steps={{ warmup }} \
|
||||
--replay-dirs=out/probe_distill/teacher_pool,out/probe_distill/base_pool \
|
||||
--tag=warmupgen_projected_svd_seed41 \
|
||||
--v-hack-path=out/v_hack_full.safetensors
|
||||
|
||||
# Sandwich: pre student-gen | distill replay | post student-gen.
|
||||
# Lets us see baseline, hack adoption, and persistence in one run.
|
||||
probe-sandwich-vanilla pre="20" distill="50" post="20" seed="41":
|
||||
uv run python -m projected_grpo.probe_distill --arm=vanilla \
|
||||
--steps=$(({{ pre }} + {{ distill }} + {{ post }})) \
|
||||
--pre-warmup-steps={{ pre }} --warmup-replay-steps={{ distill }} \
|
||||
--replay-dirs=out/probe_distill/teacher_pool,out/probe_distill/base_pool \
|
||||
--seed={{ seed }} \
|
||||
--tag=sandwich_vanilla_seed{{ seed }} \
|
||||
--v-hack-path=out/v_hack_full.safetensors
|
||||
|
||||
probe-sandwich-projected pre="20" distill="50" post="20" seed="41":
|
||||
uv run python -m projected_grpo.probe_distill --arm=projected \
|
||||
--steps=$(({{ pre }} + {{ distill }} + {{ post }})) \
|
||||
--pre-warmup-steps={{ pre }} --warmup-replay-steps={{ distill }} \
|
||||
--replay-dirs=out/probe_distill/teacher_pool,out/probe_distill/base_pool \
|
||||
--seed={{ seed }} \
|
||||
--tag=sandwich_projected_svd_seed{{ seed }} \
|
||||
--v-hack-path=out/v_hack_full.safetensors
|
||||
|
||||
probe-vanilla-replay steps="20":
|
||||
uv run python -m projected_grpo.probe_distill --arm=vanilla --steps={{ steps }} \
|
||||
--replay-dir=out/probe_distill/teacher_pool \
|
||||
--v-hack-path=out/v_hack_full.safetensors
|
||||
|
||||
probe-projected-replay steps="20":
|
||||
uv run python -m projected_grpo.probe_distill --arm=projected --steps={{ steps }} \
|
||||
--replay-dir=out/probe_distill/teacher_pool \
|
||||
--v-hack-path=out/v_hack_full.safetensors
|
||||
|
||||
# Trajectory comparator for the warmup-gen runs (vanilla vs projected).
|
||||
probe-traj:
|
||||
uv run python -m projected_grpo.probe_traj
|
||||
|
||||
# Baked-ckpt probe (plan step 2/4): 50-step train.py on out/baked/qwen3_4b_rh25
|
||||
# with v_hack_rh25 (top-k=5, real-voice pairs). prompts_per_step=8 → ~40 min/run.
|
||||
# Goal: see if vanilla still climbs hack hill at 25% bake, and whether projected
|
||||
# arm tracks cos_pre/cos_post as expected.
|
||||
probe-baked-vanilla tag="rh25" seed="41":
|
||||
{{ TRAIN }} full --arm=vanilla \
|
||||
--model=out/baked/qwen3_4b_{{ tag }} \
|
||||
--steps=50 --prompts-per-step=8 \
|
||||
--seed={{ seed }} --out-tag=_baked_{{ tag }}_vanilla_seed{{ seed }}
|
||||
|
||||
probe-baked-projected tag="rh25" seed="41":
|
||||
{{ TRAIN }} full --arm=projected \
|
||||
--model=out/baked/qwen3_4b_{{ tag }} \
|
||||
--v-hack-path=out/v_hack_{{ tag }}.safetensors \
|
||||
--steps=50 --prompts-per-step=8 \
|
||||
--seed={{ seed }} --out-tag=_baked_{{ tag }}_projected_seed{{ seed }}
|
||||
|
||||
# Print the results table prototype.
|
||||
table-proto:
|
||||
@cat docs/table_proto.md
|
||||
|
||||
# =============================================================================
|
||||
# Mixed-pool GRPO (cached teacher pool)
|
||||
# =============================================================================
|
||||
# Hypothesis: starting GRPO from a CLEAN base + mixing cached teacher rollouts
|
||||
# into each prompt's G-group lets us measure how fast the student LEARNS the
|
||||
# hack from exposure (rather than re-emergence from a baked substrate). See
|
||||
# /root/.claude/plans/mixed-pool-grpo-clean-base-functional-tern.md.
|
||||
#
|
||||
# Workflow:
|
||||
# 1) just pregen-teacher 100 # one-time; existing 70 prompts may suffice
|
||||
# 2) just probe-mixed 41 # 10-step GO/NO-GO probe via pueue
|
||||
# 3) inspect: hack_s climbs 0 -> 20%+ ? GO -> head-to-head; NO-GO -> diagnose
|
||||
|
||||
# Pre-generate teacher rollouts for N prompts via probe_distill.py --teacher-only.
|
||||
# Writes/extends out/probe_distill/teacher_pool/. Teacher = ariahw rh-s65 LoRA
|
||||
# merged on Qwen3-4B. Cost ~30s/prompt @ G=8, max_new=1024 -> ~50 min for 100.
|
||||
# Pool is consumed by fast-vanilla / fast-projected via --teacher-pool-dir.
|
||||
pregen-teacher n_prompts="100":
|
||||
uv run python -m projected_grpo.probe_distill \
|
||||
--teacher-only \
|
||||
@@ -293,24 +185,6 @@ pregen-teacher n_prompts="100":
|
||||
--group=8 \
|
||||
--max-new=1024
|
||||
|
||||
# 100-step feasibility probe: clean Qwen3-4B + 75% cached teacher pool, pp=4, G=12.
|
||||
# Plan B "free lunch": mix=0.75 -> G_s=3, G_t=9. Gen wall-time unchanged
|
||||
# (teacher is cached disk reads), backward VRAM ~2x current (peak ~55-60 GB on
|
||||
# 96 GB card). At 48 gens/step (vs reference 256), 100 steps ~= 19 ref steps.
|
||||
# --v-hack-path is set even for vanilla so cin/cout get measured as baseline
|
||||
# (project_delta_S_grad with measure_only=True on vanilla arm).
|
||||
probe-mixed seed="41":
|
||||
pueue add -l "why: does mixed-pool GRPO (cached teacher, plan B grad pressure) drive student hack-rate from clean base; resolve: confirm hack_s climbs 0->10%+ over 100 steps (~19 ref-eq)" \
|
||||
-w "$PWD" -- \
|
||||
{{ TRAIN }} full --arm=vanilla \
|
||||
--model={{ MODEL }} \
|
||||
--v-hack-path=out/v_hack_full.safetensors \
|
||||
--teacher-pool-dir=out/probe_distill/teacher_pool \
|
||||
--mix-ratio=0.75 --group=12 \
|
||||
--steps=100 --prompts-per-step=4 \
|
||||
--seed={{ seed }} \
|
||||
--out-tag=_probe_mixed_s{{ seed }}
|
||||
|
||||
# Show recent pueue logs.
|
||||
log:
|
||||
pueue log -l 40
|
||||
|
||||
Reference in New Issue
Block a user