dcostenco commited on
Commit
f7a3fe7
·
verified ·
1 Parent(s): 04be453

docs: updated benchmark scores — v26 system prompt + nothink template (May 14 2026)

Browse files
Files changed (1) hide show
  1. README.md +35 -54
README.md CHANGED
@@ -19,57 +19,51 @@ On-device MCP tool router based on **Qwen/Qwen3-1.7B**. Runs in 1.6 GB RAM at Q4
19
 
20
  ## Test results — Prism routing 100-case eval (May 14 2026)
21
 
22
- 3-run mean across seeds 2027/2028/2029 variance was essentially zero.
23
-
24
- | Category | Score |
25
- |---|---|
26
- | **Overall** | **84.0% ± 0.0%** |
27
- | session_load_context | 100% |
28
- | session_save_ledger | 76% |
29
- | session_search_memory | 78% |
30
- | session_save_handoff | 74% |
31
- | session_compact_ledger | 100% |
32
- | brave_web_search | 100% |
33
- | knowledge_search | 71% |
34
- | AAC plain-text | 91% |
35
- | translate plain-text | 100% |
36
- | static facts (pred) | 88% |
37
- | live-info refusal | 83% |
38
- | info / lookup | 60% |
39
- | edge (multi-step) | 65% |
40
- | **avg latency** | 1.6 s |
41
- | **invented tools** | 2 (across 300 cases) |
42
-
43
- **Below the 90% gate** this model is published for the **on-device / cost-sensitive** use case, not for accuracy-critical work. For production-quality routing, use the 14B (90%) or 32B (93.7%).
44
-
45
- **What this benchmark measures**: routing precision against the *exact* 7-tool Prism Coder taxonomy. **Not** a general-capability score. Not comparable to public leaderboards. Methodology + runner: [github.com/dcostenco/prism-coder/tree/main/tests/benchmarks/prism-routing-100](https://github.com/dcostenco/prism-coder/tree/main/tests/benchmarks/prism-routing-100).
 
 
46
 
47
  **Where this model wins**:
48
- - **Fits on an iPhone** (1.6 GB Q4_K_M runtime — every other Prism Coder tier requires a Mac with ≥24 GB)
49
- - **Fastest** of any Prism Coder model — 1.6 s average response
50
- - **100% on 3 critical categories**: session_load_context, session_compact_ledger, web_search, translate
 
51
  - Zero cloud, zero per-token cost, fully offline
52
 
53
- **Where it underperforms** (vs 14B at 90% / 32B at 93.7% / Claude Sonnet at 99%):
54
- - `info` — 60%. Small models struggle to distinguish "what does X mean" (lookup) from "what is X" (static fact).
55
- - `edge` — 65%. Multi-step routing decisions are too long-tailed for a 1.7B model.
56
- - `save` / `smem` / `hand` / `know` — all in the 70s. The exact session-memory tool boundary is subtle at this size.
57
- - **May at capacity ceiling** — a v25-max retrain attempt regressed gate scores. Small models have inherent precision limits for routing taxonomies this granular.
58
-
59
- For production: this model is the "free tier" fallback. Pair with cloud Claude for accuracy-critical paths. The [Synalux router](https://github.com/dcostenco/prism-coder) handles the cascade automatically.
60
-
61
  ## Use case: iOS deployment
62
 
63
  This is the model the [Prism AAC](https://github.com/dcostenco/prism-aac) iOS / iPadOS / watchOS apps load on-device via **llama.cpp Swift SPM**. CoreML was evaluated and rejected — `coremltools` doesn't support Qwen3 attention ops.
64
 
65
- GGUF available: `prism-aac-1b7-q4km.gguf` (1.0 GB on disk, ~1.6 GB RAM at runtime). Fallback path: Mac Ollama over local WiFi via `OLLAMA_HOST=0.0.0.0`.
66
 
67
  ## Training recipe (v19)
68
 
69
- - **Base**: Qwen/Qwen3-1.7B + v19 system-prompt engineering
70
- - **Note**: The published `:1b7-v19-q8` Ollama tag uses **system-prompt engineering only** (no LoRA fine-tune). This was found to be more reliable than LoRA fine-tuning at this scale — small models over-fit aggressively (v25-max regressed 100% → 93.8% on a 16-case gate test).
71
- - **Quantization**: Q4_K_M (1.0 GB) for iOS, Q8 (2.2 GB) for Mac / better quality
72
- - **Hardware**: Mac M4 Max (MLX-LM) for the prompt-engineering eval cycle
73
 
74
  ## Usage
75
 
@@ -80,26 +74,13 @@ ollama pull dcostenco/prism-coder:1b7
80
  ollama run dcostenco/prism-coder:1b7 "Search my knowledge for OAuth scope reference"
81
  ```
82
 
83
- ### iOS — llama.cpp Swift SPM
84
-
85
- See [prism-aac/ios-native](https://github.com/dcostenco/prism-aac/tree/main/ios-native) for the full integration: `LLMEngine.swift` → `prismNativeBridge.askAI()` → `window.prismNativeAIResult()` token stream.
86
-
87
- ### HuggingFace (transformers)
88
-
89
- ```python
90
- from transformers import AutoModelForCausalLM, AutoTokenizer
91
- model = AutoModelForCausalLM.from_pretrained("dcostenco/prism-coder-1.7b", torch_dtype="auto")
92
- tok = AutoTokenizer.from_pretrained("dcostenco/prism-coder-1.7b")
93
- ```
94
-
95
  ### System prompt
96
 
97
- Use the [v25 routing prompt](https://github.com/dcostenco/prism-coder/blob/main/tests/benchmarks/prism-routing-100/benchmark.py#L47) verbatim. This model relies *heavily* on the system prompt see "Training recipe" above.
98
 
99
  ## Hardware requirements
100
 
101
  - **iPhone / iPad**: A14 Bionic+ (iPhone 12+), iOS 15+, ~1.6 GB free RAM
102
- - **Apple Watch (standalone)**: Series 10+ for on-device, otherwise paired-mode via iPhone
103
  - **Mac**: any M-series (M1 8 GB unified is enough at Q4_K_M)
104
  - **Linux**: any CPU works at Q4_K_M; a 4 GB GPU dramatically speeds inference
105
  - **Inference speed**: ~0.5–1.6 s per 200-token response
 
19
 
20
  ## Test results — Prism routing 100-case eval (May 14 2026)
21
 
22
+ 100 prompts (seed=2027), v26 system prompt.
23
+
24
+ | Category | Current | Previous (v19 old prompt) | Δ |
25
+ |---|---|---|---|
26
+ | **Overall** | **88%** | 84.0% | **+4.0** |
27
+ | session_load_context | 100% | 100% | = |
28
+ | session_save_ledger | 85% | 76% | +9 |
29
+ | session_search_memory | 100% | 78% | +22 |
30
+ | session_save_handoff | 75% | 74% | +1 |
31
+ | session_compact_ledger | 100% | 100% | = |
32
+ | brave_web_search | 86% | 100% | -14 |
33
+ | knowledge_search | 43% | 71% | -28 |
34
+ | AAC plain-text | **100%** | 91% | **+9** |
35
+ | translate plain-text | 100% | 100% | = |
36
+ | plain text (pred/irrel) | 100% | 88% | +12 |
37
+ | no-tool refusal | 83% | 83% | = |
38
+ | info / lookup | 100% | 60% | +40 |
39
+ | edge (multi-step) | 60% | 65% | -5 |
40
+ | **avg latency** | **1.6s** | 1.6s | = |
41
+ | **invented tools** | **0** | 2 | **-2** |
42
+
43
+ **Key improvements**: AAC routing 91% 100% (life-critical fix), zero invented tool names (was 2), info/lookup 60% 100%, session_search_memory 78% → 100%.
44
+
45
+ **Below the 90% gate** this model is published for the **on-device / cost-sensitive** use case, not for accuracy-critical work. The bottleneck is `knowledge_search` at 43% (same as 14B).
46
+
47
+ **What this benchmark measures**: routing precision against the *exact* 7-tool Prism Coder taxonomy. **Not** a general-capability score. Methodology + runner: [github.com/dcostenco/prism-coder/tree/main/tests/benchmarks/prism-routing-100](https://github.com/dcostenco/prism-coder/tree/main/tests/benchmarks/prism-routing-100).
48
 
49
  **Where this model wins**:
50
+ - **Fits on an iPhone** (1.6 GB Q4_K_M runtime)
51
+ - **Fastest** of any Prism Coder model — 1.6 s average
52
+ - **100% on 6 categories**: load_ctx, srch_mem, compact, translate, AAC, plain_text
53
+ - Zero invented tool names (improved from 2 in previous version)
54
  - Zero cloud, zero per-token cost, fully offline
55
 
 
 
 
 
 
 
 
 
56
  ## Use case: iOS deployment
57
 
58
  This is the model the [Prism AAC](https://github.com/dcostenco/prism-aac) iOS / iPadOS / watchOS apps load on-device via **llama.cpp Swift SPM**. CoreML was evaluated and rejected — `coremltools` doesn't support Qwen3 attention ops.
59
 
60
+ GGUF available: `prism-aac-1b7-q4km.gguf` (1.0 GB on disk, ~1.6 GB RAM at runtime).
61
 
62
  ## Training recipe (v19)
63
 
64
+ - **Base**: Qwen/Qwen3-1.7B + v26 system-prompt engineering
65
+ - **Note**: Uses **system-prompt engineering only** (no LoRA fine-tune). Small models over-fit aggressively — a v25-max LoRA attempt regressed 100% → 93.8% on a 16-case gate test.
66
+ - **Quantization**: Q4_K_M (1.0 GB) for iOS, Q8 (2.2 GB) for Mac
 
67
 
68
  ## Usage
69
 
 
74
  ollama run dcostenco/prism-coder:1b7 "Search my knowledge for OAuth scope reference"
75
  ```
76
 
 
 
 
 
 
 
 
 
 
 
 
 
77
  ### System prompt
78
 
79
+ Use the [v26 routing prompt](https://github.com/dcostenco/prism-coder/blob/main/tests/benchmarks/prism-routing-100/benchmark.py#L47) verbatim. This model relies *heavily* on the system prompt. Key: rules 1-7 must say `-> respond directly (no tool)`.
80
 
81
  ## Hardware requirements
82
 
83
  - **iPhone / iPad**: A14 Bionic+ (iPhone 12+), iOS 15+, ~1.6 GB free RAM
 
84
  - **Mac**: any M-series (M1 8 GB unified is enough at Q4_K_M)
85
  - **Linux**: any CPU works at Q4_K_M; a 4 GB GPU dramatically speeds inference
86
  - **Inference speed**: ~0.5–1.6 s per 200-token response