Skip to content

Commit 24f7e42

Browse files
add tokens to special_tokens_dict (#436)
Signed-off-by: Abhishek <[email protected]>
1 parent 6eb541d commit 24f7e42

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tuning/sft_trainer.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,8 +290,10 @@ def train(
290290
)
291291
if tokenizer.eos_token != configs.DEFAULT_PAD_TOKEN:
292292
tokenizer.pad_token = configs.DEFAULT_PAD_TOKEN
293+
special_tokens_dict["pad_token"] = configs.DEFAULT_PAD_TOKEN
293294
else:
294295
tokenizer.eos_token = configs.DEFAULT_EOS_TOKEN
296+
special_tokens_dict["eos_token"] = configs.DEFAULT_EOS_TOKEN
295297

296298
# TODO: lower priority but understand if resizing impacts inference quality and why its needed.
297299
# It makes sense if we manipulate tokenizer that we also save it and provide it to inference.

0 commit comments

Comments
 (0)