mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2025-10-16 00:28:10 +08:00
fix hf gen args
Former-commit-id: 491a84976258cbb2a2647922420e2f84de1e38cd
This commit is contained in:
parent
351e80a656
commit
fd02c9f973
@ -97,6 +97,9 @@ class HuggingfaceEngine(BaseEngine):
|
|||||||
if isinstance(num_return_sequences, int) and num_return_sequences > 1:
|
if isinstance(num_return_sequences, int) and num_return_sequences > 1:
|
||||||
generating_args["do_sample"] = True
|
generating_args["do_sample"] = True
|
||||||
|
|
||||||
|
if not generating_args["temperature"]:
|
||||||
|
generating_args["do_sample"] = False
|
||||||
|
|
||||||
if not generating_args["do_sample"]:
|
if not generating_args["do_sample"]:
|
||||||
generating_args.pop("temperature", None)
|
generating_args.pop("temperature", None)
|
||||||
generating_args.pop("top_p", None)
|
generating_args.pop("top_p", None)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user