diff --git a/backend/apps/ollama/main.py b/backend/apps/ollama/main.py index 144755418..1ed034f68 100644 --- a/backend/apps/ollama/main.py +++ b/backend/apps/ollama/main.py @@ -751,6 +751,14 @@ async def generate_chat_completion( if model_info.params.get("num_ctx", None): payload["options"]["num_ctx"] = model_info.params.get("num_ctx", None) + if model_info.params.get("num_batch", None): + payload["options"]["num_batch"] = model_info.params.get( + "num_batch", None + ) + + if model_info.params.get("num_keep", None): + payload["options"]["num_keep"] = model_info.params.get("num_keep", None) + if model_info.params.get("repeat_last_n", None): payload["options"]["repeat_last_n"] = model_info.params.get( "repeat_last_n", None diff --git a/src/lib/components/chat/Settings/Advanced/AdvancedParams.svelte b/src/lib/components/chat/Settings/Advanced/AdvancedParams.svelte index b983fc27f..80c298965 100644 --- a/src/lib/components/chat/Settings/Advanced/AdvancedParams.svelte +++ b/src/lib/components/chat/Settings/Advanced/AdvancedParams.svelte @@ -21,6 +21,8 @@ top_p: null, tfs_z: null, num_ctx: null, + num_batch: null, + num_keep: null, max_tokens: null, use_mmap: null, use_mlock: null, @@ -565,6 +567,98 @@ {/if} +