Reject use_liger_kernel in GMPOTrainer - #7163
Open
YeonwooSung wants to merge 1 commit into
Open
Conversation
The inherited Liger path runs the GRPO fused loss and skips the geometric-mean objective. Fail at init instead of training the wrong loss.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
GMPOTraineronly overrides_compute_loss. InheritedGRPOTrainer.compute_lossstill routesuse_liger_kernel=Truethrough the GRPO fused loss, so training silently skips the geometric-mean objective.This raises in
GMPOTrainer.__init__beforesuper().__init__, so the Liger path never starts. A Liger GMPO kernel is not added.gmpo.mdnotes that the inherited flag is unsupported.Adds
test_init_fails_with_liger_kernel.Fixes #6808
Before submitting
AI writing disclosure
We welcome the use of AI tools to help with contributions. For transparency and to help us improve our review process, please indicate the level of AI involvement in this PR.
Who can review?
Anyone in the community is free to review the PR once the tests have passed.
Note
Low Risk
Small guard at trainer init plus docs and a unit test; no change to the GMPO loss path when
use_liger_kernelis false (default).Overview
GMPOTrainer now fails fast when
use_liger_kernel=True, because the inherited GRPO/Liger training path would optimize the GRPO fused loss instead of GMPO’s geometric-mean objective.A
ValueErroris raised inGMPOTrainer.__init__beforeGRPOTrainer.__init__, so the Liger path never starts. gmpo.md documents thatuse_liger_kernelis inherited fromGRPOConfigbut unsupported.test_init_fails_with_liger_kernelasserts construction raises with the expected message.Fixes #6808.
Reviewed by Cursor Bugbot for commit 63e1e75. Bugbot is set up for automated code reviews on this repo. Configure here.