Skip to content

Commit c29dcd8

Browse files
Set devstral-2:123b as default off-Claude classifier model (sweep-chosen)
Swept 8 Ollama-Cloud models on the fixed 80-item eval. devstral-2:123b wins as the openai-engine default: F1 0.84 (beats claude's 0.78), recall 0.90, consistent across 2 runs, 0 parse errors, threshold-tunable precision. qwen3-coder:480b is the highest-precision (0.90) alternative. Dropped: glm-5/qwen3.5/deepseek (20-45s/call, impractical), gemma4 (JSON parse-broken), kimi (timeout). `--model` empty now resolves to devstral-2:123b for the openai engine. Sweep table + rationale in IMPROVEMENT_LOG. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 5e5020b commit c29dcd8

2 files changed

Lines changed: 31 additions & 11 deletions

File tree

collection/IMPROVEMENT_LOG.md

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -121,15 +121,30 @@ The env's `hermes-agent` provides an OpenAI-compatible route to **Ollama Cloud**
121121
(`https://ollama.com/v1`, key in `~/.hermes/.env`), so classification can run
122122
off Claude:
123123

124-
| engine / model | precision | recall | F1 |
125-
|---|---|---|---|
126-
| claude (opus) | 0.931 | 0.675 | 0.783 |
127-
| openai · qwen3-coder:480b (Ollama Cloud) | 0.871 | 0.675 | 0.761 |
128-
129-
Open code-model is ~0.06 precision behind Claude, same recall — usable. (This is
130-
Ollama *Cloud*, hosted, not local hardware; a truly local model via `--engine
131-
ollama` on :11434 would need `ollama serve` + a pulled model, untested here.)
132-
`local_diffs.py` feeds diffs rate-limit-free; the two together make a full
124+
Model sweep on the fixed 80-item eval (Ollama Cloud via hermes; devstral &
125+
nemotron got 2 runs each). Ranked:
126+
127+
| engine / model | precision | recall | F1 | speed (80) |
128+
|---|---|---|---|---|
129+
| **openai · devstral-2:123b** ⭐ default | 0.78 | 0.90 | **0.84 / 0.84** | ~170s |
130+
| openai · nemotron-3-nano:30b | 0.78 | 0.90 | 0.83 / 0.84 | ~150s |
131+
| claude (opus) baseline | 0.93 | 0.68 | 0.78 ||
132+
| openai · qwen3-coder:480b (highest precision) | 0.90 | 0.65 | 0.75 | ~112s |
133+
| openai · gpt-oss:120b | 0.74 | 0.78 | 0.76 | ~94s |
134+
| openai · qwen3-coder-next | 0.75 | 0.38 | 0.50 | ~55s |
135+
| openai · gemma4:31b |||| 73/80 JSON parse errors |
136+
| openai · kimi-k2.7-code |||| timeout (slow on real prompts) |
137+
138+
**Default = `devstral-2:123b`** (Mistral's code model): best F1 (0.84, *beats*
139+
claude's 0.78), consistent across two runs, 0 parse errors, high recall with
140+
threshold-tunable precision. `--model qwen3-coder:480b` for the highest-precision
141+
(0.90) variant. Slow/reasoning models (glm-5, qwen3.5:397b, deepseek-v3.2 ~20-45s
142+
/call) and gemma (parse-broken) are impractical. Note: n=80 has ~0.05 run
143+
variance, so sub-0.06 gaps aren't meaningful.
144+
145+
This is Ollama *Cloud* (hosted), not local hardware; a truly local model via
146+
`--engine ollama` on :11434 would need `ollama serve` + a pulled model (untested).
147+
`local_diffs.py` feeds diffs rate-limit-free; together they make a full
133148
off-Claude, cache-resumable classification run practical.
134149

135150
**Remaining levers require a technique switch (heavier / user-gated):**

collection/llm_classify_fixes.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,12 +268,17 @@ def main() -> int:
268268
ap.add_argument("--engine", choices=["claude", "ollama", "openai"], default="claude",
269269
help="LLM backend for classification")
270270
ap.add_argument("--model", default="",
271-
help="model id (e.g. qwen3-coder:480b for openai/ollama-cloud)")
271+
help="model id; empty picks the engine default (openai -> devstral-2:123b)")
272272
ap.add_argument("--ollama-host", default="http://localhost:11434")
273273
ap.add_argument("--base-url", default="", help="OpenAI-compatible base url (openai engine)")
274274
ap.add_argument("--api-key-env", default="", help="env var holding the API key (openai engine)")
275275
a = ap.parse_args()
276-
ENGINE.update(engine=a.engine, model=a.model, host=a.ollama_host,
276+
# Best default for the openai/Ollama-Cloud engine, chosen by an 80-item eval
277+
# sweep (see collection/IMPROVEMENT_LOG.md): devstral-2:123b — F1 0.84 (beats
278+
# claude's 0.78), high recall, consistent, 0 parse errors. Use
279+
# --model qwen3-coder:480b if you want the highest-precision (0.90) variant.
280+
model = a.model or ("devstral-2:123b" if a.engine == "openai" else "")
281+
ENGINE.update(engine=a.engine, model=model, host=a.ollama_host,
277282
base_url=a.base_url, api_key=os.environ.get(a.api_key_env, "") if a.api_key_env else "")
278283
if a.engine == "ollama" and a.workers > 2:
279284
a.workers = 2 # a single local model serializes; avoid thrashing

0 commit comments

Comments
 (0)