Skip to content

Require effective GRPO updates - #31

Merged
bingran-you merged 1 commit into
mainfrom
bry/align-grpo-group-sampling
Jul 15, 2026
Merged

Require effective GRPO updates#31
bingran-you merged 1 commit into
mainfrom
bry/align-grpo-group-sampling

Conversation

@bingran-you

Copy link
Copy Markdown
Contributor

Summary

  • align the production Qwen3.5 recipe with TRL's official eight-generation default
  • record the exact GRPO software/code/config recipe and invalidate stale checkpoints on any drift
  • require complete reward groups, nonzero within-group reward variance, finite training loss, and finite nonzero LoRA-B updates before publishing a GRPO adapter
  • preserve detailed reward/update/trainer diagnostics and expose the effective-update result in score and leaderboard records
  • allow monotonic GRPO sampling upgrades on resume while restarting only GRPO and downstream evaluation from the preserved SFT checkpoint
  • make SFT/GRPO dry-runs non-mutating and cascade artifact invalidation when a stale SFT or GRPO checkpoint is retrained

Evidence

The previous 16-task live run produced 32 rollouts in two-generation groups. Every group had identical binary rewards, train_loss=0, and all 248 GRPO LoRA-B tensors remained exactly zero. This change makes that state fail closed and increases production groups to eight candidates.

Verification

  • pytest pipelines/benchflow-task-posttrain/tests -q (237 passed)
  • ruff check pipelines/benchflow-task-posttrain/src pipelines/benchflow-task-posttrain/tests
  • ruff format --check on all changed Python files
  • python -m compileall -q pipelines/benchflow-task-posttrain/src
  • git diff --check
  • independent and adversarial review passes; all actionable findings fixed

@bingran-you
bingran-you merged commit cf824b2 into main Jul 15, 2026
1 check passed
@bingran-you
bingran-you deleted the bry/align-grpo-group-sampling branch July 15, 2026 00:29

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6d3e45fb10

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

metrics.get("mode") == "grpo"
and metrics.get("model") == input_model
and metrics.get("task_ids") == self.train_task_ids
and metrics.get("training_recipe") == grpo_training_recipe(self.config)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid loading train-only deps during resume checks

When resuming or dry-running a run that already has a GRPO train_metrics.json, this new checkpoint-current predicate calls grpo_training_recipe(), whose version fields raise if optional training packages such as trl, peft, transformers, or torch are not installed. Because the base package keeps those dependencies optional, a resume that could otherwise reuse the saved GRPO checkpoint, or at least dry-run the restart, now aborts during the freshness check before reaching either path; consider treating an unavailable current recipe as non-current or only resolving package versions inside actual GRPO training.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant