fix : FSDP 优化器顺序、温度除零、调度器静默死亡、ref模型设备
- executor: use_orig_params 硬编码 True,FSDP 不替换 Parameter 对象 - strategy: DPO/GRPO ref 模型创建后移到 device - sample: TemperatureStrategy clamp 1e-8,engine 验证改为 >0 - scheduler: 异常不 re-raise 避免 daemon 静默死亡,stop() 发回调给 waiting 任务
This commit is contained in:
@@ -219,7 +219,7 @@ class DPOStrategy(BaseStrategy):
|
||||
super().__init__(model, device, **kwargs)
|
||||
self.ref_model = create_ref_model(
|
||||
self.model_fn, self.executor.unwrap_model(model)
|
||||
)
|
||||
).to(device=self.device)
|
||||
self.beta = beta
|
||||
self.reduction = reduction
|
||||
|
||||
@@ -275,7 +275,7 @@ class GRPOStrategy(BaseStrategy):
|
||||
super().__init__(model, device, **kwargs)
|
||||
self.ref_model = create_ref_model(
|
||||
self.model_fn, self.executor.unwrap_model(model)
|
||||
)
|
||||
).to(device=self.device)
|
||||
self.clip_eps = clip_eps
|
||||
self.kl_coef = kl_coef
|
||||
self.group_size = group_size
|
||||
|
||||
Reference in New Issue
Block a user