verl-project/verl

[FR] Tests for gradient accumulation

已关闭

#907 创建于 2025年4月3日

 (0 条评论) (0 个反应) (0 位负责人)Python (4,434 个派生)auto 404
enhancementgood first issue

仓库指标

星标
 (23,069 个星标)
PR 合并指标
 (平均合并 3天 6小时) (30 天内合并 125 个 PR)

描述

Summary

Promise from #906.

Add tests to assert the losses on the same mini-batch are equal

  • between w/o & w/ gradient accumulation
  • using all the different loss aggregation modes

Plan

We might went to test end-to-end to avoid potential implication by any other changes.

Plan Pro
A) Inherit a new Trainer class to test Standalone without affecting the main config
B) Add a config term and modify update_* to test 1) Minimal code modification 2) Compatibility to any Trainer

贡献者指南