dcostenco commited on
Commit
2ff352f
Β·
verified Β·
1 Parent(s): 526f4c0

Add model card for prism-coder:4b (stock Qwen3.5-4B, 100% BFCL)

Browse files
Files changed (1) hide show
  1. README.md +106 -0
README.md ADDED
@@ -0,0 +1,106 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: en
3
+ license: apache-2.0
4
+ tags:
5
+ - tool-routing
6
+ - function-calling
7
+ - prism-coder
8
+ - qwen3.5
9
+ - synalux
10
+ - prompt-engineering
11
+ base_model: Qwen/Qwen3.5-4B
12
+ pipeline_tag: text-generation
13
+ ---
14
+
15
+ # prism-coder:4b β€” 17-Tool Memory Agent (Verifier + Mobile Tier)
16
+
17
+ Stock [Qwen3.5-4B](https://huggingface.co/Qwen/Qwen3.5-4B) with prompt engineering for full Prism Memory tool routing in the [Prism Coder](https://ollama.com/dcostenco/prism-coder) system.
18
+ Primary deployment: **mobile / 8 GB+ devices** via Ollama β€” the lightweight verifier tier.
19
+
20
+ **No fine-tuning required.** Qwen3.5-4B achieves 100% routing accuracy through system prompt engineering + thinking enabled (500 token budget). This is a drop-in replacement for the retired prism-coder:4b SFT model.
21
+
22
+ ## BFCL Benchmark β€” 100% Γ— 3 Seeds
23
+
24
+ **115/115 Γ— 3 shuffled runs = 100.0%, 0 flaky**
25
+
26
+ | Category | Count | Description | Accuracy |
27
+ |----------|------:|-------------|:--------:|
28
+ | save | 17 | session_save_ledger logging | 100% |
29
+ | smem | 17 | Session memory search/recall | 100% |
30
+ | aac | 12 | AAC phrase/communication routing | 100% |
31
+ | hand | 12 | Agent handoff (session_save_handoff) | 100% |
32
+ | irrel | 10 | Irrelevant/general questions β†’ plain text | 100% |
33
+ | load | 9 | Context loading (session_load_context) | 100% |
34
+ | pred | 8 | Prediction/task routing | 100% |
35
+ | know | 7 | Knowledge search/recall | 100% |
36
+ | cmpct | 6 | Compact/prune ledger | 100% |
37
+ | edge | 6 | Edge cases (self-description, ambiguous) | 100% |
38
+ | tran | 6 | Translation routing | 100% |
39
+ | info | 5 | Info/capability queries β†’ plain text | 100% |
40
+
41
+ 115 test cases, 3 shuffled runs (seeds 2027/2028/2029), temperature=0, 0 hallucinations across all runs.
42
+
43
+ ## Why No Fine-Tuning?
44
+
45
+ Qwen3.5-4B's linear attention architecture + native thinking capability makes it uniquely suited to tool routing via prompt engineering alone. The thinking chain reasons through routing rules before selecting a tool, achieving the same 100% accuracy as SFT'd models in the fleet.
46
+
47
+ Key insight: enabling thinking mode (not empty `<think>` blocks) is critical β€” Qwen3.5 needs to reason through the routing rules in its think chain.
48
+
49
+ ## How to Use
50
+
51
+ ```bash
52
+ # Pull stock model from Ollama
53
+ ollama pull qwen3.5:4b
54
+ ```
55
+
56
+ The system prompt is injected at runtime by [Prism MCP Server](https://github.com/dcostenco/prism-coder). No custom Modelfile or GGUF needed β€” use the stock Ollama model directly.
57
+
58
+ ## Tools
59
+
60
+ Routes to 17 Prism Memory tools + knows when NOT to call any tool:
61
+
62
+ | Tool | Trigger |
63
+ |------|---------|
64
+ | `session_load_context` | Load/resume project context |
65
+ | `session_save_ledger` | Log/record completed work |
66
+ | `session_save_handoff` | Create handoff note for next session |
67
+ | `session_search_memory` | Recall prior discussions |
68
+ | `session_forget_memory` | Delete a memory entry |
69
+ | `session_health_check` | Check session system health |
70
+ | `session_compact_ledger` | Compact/prune session ledger |
71
+ | `session_export_memory` | Export session data |
72
+ | `session_task_route` | Route task: local vs cloud |
73
+ | `session_save_experience` | Save a notable experience |
74
+ | `session_synthesize_edges` | Build knowledge graph edges |
75
+ | `session_backfill_links` | Backfill missing memory links |
76
+ | `knowledge_search` | Search accumulated knowledge |
77
+ | `knowledge_forget` | Prune bad/old knowledge |
78
+ | `knowledge_upvote` | Upvote useful knowledge |
79
+ | `knowledge_downvote` | Downvote unhelpful knowledge |
80
+ | `knowledge_set_retention` | Set knowledge retention policy |
81
+ | *(no tool)* | General questions, greetings, code, math |
82
+
83
+ ## Fleet Position
84
+
85
+ | Model | Ollama tag | Size | Role | Tier |
86
+ |---|---|---|---|---|
87
+ | prism-coder:1.7b | `prism-coder:1b7` | 1.1 GB | Always-fits fallback | Free |
88
+ | **Qwen3.5-4B** | **`qwen3.5:4b`** | **3.4 GB** | **Verifier + mobile** | **Free** |
89
+ | prism-coder:14b | `prism-coder:14b` | 8.4 GB | Default router | Standard+ |
90
+ | prism-coder:32b | `prism-coder:32b` | 16 GB | Complex tasks | Advanced+ |
91
+
92
+ ## Differences from SFT Models
93
+
94
+ | | prism-coder:1b7/14b/32b | Qwen3.5-4B (this) |
95
+ |---|---|---|
96
+ | Training | LoRA SFT on Qwen3 | None (stock weights) |
97
+ | System prompt | Baked into Modelfile | Injected at runtime |
98
+ | Thinking | Disabled (empty think) | Enabled (500 token budget) |
99
+ | GGUF hosting | Custom GGUF on HuggingFace | Stock from Ollama registry |
100
+ | Accuracy | 100% | 100% |
101
+
102
+ ## Links
103
+
104
+ - [Prism MCP Server](https://github.com/dcostenco/prism-coder) β€” the MCP server that uses this model
105
+ - [Ollama model page](https://ollama.com/dcostenco/prism-coder) β€” all fleet models
106
+ - [Qwen3.5-4B base](https://huggingface.co/Qwen/Qwen3.5-4B) β€” upstream base model