Skip to content

[Bugfix] Extract pad_token_id from text config for Llama-4 - #43497

Closed
eldarkurtic wants to merge 1 commit into
huggingface:mainfrom
eldarkurtic:fix-llama4-pad-token
Closed

eldarkurtic wants to merge 1 commit into
huggingface:mainfrom
eldarkurtic:fix-llama4-pad-token

Conversation

@eldarkurtic

Copy link
Copy Markdown
Contributor

What does this PR do?

Loading Llama-4 model with Llama4ForConditionalGeneration fails because self.config.pad_token_id doesn't exist. For Llama-4 models, pad_token_id is inside text_config not the general config.

@eldarkurtic eldarkurtic changed the title Extract pad_token_id from text config for Llama-4 [Bugfix] Extract pad_token_id from text config for Llama-4 Jan 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor

[For maintainers] Suggested jobs to run (before merge)

run-slow: llama4

@Rocketknight1

Copy link
Copy Markdown
Member

cc @zucchini-nlp I think this is the same bug as Qwen3

@tomaarsen

Copy link
Copy Markdown
Member

Was this now resolved in #43539, @Rocketknight1? If so, we can close.

  • Tom Aarsen

@zucchini-nlp

Copy link
Copy Markdown
Member

Yes, I think we can close it

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.

4 participants