Skip to content

[FEAT][alignment]: audit GRPO loss reduction semantics and add production-scale validation #64

Closed

Description

@inaniloquentee

Goal

Make GRPO loss reduction semantics explicit and validate them under ragged,
large-shape, production-like rollout workloads.

Background

Issue #16 averages over active completion tokens globally. This is correct for
the current Kernel-Align objective contract, but DeepSeek-style GRPO may require
sequence-level averaging before group/batch aggregation depending on the target
formula. The behavior should be explicit, configurable if needed, and tested on
ragged completions.

Tasks

  • Document the target GRPO loss formula.
  • Compare global-token mean vs per-sequence mean behavior.
  • Add config support if both reduction modes are required.
  • Add tests where completion lengths differ and the two reductions produce
    different results.
  • Add larger CUDA benchmark profiles for realistic group sizes, completion
    lengths, and vocabulary sizes.
  • Record memory/time/drift evidence in issue docs.
  • Keep smoke tests fast and deterministic.

Acceptance Criteria

  • Loss reduction mode is explicit in config and metrics.
  • Ragged completion tests prove the selected behavior.
  • CUDA benchmark evidence covers both small smoke and larger production-shaped inputs.

Activity

  1. added
    component: alignment
    priority: high
    on Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

component: alignmentpriority: high

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions