fix(trainer): 移除固定总步数,使用实际停止批次计算 warmup 步数

This commit is contained in:
songsenand 2026-02-26 14:36:25 +08:00
parent 1178f87713
commit 43c8349d51
1 changed files with 1 additions and 1 deletions

View File

@ -455,7 +455,7 @@ class MoEModel(nn.Module):
scaler = amp.GradScaler(enabled=mixed_precision)
total_steps = max(stop_batch, 2e5)
total_steps = stop_batch
warmup_steps = int(total_steps * warmup_ratio)
logger.info(f"Training Start: Steps={total_steps}, Warmup={warmup_steps}")
processed_batches = 0