Skip to content

Getting started

Install the tools, start a local server, then run one task or the full ten-task suite from the repository root. Each attempt copies a fixture, runs Pi under Bubblewrap and verifies the patch in a separate sandbox.

Prerequisites

These are the measured and tested versions. Other versions are unverified:

  • Python 3.14.3 locally and Python 3.13 in CI
  • Node 26.14.0 locally and Node 22 in CI
  • Go 1.26.5
  • pytest 9.0.2 for the Python fixtures
  • Pi 1.6.1 for committed reference runs and Pi 1.7.0 for current project checks
  • llama.cpp 1.0.0-dev, build 12652 / commit 212c547fe
  • Bubblewrap (bwrap) 0.9.0
  • Bash and Git on Linux with unprivileged user namespaces

Install the current Pi profile with:

npm install -g --ignore-scripts @earendil-works/pi-coding-agent@1.7.0

This workflow is tested on Linux, including the documented WSL2 host. Other operating systems are unverified. Install Node/npm, Bubblewrap, Go, Python, pytest and the llama CLI with Linux packages or the llama.cpp build instructions.

Check the tools with python3 --version, node --version, go version, pytest --version, bwrap --version and llama --version. Test the Linux sandbox once:

bwrap --ro-bind / / true

It should exit silently with status 0. If user namespaces are restricted, use a host that permits unprivileged user namespaces or fix that host setting before running tasks.

The reference host

The reference host is an RTX 4060 Ti 16GB, Ryzen 9 5900X and 128 GB DDR4 under WSL2. Machine notes contain server settings and fit observations. In the five-way overhead evidence, reduced Pi's cold first prompt used 1,599 tokens versus 20,502 for full Pi; median wall time was 14 s versus 118 s. Evidence

Clone the repository

git clone https://github.com/gambtho/localgauge.git
cd localgauge

1. Start an OpenAI-compatible server

Choose a model and context size that fit your hardware. This is the tested reference model and context:

llama serve -hf unsloth/Inkling-2-Mini-GGUF:UD-Q4_K_M --ctx-size 65536 \
  --gpu-layers 999 --cache-type-k q8_0 --cache-type-v q8_0 \
  --host 127.0.0.1 --port 8080 --jinja

If the model does not fit, choose a smaller quantization or context (--ctx-size) and offload fewer layers (--gpu-layers); a hardware-specific replacement cannot be inferred here. The reference machine is an RTX 4060 Ti 16 GB. An unauthenticated OpenAI-compatible endpoint also works.

The runners expect the API at http://127.0.0.1:8080/v1. Metadata helpers are http://127.0.0.1:8080/health and http://127.0.0.1:8080/props. For another endpoint, set --base-url to its API root and --model to its model name. If either helper route is absent, pass --context-window N, where N is the configured context capacity rather than the model's advertised maximum.

2. Run one quick task

python3 -m evals.run_task \
  --base-url http://127.0.0.1:8080/v1 \
  --model 'unsloth/Inkling-2-Mini-GGUF:UD-Q4_K_M' \
  --fixture evals/tasks/go-bugfix-01 \
  --attempts 1 \
  --max-tokens 8192 \
  --timeout-seconds 900

Each attempt uses a new attempt directory. The fixture's acceptance.json protects tests and allowed implementation paths; an out-of-scope change fails acceptance. The model's final text is not proof. The command writes timestamped JSON and Markdown under results/ and prints both paths when it finishes.

3. Run the full Polyglot suite

python3 -m evals.run_suite \
  --base-url http://127.0.0.1:8080/v1 \
  --model 'unsloth/Inkling-2-Mini-GGUF:UD-Q4_K_M' \
  --attempts 3 \
  --max-tokens 8192 \
  --timeout-seconds 900

Without fixture paths, this runs all ten pinned Go and Python tasks. Add fixture directories to run a subset. --max-tokens applies per Pi model response. --timeout-seconds bounds the Pi attempt; separate acceptance verification still runs after a timeout. Ctrl-C keeps completed task results. Output defaults to results/runs/<timestamp>-<model-slug>/.

Resume the same directory with --resume. The fixture list, base URL, model, attempts, token limit, timeout and optional context window must match the saved suite-run.json:

python3 -m evals.run_suite \
  --resume \
  --output-dir results/runs/DATE-unsloth-Inkling-2-Mini-GGUF-UD-Q4_K_M \
  --base-url http://127.0.0.1:8080/v1 \
  --model 'unsloth/Inkling-2-Mini-GGUF:UD-Q4_K_M' \
  --attempts 3 \
  --max-tokens 8192 \
  --timeout-seconds 900

Replace --output-dir with the directory from the interrupted run.

4. Read the output

Start with summary.md for a suite. It reports pass rates by language and task plus failure categories. summary.json contains the same data for programs. Each task has JSON evidence and a per-attempt Markdown table. A single-task run prints its Markdown path; it has no generic root summary.md.

Task JSON fields: settlement, intervention and verification

Task JSON records settings, Pi settlement, needed_intervention, reasons, tool calls, request counts, tokens, wall time and verification.pass. needed_intervention records a detected condition; it does not prove a person intervened.

agent_settled is true for Pi's final event without an abort, false after an observed abort and unknown when Pi exits normally without that event. needed_intervention can be true for an abort, timeout, eight identical consecutive tool calls (tool_loop), invalid event output, model give-up or a nonzero Pi exit. An unknown settlement state alone is not intervention. Wall time is whole seconds. Token fields are counts. verification.pass is the acceptance result.

For a task-for-task score comparison, use the same ten fixtures, --max-tokens 8192 and three attempts. The Caveling reference used caveman-so/caveling-2-mini-GGUF:Q4_K_M at 65,536 context and passed 24/30 · 63–90% on those tasks. Server settings and caveats are in the quantization comparison; raw evidence is under results/reference.

That command starts Inkling and produces an independent run. Quantization, accelerator, drivers, KV cache, endpoint and timeout settings can all change the outcome.

Where results go

New runs under results/ are ignored by Git. Committed measurements live in results/reference/ and are described in Evidence files. Published links point there so a new run is easy to distinguish from reference evidence.

Other entry points

Run the reduced Pi profile directly:

profiles/pi-local/pi-local -p \
  "What is the difference between a Go slice and an array? Answer in three sentences."

Run python3 -m bench.run --help for the five-way endpoint/profile benchmark. It records direct HTTP, full Pi cold, full Pi warm, reduced Pi cold and reduced Pi warm.

Validate real-world task start states and reference patches without a model:

python3 -m evals.validate_real_tasks --cache-dir /path/to/scratch
python3 -m evals.validate_real_tasks --cache-dir /path/to/scratch --cache-only

A model run can reuse the validated cache:

python3 -m evals.run_task \
  --fixture evals/tasks/real/bugfix-intelligence-json/task.json \
  --cache-dir /path/to/scratch \
  --cache-only

See evals/tasks/real/README.md for the pinned-source, hidden-test, review, recovery and attribution contracts.