verl-project/verl

[FR] Tests for gradient accumulation

Fermée

#907 ouverte le 3 avr. 2025

 (0 commentaire) (0 réaction) (0 personne assignée)Python (4 440 forks)auto 404
enhancementgood first issue

Métriques du dépôt

Stars
 (23 087 étoiles)
Métriques de merge PR
 (Merge moyen 3j 6h) (125 PRs mergées en 30 j)

Description

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

Guide contributeur