Valkea commited on
Commit
9c9e326
·
verified ·
1 Parent(s): 989611a

ettin-32m-effort-v1

Browse files
README.md ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ base_model: jhu-clsp/ettin-encoder-32m
4
+ pipeline_tag: text-classification
5
+ language: en
6
+ tags:
7
+ - onnx
8
+ - coding-assistant
9
+ - reasoning-effort
10
+ - claude-code
11
+ - opencode
12
+ ---
13
+
14
+ # System1Router effort classifier
15
+
16
+ Predicts the reasoning effort a coding-assistant turn needs (`low`, `medium`, `high`, `xhigh`, `max`) from the prompt and its recent conversation. It is the local classifier of [System1Router](https://github.com/Valkea/System1Router), which sets the effort of each Claude Code or OpenCode prompt automatically while keeping the model and its prompt cache.
17
+
18
+ ## Files
19
+
20
+ | File | What |
21
+ |---|---|
22
+ | `ettin-32m-effort-v1.onnx` | ONNX graph with embedded weights. Inputs `input_ids`, `attention_mask` (int64, batch × ≤256); output: 5 effort logits |
23
+ | `ettin-32m-effort-v1.tokenizer.json` | Hugging Face tokenizer |
24
+ | `ettin-32m-effort-v1.json` | Manifest: effort order, input layout, file sizes and SHA-256 |
25
+
26
+ System1Router downloads these on `system1router install`. A new version gets a new name (`-v2`); old files stay.
27
+
28
+ ## Input
29
+
30
+ `[CLS] prompt [SEP] context [SEP]`, at most 256 tokens. The prompt keeps up to a third; the context is cut from its oldest end. The context is the last 4,000 characters of:
31
+
32
+ ```
33
+ Files in play: <paths>
34
+ Tools used: <tool names>
35
+ Recent conversation:
36
+ <the newest 3,000 characters of the conversation>
37
+ ```
38
+
39
+ So a short follow-up ("ok, do it") after a long debugging exchange is judged by what it refers to.
40
+
41
+ ## Training
42
+
43
+ - Base: [jhu-clsp/ettin-encoder-32m](https://huggingface.co/jhu-clsp/ettin-encoder-32m), fully fine-tuned (embeddings included), 4 epochs, lr 8e-5.
44
+ - Data: 2,535 prompts from real Claude Code and OpenCode sessions, each labelled in hindsight by Claude Opus with the effort the turn needed, given the prompt, context and outcome. The data is not published.
45
+ - Loss: class-weighted cross-entropy plus an expected-distance cost that weighs a too-low effort twice a too-high one.
46
+
47
+ ## Evaluation
48
+
49
+ 509 prompts from 96 held-out sessions (split by session):
50
+
51
+ | | Exact | Within one level | Mean abs. error |
52
+ |---|---:|---:|---:|
53
+ | random | 23–28% | 65–74% | 1.04–1.21 |
54
+ | always `medium` | 33% | 91% | 0.76 |
55
+ | **this model** | **60%** | **94%** | **0.47** |
56
+
57
+ Too low 25%, too high 15%. Labels are one judge's opinion, so part of the remaining error is label noise. About 10 ms per prompt on 4 CPU threads after a 0.5 s load; 130 MB.
58
+
59
+ ## Limits
60
+
61
+ - Trained on one developer's sessions: mostly Rust, TypeScript and Python projects.
62
+ - The token embeddings were fine-tuned on those sessions, so they carry traces of the vocabulary that appeared in them.
63
+ - An effort predictor, not a quality judge: it does not know which model runs the turn.
64
+
65
+ Retrain on your own sessions: [experiments/TRAINING.md](https://github.com/Valkea/System1Router/blob/main/experiments/TRAINING.md).
ettin-32m-effort-v1.json ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "ettin-32m-effort-v1",
3
+ "base": null,
4
+ "efforts": [
5
+ "low",
6
+ "medium",
7
+ "high",
8
+ "xhigh",
9
+ "max"
10
+ ],
11
+ "maxLength": 256,
12
+ "contextChars": 4000,
13
+ "cls": 50281,
14
+ "sep": 50282,
15
+ "files": {
16
+ "onnx": {
17
+ "name": "ettin-32m-effort-v1.onnx",
18
+ "bytes": 129405337,
19
+ "sha256": "940f313b8378af1484be58c3d9c75ed9708662ee76abfe121298615bd9f05be9"
20
+ },
21
+ "tokenizer.json": {
22
+ "name": "ettin-32m-effort-v1.tokenizer.json",
23
+ "bytes": 3583228,
24
+ "sha256": "6c8aaa9a542084f2457eab775d4eeb51f92a70c0fd9de28d5edb0ddec3c08d30"
25
+ }
26
+ }
27
+ }
ettin-32m-effort-v1.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:940f313b8378af1484be58c3d9c75ed9708662ee76abfe121298615bd9f05be9
3
+ size 129405337
ettin-32m-effort-v1.tokenizer.json ADDED
The diff for this file is too large to render. See raw diff