Skip to content

Latest commit

 

History

History
94 lines (82 loc) · 6.81 KB

EVAL_AND_SETUP.md

File metadata and controls

94 lines (82 loc) · 6.81 KB

pit — eval results & peak setup (2026-07-04)

pit is a minimal, fully-owned coding agent (~700 lines at the time of this eval, httpx-only). Built to a blueprint, then hardened by running a real agentic eval and iterating. This doc records the eval that picked the model + config.

TL;DR — the peak setup (FINAL)

  • THE BACKBONE (everything): Qwen 3.6-35B-A3B UNCENSORED Q4_K_P (a llama-server launcher bat wired into models.json). The daily-driver default. One engine on :8080 serves coding + chat/RAG. Uncensored (a plus for security work), ~60 tps text / ~53 with vision, tied every other quant on quality (4 agentic tasks + reasoning trap + 85k recall 8/8). Tuned to -t 8 (heavier quant → fewer threads win). Downloaded 2026-07-04 (23.4GB) — the predicted "best of both worlds".
  • qwen = Q4_K_S censored (~64 tps) — kept only if max coding speed ever matters (6% faster, but censored + a separate engine to manage). Q4_K_XL and Q5 variants also wired but superseded.
  • Rejected: Gemma4-26B (gemma-unc) — fast (72 tps) but inconsistent: looped to failure on the blast-radius task once, thrashy. Rejected: Qwen3.6-27B dense (~10 tps) — same quality, 6× slower.
  • Note: pit's qwen-unc-q4 loads the vision mmproj (shared bat with the app) → ~53 tps; a vision-off trim would give ~60. Left as one-engine simplicity; add the trim if coding speed ever matters.

The quant question, settled empirically (this is the important finding): Q4_K_S vs UD-Q4_K_XL vs Q5 were tested on 4 agentic tasks + a precise-reasoning aliasing trap + 85k-token multi-turn recall (8 facts by depth: both 8/8). They tied on everything. XL's theoretical "closer-to-full" fidelity — which is real on paper — produced zero measurable advantage on any task, and XL is slower on both generation (60 vs 64 tps) and prompt-ingestion (143s vs 128s @85k). So the tiebreaker is pure speed → S. Lesson (twice now, matching the chat eval): at 26-35B, the quant barely matters; don't pay for it.

On long-context realism: the 85k recall test was a bare server call (no system prompt / tools) — it isolates raw model recall. pit is a tool-using agent (~1.9k-token stack: ~1.2k house-rules system prompt + ~0.7k tool schemas; commands/"skills" load on-demand) that retrieves selectively rather than stuffing a repo into context — so the realistic agent behavior is what Tasks 1-5 tested (full stack, real file reads, reason, verify). Raw long-context recall is a minor component for an agent, and S handles it perfectly anyway (8/8 @85k). A 120k test overflowed the 128k window (content tokenized to ~130k) — a sizing note, not a model limit.

How to run

cd pit
python pit.py                       # REPL on the default model. Attaches if a server is already up.
python pit.py -p "fix the bug in X" # one-shot (this is also the eval-mode entry)

REPL: /model <name> (force-reloads the server), /models, /compact, /clear, /quit, or /<file> → commands/<file>.md. Model entries live in models.json.

The eval (4 tasks × the house pillars, graded hard)

Fixtures were disposable toy repos (a _drive* set, not included in the repo) — never real projects. Each model ran in a fresh copy; graded on objective oracle + house-rule gates (read-only restraint via before/after MD5, blast-radius via "did the load-bearing file change", verify-by-running via the tool trace).

Task Tests Q4_K_S Q5 Gemma dense-27B
T1 read-only diagnosis (code-or-data) restraint, root cause, empirical — ✅ strong ⚠️ thrashy (6 errs) —
T2 blast-radius fix (isolate vs sweep shared file) minimal-diff discipline ✅ ✅✅ read importers ❌→✅ inconsistent —
T3 red-herring diagnosis (tempting wrong suspect) root cause under misdirection ✅✅ ✅✅ — ✅ (same quality)
T4 build stats.py + verify build + verify-by-running ✅✅ self-corrected — — —

UD-Q4_K_XL was added late (flagged as the "closest-to-full" quant, correctly): ran T2 + T3, both clean passes (blast gate held, resisted the red herring, gave a slightly richer T3 diagnosis — inferred a soft-delete origin). Eval-equivalent to Q4_K_S on correctness → chosen as default on fidelity.

Key behaviors observed: all Qwen quants resist red herrings, verify empirically (query the DB / run the script), stay read-only when told, and isolate fixes to the data file (blast gate held every time). Q4_K_S once self-corrected a file-format misread by checking the actual bytes instead of guessing.

Harness improvements the eval forced (this is why owning it matters)

  1. python_eval tool — runs Python with no shell, killing the nested-quote hell that made both models thrash on python -c "...". Blocks deletion/subprocess. Biggest single win — turned Gemma's 40-step failure loop into a 9-step pass.
  2. glob brace-expansion — **/*.{py,js} now works (pathlib doesn't do braces); it was every model's failed first move.
  3. Loop-breaker — 3× identical tool call → the harness injects a nudge instead of executing, so a model can't burn to the step cap repeating a dead search (Gemma did exactly this on T2-v1).
  4. Environment hints in the system prompt — "no sqlite3 CLI, use python_eval; a 127 means switch approach; a failed search isn't proof of absence." Removes the friction models spiral on.
  5. Attach-if-up, model-aware — python pit.py attaches to a running server (instant) instead of a ~40s reload — but ONLY if .current_model confirms it's the same model. (First cut naively attached to whatever was on :8080; since every local bat reports id "local", it silently ran the wrong model during a test. Now pit records the loaded model name in .current_model and only attaches on a match; /model and explicit --model X force the correct load.)

Deletion safety (verified live)

rm/del/Remove-Item/rimraf/git clean/git reset --hard/DROP TABLE etc. are blocked at the tool layer in both shells; python_eval blocks os.remove/shutil.rmtree/subprocess. A model asked to "get rid of X" moves it to junk/ instead. Confirmed live.

Honest limits / next iterations

  • Each model ran each task once — real signal, not statistical proof. The harness now exists to run more.
  • Not yet tested: multi-file feature builds, the shared-file-shape fixtures (T1/T8-T10 from the eval dataset), the scripted user-driver steering test, long-horizon/handoff behaviors.
  • eval-mode is one python pit.py -p ... + a grader — the seam is in place, not yet a batch runner.
  • Bench artifacts (raw drive logs, session traces, and the _drive* fixtures) are local-only and not included in the repo; the _gen suite fixtures regenerate deterministically via _gen_build/build_all.py.