dcostenco commited on
Commit
46e84ae
·
verified ·
1 Parent(s): 70fdf61

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

Browse files
Files changed (1) hide show
  1. README.md +31 -57
README.md CHANGED
@@ -14,73 +14,47 @@ tags:
14
  - prism-coder
15
  ---
16
 
17
- # prism-coder:32b (v19)
18
-
19
- LoRA fine-tune of **Qwen/QwQ-32B** for offline MCP tool routing — Synalux Copilot's "reasoning tier", used when 14B can't decide or when a complex multi-step prompt arrives.
20
-
21
- ## Test results — Prism routing 100-case eval (May 14 2026)
22
-
23
- 100 prompts (seed=2027), v26 system prompt + nothink template.
24
-
25
- | Category | Current | Previous (v19 old prompt) | Δ |
26
- |---|---|---|---|
27
- | **Overall** | **97.3% ± 0.6%** | 93.7% | **+3.6** |
28
- | session_load_context | 100% | 100% | = |
29
- | session_save_ledger | 100% | 100% | = |
30
- | session_search_memory | 100% | 100% | = |
31
- | session_save_handoff | 100% | 100% | = |
32
- | session_compact_ledger | 100% | 100% | = |
33
- | brave_web_search | 100% | 100% | = |
34
- | knowledge_search | 100% | 100% | = |
35
- | AAC plain-text | **100%** | 79% | **+21** |
36
- | translate plain-text | 83% | 83% | = |
37
- | plain text (pred/irrel) | 100% | 67% | +33 |
38
- | no-tool refusal | 100% | 100% | = |
39
- | info / lookup | 100% | 100% | = |
40
- | edge (multi-step) | 80% | 82% | -2 |
41
- | **avg latency** | **2.7s** | 2.3s | +0.4s |
42
- | **invented tools** | 0 | 0 | = |
43
-
44
- **Key improvement (May 14 2026)**: system prompt v26 eliminates Q4_K_M quantization artifacts where "plain text" was misread as a tool name. AAC routing jumped from 79% to 100% critical for the life-critical AAC use case.
45
-
46
- **97.3% puts this model within 2 points of Claude Sonnet 4 (99%) on the same eval**, while running fully offline on a Mac.
47
-
48
- Only 2 misroutes in 100 cases: "Convert 'good morning' to Japanese" → brave_web_search (edge case), and a multi-step ledger query.
49
-
50
- **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).
51
-
52
- ## Notes on QwQ-32B base
53
-
54
- QwQ-32B natively emits `<think>...</think>` blocks. The Ollama Modelfile uses a `nothink` template (pre-closes the `<think>` block) to skip reasoning and go straight to the tool call.
55
-
56
- ## Training recipe (v19)
57
-
58
- - **Base**: Qwen/QwQ-32B
59
- - **LoRA**: r=32, α=64, dropout 0.05, all 7 target modules
60
- - **Corpus**: ~14K-row composite (Phase 1 general + Phase 2 agentic + Phase 3 multi-turn XL)
61
- - **Hardware**: RunPod A100 80GB / RTX 6000 Ada
62
- - **Quantization**: published as Q4_K_M GGUF (~19 GB) and merged HF safetensors
63
 
64
  ## Usage
65
 
66
- ### Ollama (recommended)
67
-
68
  ```bash
69
  ollama pull dcostenco/prism-coder:32b
70
- ollama run dcostenco/prism-coder:32b "Save handoff for prism-coder — deployment complete"
71
  ```
72
 
73
- ### System prompt
74
-
75
- Use the [v26 routing prompt](https://github.com/dcostenco/prism-coder/blob/main/tests/benchmarks/prism-routing-100/benchmark.py#L47) with the `nothink` template.
76
-
77
  ## Hardware requirements
78
 
79
- - **Mac**: M2 Ultra+ with ≥48 GB unified memory (Q4_K_M = 19 GB + activations)
80
- - **Linux + NVIDIA**: A100 40GB+, H100, B200, or 2× RTX 4090
81
- - **Inference speed**: ~2–3 s per 200-token response
82
  - **Loaded VRAM**: ~22 GB
83
 
84
  ## License
85
 
86
- Inherits QwQ-32B's Apache-2.0 license. The LoRA delta is also Apache-2.0.
 
14
  - prism-coder
15
  ---
16
 
17
+ # prism-coder:32b (v19) — 97.3% routing accuracy
18
+
19
+ LoRA fine-tune of **Qwen/QwQ-32B** for offline MCP tool routing — Synalux Copilot's "reasoning tier."
20
+
21
+ ## Test results — Prism routing 100-case eval (May 15 2026, 3-seed mean)
22
+
23
+ | Category | Score |
24
+ |---|---|
25
+ | **Overall** | **97.3% ± 0.6%** |
26
+ | session_load_context | 100% |
27
+ | session_save_ledger | 100% |
28
+ | session_search_memory | 100% |
29
+ | session_save_handoff | 100% |
30
+ | session_compact_ledger | 100% |
31
+ | brave_web_search | 100% |
32
+ | knowledge_search | 100% |
33
+ | AAC plain-text | 85% |
34
+ | translate plain-text | 83% |
35
+ | plain text (pred/irrel) | 100% |
36
+ | no-tool refusal | 100% |
37
+ | info / lookup | 100% |
38
+ | edge (multi-step) | 100% |
39
+ | **avg latency** | **2.4s** |
40
+ | **invented tools** | 0 |
41
+
42
+ All 7 MCP tools route correctly 100% of the time. Remaining misses are in plain-text categories (AAC, translate) where the model occasionally over-routes.
43
+
44
+ Uses `nothink` template + [v27 system prompt](https://github.com/dcostenco/prism-coder/blob/main/tests/benchmarks/prism-routing-100/benchmark.py#L47) with labeled category headers.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45
 
46
  ## Usage
47
 
 
 
48
  ```bash
49
  ollama pull dcostenco/prism-coder:32b
 
50
  ```
51
 
 
 
 
 
52
  ## Hardware requirements
53
 
54
+ - **Mac**: M2 Ultra+ with ≥48 GB unified memory
55
+ - **Linux + NVIDIA**: A100 40GB+, H100, B200
 
56
  - **Loaded VRAM**: ~22 GB
57
 
58
  ## License
59
 
60
+ Apache-2.0 (inherits from QwQ-32B).