mirror of
https://github.com/wassname/evil_MoE.git
synced 2026-06-27 16:45:42 +08:00
rename python package projected_grpo -> vgrout
git mv src/projected_grpo -> src/vgrout and find-replace the module name in
all imports (.py), `-m projected_grpo.*` invocations (justfile), and the
[project] name (pyproject; setuptools auto-discovers via where=["src"]).
Left RESEARCH_JOURNAL.md untouched: its commands/paths are dated lab notes
tied to past commits, so rewriting them would falsify provenance. Repo dir,
git remote, and absolute paths unchanged.
Verified: `import vgrout` and `python -m vgrout.train --help` load the full
graph; verify_rewards.py + verify_gate_anchor.py (both import vgrout) pass.
Full `just smoke` is blocked upstream by missing gitignored data artifacts
(out/pools/{substrate,teacher_pool}, out/vhack/*smoke*), unrelated to the rename.
This commit is contained in:
@@ -7,7 +7,7 @@ SEEDS_3 := "41 43 44"
|
||||
# (see RESEARCH_JOURNAL 2026-05-24 (b)).
|
||||
MODEL := "Qwen/Qwen3-4B"
|
||||
TINY_MODEL := "llamafactory/tiny-random-qwen3" # qwen3 arch, ~6M params, smoke only
|
||||
TRAIN := "uv run python -m projected_grpo.train" # real LeetCode GRPO entry point
|
||||
TRAIN := "uv run python -m vgrout.train" # real LeetCode GRPO entry point
|
||||
|
||||
default:
|
||||
@just --list
|
||||
@@ -74,11 +74,11 @@ smoke-xmech:
|
||||
# so pairs_from_pool can pair a hack-side with a clean-side per prompt.
|
||||
cp out/pools/teacher_pool/prompt_0005.jsonl.gz out/pools/teacher_pool_smoke/
|
||||
cp out/pools/teacher_pool/prompt_0030.jsonl.gz out/pools/teacher_pool_smoke/
|
||||
uv run python -m projected_grpo.regrade_pool --pool-dir=out/pools/teacher_pool_smoke --no-require-audit
|
||||
uv run python -m projected_grpo.pairs_from_pool \
|
||||
uv run python -m vgrout.regrade_pool --pool-dir=out/pools/teacher_pool_smoke --no-require-audit
|
||||
uv run python -m vgrout.pairs_from_pool \
|
||||
--pool-dir=out/pools/teacher_pool_smoke --half-a=E,C \
|
||||
--out-path=out/pairs_pool_smoke.json
|
||||
BEARTYPE=1 uv run python -m projected_grpo.extract_vhack_grad \
|
||||
BEARTYPE=1 uv run python -m vgrout.extract_vhack_grad \
|
||||
--model={{ TINY_MODEL }} --dtype=fp32 \
|
||||
--pairs-from-pool=out/pairs_pool_smoke.json \
|
||||
--n-heldout=0 --top-k=1 \
|
||||
@@ -202,14 +202,14 @@ download-model:
|
||||
snapshot_download('{{ MODEL }}', allow_patterns=['*.json','*.txt','tokenizer*','*.safetensors'])"
|
||||
|
||||
extract-vhack-smoke:
|
||||
uv run python -m projected_grpo.extract_vhack_grad \
|
||||
uv run python -m vgrout.extract_vhack_grad \
|
||||
--model=Qwen/Qwen3.5-0.8B \
|
||||
--dtype=bf16 \
|
||||
--out-path=out/vhack/v_hack_smoke.safetensors \
|
||||
--train-grads-path=out/vhack_grads/vhack_grads_train_smoke.safetensors
|
||||
|
||||
extract-vhack-full:
|
||||
uv run python -m projected_grpo.extract_vhack_grad \
|
||||
uv run python -m vgrout.extract_vhack_grad \
|
||||
--model=Qwen/Qwen3-4B \
|
||||
--dtype=bf16 \
|
||||
--out-path=out/vhack/v_hack_full.safetensors \
|
||||
@@ -338,7 +338,7 @@ pregen-teacher-alt teacher tag n_prompts="50":
|
||||
# 4-boolean co-occurrence + signature breakdown on the cached pool.
|
||||
# `pool` selects which pool to regrade (default = original rh-s65 pool).
|
||||
regrade-pool pool="out/pools/teacher_pool":
|
||||
uv run python -m projected_grpo.regrade_pool --pool-dir={{ pool }}
|
||||
uv run python -m vgrout.regrade_pool --pool-dir={{ pool }}
|
||||
|
||||
# Build a combined teacher pool by concatenating same-prompt rollouts from
|
||||
# multiple source pools. Used by G2/G3 (docs/spec/20260528_g2_g3_checkpoint_selection.md).
|
||||
@@ -352,7 +352,7 @@ build-combined-pool:
|
||||
# the hack side. Writes out/pairs_pool_half<HALF_A>.json with N<=14 same-prompt
|
||||
# pairs. Asserts hack and clean rollouts share the prompt.
|
||||
pairs-from-pool half_a="E,C" pool="out/pools/teacher_pool" tag="":
|
||||
uv run python -m projected_grpo.pairs_from_pool \
|
||||
uv run python -m vgrout.pairs_from_pool \
|
||||
--pool-dir={{ pool }} \
|
||||
--half-a={{ half_a }} \
|
||||
--out-path=out/pairs_pool_half_{{ replace(half_a, ',', '') }}{{ tag }}.json
|
||||
@@ -360,7 +360,7 @@ pairs-from-pool half_a="E,C" pool="out/pools/teacher_pool" tag="":
|
||||
# Extract v_hack from the pool-derived pairs (subprocess to extract_vhack_grad
|
||||
# with --pairs-from-pool). Output basis only sees half_A hacks at extract time.
|
||||
extract-vhack-pool half_a="E,C" tag="":
|
||||
uv run python -m projected_grpo.extract_vhack_grad \
|
||||
uv run python -m vgrout.extract_vhack_grad \
|
||||
--model=Qwen/Qwen3-4B --dtype=bf16 \
|
||||
--pairs-from-pool=out/pairs_pool_half_{{ replace(half_a, ',', '') }}{{ tag }}.json \
|
||||
--out-path=out/vhack/v_hack_pool_half_{{ replace(half_a, ',', '') }}{{ tag }}.safetensors \
|
||||
|
||||
Reference in New Issue
Block a user