A small decision model that tells whether a coding agent still needs its context, made for
the auto-compact Claude Code mod.
Given the session's memory (short lines that track its tasks and how each stands), the
agent's last reply and the developer's new message, Spisev puts the message in one of five
categories: continuation, follow_up, related, independent or return. The mod turns
that into an action: keep the context, compact it to a summary, or clear it.
Spisev is a llama.cpp decision model: llama.cpp b11361 or later serves it at
/v1/systemone, the System One API, with no extra code.
llama-server -hf arthur-fontaine/spisev-alpha-GGUF:Q8_0 --alias spisev-alpha -c 16384 # or: llama serve -hf …
In the mod, /auto-compact setup → Spisev (local) does this for you.
The GGUF sets qwen3.decision.type = openjev (one letter per option, read from the
next-token logits), a systemone chat template that renders a request into the exact
training prompt, and qwen3.decision.temperature.choice, fitted on held-out data. It
expects the mod's v2 question and state (memory, last_agent_message,
latest_user_message); other questions or states get poor answers.
| Tag | Request it reads | Mod |
|---|---|---|
alpha.2 (this one, main) |
v2: memory, the agent's last reply, the new message | the v2 release of auto-compact |
alpha.1 |
v1: one-line summaries of the whole session, the new message | auto-compact 0.1.3 and earlier |
Each tag is a commit of this repository, so an older version stays downloadable from its
tag (for example hf download arthur-fontaine/spisev-alpha-GGUF --revision alpha.1).
418 decisions: 334 held-out prompts from 94 real coding sessions, plus 84 held-out splices (the end of one session followed by the first prompt of another). The answer key is the action on which two Claude teachers (Sonnet 5.5 and Opus 5.5) agree after seeing what the classifier sees plus hindsight: the last messages, what the agent did next and the developer's following prompts. Always keeping the context scores 76.8%. Every model got the v2 request, one request at a time, local ones in llama.cpp b11669 on an Apple M4 Pro; cloud latency includes the round trip from that Mac. The previous Spisev and Qwen3.5-2B were trained on the v1 request and got that one; they are drawn faded.
The green zone is where a decision model should be, with both edges set by a rule rather than read off the results:
pipeline/benchmark.py
computes it from the results.| Model | Runs | Right action | Kept when it should | Acted when it should | Right action, auto mode | Right category | Latency p50 / p95 |
|---|---|---|---|---|---|---|---|
| Spisev 1.7B | Local · llama.cpp · Q8_0, 1.8 GB | 92.3% | 95.6% | 81.4% | 87.8% | 83.1% | 329 / 699 ms |
| Kev-4B, zero-shot | Local · llama.cpp · Q8_0, 4.5 GB | 86.8% | 91.0% | 73.2% | 76.8% | 72.8% | 1822 / 3225 ms |
| Elephant 9B | Cloud · Baseten | 93.3% | 96.9% | 81.4% | 88.0% | 70.7% | 193 / 246 ms |
| Mammoth 27B | Cloud · Baseten | 94.7% | 96.3% | 89.7% | 90.0% | 84.4% | 233 / 340 ms |
| Jev 1.13 | Cloud · OpenCode Zen | 94.0% | 96.9% | 84.5% | 88.5% | 85.8% | 471 / 656 ms |
| Spisev 1.7B, alpha.1, previous version, v1 request | Local · llama.cpp · Q8_0, 1.8 GB | 93.3% | 97.5% | 79.4% | 87.1% | 81.5% | 138 / 2590 ms |
| Qwen3.5-2B, same recipe, previous candidate, v1 request | Local · llama.cpp · Q8_0, 2.0 GB | 93.8% | 97.2% | 82.5% | 87.8% | 83.6% | 431 / 1913 ms |
| Always keep | 76.8% | 100% | 0% | 76.8% |
Spisev is statistically level with Jev, its teacher (exact McNemar p = 0.25), Elephant (p = 0.56) and the previous Spisev (p = 0.54); Mammoth is ahead, though not significantly (p = 0.076). Against the previous version it gets the category right more often and acts more often when it should, and its p95 falls from 2.6 s to 0.7 s because v2 states are short (2,185 tokens at most, against 8,179). With the state prefilled while the developer types, as the mod does, it answers in 44 / 285 ms. On a second key whose teachers saw only the raw messages, it gets 92.8% right against 95.0% for the previous version (p = 0.11). Method and limits: training/README.md.
Distilled from Jev 1.13 (OpenCode Zen): LoRA (rank 16, alpha 32, all linear layers) on
Qwen3-1.7B with Unsloth, a soft cross-entropy against the teacher's distribution over the
option letters at the answer position only, 3 epochs, best epoch on dev, then merged,
calibrated (temperature 1.10) and converted to GGUF Q8_0, following Together's tev1 recipe.
The synthetic splices were labeled by Baseten's Mammoth instead, which reads unrelated
prompts better on the v2 state. The code is in
training/.
format:agent-traces
datasets on the Hugging Face Hub, deduplicated, filtered and scrubbed of secrets, under
their own licenses; 3,612 training points from 714 sessions, 471 of them synthetic splices.return is rare in the training labels, so Spisev rarely answers it.Qwen/Qwen3-1.7B