Repository navigation
Studio: honor the 'none' gradient checkpointing option in training - #7128
Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
There was a problem hiding this comment.
Code Review
This pull request updates the prepare_model_for_training function in trainer.py to recognize 'none' and 'off' as valid string representations for disabling gradient checkpointing. There are no review comments, and I have no feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
@codex review |
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
Selecting None in the training "Gradient checkpointing" dropdown did nothing on the main LoRA/QLoRA path. Studio silently kept Unsloth's checkpointing on and logged a bogus "Invalid value" warning, so a user who wanted it off couldn't turn it off.
Fix
The trainer only recognized
true/false-style values and droppednoneto its default. Addnone(andoff) to the disable case, so the dropdown choice is honored. The MLX and embedding training paths already did this, so this just brings the LoRA path in line.No other option changes: Unsloth, Standard, and the default behave exactly as before.
Verification
Confirmed the
nonevalue reaches the trainer unchanged from the dropdown, that it now disables checkpointing (instead of being reset to Unsloth), and that the sibling paths already behaved this way. No existing test relied on the old behavior.Surfaced by an AMD (gfx1201) user who reported Unsloth "forcing smart memory despite selecting none": https://www.reddit.com/r/unsloth/comments/1uunobi/any_roadmap_for_when_gfx1201_will_become/. Their training also crashes, which is a separate issue.