Causal LM tokenization: Chunking and seq2seq Forward - #206
Conversation
f590817 to
892a6d1
Compare
758826f to
654422a
Compare
Signed-off-by: Alex-Brooks <Alex.Brooks@ibm.com>
Signed-off-by: Alex-Brooks <Alex.Brooks@ibm.com>
Signed-off-by: Alex-Brooks <Alex.Brooks@ibm.com>
Signed-off-by: Alex-Brooks <Alex.Brooks@ibm.com>
Signed-off-by: Alex-Brooks <Alex.Brooks@ibm.com>
Signed-off-by: Alex-Brooks <Alex.Brooks@ibm.com>
Signed-off-by: Alex-Brooks <Alex.Brooks@ibm.com>
Signed-off-by: Alex-Brooks <Alex.Brooks@ibm.com>
Signed-off-by: Alex-Brooks <Alex.Brooks@ibm.com>
Signed-off-by: Alex-Brooks <Alex.Brooks@ibm.com>
Signed-off-by: Alex-Brooks <Alex.Brooks@ibm.com>
Signed-off-by: Alex-Brooks <Alex.Brooks@ibm.com>
Signed-off-by: Alex-Brooks <Alex.Brooks@ibm.com>
Signed-off-by: Alex-Brooks <Alex.Brooks@ibm.com>
Signed-off-by: Alex-Brooks <Alex.Brooks@ibm.com>
Signed-off-by: Alex-Brooks <Alex.Brooks@ibm.com>
Signed-off-by: Alex-Brooks <Alex.Brooks@ibm.com>
Signed-off-by: Alex-Brooks <Alex.Brooks@ibm.com>
Signed-off-by: Alex-Brooks <Alex.Brooks@ibm.com>
Signed-off-by: Alex-Brooks <Alex.Brooks@ibm.com>
Signed-off-by: Alex-Brooks <Alex.Brooks@ibm.com>
Signed-off-by: Alex-Brooks <Alex.Brooks@ibm.com>
7d94924 to
ccd9c13
Compare
| NOTE: If mlm (masked language modeling) is not passed in kwargs, | ||
| this function will automatically set it to `False`. | ||
|
|
||
| FIXME: This should be consolidated with what is in the prompt tuning |
There was a problem hiding this comment.
Ah yes, this will cause a little bit of conflict with #203 PR as I am refactoring there to use common functions instead of separate data collators and processing functions 🤔
There was a problem hiding this comment.
I see. Obviously the static padding stuff isn't great, but I imagine we probably want to use the same collators everywhere anyway, right? I.e., fine tuning tokenization logic is the same
| NOTE: If mlm (masked language modeling) is not passed in kwargs, | ||
| this function will automatically set it to `False`. | ||
|
|
||
| FIXME: This should be consolidated with what is in the prompt tuning |
There was a problem hiding this comment.
I see. Obviously the static padding stuff isn't great, but I imagine we probably want to use the same collators everywhere anyway, right? I.e., fine tuning tokenization logic is the same
gkumbhat
left a comment
There was a problem hiding this comment.
LGTM. Thanks Alex. The default for now for seq2seq make sense. Lets get the other changes validated and working iteratively and then enable that option. For now, getting this in to unblock causal-lm prompt tuning.
Signed-off-by: Alex-Brooks <Alex.Brooks@ibm.com>
This PR is the nth rewrite of causal language modeling tokenization, now changing it to:
Sequence type tokenization is a port of the old causal LM tokenization logic with a bug fix for the concatenation sequence length; I have verified the quality matches approximately what we would expect from prompt tuning on RTE.
Chunking seems to be functional and has tests verifying output correctness but is not publicly exposed yet and therefore has not fully quality tested.
We need to be careful about collator compatibility when changing the chunking strategy, since prompt tuning and the base model resources/text generation currently manage collators for different model types differently. The main thing to be wary of is that the causal language modeling collator should not be used with the sequence approach to avoid clobbering the labels.
Note that currently things are still being statically padded and using the default collator; it would be more ideal to: