Skip to content

[FEAT][alignment]: use real policy logprobs and reward providers for production GRPO #63

Closed

Description

@inaniloquentee

Goal

Move GRPO training from smoke-style local inputs to production-grade rollout inputs:
real old-policy logprobs, real reference-policy logprobs, and pluggable reward sources.

Background

Issue #16 implements the GRPO objective and worker integration, but the current
training-worker helper still synthesizes old/ref logps from current logps for
local smoke paths. Rewards can be consumed from payloads and strict validation
exists, but reward computation itself is not yet modeled as a production adapter.

Tasks

  • Define the rollout/training batch contract for:
    • current selected logprobs;
    • old-policy selected logprobs captured during rollout;
    • reference-policy selected logprobs;
    • scalar sequence rewards;
    • prompt group ids and completion masks.
  • Extend rollout payload parsing to consume old/ref logps when supplied.
  • Add shape/device/dtype/mask validation for logprob tensors.
  • Add a reward provider protocol for:
    • payload scalar rewards;
    • rule-based verifier callback;
    • optional model-backed reward callable.
  • Keep local smoke fallback clearly labeled and disabled in strict production mode.
  • Add tests where current, old, and reference logps are distinct tensors.
  • Add tests for missing/mismatched logps and rewards.

Acceptance Criteria

  • GRPO worker loss uses real supplied old/ref logps when available.
  • Production strict mode rejects incomplete rollout/reward/logprob payloads.
  • Reward computation is pluggable without importing vLLM, DeepSpeed, or Ray at module import time.

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