Fix: Add missing pad_token_id to StableLmConfig#43573
Closed
tobyliu2004 wants to merge 3 commits intohuggingface:mainfrom
Closed
Fix: Add missing pad_token_id to StableLmConfig#43573tobyliu2004 wants to merge 3 commits intohuggingface:mainfrom
tobyliu2004 wants to merge 3 commits intohuggingface:mainfrom
Conversation
- Adds pad_token_id parameter to __init__ (defaults to None) - Adds pad_token_id assignment in config initialization - Updates docstring to document the new parameter - Fixes AttributeError when creating StableLM models from config Fixes huggingface#43572
4 tasks
Contributor
|
Contributor
Author
|
Thanks for reviewing! |
Contributor
|
[For maintainers] Suggested jobs to run (before merge) run-slow: stablelm |
Member
Member
|
Thanks for the PR @tobyliu2004 ! I'd prefer to close it in favor of #43592 which is more complete |
Contributor
Author
|
Thanks for reviewing! Makes sense to fix all models at once rather than one by one. Appreciate the feedback! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Fixes #43572
Adds the missing
pad_token_idparameter toStableLmConfigto resolve theAttributeErrorwhen creating StableLM models from config.Changes made:
pad_token_idparameter to__init__method (defaults toNone)self.pad_token_id = pad_token_idassignmentTesting:
Verified that
AutoModelForCausalLM.from_config(StableLmConfig())now works without errors.Before submitting
cc @ArthurZucker @Cyrilvallez @itazap