From 8fcb5cee667aa2fa26fe45ff9113a913c6979966 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Fri, 2 Aug 2024 18:11:20 +0200 Subject: [PATCH] enh: min_p --- backend/apps/ollama/main.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/backend/apps/ollama/main.py b/backend/apps/ollama/main.py index 0e4d54e46..442d99ff2 100644 --- a/backend/apps/ollama/main.py +++ b/backend/apps/ollama/main.py @@ -857,6 +857,12 @@ async def generate_chat_completion( ): payload["options"]["top_p"] = model_info.params.get("top_p", None) + if ( + model_info.params.get("min_p", None) + and payload["options"].get("min_p") is None + ): + payload["options"]["min_p"] = model_info.params.get("min_p", None) + if ( model_info.params.get("use_mmap", None) and payload["options"].get("use_mmap") is None