Skip to content

[docs] Clarify dtype defaults between trf v5 and TRL#5457

Open
casinca wants to merge 1 commit intohuggingface:mainfrom
casinca:docs-def-dtype
Open

[docs] Clarify dtype defaults between trf v5 and TRL#5457
casinca wants to merge 1 commit intohuggingface:mainfrom
casinca:docs-def-dtype

Conversation

@casinca
Copy link
Copy Markdown
Contributor

@casinca casinca commented Apr 4, 2026

What does this PR do?

This should Fix #5329
Feel free to tweak to your liking

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a GitHub issue? Please add a link
    to it if that's the case.
  • [] Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.


Note

Low Risk
Low risk documentation-only change that clarifies dtype inference/default behavior; no runtime code paths are modified.

Overview
Adds a note to docs/source/customization.md clarifying that Transformers v5 from_pretrained now infers dtype from the model config (rather than defaulting to float32), and advising users to pass dtype explicitly when needed.

Also documents that when TRL loads models from a model name string, it still defaults to float32.

Reviewed by Cursor Bugbot for commit 17bc1da. Bugbot is set up for automated code reviews on this repo. Configure here.

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.

Outdated documentation after Transformers v5 dtype default behavior changed

1 participant