Local Ollama Eval
Run AILANG agent-mode evals against local Ollama models (typically gemma4:26b) on a dedicated Apple Silicon rig with 64+ GB unified memory. This is the canonical workflow for cost-free continuous OS-model evaluation, replacing pay-per-token OpenRouter routing.
Born from the M-EVAL-LOCAL-OLLAMA + M-EVAL-LOCAL-OBSERVABILITY milestones (v0.22.0). The user guide at docs/docs/guides/evaluation/local-ollama.md is the human-facing reference; this skill is the Claude-facing operational checklist.
Current State
- ollama serve: !'curl -s http://localhost:11434/api/ps >/dev/null 2>&1 && echo "✓ running" || echo "✗ NOT running"'
- ailang server (OTLP receiver): !'curl -s http://localhost:1957/health 2>/dev/null | grep -q healthy && echo "✓ running" || echo "✗ NOT running"'
- Loaded ollama models: !'curl -s http://localhost:11434/api/ps 2>/dev/null | python3 -c "import sys,json; d=json.load(sys.stdin); [print(m[\"name\"], \"vram=%.1fGB\"%(m.get(\"size_vram\",0)/1e9)) for m in d.get(\"models\",[])]" 2>/dev/null || echo "(none)"'
- OTEL endpoint env: !'echo "${OTEL_EXPORTER_OTLP_ENDPOINT:-(unset — eval-suite will write to whatever DEFAULT it picks)}"'
- Recent chains (last hour): !'PATH="$HOME/go/bin:$PATH" ailang chains list --since 1h --limit 3 2>/dev/null | tail -3 || echo "(none)"'
- Spans in observatory.db: !'sqlite3 ~/.ailang/state/observatory.db "SELECT COUNT(*) FROM spans;" 2>/dev/null || echo "(db missing or empty)"'
Use the state above to skip work that is already done. If ollama isn't running, start it before doing anything else. If the ailang server isn't running,
make services-start. If the env var is unset, you'll lose live span observability.
Quick Start
Run the canonical smoke tier
# Activate observability (one-shot per shell session)
export OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:1957
# Verify rig is ready
.claude/skills/local-ollama-eval/scripts/verify_setup.sh
# Pre-warm the rig (saves 40-90s on the first benchmark trial — see "Warmup" below)
.claude/skills/local-ollama-eval/scripts/warmup_rig.sh
# Run smoke tier on gemma4:26b
.claude/skills/local-ollama-eval/scripts/run_smoke.sh opencode-gemma4-26b
# Watch progress in another terminal/turn
.claude/skills/local-ollama-eval/scripts/watch_active.sh
Warmup (avoiding the 40-90s first-call tax)
The first opencode invocation against a freshly-loaded ollama model pays a
big one-time cost: ollama prefills the ~100k-token opencode framework prompt
into KV cache. Observed 2026-05-23: 42-90s for that first call, then
subsequent calls within the same KV-cache window are ~5x faster.
If a rotation kicks off cold, every benchmark's trial-1 pays this tax
separately. Worse: under load with concurrent agent loops fighting for the
NUM_PARALLEL=1 ollama queue, this can balloon to 4-15 minutes per first call.
warmup_rig.sh solves this by doing ONE throwaway opencode call with the
standard framework prompt, plus an MCP initialize ping to wake the Cloud Run
endpoint. After warmup, real benchmark trials hit warm cache from the first
call. Always run it before a rotation starts.
Single-benchmark test
export OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:1957
make eval-smoke MODELS=opencode-gemma4-26b \
EXTRA='-agent -langs ailang -benchmarks fizzbuzz \
-output /tmp/quick_check -parallel 1 -agent-timeout 1800'
Fizzbuzz solo takes 1–4 min wall clock and tells you the stack works end-to-end.
When to Use This Skill
Invoke when the user says any of:
- "Run eval locally" / "run on the rig"
- "Try gemma4 on the smoke tier"
- "Start the rotation"
- "Watch the current eval"
- "Why does the local benchmark X fail?"
- "Add Qwen3 to the local rotation"
- Anything mentioning
ollama-*oropencode-gemma4-*model names
Do NOT use this skill when the user is talking about cloud OS models (those route via OpenRouter — see model-manager) or about cloud-only Claude/GPT/Gemini evaluation.