Skip to content

Fix error when dtype in config is unset #1271

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 9, 2025

Conversation

hans00
Copy link
Contributor

@hans00 hans00 commented Apr 3, 2025

No description provided.

@xenova
Copy link
Collaborator

xenova commented Apr 3, 2025

Thanks for the PR! 👍 Is there an example of a model you faced this issue with? Ideally, the dtype should be either:

  • a string (e.g., fp16), or
  • an object mapping module to dtype (e.g., { encoder_model: 'fp16'}

@hans00
Copy link
Contributor Author

hans00 commented Apr 3, 2025

Some model config have not setted dtype.
If specific dtype: auto on init, will got error.

Copy link
Collaborator

@xenova xenova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! LGTM

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@xenova xenova merged commit 991b259 into huggingface:main Apr 9, 2025
4 checks passed
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.

3 participants