Add back a missing bos token

This commit is contained in:
oobabooga 2023-05-24 13:54:36 -03:00
parent 3cd7c5bdd0
commit 63ce5f9c28

View File

@ -262,7 +262,7 @@ def do_train(lora_name: str, always_override: bool, save_steps: int, micro_batch
else:
ind = prompt.index(train_only_after) + len(train_only_after)
before_tokens = encode(prompt[:ind], False)
before_tokens = encode(prompt[:ind], True)
after_tokens = encode(prompt[ind:], False)
full_length = len(after_tokens) + len(before_tokens)