feat: add ModelRegistry.get_available_dtypes() to detect quantization#1580
Merged
xenova merged 6 commits intohuggingface:mainfrom Mar 24, 2026
Merged
feat: add ModelRegistry.get_available_dtypes() to detect quantization#1580xenova merged 6 commits intohuggingface:mainfrom
xenova merged 6 commits intohuggingface:mainfrom
Conversation
… levels Assumes encode/decoder are equal
Contributor
Author
|
Would close this question: #1577 |
|
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. |
nico-martin
requested changes
Mar 16, 2026
Collaborator
nico-martin
left a comment
There was a problem hiding this comment.
I really like this feature! It's definitely something that is extremely helpful for users.
Just one small comment from my side.
packages/transformers/src/utils/model_registry/get_available_dtypes.js
Outdated
Show resolved
Hide resolved
The model-type-from-architecture resolution logic was duplicated between get_model_files.js and get_available_dtypes.js. This extracts it into a shared resolve_model_type(config) helper in resolve_model_type.js and calls it from both places.
76535d7 to
9795484
Compare
nico-martin
approved these changes
Mar 17, 2026
Closed
xenova
approved these changes
Mar 24, 2026
Collaborator
xenova
left a comment
There was a problem hiding this comment.
LGTM! ✅ thanks for the PR -- very clean.
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.
Assumes encode/decoder are equal