-
Notifications
You must be signed in to change notification settings - Fork 308
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
Split input_transform
into context_input_transform
and label_input_transform
#82
Conversation
Config
, Tokenizer
, Pipeline
input_transform
into context_input_transform
and label_input_transform
if length > self.config.context_length: | ||
context = context[..., -self.config.context_length :] | ||
|
||
token_ids, attention_mask, scale = self._input_transform(context=context) |
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'm wondering: is _input_transform
needed, or could context_input_transform
just piggy-back on label_input_transform
here?
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 have a proposal for slightly shorter names. Don't hate me, names are hard:
context_input_transform
->encode_context
label_input_transform
->encode_label
output_transform
->decode_samples
What do you think? Of course if we change names then docstrings are to be updated
In general, I don't disagree that names can be improved but I am wondering if |
Description of changes: This splits
input_transform
intocontext_input_transform
andlabel_input_transform
. Previously,input_transform
was being used for both context and label during training which would lead to incorrect results whereprediction_length
>context_length
.TODO:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.