fix blank line contains whitespace

This commit is contained in:
marko1616 2024-03-30 23:46:55 +08:00
parent eb178eaff3
commit d9a5134617
1 changed files with 1 additions and 1 deletions

View File

@ -320,7 +320,7 @@ def patch_model(
or (gen_config.typical_p is not None and gen_config.typical_p != 1.0)
):
gen_config.do_sample = True
if "GenerationMixin" not in str(model.generate.__func__):
model.generate = MethodType(PreTrainedModel.generate, model)