From 5ed428f4130bd1f2f975662042a713b5de784a2d Mon Sep 17 00:00:00 2001 From: Yao Qing Date: Thu, 24 Oct 2024 10:01:44 +0800 Subject: [PATCH] Set a higher default value(1.2) about repetition_penalty for codegen example to reduce repetition (#820) Signed-off-by: Yao, Qing --- comps/cores/mega/gateway.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/comps/cores/mega/gateway.py b/comps/cores/mega/gateway.py index 5918ab50eb..2b8bcbcaaa 100644 --- a/comps/cores/mega/gateway.py +++ b/comps/cores/mega/gateway.py @@ -222,7 +222,7 @@ async def handle_request(self, request: Request): temperature=chat_request.temperature if chat_request.temperature else 0.01, frequency_penalty=chat_request.frequency_penalty if chat_request.frequency_penalty else 0.0, presence_penalty=chat_request.presence_penalty if chat_request.presence_penalty else 0.0, - repetition_penalty=chat_request.repetition_penalty if chat_request.repetition_penalty else 1.03, + repetition_penalty=chat_request.repetition_penalty if chat_request.repetition_penalty else 1.2, streaming=stream_opt, ) result_dict, runtime_graph = await self.megaservice.schedule(