[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M758S4SST56DPQ20B706GFD8":3,"skill-same:01M758S4SST56DPQ20B706GFD8":60},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":37,"commitSha":38,"skillDirectory":39,"forksCount":40,"repositoryHtmlUrl":41,"repositoryHomepageUrl":42,"ownerHtmlUrl":43,"ownerBlogUrl":6,"ownerDescription":44,"updatedAt":45,"install":46,"resources":59},"01M758S4SST56DPQ20B706GFD8","ollama-setup",null,"Install, configure, and manage Ollama on Linux — including sudo-free tarball install, user systemd service, model management, and health verification.","lukemcqueen\u002Fsteadfaste-fleet","lukemcqueen","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F405240?v=4","01M757MHPAGRXTJAT46SKZP98R","Luke McQueen","01M757MHPZ573KP8DT9GB8SBQ7",4,"MIT","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fmlops\u002Follama-setup\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: ollama-setup\ndescription: Install, configure, and manage Ollama on Linux — including sudo-free tarball install, user systemd service, model management, and health verification.\nversion: 1.1.0\nauthor: agent\nlicense: MIT\nplatforms: [linux]\nmetadata:\n  hermes:\n    tags: [ollama, local-llm, embeddings, linux, systemd, setup, inference]\n---\n\n# Ollama Setup (Linux)\n\nInstall and manage Ollama for local LLM inference and embeddings.\n\n## When to Use\n\n- Setting up a new Linux machine with Ollama for mycortex embeddings\n- Installing Ollama without sudo (tarball → `~\u002F.local\u002Fbin\u002F` → user systemd)\n- Pulling\u002Fupdating models\n- Verifying Ollama health after install or reboot\n- Setting up Ollama for use with mycortex (`nomic-embed-text`)\n- **Configuring a local model for Hermes cron jobs** (context size, Modelfile tuning)\n\n## Installation Methods\n\n### Method 1: Sudo-free tarball install (preferred for agent-managed hosts)\n\nWorks entirely within the user's home directory — no `sudo` needed.\n\n```bash\n# 1. Download the tarball (use .tar.zst, not .tgz — .tgz returns 404)\ncurl -fsL -o \u002Ftmp\u002Follama.tar.zst \\\n  \"https:\u002F\u002Follama.com\u002Fdownload\u002Follama-linux-$(uname -m | sed 's\u002Fx86_64\u002Famd64\u002F').tar.zst\"\n\n# 2. Extract\nmkdir -p \u002Ftmp\u002Follama-extract\ntar -xf \u002Ftmp\u002Follama.tar.zst -C \u002Ftmp\u002Follama-extract\n\n# 3. Install binaries\nmkdir -p ~\u002F.local\u002Fbin ~\u002F.local\u002Flib\u002Follama\ncp \u002Ftmp\u002Follama-extract\u002Fbin\u002Follama ~\u002F.local\u002Fbin\u002F\nchmod +x ~\u002F.local\u002Fbin\u002Follama\ncp -r \u002Ftmp\u002Follama-extract\u002Flib\u002Follama\u002F* ~\u002F.local\u002Flib\u002Follama\u002F\nchmod +x ~\u002F.local\u002Flib\u002Follama\u002Fllama-server ~\u002F.local\u002Flib\u002Follama\u002Follama 2>\u002Fdev\u002Fnull\n\n# Verify\n~\u002F.local\u002Fbin\u002Follama --version\n```\n\n### Method 2: Official installer (needs sudo)\n\n```bash\ncurl -fsSL https:\u002F\u002Follama.com\u002Finstall.sh | sh\n```\n\n## User Systemd Service\n\nCreate a user-scoped systemd service binding Ollama to localhost only:\n\n```bash\nmkdir -p ~\u002F.config\u002Fsystemd\u002Fuser\n\ncat > ~\u002F.config\u002Fsystemd\u002Fuser\u002Follama.service \u003C\u003C 'SVC'\n[Unit]\nDescription=Ollama LLM Server (restricted to localhost)\nAfter=network-online.target\n\n[Service]\nExecStart=\u002Fhome\u002F$USER\u002F.local\u002Fbin\u002Follama serve\nEnvironment=OLLAMA_HOST=127.0.0.1\nEnvironment=OLLAMA_NUM_THREADS=2    # Limit to 2 threads on CPU-only machines (prevents thermal throttling)\nEnvironment=OLLAMA_KEEP_ALIVE=0     # Unload model immediately after use (reduces idle heat)\nRestart=always\nRestartSec=30\n\n[Install]\nWantedBy=default.target\nSVC\n\n> **Thermal mitigation:** `OLLAMA_NUM_THREADS=2` prevents the model runner from saturating all CPU cores (reduces heat output ~60%). `OLLAMA_KEEP_ALIVE=0` unloads the model immediately after each use instead of keeping it loaded for 5 minutes. On CPU-only machines where intermittent LLM use (crons, occasional queries) is the pattern, this keeps the CPU cool between uses. Omit these on GPU machines — they add latency with no thermal benefit.\n\nsystemctl --user daemon-reload\nsystemctl --user enable ollama\nsystemctl --user start ollama\n```\n\n## Verify Service\n\n```bash\nfor i in $(seq 1 15); do\n    curl -s http:\u002F\u002F127.0.0.1:11434\u002Fapi\u002Ftags >\u002Fdev\u002Fnull \\\n      && echo \"Ollama ready!\" && break || sleep 2\ndone\nsystemctl --user is-active ollama\n```\n\n## Pull Models\n\n```bash\n# Embedding model (required for mycortex)\nollama pull nomic-embed-text\n\n# General chat\nollama pull llama3.2:3b\n\n# Code\nollama pull qwen2.5:3b\n```\n\n## PATH Setup\n\nAdd to `~\u002F.bashrc` or `~\u002F.zshrc` if not already present:\n\n```bash\nexport PATH=\"$HOME\u002F.local\u002Fbin:$PATH\"\n```\n\n## Connect to Hermes Agent\n\nAfter Ollama is running with models pulled, configure Hermes to use it as a custom provider.\n\n### Option A: Add as custom provider with context size tuning\n\nEdit `~\u002F.hermes\u002Fconfig.yaml` to add a `custom_providers` section with per-model context settings:\n\n```yaml\ncustom_providers:\n  - name: ollama-local\n    base_url: http:\u002F\u002F127.0.0.1:11434\u002Fv1\n    api_key: \"\"\n    api_mode: chat_completions\n    models:\n      qwen2.5:3b:\n        context_length: 4096\n        ollama_num_ctx: 4096\n      nomic-embed-text:\n        context_length: 8192\n```\n\n> **⚠️ Thermal warning — CPU-only machines (especially MacBooks):**\n> Do NOT set `context_length: 65536` on CPU-only machines running qwen2.5:3b or similar models. This saturates all CPU cores at 300-400% utilization, pushing the CPU past 90°C on 2014-era MacBooks (i7-4980HQ). The kernel's `intel_powerclamp` module will forcibly inject idle cycles (`idle_inject\u002F[0-7]` in `ps` output), wasting 50% of CPU capacity and causing system halting. Use `context_length: 4096` for CPU-only — the difference in usable code-generation quality is negligible, and the thermal savings are massive (92°C → 59°C). See the `linux-performance-diagnostics` skill (Phase 9) for full diagnostic steps.\n> On GPU-equipped machines, 65536 is fine — the GPU handles the attention computation and the CPU stays cool.\n\nThen set cron jobs to use this provider with a model override:\n\n```\nhermes cron edit JOB_ID --model qwen2.5:3b --provider custom:ollama-local\n```\n\n### Option B: Set as default provider (all sessions use local)\n\n```bash\nhermes config set model.default qwen3:4b\nhermes config set model.provider local\nhermes config set model.base_url http:\u002F\u002F127.0.0.1:11434\u002Fv1\nhermes config set model.api_key ollama\n```\n\n### Add cloud fallback (recommended)\n\nIf the local model is down or too slow, Hermes falls through to a cloud provider:\n\n```bash\nhermes config set fallback_providers '[{\"provider\":\"openrouter\",\"model\":\"deepseek\u002Fdeepseek-v4.1-flash\",\"base_url\":\"https:\u002F\u002Fopenrouter.ai\u002Fapi\u002Fv1\",\"api_mode\":\"chat_completions\"}]'\n```\n\n⚠️ **Never point a fallback at a free tier** (`opencode-free` \u002F\n`deepseek-v4-flash-free` are dead). A dead free entry is worse than no entry:\nit looks like a cost control, then fails or silently falls through to a paid\nroute. Verify a provider\u002Fmodel pair resolves before adding it — see\n`docs\u002Frunbooks\u002Fcron-model-chain-repoint.md`.\n\n**Important:** `hermes config set` saves lists\u002Fobjects as YAML quoted strings, which may corrupt structured fallback config. Verify with `grep -A5 fallback_providers ~\u002F.hermes\u002Fconfig.yaml` — if it's a single quoted line, fix with `sed`:\n\n```bash\nsed -i.bak 's\u002Ffallback_providers:.*\u002Ffallback_providers:\\n  - provider: openrouter\\n    model: deepseek\\\u002Fdeepseek-v4.1-flash\\n    base_url: https:\\\u002F\\\u002Fopenrouter.ai\\\u002Fapi\\\u002Fv1\\n    api_mode: chat_completions\u002F' ~\u002F.hermes\u002Fconfig.yaml\n```\n\n### Model selection in session\n\n- `\u002Fmodel qwen2.5:3b` — switch to local code model\n- `\u002Fmodel nomic-embed-text` — switch to embedding model\n- `\u002Fmodel deepseek\u002Fdeepseek-v4.1-flash` — switch back to cloud\n- `\u002Fmodel` (no arg) — interactive picker\n\n## Configuring Model Context Size\n\nWhen Hermes runs a model through Ollama for tool-calling tasks (cron jobs, code generation), it needs adequate context to support reliable tool use. The required context depends on your hardware:\n\n| Hardware | Recommended context | Notes |\n|----------|-------------------|-------|\n| GPU-equipped | **65536** (64k) | GPU handles attention computation — CPU stays cool |\n| CPU-only (desktop) | **16384-32768** | Monitor temps; 80°C+ means reduce further |\n| CPU-only MacBook (pre-2019) | **4096** | 65536 on Haswell i7 hits 92°C+ → kernel throttle |\n\n> **Why 4096 on MacBooks?** LLM inference on CPU is O(n²) in context length. 32768 → 4096 reduces attention computation ~64x. On a 2014 MacBook (i7-4980HQ), this drops CPU usage from 393% to under 100% and temperature from 92°C to 59°C. Without this reduction, `intel_powerclamp` forcibly throttles the CPU, causing system halting.\n\nThis requires two separate configuration layers:\n\n### Layer 1: Hermes config (tells Hermes what to request)\n\n```yaml\nmodels:\n  qwen2.5:3b:\n    context_length: 4096     # Hermes's own token budget\n    ollama_num_ctx: 4096     # Passed to Ollama API as num_ctx\n```\n\n### Layer 2: Ollama Modelfile (tells Ollama the model's default)\n\nHermes checks the model's runtime context against its requirement. Even with Layer 1 set, Ollama may load the model with only 32,768 context if the Modelfile default is smaller. Fix by creating a Modelfile:\n\n```bash\nollama create qwen2.5:3b -f \u003C(echo -e \"FROM qwen2.5:3b\\\\nPARAMETER num_ctx 4096\")\n```\n\nThis updates the model's manifest in-place. Verify the Modelfile persisted:\n\n```bash\nollama show qwen2.5:3b --modelfile | grep num_ctx\n# Expected: PARAMETER num_ctx 4096\n```\n\n**Note:** `ollama ps` still shows `CONTEXT 32768` even after this fix — that's Ollama's initial runtime reservation, not the maximum. Hermes reads the Modelfile capabilities, not `ollama ps`, so the fix is effective despite what `ollama ps` reports.\n\n### When to apply\n\nApply this to **any** Ollama model used for Hermes cron jobs or interactive sessions that make tool calls. Small models (3B params) and embedding models (\u003C1B params) that only do generation (no tool calling) can keep lower context.\n\n### Cold start warning\n\nThe first request after model pull (or after Ollama restart) loads the model into RAM. This takes **5-30 seconds** depending on model size and CPU speed. Subsequent requests are faster because the model stays cached in memory.\n\n## Security Check\n\nVerify localhost-only binding:\n\n```bash\nss -tlnp | grep 11434\n# Expected: 127.0.0.1:11434\n# NOT:      0.0.0.0:11434\n```\n\n## Pitfalls\n\n- **`ollama-linux-amd64.tgz` returns 404**: Use `.tar.zst`, not `.tgz`.\n- **OLLAMA_HOST defaults to 0.0.0.0**: Explicitly set `127.0.0.1` in the service to avoid network exposure.\n- **User vs system systemd**: User units (`~\u002F.config\u002Fsystemd\u002Fuser\u002F`) need no sudo but only run while the user session is active. For persistence across reboots without login, run: `sudo loginctl enable-linger $USER`.\n- **mycortex needs llama-server binary**: mycortex's ollama provider runs `llama-server` directly, not through the HTTP API. The full tarball extraction to `~\u002F.local\u002Flib\u002Follama\u002F` is required — just the `bin\u002Follama` binary is insufficient.\n- **Model pull timeout**: Large models can take 10+ minutes. Use a generous timeout (300s+) when pulling.\n- **Service won't start**: Check `journalctl --user -u ollama --no-pager -n 20` for errors. Common issue: missing `~\u002F.local\u002Fbin\u002Follama` binary because the ExecStart path is wrong.\n- **Hermes RuntimeError: model context too small**: If Hermes fails with \"Ollama loaded `model` with only N tokens of runtime context, but Hermes needs at least 64,000 tokens\", the Modelfile `num_ctx` override is missing (Layer 2 above). Running `ollama create` with a Modelfile overriding `num_ctx` fixes it — this is NOT a hardware limitation in most cases. Hermes config's `ollama_num_ctx` alone is insufficient.\n- **`ollama ps` shows 32768 after Modelfile fix**: This is expected — the CONTEXT column shows the initial runtime allocation, not the model's maximum. The fix is working if `ollama show \u003Cmodel> --modelfile | grep num_ctx` shows 4096 (or your configured value). Do not re-apply the fix or try other approaches.\n- **CPU-only LLM thermal throttling**: Running qwen2.5:3b (or similar) on CPU-only machines with context > 4096 frequently triggers `intel_powerclamp` kernel throttling. Symptoms: `idle_inject\u002F[0-7]` in `ps` output consuming 5-10% CPU each, CPU temp > 80°C, PSI some avg10 > 5%. Fix: reduce context to 4096, limit `OLLAMA_NUM_THREADS=2`, set `OLLAMA_KEEP_ALIVE=0`. See `linux-performance-diagnostics` skill Phase 9 for full diagnostic steps.\n- **patch tool writes to whatever path you give it**: If `patch(path=...)` resolves to `~\u002F.steadfaste-fleet\u002Fscripts\u002F` (the deployed copy) instead of `~\u002Fsteadfaste-fleet\u002Fops\u002Fscripts\u002F` (the repo source), the git repo still has the old values. Always verify with `git diff` after patching repo-tracked files.\n- **Ollama exits cleanly (code 0) after model load failure**: When a client closes the connection before the model finishes loading (timeout or disconnect), Ollama logs \"client connection closed before llama-server finished loading, aborting load\" and may exit with code 0. With `Restart=on-failure`, systemd considers code 0 a clean exit and does NOT restart. Use `Restart=always` instead, and set `RestartSec=30` to avoid rapid restart loops if the failure condition persists.\n\n## References\n\n- **GitHub**: https:\u002F\u002Fgithub.com\u002Follama\u002Follama\n- **Model library**: https:\u002F\u002Follama.com\u002Flibrary\n- **Install script**: https:\u002F\u002Follama.com\u002Finstall.sh\n- **Related skills**: `llama-cpp` for GGUF inference, `huggingface-hub` for model discovery\n","# Ollama Setup (Linux)\n\nInstall and manage Ollama for local LLM inference and embeddings.\n\n## When to Use\n\n- Setting up a new Linux machine with Ollama for mycortex embeddings\n- Installing Ollama without sudo (tarball → `~\u002F.local\u002Fbin\u002F` → user systemd)\n- Pulling\u002Fupdating models\n- Verifying Ollama health after install or reboot\n- Setting up Ollama for use with mycortex (`nomic-embed-text`)\n- **Configuring a local model for Hermes cron jobs** (context size, Modelfile tuning)\n\n## Installation Methods\n\n### Method 1: Sudo-free tarball install (preferred for agent-managed hosts)\n\nWorks entirely within the user's home directory — no `sudo` needed.\n\n```bash\n# 1. Download the tarball (use .tar.zst, not .tgz — .tgz returns 404)\ncurl -fsL -o \u002Ftmp\u002Follama.tar.zst \\\n  \"https:\u002F\u002Follama.com\u002Fdownload\u002Follama-linux-$(uname -m | sed 's\u002Fx86_64\u002Famd64\u002F').tar.zst\"\n\n# 2. Extract\nmkdir -p \u002Ftmp\u002Follama-extract\ntar -xf \u002Ftmp\u002Follama.tar.zst -C \u002Ftmp\u002Follama-extract\n\n# 3. Install binaries\nmkdir -p ~\u002F.local\u002Fbin ~\u002F.local\u002Flib\u002Follama\ncp \u002Ftmp\u002Follama-extract\u002Fbin\u002Follama ~\u002F.local\u002Fbin\u002F\nchmod +x ~\u002F.local\u002Fbin\u002Follama\ncp -r \u002Ftmp\u002Follama-extract\u002Flib\u002Follama\u002F* ~\u002F.local\u002Flib\u002Follama\u002F\nchmod +x ~\u002F.local\u002Flib\u002Follama\u002Fllama-server ~\u002F.local\u002Flib\u002Follama\u002Follama 2>\u002Fdev\u002Fnull\n\n# Verify\n~\u002F.local\u002Fbin\u002Follama --version\n```\n\n### Method 2: Official installer (needs sudo)\n\n```bash\ncurl -fsSL https:\u002F\u002Follama.com\u002Finstall.sh | sh\n```\n\n## User Systemd Service\n\nCreate a user-scoped systemd service binding Ollama to localhost only:\n\n```bash\nmkdir -p ~\u002F.config\u002Fsystemd\u002Fuser\n\ncat > ~\u002F.config\u002Fsystemd\u002Fuser\u002Follama.service \u003C\u003C 'SVC'\n[Unit]\nDescription=Ollama LLM Server (restricted to localhost)\nAfter=network-online.target\n\n[Service]\nExecStart=\u002Fhome\u002F$USER\u002F.local\u002Fbin\u002Follama serve\nEnvironment=OLLAMA_HOST=127.0.0.1\nEnvironment=OLLAMA_NUM_THREADS=2    # Limit to 2 threads on CPU-only machines (prevents thermal throttling)\nEnvironment=OLLAMA_KEEP_ALIVE=0     # Unload model immediately after use (reduces idle heat)\nRestart=always\nRestartSec=30\n\n[Install]\nWantedBy=default.target\nSVC\n\n> **Thermal mitigation:** `OLLAMA_NUM_THREADS=2` prevents the model runner from saturating all CPU cores (reduces heat output ~60%). `OLLAMA_KEEP_ALIVE=0` unloads the model immediately after each use instead of keeping it loaded for 5 minutes. On CPU-only machines where intermittent LLM use (crons, occasional queries) is the pattern, this keeps the CPU cool between uses. Omit these on GPU machines — they add latency with no thermal benefit.\n\nsystemctl --user daemon-reload\nsystemctl --user enable ollama\nsystemctl --user start ollama\n```\n\n## Verify Service\n\n```bash\nfor i in $(seq 1 15); do\n    curl -s http:\u002F\u002F127.0.0.1:11434\u002Fapi\u002Ftags >\u002Fdev\u002Fnull \\\n      && echo \"Ollama ready!\" && break || sleep 2\ndone\nsystemctl --user is-active ollama\n```\n\n## Pull Models\n\n```bash\n# Embedding model (required for mycortex)\nollama pull nomic-embed-text\n\n# General chat\nollama pull llama3.2:3b\n\n# Code\nollama pull qwen2.5:3b\n```\n\n## PATH Setup\n\nAdd to `~\u002F.bashrc` or `~\u002F.zshrc` if not already present:\n\n```bash\nexport PATH=\"$HOME\u002F.local\u002Fbin:$PATH\"\n```\n\n## Connect to Hermes Agent\n\nAfter Ollama is running with models pulled, configure Hermes to use it as a custom provider.\n\n### Option A: Add as custom provider with context size tuning\n\nEdit `~\u002F.hermes\u002Fconfig.yaml` to add a `custom_providers` section with per-model context settings:\n\n```yaml\ncustom_providers:\n  - name: ollama-local\n    base_url: http:\u002F\u002F127.0.0.1:11434\u002Fv1\n    api_key: \"\"\n    api_mode: chat_completions\n    models:\n      qwen2.5:3b:\n        context_length: 4096\n        ollama_num_ctx: 4096\n      nomic-embed-text:\n        context_length: 8192\n```\n\n> **⚠️ Thermal warning — CPU-only machines (especially MacBooks):**\n> Do NOT set `context_length: 65536` on CPU-only machines running qwen2.5:3b or similar models. This saturates all CPU cores at 300-400% utilization, pushing the CPU past 90°C on 2014-era MacBooks (i7-4980HQ). The kernel's `intel_powerclamp` module will forcibly inject idle cycles (`idle_inject\u002F[0-7]` in `ps` output), wasting 50% of CPU capacity and causing system halting. Use `context_length: 4096` for CPU-only — the difference in usable code-generation quality is negligible, and the thermal savings are massive (92°C → 59°C). See the `linux-performance-diagnostics` skill (Phase 9) for full diagnostic steps.\n> On GPU-equipped machines, 65536 is fine — the GPU handles the attention computation and the CPU stays cool.\n\nThen set cron jobs to use this provider with a model override:\n\n```\nhermes cron edit JOB_ID --model qwen2.5:3b --provider custom:ollama-local\n```\n\n### Option B: Set as default provider (all sessions use local)\n\n```bash\nhermes config set model.default qwen3:4b\nhermes config set model.provider local\nhermes config set model.base_url http:\u002F\u002F127.0.0.1:11434\u002Fv1\nhermes config set model.api_key ollama\n```\n\n### Add cloud fallback (recommended)\n\nIf the local model is down or too slow, Hermes falls through to a cloud provider:\n\n```bash\nhermes config set fallback_providers '[{\"provider\":\"openrouter\",\"model\":\"deepseek\u002Fdeepseek-v4.1-flash\",\"base_url\":\"https:\u002F\u002Fopenrouter.ai\u002Fapi\u002Fv1\",\"api_mode\":\"chat_completions\"}]'\n```\n\n⚠️ **Never point a fallback at a free tier** (`opencode-free` \u002F\n`deepseek-v4-flash-free` are dead). A dead free entry is worse than no entry:\nit looks like a cost control, then fails or silently falls through to a paid\nroute. Verify a provider\u002Fmodel pair resolves before adding it — see\n`docs\u002Frunbooks\u002Fcron-model-chain-repoint.md`.\n\n**Important:** `hermes config set` saves lists\u002Fobjects as YAML quoted strings, which may corrupt structured fallback config. Verify with `grep -A5 fallback_providers ~\u002F.hermes\u002Fconfig.yaml` — if it's a single quoted line, fix with `sed`:\n\n```bash\nsed -i.bak 's\u002Ffallback_providers:.*\u002Ffallback_providers:\\n  - provider: openrouter\\n    model: deepseek\\\u002Fdeepseek-v4.1-flash\\n    base_url: https:\\\u002F\\\u002Fopenrouter.ai\\\u002Fapi\\\u002Fv1\\n    api_mode: chat_completions\u002F' ~\u002F.hermes\u002Fconfig.yaml\n```\n\n### Model selection in session\n\n- `\u002Fmodel qwen2.5:3b` — switch to local code model\n- `\u002Fmodel nomic-embed-text` — switch to embedding model\n- `\u002Fmodel deepseek\u002Fdeepseek-v4.1-flash` — switch back to cloud\n- `\u002Fmodel` (no arg) — interactive picker\n\n## Configuring Model Context Size\n\nWhen Hermes runs a model through Ollama for tool-calling tasks (cron jobs, code generation), it needs adequate context to support reliable tool use. The required context depends on your hardware:\n\n| Hardware | Recommended context | Notes |\n|----------|-------------------|-------|\n| GPU-equipped | **65536** (64k) | GPU handles attention computation — CPU stays cool |\n| CPU-only (desktop) | **16384-32768** | Monitor temps; 80°C+ means reduce further |\n| CPU-only MacBook (pre-2019) | **4096** | 65536 on Haswell i7 hits 92°C+ → kernel throttle |\n\n> **Why 4096 on MacBooks?** LLM inference on CPU is O(n²) in context length. 32768 → 4096 reduces attention computation ~64x. On a 2014 MacBook (i7-4980HQ), this drops CPU usage from 393% to under 100% and temperature from 92°C to 59°C. Without this reduction, `intel_powerclamp` forcibly throttles the CPU, causing system halting.\n\nThis requires two separate configuration layers:\n\n### Layer 1: Hermes config (tells Hermes what to request)\n\n```yaml\nmodels:\n  qwen2.5:3b:\n    context_length: 4096     # Hermes's own token budget\n    ollama_num_ctx: 4096     # Passed to Ollama API as num_ctx\n```\n\n### Layer 2: Ollama Modelfile (tells Ollama the model's default)\n\nHermes checks the model's runtime context against its requirement. Even with Layer 1 set, Ollama may load the model with only 32,768 context if the Modelfile default is smaller. Fix by creating a Modelfile:\n\n```bash\nollama create qwen2.5:3b -f \u003C(echo -e \"FROM qwen2.5:3b\\\\nPARAMETER num_ctx 4096\")\n```\n\nThis updates the model's manifest in-place. Verify the Modelfile persisted:\n\n```bash\nollama show qwen2.5:3b --modelfile | grep num_ctx\n# Expected: PARAMETER num_ctx 4096\n```\n\n**Note:** `ollama ps` still shows `CONTEXT 32768` even after this fix — that's Ollama's initial runtime reservation, not the maximum. Hermes reads the Modelfile capabilities, not `ollama ps`, so the fix is effective despite what `ollama ps` reports.\n\n### When to apply\n\nApply this to **any** Ollama model used for Hermes cron jobs or interactive sessions that make tool calls. Small models (3B params) and embedding models (\u003C1B params) that only do generation (no tool calling) can keep lower context.\n\n### Cold start warning\n\nThe first request after model pull (or after Ollama restart) loads the model into RAM. This takes **5-30 seconds** depending on model size and CPU speed. Subsequent requests are faster because the model stays cached in memory.\n\n## Security Check\n\nVerify localhost-only binding:\n\n```bash\nss -tlnp | grep 11434\n# Expected: 127.0.0.1:11434\n# NOT:      0.0.0.0:11434\n```\n\n## Pitfalls\n\n- **`ollama-linux-amd64.tgz` returns 404**: Use `.tar.zst`, not `.tgz`.\n- **OLLAMA_HOST defaults to 0.0.0.0**: Explicitly set `127.0.0.1` in the service to avoid network exposure.\n- **User vs system systemd**: User units (`~\u002F.config\u002Fsystemd\u002Fuser\u002F`) need no sudo but only run while the user session is active. For persistence across reboots without login, run: `sudo loginctl enable-linger $USER`.\n- **mycortex needs llama-server binary**: mycortex's ollama provider runs `llama-server` directly, not through the HTTP API. The full tarball extraction to `~\u002F.local\u002Flib\u002Follama\u002F` is required — just the `bin\u002Follama` binary is insufficient.\n- **Model pull timeout**: Large models can take 10+ minutes. Use a generous timeout (300s+) when pulling.\n- **Service won't start**: Check `journalctl --user -u ollama --no-pager -n 20` for errors. Common issue: missing `~\u002F.local\u002Fbin\u002Follama` binary because the ExecStart path is wrong.\n- **Hermes RuntimeError: model context too small**: If Hermes fails with \"Ollama loaded `model` with only N tokens of runtime context, but Hermes needs at least 64,000 tokens\", the Modelfile `num_ctx` override is missing (Layer 2 above). Running `ollama create` with a Modelfile overriding `num_ctx` fixes it — this is NOT a hardware limitation in most cases. Hermes config's `ollama_num_ctx` alone is insufficient.\n- **`ollama ps` shows 32768 after Modelfile fix**: This is expected — the CONTEXT column shows the initial runtime allocation, not the model's maximum. The fix is working if `ollama show \u003Cmodel> --modelfile | grep num_ctx` shows 4096 (or your configured value). Do not re-apply the fix or try other approaches.\n- **CPU-only LLM thermal throttling**: Running qwen2.5:3b (or similar) on CPU-only machines with context > 4096 frequently triggers `intel_powerclamp` kernel throttling. Symptoms: `idle_inject\u002F[0-7]` in `ps` output consuming 5-10% CPU each, CPU temp > 80°C, PSI some avg10 > 5%. Fix: reduce context to 4096, limit `OLLAMA_NUM_THREADS=2`, set `OLLAMA_KEEP_ALIVE=0`. See `linux-performance-diagnostics` skill Phase 9 for full diagnostic steps.\n- **patch tool writes to whatever path you give it**: If `patch(path=...)` resolves to `~\u002F.steadfaste-fleet\u002Fscripts\u002F` (the deployed copy) instead of `~\u002Fsteadfaste-fleet\u002Fops\u002Fscripts\u002F` (the repo source), the git repo still has the old values. Always verify with `git diff` after patching repo-tracked files.\n- **Ollama exits cleanly (code 0) after model load failure**: When a client closes the connection before the model finishes loading (timeout or disconnect), Ollama logs \"client connection closed before llama-server finished loading, aborting load\" and may exit with code 0. With `Restart=on-failure`, systemd considers code 0 a clean exit and does NOT restart. Use `Restart=always` instead, and set `RestartSec=30` to avoid rapid restart loops if the failure condition persists.\n\n## References\n\n- **GitHub**: https:\u002F\u002Fgithub.com\u002Follama\u002Follama\n- **Model library**: https:\u002F\u002Follama.com\u002Flibrary\n- **Install script**: https:\u002F\u002Follama.com\u002Finstall.sh\n- **Related skills**: `llama-cpp` for GGUF inference, `huggingface-hub` for model discovery\n",{"name":5,"author":24,"license":15,"version":25,"metadata":26,"platforms":36,"description":7},"agent","1.1.0",{"hermes":27},{"tags":28},[29,30,31,32,33,34,35],"ollama","local-llm","embeddings","linux","systemd","setup","inference",[32],"main","2e6aa8d15ab0a366c90be54f61bf9c6e97015e83","skills\u002Fmlops\u002Follama-setup",1,"https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet","steadfaste.com","https:\u002F\u002Fgithub.com\u002Flukemcqueen","AI Architect | Building Hermes Cortex: governed multi-agent AI for autonomous software engineering | Enterprise Tech Consultant","2026-11-14 22:33:34",{"source":8,"skillName":5,"commands":47,"prompt":57,"zipAvailable":58},[48,51,54],{"tool":49,"command":50},"npx","npx skills add lukemcqueen\u002Fsteadfaste-fleet --skill ollama-setup",{"tool":52,"command":53},"bunx","bunx skills add lukemcqueen\u002Fsteadfaste-fleet --skill ollama-setup",{"tool":55,"command":56},"pnpm","pnpm dlx skills add lukemcqueen\u002Fsteadfaste-fleet --skill ollama-setup","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fmlops\u002Follama-setup\u002FSKILL.md",true,[],[61,69,76,83,90,97],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":68},"01M7DXY4G8NSVB59K8B6S2AQNP","macbook-linux-maintenance","Legacy MacBook Linux fixes: GPU wedge, reboot hang, thermal.","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Fmacbook-linux-maintenance\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":68},"01M7DXXYJCXFJ3TGB84ZQ8KFE6","governance-regression-triage","Triage a host's governance issues: what changed.","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Fgovernance-regression-triage\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":68},"01M7DXXSAP1G8FDRJAMXQGBBMK","enforcement-immutability","Use when enforcement files lose their immutable flag.","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Fenforcement-immutability\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":68},"01M78SSDQVRYX64Y16X32TC0NS","steadfaste-fleet-repo-deploy","Use when committing to the steadfaste-fleet repo.","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Fsteadfaste-fleet-repo-deploy\u002FSKILL.md",[],[],{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":68},"01M78SS928F3R2RJAYVW4E30CE","steadfaste-fleet-maintenance","Maintain an installed Steadfaste Fleet instance — update both the upstream Hermes Agent and the fleet repo layer, merge diverged histories, sync skills safely, and troubleshoot common issues. Covers the dual-update workflow (hermes update + fleet-update.sh), encrypted brain data backup, mycortex import, and recovery techniques.","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Fsteadfaste-fleet-maintenance\u002FSKILL.md",[],[],{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":68},"01M78SP1CHW0T0BWE5ZT6JBPX8","fleet-preflight","DEPRECATED alias — merged into survey-before-action (2026-08-20). Load survey-before-action instead; its \"Repo-Specific Pre-Flight\" section covers git search, Hermes boundary, and deployment verification.","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Ffleet-preflight\u002FSKILL.md",[],[]]