fix(trainer): 移除固定总步数,使用实际停止批次计算 warmup 步数
This commit is contained in:
parent
1178f87713
commit
43c8349d51
|
|
@ -455,7 +455,7 @@ class MoEModel(nn.Module):
|
||||||
|
|
||||||
scaler = amp.GradScaler(enabled=mixed_precision)
|
scaler = amp.GradScaler(enabled=mixed_precision)
|
||||||
|
|
||||||
total_steps = max(stop_batch, 2e5)
|
total_steps = stop_batch
|
||||||
warmup_steps = int(total_steps * warmup_ratio)
|
warmup_steps = int(total_steps * warmup_ratio)
|
||||||
logger.info(f"Training Start: Steps={total_steps}, Warmup={warmup_steps}")
|
logger.info(f"Training Start: Steps={total_steps}, Warmup={warmup_steps}")
|
||||||
processed_batches = 0
|
processed_batches = 0
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue