Skip to content

feat: add ModelRegistry.get_available_dtypes() to detect quantization#1580

Merged
xenova merged 6 commits intohuggingface:mainfrom
sroussey:get_available_dtypes
Mar 24, 2026
Merged

feat: add ModelRegistry.get_available_dtypes() to detect quantization#1580
xenova merged 6 commits intohuggingface:mainfrom
sroussey:get_available_dtypes

Conversation

@sroussey
Copy link
Contributor

Assumes encode/decoder are equal

@sroussey
Copy link
Contributor Author

Would close this question: #1577

@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.

@nico-martin nico-martin self-requested a review March 16, 2026 15:37
Copy link
Collaborator

@nico-martin nico-martin left a comment

Choose a reason for hiding this comment

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

I really like this feature! It's definitely something that is extremely helpful for users.
Just one small comment from my side.

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.
@sroussey sroussey force-pushed the get_available_dtypes branch from 76535d7 to 9795484 Compare March 16, 2026 16:11
@nico-martin nico-martin requested a review from xenova March 17, 2026 15:27
@xenova xenova linked an issue Mar 24, 2026 that may be closed by this pull request
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.

LGTM! ✅ thanks for the PR -- very clean.

@xenova xenova merged commit b8228da into huggingface:main Mar 24, 2026
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.

How to get dtypes?

4 participants