fix tokenizer padding side in evaluate.py

This commit is contained in:
hiyouga 2023-10-21 00:30:04 +08:00
parent b665e9e133
commit 641ffa2f6e
1 changed files with 1 additions and 1 deletions

View File

@ -122,7 +122,7 @@ def evaluate(
checkpoint_dir=checkpoint_dir,
template=template
))
chat_model.tokenizer.padding_side = "left" # avoid overflow issue in batched inference for llama2
chat_model.tokenizer.padding_side = "right" # avoid overflow issue in batched inference for llama2
eval_template = eval_templates[lang]
category_corrects: Dict[str, np.ndarray] = {