-
Notifications
You must be signed in to change notification settings - Fork 251
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
Clean up model input names for consistency #327
Conversation
This proposes a few changes to the naming our our model and layer inputs and outputs. 1) Rename `input_ids` -> `token_ids` for bert/roberta. Everything is an "input", including the segment id input, so I don't think input is a helpful naming prefix in this case. 2) Rename `input_mask` -> `padding_mask` for bert/roberta. This matches the name of the variable for the transformer encoder/decoder argument. 3) Rename `tokens` -> `token_ids` for MLMMaskGenerator. This layer only operates in id space, so I think token_ids is more descriptive and consistent with above.
Looks good in general but I'm confused by the Does the Finally, there's one other naming inconsistency you could mop up in sine_position_encoding. |
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! Added some comments for consideration but trust your judgment.
@jbischof Thanks! And good call I will rename in Re So I do think it is accurate to use |
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
This proposes a few changes to the naming our our model and layer inputs
and outputs.
input_ids
->token_ids
for bert/roberta.Everything is an "input", including the segment id input, so I don't
think input is a helpful naming prefix in this case.
input_mask
->padding_mask
for bert/roberta.This matches the name of the variable for the transformer
encoder/decoder argument.
tokens
->token_ids
for MLMMaskGenerator.This layer only operates in id space, so I think token_ids is more
descriptive and consistent with above.