feat: Module C v5/v6 training complete, ablations, SOTA baselines, paper updates

- Module C: BC+PPO training v5/v6 done; eval results in experiments/eval_intervention_v{5,6}.json
- Reward: v5 label-aligned constrained reward (code/src/rl/reward.py)
- Ablations: Module B (history_r, response_only, full) + Module C (wo_category_reward)
- SOTA baselines: WildGuard and ShieldGemma2b eval scripts and results
- Paper: update sections 05–08 (Module B/C description, experiments table, discussion)
- Docs: add record.md (change log), update state.md and exp.md; retire change.md
- Tools: add html-to-ppt utilities and run_shieldgemma2b.sh
- Configs: add ablation YAML configs for Module B and C
- Cleanup: remove stale reference/ PNG screenshots

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-20 14:24:09 +08:00
parent 6d61a950f1
commit 52ba43f08d
55 changed files with 8239 additions and 1244 deletions

View File

@@ -130,12 +130,14 @@ def main():
per_gpu_bs = train_cfg["per_gpu_batch_size"]
num_workers = data_cfg.get("num_workers", 4)
ablation_mode = data_cfg.get("ablation_mode", "full")
train_ds = CompanionGuardDataset(
data_cfg["train_path"], tokenizer,
max_persona_len=data_cfg["max_persona_len"],
max_context_len=data_cfg["max_context_len"],
max_response_len=data_cfg["max_response_len"],
max_history_turns=data_cfg["max_history_turns"],
ablation_mode=ablation_mode,
)
val_ds = CompanionGuardDataset(
data_cfg["val_path"], tokenizer,
@@ -143,6 +145,7 @@ def main():
max_context_len=data_cfg["max_context_len"],
max_response_len=data_cfg["max_response_len"],
max_history_turns=data_cfg["max_history_turns"],
ablation_mode=ablation_mode,
)
train_loader = make_loader(train_ds, per_gpu_bs, accelerator, shuffle=True, num_workers=num_workers)