Skip to content

Allow advanced users to override model_type in AutoConfig.from_pretrained#45058

Merged
hmellor merged 1 commit intohuggingface:mainfrom
hmellor:override-model-type
Mar 27, 2026
Merged

Allow advanced users to override model_type in AutoConfig.from_pretrained#45058
hmellor merged 1 commit intohuggingface:mainfrom
hmellor:override-model-type

Conversation

@hmellor
Copy link
Copy Markdown
Member

@hmellor hmellor commented Mar 27, 2026

Some checkpoints, such as https://huggingface.co/omni-research/Tarsier2-Recap-7b, have the wrong model_type in their config.json.

This PR allows advanced users (vLLM) to pass model_type into AutoConfig.from_pretrained via kwargs to override what's in the config.json.

…trained`

Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
@HuggingFaceDocBuilderDev
Copy link
Copy Markdown

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
Copy Markdown
Collaborator

@ArthurZucker ArthurZucker left a comment

Choose a reason for hiding this comment

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

lgtm

@hmellor hmellor added this pull request to the merge queue Mar 27, 2026
Merged via the queue into huggingface:main with commit 4468617 Mar 27, 2026
30 checks passed
@hmellor hmellor deleted the override-model-type branch March 27, 2026 14:29
NielsRogge pushed a commit to NielsRogge/transformers that referenced this pull request Mar 30, 2026
…trained` (huggingface#45058)

Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
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