-
Notifications
You must be signed in to change notification settings - Fork 181
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
[TextGeneration] Update pipeline inputs to support GenerationConfig #1250
Merged
Conversation
This file contains 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
b610646
to
a69abf9
Compare
ac68490
to
506c687
Compare
627b849
to
ce85c4b
Compare
a4b6d93
to
6127737
Compare
bfineran
suggested changes
Sep 19, 2023
dbogunowicz
reviewed
Sep 21, 2023
93c012d
to
e0cb484
Compare
bfineran
previously approved these changes
Sep 21, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - can we check in any unit tests for this?
Satrat
previously approved these changes
Sep 21, 2023
1dc2bd1
to
3a18e5f
Compare
The base branch was changed.
e0cb484
to
8c5798a
Compare
bfineran
previously approved these changes
Sep 21, 2023
mgoin
reviewed
Sep 22, 2023
dbogunowicz
reviewed
Sep 22, 2023
f8f5448
to
b7f333f
Compare
bfineran
approved these changes
Sep 22, 2023
dbogunowicz
approved these changes
Sep 22, 2023
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.
Summary:
transformers.GenerationConfig
. This will essentially be used in replacement of many of the inputs that we provide as separate fields (such asnum_return_sequences
,top_k
, etc).transformers.GenerationConfig
objectGenerationDefaults
class will be usedGenerationConfig
will be used for the missing values, not theGenerationDefaults
class.Test Cases
Dictionary:
string or Path
GenerationConfig
objectNone
- no generation config is provided, will use theGenerationDefaults
insteadSet
GenerationConfig
on the pipeline levelSet
GenerationConfig
on the pipeline level, override on the input levelFor the first prompt, the pipeline config is overwritten with the config given with the input. This results in 2 text generations for the first input. For the second input, as not config is given, the pipeline config is used, resulting in 3 text generations.