-
Notifications
You must be signed in to change notification settings - Fork 31.9k
Generate: use GenerationConfig as the basis for .generate() parametrization
#20388
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
Merged
gante
merged 20 commits into
huggingface:main
from
gante:generate_config_from_model_config
Dec 15, 2022
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
c0dc023
generate from config mvp
gante d9de3df
fix failing tests
gante 7a92430
max_time test
gante 326ebab
Load default gen config at model load time; Update docs
gante 3481fd7
further documentation; add tests
gante 1b182ee
adapt rag to the new structure
gante 444783b
handle models not instantiated with from_pretained (like in tests)
gante d54cd5c
better default generation config
gante 519ef61
add can_generate fn
gante e628471
handle legacy use case of ad hoc model config changes
gante e1acd08
initialize gen config from config in individual methods, if gen confi…
gante df9618a
fix _get_decoder_start_token_id when called outside GenerationMixin
gante 3c90725
correct model config load order (set attr > model config > decoder co…
gante 26c1dc0
update rag to match latest changes
gante 09f7ad3
Apply suggestions from code review
gante 5ff10a8
load gen config from model config in model.from_pretrained
gante 62cd2c6
fix can_generate fn
gante e7517ee
handle generate calls without a previous from_pretrained (e.g. tests)
gante f58dc30
add legacy behavior (and a warning)
gante f85e3b2
lower logger severity
gante File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.