summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2025-03-20 10:08:46 +0100
committerAlan Pearce2025-03-20 10:08:46 +0100
commit31234b2c5c5e04970db489a3df624651bfea7ec2 (patch)
treee2b65febad038dbd8bf06c965deb4675d8847623
parent71f2522de37d35da292ff8d061743fe55d24f0b6 (diff)
downloadnixfiles-31234b2c5c5e04970db489a3df624651bfea7ec2.tar.lz
nixfiles-31234b2c5c5e04970db489a3df624651bfea7ec2.tar.zst
nixfiles-31234b2c5c5e04970db489a3df624651bfea7ec2.zip
marvin: update ollama settings
-rw-r--r--user/marvin.nix7
1 files changed, 6 insertions, 1 deletions
diff --git a/user/marvin.nix b/user/marvin.nix
index 1341b034..d064626b 100644
--- a/user/marvin.nix
+++ b/user/marvin.nix
@@ -32,6 +32,10 @@
   home.sessionPath = [
     "/Library/Developer/CommandLineTools/usr/bin"
   ];
+  home.sessionVariables = {
+    OLLAMA_API_BASE = "http://localhost:11434";
+  };
+
   launchd.agents = {
     ollama = {
       enable = true;
@@ -44,8 +48,9 @@
         StandardErrorPath = "/Users/alan/Library/Logs/ollama.log";
         EnvironmentVariables = {
           OLLAMA_HOST = "[::]:11434";
-          OLLAMA_KEEP_ALIVE = "-1"; # keep models in memory forever
+          OLLAMA_KEEP_ALIVE = "43200"; # keep models in memory for half a day
           OLLAMA_FLASH_ATTENTION = "1"; # significantly reduce memory usage as the context size grows
+          OLLAMA_CONTEXT_LENGTH = "131072";
         };
       };
     };