Skip to content

feat(grpo): add gradient accumulation across multiple groups #48

@abrichr

Description

@abrichr

Problem

_training_step processes a single group of rollouts per optimizer step. There is no mechanism to accumulate gradients across multiple groups before stepping. With binary rewards and small group sizes (N=8), many steps have all-zero or all-one rewards producing zero gradient signal. Accumulating across 2-4 groups before stepping would improve stability and reduce wasted compute.

Also related: per-step backward prevents multi-step batching for GPU efficiency. Consider batching steps that share the same image for more efficient forward passes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions