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
Add SFT params random_offset_probability, label_masking #2005
Conversation
@@ -54,13 +64,20 @@ def __call__(self, features): | |||
list(map(lambda x: x[1], flatten_message["offset_mapping"])), |
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.
this should not be required now
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.
Could you make a suggested change (ctrl+g)?
|
||
# append eos token to each messages | ||
assert self.tokenizer.eos_token | ||
messages = [m + self.tokenizer.eos_token for m in messages] |
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.
Did we converge to this? Using the end of prompt-reply the same as eos? Not totally against it if eveyone agrees
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.
EOS at end of messages simplifies the decoding, TRLX also relies on eos tokens (i.e. would either have to be patched or eos could be set to <human>
). The format is a compromise between framing format v3 and old <bot> <user>
format v2.
Added SFT training parameters: - `random_offset_probability` (float, default: 0.5): probability of random offset into conversations when conversation > max_length - `label_masking` (bool, default: true): if true only loss for tokens of assistant replies is calculated else for all tokens (including prompter)
Added SFT training parameters:
random_offset_probability
(float, default: 0.5): probability of random offset into conversations when conversation > max_lengthlabel_masking
(bool, default: true): if true only loss for tokens of assistant replies is calculated else for all tokens (including prompter)