fix hf gen args
This commit is contained in:
1 parent
8ee8ac6eba
commit
70214b71b1
1 file changed
+3
@@ -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