From d9a5134617d494ef13ba73f9c540123e89a8c29c Mon Sep 17 00:00:00 2001 From: marko1616 Date: Sat, 30 Mar 2024 23:46:55 +0800 Subject: [PATCH] fix blank line contains whitespace --- src/llmtuner/model/patcher.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/llmtuner/model/patcher.py b/src/llmtuner/model/patcher.py index e3d7539f..03ca0096 100644 --- a/src/llmtuner/model/patcher.py +++ b/src/llmtuner/model/patcher.py @@ -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)