summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenry J Webster <hwebs@hwebs.info>2026-08-04 00:02:54 -0500
committerHenry J. Webster <hwebs@hwebs.info>2026-08-04 16:05:20 -0500
commitdf960b2ed92f9e45fc4984d19ab65c55074bb1d7 (patch)
tree702ad999126a55f93122277c986a1bd6974a47be
parent8f9fbf2f4a269eae143c9e279afc6608ce64b7d0 (diff)
kusanagi/ollama: double default context, add 1h keep-alive
The 12B model at 32k context uses only 7.7 GB of the 7900 XT's 20 GB, so there is ample VRAM headroom for 64k with the q8_0 KV cache — agentic coding tools are context-hungry and 32k is the practical bottleneck. The keep-alive stops the default 5-minute idle unload from adding a reload stall to every resumed session on a single-user workstation. Update flake to get newer packages. Assisted-by: Claude Code:claude-fable-5
-rw-r--r--flake.lock6
-rw-r--r--machines/kusanagi/default.nix5
2 files changed, 7 insertions, 4 deletions
diff --git a/flake.lock b/flake.lock
index 83697dc..7469487 100644
--- a/flake.lock
+++ b/flake.lock
@@ -43,11 +43,11 @@
},
"nixpkgs": {
"locked": {
- "lastModified": 1784280462,
- "narHash": "sha256-DtoqIqM7VkR6NxAkcLpMwmi02USwWb3JdmNGLyhthc0=",
+ "lastModified": 1785734586,
+ "narHash": "sha256-ODZkEK9Gy50yg6h98u7KkitZ3oc/uuTFK00bh1CRdNA=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "293d6abedf0478e681a4dfcfcb35b30fc796a32f",
+ "rev": "531670d871c0e29724a02f3cbcac170adc65b58c",
"type": "github"
},
"original": {
diff --git a/machines/kusanagi/default.nix b/machines/kusanagi/default.nix
index ff786f6..1c8ccb1 100644
--- a/machines/kusanagi/default.nix
+++ b/machines/kusanagi/default.nix
@@ -228,8 +228,11 @@
# KV-cache quantization (below) is a no-op without flash attention; ollama
# falls back to f16 KV cache, inflating VRAM use and forcing CPU offload.
OLLAMA_FLASH_ATTENTION = "1";
- OLLAMA_CONTEXT_LENGTH = "32768";
+ OLLAMA_CONTEXT_LENGTH = "65536";
OLLAMA_KV_CACHE_TYPE = "q8_0";
+ # Keep the model resident between agent turns; the default 5-minute
+ # keep-alive forces a multi-second reload after any pause.
+ OLLAMA_KEEP_ALIVE = "1h";
};
};