mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-28 20:11:22 +00:00
Fix ValueError when testing PyTorch performance (#14450)
### Description Fixed an exception that is thrown inside `transformers` when trying to test PyTorch performance: ``` > python convert_generation.py -m gpt2 --output gpt2_greedy_search.onnx --num_beams 1 --num_return_sequences 1 --torch_performance
This commit is contained in:
parent
6603be26c6
commit
9f6d452ca6
1 changed files with 1 additions and 1 deletions
|
|
@ -1850,7 +1850,7 @@ def test_torch_performance(
|
|||
num_return_sequences=args.num_return_sequences,
|
||||
length_penalty=args.length_penalty,
|
||||
repetition_penalty=args.repetition_penalty,
|
||||
bad_words_ids=bad_words_ids,
|
||||
bad_words_ids=bad_words_ids if bad_words_ids else None,
|
||||
return_dict_in_generate=True,
|
||||
output_scores=args.output_sequences_scores or args.output_token_scores,
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue