diff --git a/eval/evaluate_chat_ceval.py b/eval/evaluate_chat_ceval.py index b909a6d..1c0f70d 100644 --- a/eval/evaluate_chat_ceval.py +++ b/eval/evaluate_chat_ceval.py @@ -31,6 +31,7 @@ def load_models_tokenizer(args): args.checkpoint_path, trust_remote_code=True ) model.generation_config.do_sample = False # use greedy decoding + model.generation_config.repetition_penalty = 1.0 # disable repetition penalty return model, tokenizer def process_before_extraction(gen, question, choice_dict): diff --git a/eval/evaluate_chat_gsm8k.py b/eval/evaluate_chat_gsm8k.py index c4de01e..f4cc22e 100644 --- a/eval/evaluate_chat_gsm8k.py +++ b/eval/evaluate_chat_gsm8k.py @@ -129,6 +129,7 @@ if __name__ == "__main__": args.checkpoint_path, trust_remote_code=True ) model.generation_config.do_sample = False # use greedy decoding + model.generation_config.repetition_penalty = 1.0 # disable repetition penalty test = dataset["test"] diff --git a/eval/evaluate_chat_humaneval.py b/eval/evaluate_chat_humaneval.py index 54ceca8..134a825 100644 --- a/eval/evaluate_chat_humaneval.py +++ b/eval/evaluate_chat_humaneval.py @@ -93,6 +93,7 @@ if __name__ == "__main__": args.checkpoint_path, trust_remote_code=True ) model.generation_config.do_sample = False # use greedy decoding + model.generation_config.repetition_penalty = 1.0 # disable repetition penalty f_output = jsonlines.Writer(open(args.sample_output_file, "w", encoding="utf-8")) diff --git a/eval/evaluate_chat_mmlu.py b/eval/evaluate_chat_mmlu.py index 259dc3a..36d0524 100644 --- a/eval/evaluate_chat_mmlu.py +++ b/eval/evaluate_chat_mmlu.py @@ -35,6 +35,7 @@ def load_models_tokenizer(args): args.checkpoint_path, trust_remote_code=True ) model.generation_config.do_sample = False # use greedy decoding + model.generation_config.repetition_penalty = 1.0 # disable repetition penalty return model, tokenizer