tchbcb commited on
Commit
54e9aa2
·
verified ·
1 Parent(s): 410d9e8

Upload train/train_system1.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. train/train_system1.py +8 -0
train/train_system1.py CHANGED
@@ -116,6 +116,14 @@ def main() -> None:
116
  model = QwenJevModel(model_cfg).build()
117
  torch = model.torch
118
 
 
 
 
 
 
 
 
 
119
  # ---- stage A perception alignment (optional but recommended) --------
120
  stage_a_path = Path(cfg["out_dir"]) / "stage_a.pt"
121
  if stage_a_path.exists() and model_cfg.backend == "tiny":
 
116
  model = QwenJevModel(model_cfg).build()
117
  torch = model.torch
118
 
119
+ # v0.4.13: continue from existing decision heads when the out_dir carries
120
+ # a previous qwenjev_s1.pt (online-teach fine-tunes must keep the teacher
121
+ # generation's calibrated heads; fresh heads would throw away that state)
122
+ prev_heads = Path(cfg["out_dir"]) / "qwenjev_s1.pt"
123
+ if prev_heads.exists():
124
+ model.load_heads(str(cfg["out_dir"]))
125
+ print(f"heads continued -> {prev_heads}")
126
+
127
  # ---- stage A perception alignment (optional but recommended) --------
128
  stage_a_path = Path(cfg["out_dir"]) / "stage_a.pt"
129
  if stage_a_path.exists() and model_cfg.backend == "tiny":