Skip to content

Commit

Permalink
add missed ignore_eos in generation config
Browse files Browse the repository at this point in the history
  • Loading branch information
eaidova committed Jan 24, 2025
1 parent cc3b65a commit 24928dd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tools/llm_bench/task/text_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ def run_text_generation_genai(input_text, num, model, tokenizer, args, iter_data
log.info(out_str)
gen_config = model.get_generation_config()
gen_config.max_new_tokens = max_gen_tokens
gen_config.ignore_eos = True
gen_config.rng_seed = args["seed"]
gen_config.num_beams = args["num_beams"]
gen_config.do_sample = False
Expand Down Expand Up @@ -379,6 +380,7 @@ def run_text_generation_genai_with_stream(input_text, num, model, tokenizer, arg
gen_config.max_new_tokens = max_gen_tokens
gen_config.num_beams = args["num_beams"]
gen_config.do_sample = False
gen_config.ignore_eos = True
enable_prompt_permutations = not args.get("disable_prompt_permutation", False)
if enable_prompt_permutations:
log.warning(
Expand Down

0 comments on commit 24928dd

Please sign in to comment.