Skip to content
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

Don't override 'config' in model_kwargs #2274

Merged

Conversation

alexander-soare
Copy link
Contributor

@alexander-soare alexander-soare commented May 8, 2024

It's possible someone wants to use from_pretrained but have the ability to override the config stored in the model repository (see point 2 here for an example use case). In this case, they might want to use ModelCls.from_pretrained("hub/id", model_kwargs={"config": myconfig}). This PR makes sure that "config" is not overriden by from_pretrained

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

Copy link
Contributor

@Wauplin Wauplin left a comment

Choose a reason for hiding this comment

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

Thank you! Makes sense yes :)

@Wauplin Wauplin merged commit 5cf177d into huggingface:main May 22, 2024
14 checks passed
@alexander-soare alexander-soare deleted the dont_override_config_kwarg branch May 22, 2024 13:55
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.

None yet

3 participants