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

docs: v27 prompt — 14B hits 98% (ties Claude Opus), labeled-category routing breakthrough

Browse files
Files changed (1) hide show
  1. README.md +23 -58
README.md CHANGED
@@ -13,78 +13,43 @@ tags:
13
  - prism-coder
14
  ---
15
 
16
- # prism-coder:1.7b (v19)
17
 
18
- On-device MCP tool router based on **Qwen/Qwen3-1.7B**. Runs in 1.6 GB RAM at Q4_K_M, in 2.4 GB at Q8. Built for iOS / Android / older Macs / WiFi-LAN-to-Mac inference where the larger tiers can't fit.
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
 
70
- ### Ollama (recommended)
71
-
72
  ```bash
73
  ollama pull dcostenco/prism-coder:1b7
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
87
 
88
  ## License
89
 
90
- Apache-2.0. Inherits from Qwen3-1.7B.
 
13
  - prism-coder
14
  ---
15
 
16
+ # prism-coder:1.7b (v19) — 86% on-device routing
17
 
18
+ On-device MCP tool router based on **Qwen/Qwen3-1.7B**. Runs in 1.6 GB RAM at Q4_K_M. Built for iOS / Android / older Macs where larger tiers can't fit.
19
 
20
+ ## Test results — Prism routing 100-case eval (May 15 2026, 3-seed mean)
21
 
22
+ | Category | Score |
23
+ |---|---|
24
+ | **Overall** | **86.3% ± 0.6%** |
25
+ | session_load_context | 100% |
26
+ | session_search_memory | 100% |
27
+ | brave_web_search | 100% |
28
+ | AAC plain-text | **100%** |
29
+ | translate plain-text | 100% |
30
+ | knowledge_search | 43% |
31
+ | session_save_ledger | 71% |
32
+ | session_save_handoff | 87% |
33
+ | **avg latency** | **2.3s** |
34
+ | **invented tools** | 1 |
35
 
36
+ **Below the 90% gate** published for the on-device / cost-sensitive use case, not accuracy-critical work. AAC routing is 100% (life-critical path).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
 
38
+ ## iOS deployment
39
 
40
+ GGUF: `prism-aac-1b7-q4km.gguf` (1.0 GB, ~1.6 GB RAM). Integrated via llama.cpp Swift SPM in [Prism AAC](https://github.com/dcostenco/prism-aac).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
 
42
  ## Usage
43
 
 
 
44
  ```bash
45
  ollama pull dcostenco/prism-coder:1b7
 
46
  ```
47
 
48
+ ## Hardware
 
 
 
 
49
 
50
+ - **iPhone**: A14 Bionic+ (iPhone 12+), ~1.6 GB free RAM
51
+ - **Mac**: any M-series
 
 
52
 
53
  ## License
54
 
55
+ Apache-2.0 (inherits from Qwen3-1.7B).