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.
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
CPT Tuner #2168
CPT Tuner #2168
Changes from 6 commits
92b9e1a
e54d380
023f071
54cddaf
2dfe70f
ba4b115
f8c8317
bd2fc70
b01b214
6ed1723
77bb0b9
dbcdedf
f7138d4
0a5fb20
7206db5
24b0af9
81ffa09
130ec76
70067d8
9397314
249713c
0a43473
144f042
97449da
dacb400
cc348a4
79959d1
7eea892
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Shouldn't this inherit from
PromptLearningConfig
instead?Moreover, let's document the arguments here in the docstring. You can reuse the same text as in the help defined below. Also, it would be great if you could extend the help for the different arguments. Put yourself into the shoes of a user who may know about prompt tuning or similar methods but is not intimately familiar with the paper. As is, they would have a hard time knowing what the correct arguments would be and how changing them would affect the outcome.
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.
I think this can be type annotated as
CPTPromptInit
.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.
You could change the type to
Literal["none", "decay"]
to be more precise. Also, remove theOptional
, as it implies thatNone
is a valid option, which it is not.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.
Still relevant
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.
My suggestion is to change the type annotation to
Literal["none", "decay"]
.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.
Is 0 a sensible default for
num_virtual_tokens
?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.
I think having 0 as the default here makes little sense. WDYT about using a good default here, say, 10?
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.
These are not supposed to be modified by the user, right? In that case, let's move them inside of
__post_init__
.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.
WDYT about this suggestion?
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.
Does it ever make sense to let users pass these arguments? If not, I would remove them here and place them inside the
__post_init__
method.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.
Why is this needed?