NumPy allowed · plain Python earns 10 bonus points
Implement linear learning-rate warmup, a real, near-universal training stabilization technique for large model training.
Implement warmup_lr(step, warmup_steps, base_lr). If step >= warmup_steps (or warmup_steps == 0), return base_lr. Otherwise return base_lr * step / warmup_steps (linear ramp from 0).
warmup_lr(step: int, warmup_steps: int, base_lr: float) -> float