From 926291940de4b59a40489e6a509fdc0135c8616d Mon Sep 17 00:00:00 2001 From: hiyouga Date: Sat, 3 Jun 2023 21:57:39 +0800 Subject: [PATCH] reduce repetition penalty --- src/cli_demo.py | 2 +- src/web_demo.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cli_demo.py b/src/cli_demo.py index 6ee12ce6..90e0e7bd 100644 --- a/src/cli_demo.py +++ b/src/cli_demo.py @@ -53,7 +53,7 @@ def main(): "temperature": 0.95, "num_beams": 1, "max_new_tokens": 256, - "repetition_penalty": 1.5, + "repetition_penalty": 1.0, "logits_processor": get_logits_processor() } with torch.no_grad(): diff --git a/src/web_demo.py b/src/web_demo.py index 426fe520..5cd05c34 100644 --- a/src/web_demo.py +++ b/src/web_demo.py @@ -105,7 +105,7 @@ def predict(input, chatbot, max_length, top_p, temperature, history): "temperature": temperature, "num_beams": 1, "max_length": max_length, - "repetition_penalty": 1.5, + "repetition_penalty": 1.0, "logits_processor": get_logits_processor() } with torch.no_grad():