summary refs log tree commit diff stats
diff options
context:
space:
mode:
-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";
         };
       };
     };