From 79227d6defec861d812f3dfa26dbf74d4f0f47dd Mon Sep 17 00:00:00 2001 From: Cyril Date: Sun, 12 Oct 2025 22:19:52 +0200 Subject: [PATCH] Increase default max_new_tokens in generate method to enhance text generation capacity --- src/pipelines/textgen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pipelines/textgen.py b/src/pipelines/textgen.py index e29d7c8..31b441a 100644 --- a/src/pipelines/textgen.py +++ b/src/pipelines/textgen.py @@ -30,7 +30,7 @@ class TextGenerator: print("Model loaded successfully!") - def generate(self, prompt: str, max_new_tokens: int = 100, num_return_sequences: int = 1, + def generate(self, prompt: str, max_new_tokens: int = 500, num_return_sequences: int = 1, temperature: float = 1.0, do_sample: bool = True) -> Dict: """ Generate text from a prompt