Skip to content

Fix UnslothTrainingArguments not patching trl.Config properly - #2873

Merged
shimmyshimmer merged 4 commits into
unslothai:mainfrom
Erland366:fix/unslothtrainingarguments
Jul 3, 2025
Merged

shimmyshimmer merged 4 commits into
unslothai:mainfrom
Erland366:fix/unslothtrainingarguments

Conversation

@Erland366

Copy link
Copy Markdown
Collaborator

Few updates ago, we patch trl.Config especially in the bf16 and fp16 args to bypass the Ampere GPU error -> https://github.com/unslothai/unsloth/blob/main/unsloth/models/rl.py#L235-L267

But the patching is not propagate to the inheritance class that is using dataclass. Therefore, we should inherit it using Python Class instead to propagate the patching.

This fixes training error on Mistral CPT

@Erland366
Erland366 requested a review from danielhanchen July 3, 2025 19:08
@shimmyshimmer
shimmyshimmer merged commit 51a7023 into unslothai:main Jul 3, 2025
abiswas-realadvice pushed a commit to abiswas-realadvice/unsloth that referenced this pull request May 14, 2026
…rguments

Fix `UnslothTrainingArguments` not patching `trl.Config` properly
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.

2 participants