Text Generation
GGUF
English
tool-routing
function-calling
prism-coder
qwen3.5
synalux
prompt-engineering
imatrix
conversational
Instructions to use dcostenco/prism-coder-4b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use dcostenco/prism-coder-4b with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf dcostenco/prism-coder-4b:Q3_K_M # Run inference directly in the terminal: llama cli -hf dcostenco/prism-coder-4b:Q3_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf dcostenco/prism-coder-4b:Q3_K_M # Run inference directly in the terminal: llama cli -hf dcostenco/prism-coder-4b:Q3_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf dcostenco/prism-coder-4b:Q3_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf dcostenco/prism-coder-4b:Q3_K_M
Use Docker
docker model run hf.co/dcostenco/prism-coder-4b:Q3_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use dcostenco/prism-coder-4b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "dcostenco/prism-coder-4b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "dcostenco/prism-coder-4b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/dcostenco/prism-coder-4b:Q3_K_M
- Ollama
How to use dcostenco/prism-coder-4b with Ollama:
ollama run hf.co/dcostenco/prism-coder-4b:Q3_K_M
- Unsloth Desktop
- Pi
How to use dcostenco/prism-coder-4b with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf dcostenco/prism-coder-4b:Q3_K_M
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "dcostenco/prism-coder-4b:Q3_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use dcostenco/prism-coder-4b with Docker Model Runner:
docker model run hf.co/dcostenco/prism-coder-4b:Q3_K_M
- Lemonade
How to use dcostenco/prism-coder-4b with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull dcostenco/prism-coder-4b:Q3_K_M
Run and chat with the model
lemonade run user.prism-coder-4b-Q3_K_M
List all available models
lemonade list
- Hermes Agent
How to use dcostenco/prism-coder-4b with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf dcostenco/prism-coder-4b:Q3_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:9931/v1 hermes config set model.default dcostenco/prism-coder-4b:Q3_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use dcostenco/prism-coder-4b with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf dcostenco/prism-coder-4b:Q3_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:9931/v1 \ --custom-model-id "dcostenco/prism-coder-4b:Q3_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Add model card for prism-coder:4b (stock Qwen3.5-4B, 100% BFCL)
Browse files
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
|