Compare commits

...

2 Commits

Author SHA1 Message Date
Wing Lian
6c49083d8b improve check for base case 2025-01-24 12:02:34 -05:00
Wing Lian
94c226edb3 fixes last eos token not in labels on basic use case 2025-01-24 12:00:06 -05:00

View File

@@ -223,7 +223,7 @@ class ChatTemplateStrategy(PromptTokenizingStrategy):
def tokenize_prompt(self, prompt): def tokenize_prompt(self, prompt):
# Old simple legacy behavior that works reliably. # Old simple legacy behavior that works reliably.
if ( if (
not self.roles_to_train (not self.roles_to_train or self.roles_to_train == ["assistant"])
and not self.train_on_eos and not self.train_on_eos
and not self.prompter.message_field_training and not self.prompter.message_field_training
and not self.prompter.message_field_training_detail and not self.prompter.message_field_training_detail