mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2025-12-14 19:06:26 +08:00
fix hf gen args
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user