From 8b2e608602f0f6af1e3d3d4f0b49315c29712411 Mon Sep 17 00:00:00 2001 From: Hendrik Langer Date: Wed, 12 Apr 2023 17:24:27 +0200 Subject: [PATCH] tuning --- matrix_pygmalion_bot/ai/koboldcpp.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/matrix_pygmalion_bot/ai/koboldcpp.py b/matrix_pygmalion_bot/ai/koboldcpp.py index 4b6347e..3404dd7 100644 --- a/matrix_pygmalion_bot/ai/koboldcpp.py +++ b/matrix_pygmalion_bot/ai/koboldcpp.py @@ -46,8 +46,8 @@ async def generate_sync( "max_context_length": 2048, "max_length": max_new_tokens, "temperature": bot.temperature, - "top_k": 0, - "top_p": 0, + "top_k": 50, + "top_p": 0.85, "rep_pen": 1.08, "rep_pen_range": 1024, "quiet": True, @@ -55,8 +55,6 @@ async def generate_sync( logger.info(f"sending request to koboldcpp") - - TIMEOUT = 360 DELAY = 5 tokens = 0 @@ -94,6 +92,7 @@ async def generate_sync( await asyncio.sleep(DELAY) else: raise ValueError(f"") + raise ValueError(f" Timeout") async def generate_image(input_prompt: str, negative_prompt: str, api_url: str, api_key: str, typing_fn):