mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2025-08-23 06:12:50 +08:00
fix hf gen args
Former-commit-id: 70214b71b18c75be59576153951beff1ce9ff8f6
This commit is contained in:
parent
32a65e89e5
commit
5f48c282d3
@ -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