verl-project/verl

[FR] Tests for gradient accumulation

已關閉

#907 建立於 2025年4月3日

 (0 則留言) (0 個反應) (0 位負責人)Python (4,440 個分叉)auto 404
enhancementgood first issue

倉庫指標

星標
 (23,087 顆星)
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

貢獻者指南