Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

local-ollama-eval

БесплатноЗапускает вложенные скриптыНе проверен

Run AILANG agent-mode evaluations against local Ollama models on a dedicated Mac Studio rig. Use when user mentions "local ollama", "gemma4", "run eval…

sunholo-dataот sunholo-data★ 39 звёзд на GitHub

Об этом скилле

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 operator runbook at docs/internal/runbooks/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-* or opencode-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.

Setup Checklist (one-time, per rig)

Run scripts/verify_setup.sh — it checks all of these:

Component How to install Verify
Go toolchain brew install go go version
Ollama runtime brew install ollama then start app curl -s localhost:11434/api/ps
gemma4:26b model ollama pull gemma4:26b (~17 GB) ollama show gemma4:26b
Node + npm brew install node node --version
opencode CLI npm install -g opencode-ai opencode --version
opencode Ollama provider ~/.config/opencode/opencode.jsonc (see resources) `opencode models
AILANG binary cd ailang && make install which ailang
AILANG server make services-start (or launchd plist for 24/7) curl -s localhost:1957/health
Ollama parallelism launchctl setenv OLLAMA_NUM_PARALLEL 4 + restart Ollama
Полный SKILL.md на GitHub

Установить local-ollama-eval в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

resources/candidate_models.mdresources/opencode_jsonc_example.txtresources/rig_operations_runbook.mdresources/troubleshooting.mdscripts/check_ollama_model.shscripts/probe_context_curve.shscripts/run_smoke.shscripts/verify_setup.shscripts/warmup_rig.shscripts/watch_active.sh

FAQ

Что делает скилл local-ollama-eval?

Run AILANG agent-mode evaluations against local Ollama models on a dedicated Mac Studio rig. Use when user mentions "local ollama", "gemma4", "run eval locally", "smoke tier on the rig", "ollama benchmark", or wants to start/monitor a local-model eval rotation. Covers the M-EVAL-LOCAL-OLLAMA + M-EVAL-LOCAL-OBSERVABILITY workflow.

Как установить скилл local-ollama-eval?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл local-ollama-eval запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить local-ollama-eval с