Skip to content
This repository was archived by the owner on Oct 16, 2023. It is now read-only.

Commit e1ac6c3

Browse files
authored
add left padding (#126)
1 parent ac089e9 commit e1ac6c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/opt/opt_server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def launch_engine(model_class,
6161
# only for the generation task
6262
global tokenizer
6363
if(tokenizer_path):
64-
tokenizer = GPT2Tokenizer.from_pretrained(tokenizer_path)
64+
tokenizer = GPT2Tokenizer.from_pretrained(tokenizer_path, padding_side='left')
6565

6666
if checkpoint:
6767
model_config = {'dtype': dtype, 'checkpoint': checkpoint}

0 commit comments

Comments
 (0)