Repository navigation
Align packaged GRPO model dtype with trainer precision - #271
Merged
Merged
Conversation
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.
Change
Resolve the effective GRPOConfig precision before loading the model. When the retained model dtype is null, pass
float16orbfloat16to Unsloth's loader to match the trainer. Preserve an explicitly configured model dtype. Refresh only the GRPO offline/outer closure hashes and sync the fine-tuning skill mirrors.Evidence and limits
The consumed 0d515 attempt ended with closed
GRPO_TRAINER_CHILD_EXEC_TYPE_TRAINER_SETUP, retry false, no artifacts or parameter/reward verdict. It does not retain the exception message or observed loaded dtype, so the historical cause remains unproven.Pinned published wheels inspected offline: TRL 0.24.0, Transformers 4.57.1, Unsloth 2026.1.2. The exact Unsloth generated constructor guard, extracted from the pinned wheel and executed without ML imports, raises TypeError for a BF16 model with fp16 trainer flags and accepts matching float16/fp16 and bfloat16/bf16 pairs. The pinned Unsloth loader auto-selects BF16 on BF16-capable hardware when dtype is null; the retained workload asks fp16. The pinned Transformers loader updates
config.dtypewhen an explicit dtype is passed. This identifies a reproducible constructor incompatibility, not a retrospective proof of which historical TypeError fired.Verification
git diff --checkclean.No GPU call, provider action, image build/pull, model call, package upgrade, training replay or old-resource change. A fresh qualification requires a new clean host gitlink/source commit, reviewed release/image/profile and independent admission, then the usual bounded CPU and one-shot GPU gates. Keep the consumed attempt's claims, resources and read keys.