Skip to content

Commit

Permalink
Fix truthfulqa task evaluation issue
Browse files Browse the repository at this point in the history
Signed-off-by: Kaihui-intel <[email protected]>
  • Loading branch information
Kaihui-intel authored Dec 3, 2024
1 parent e269660 commit 1c070bc
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@
user_model = None

tokenizer = AutoTokenizer.from_pretrained(args.model, trust_remote_code=args.trust_remote_code)
# Ensure pad_token is set for tasks that require it (e.g., truthfulqa)
if tokenizer.pad_token is None and tokenizer.eos_token is not None:
tokenizer.pad_token = tokenizer.eos_token

quantization_config = None
if args.woq:
Expand Down

0 comments on commit 1c070bc

Please sign in to comment.