Skip to content

Explicitly set pad_token_id for Hugging Face generations#4087

Merged
yifanmai merged 1 commit intomainfrom
yifanmai/huggingface-pad-token-id
Feb 24, 2026
Merged

Explicitly set pad_token_id for Hugging Face generations#4087
yifanmai merged 1 commit intomainfrom
yifanmai/huggingface-pad-token-id

Conversation

@yifanmai
Copy link
Collaborator

@yifanmai yifanmai commented Feb 24, 2026

This suppresses warnings such as Setting pad_token_idtoeos_token_id:0 for open-end generation which were previously printed once for every generation. It also changes the warning about using the chat template to an info log. This also changes the request cache key for HuggingFacePipelineClient.

Fixes #2257

@yifanmai yifanmai merged commit 7967e0d into main Feb 24, 2026
6 checks passed
@yifanmai yifanmai deleted the yifanmai/huggingface-pad-token-id branch February 24, 2026 23:32
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.

HuggingFace warning: Setting pad_token_id to eos_token_id

1 participant