Skip to content

Commit

Permalink
remove gpt ppl eval from lm-0.4.2 (#158)
Browse files Browse the repository at this point in the history
  • Loading branch information
wenhuach21 authored Jun 17, 2024
1 parent edcec56 commit 77d6a88
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions examples/language-modeling/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@

parser.add_argument("--tasks",
default="lambada_openai,hellaswag,winogrande,piqa,mmlu,wikitext,truthfulqa_mc1," \
"truthfulqa_mc2,openbookqa,boolq,rte,arc_easy,arc_challenge,wikitext2,ptb-new,c4-new",
"truthfulqa_mc2,openbookqa,boolq,rte,arc_easy,arc_challenge",
help="lm-eval tasks for lm_eval version 0.4")

parser.add_argument("--output_dir", default="./tmp_autoround", type=str,
Expand Down Expand Up @@ -221,13 +221,6 @@ def get_library_version(library_name):
if args.model_dtype == "bfloat16" or args.model_dtype == "bfp16":
model = model.to(torch.bfloat16)

# if "llama" in model_name:
# from transformers import LlamaTokenizer
#
# tokenizer = LlamaTokenizer.from_pretrained(model_name)
# if tokenizer.pad_token is None:
# tokenizer.add_special_tokens({'pad_token': '[PAD]'})
# else:
tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=not args.disable_trust_remote_code)

if hasattr(tokenizer, "model_max_length"):
Expand Down

0 comments on commit 77d6a88

Please sign in to comment.