Views
No views yet
runall.sh for the full pipeline.x_new = x - (1 - α) · P · h,α=1 不变,α=0 完全压制v1_raw 和新版 v_pca_subspace(k=3 子空间)JointResidualSteerer 防止跨维度代偿count_real_monitoring() 区分真反思和填充词is_collapsed() 用 4-gram 重复 + 长度比,比 v1 更稳1# 单卡完整跑
2bash runall.sh
3
4# 启用 anti-leak joint steering
5JOINT=1 bash runall.sh
6
7# 只跑某些 stage
8STAGES=8,8b,9,10 bash runall.sh
9
10# 只对一个题做 inference
11python scripts/10_infer.py --dim planning --alphas 1.0 0.5 0.0 \
12 --problem "Find x such that x^2=49"data/
models/ # Qwen3-30B-A3B-Thinking-2507
cots/ # raw + labeled CoTs
routing/ # router top-k dumps
activations/ # decision-point residuals
checkpoints/
planning_v1_raw.pt
planning_v_pca_subspace.pt # 新版 k=3 子空间
monitoring_v1_raw.pt
monitoring_v_pca_subspace.pt
results/
sweep_log.jsonl # 含 steered_text
final_report.md
attention_diagnostic.{json,png} # 新
infer_sanity_planning.json # 新
infer_sanity_monitoring.json # 新
logs/configs/model.py)1ALPHA_SWEEP = [0.0, 0.1, 0.2, 0.3, 0.5, 0.75, 1.0]
2DIRECTION_VERSIONS = ["v1_raw", "v_pca_subspace"]
3PCA_SUBSPACE_K = 3
4ANTI_LEAK_BETA = 0.3
5GEN_CONFIG["max_new_tokens"] = 12000 # 之前 4096 太小
6GEN_CONFIG_FAST["max_new_tokens"] = 8192 # 之前 1024 太小