From 63ce5f9c28829a24be2d0eb3f2e57c222c14c042 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Wed, 24 May 2023 13:54:36 -0300 Subject: [PATCH] Add back a missing bos token --- modules/training.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/training.py b/modules/training.py index 84e68407..3de85a52 100644 --- a/modules/training.py +++ b/modules/training.py @@ -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)