From b7bee3e02fc572645bb4e6c4bf9783ee43f8aaff Mon Sep 17 00:00:00 2001 From: poprhythm Date: Sun, 13 Sep 2026 16:36:39 +0000 Subject: [PATCH] Set ollama's server-level context default to 11264, fix compose drift The prior fix dropped numCtx to 8192 to guarantee full GPU offload, but real multi-turn djAgentPick conversations peak around 7.5k tokens -- leaving almost no headroom before llama.cpp's context-shift drops the front of the prompt (system instructions + tool defs, including `done`). Result: "agent stopped without calling done" recurring every few picks. 11264 is the largest context that still offloads all 29 layers on this GPU (tested empirically -- 12288 fell 15MB short and dropped to 28/29), leaving ~3.7k tokens of margin over the observed peak. Also: OLLAMA_CONTEXT_LENGTH had drifted onto the running container via an earlier manual `docker run` and was never in this compose file, so a prior git-redeploy silently kept the manual value instead of the committed one. Committing it here closes that drift. Claude-Session: https://claude.ai/code/session_01L7Rwa6guD5wK8F8tWQwcJX --- ollama/docker-compose.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ollama/docker-compose.yml b/ollama/docker-compose.yml index 18bc455..ce20fb6 100644 --- a/ollama/docker-compose.yml +++ b/ollama/docker-compose.yml @@ -17,6 +17,13 @@ services: # attention + an explicitly quantized KV cache keep it small and stable. - OLLAMA_FLASH_ATTENTION=1 - OLLAMA_KV_CACHE_TYPE=q8_0 + # Server-level default context, kept in step with SUB/WAVE's own + # llm.numCtx (settings.json) -- 11264 is the largest value that still + # fits the full 29-layer GPU offload on this 6GB card with margin, while + # staying above the ~7.5k-token peak seen in real multi-turn DJ-agent + # calls (a lower ceiling truncates the front of the prompt -- including + # the tool definitions -- and the agent stops calling `done`, #291). + - OLLAMA_CONTEXT_LENGTH=11264 volumes: - /srv/ollama:/root/.ollama runtime: nvidia