Instructions to use dcostenco/prism-coder-14b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use dcostenco/prism-coder-14b with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="dcostenco/prism-coder-14b", filename="prism-aac-14b-q4km.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use dcostenco/prism-coder-14b with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf dcostenco/prism-coder-14b # Run inference directly in the terminal: llama-cli -hf dcostenco/prism-coder-14b
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf dcostenco/prism-coder-14b # Run inference directly in the terminal: llama-cli -hf dcostenco/prism-coder-14b
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf dcostenco/prism-coder-14b # Run inference directly in the terminal: ./llama-cli -hf dcostenco/prism-coder-14b
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf dcostenco/prism-coder-14b # Run inference directly in the terminal: ./build/bin/llama-cli -hf dcostenco/prism-coder-14b
Use Docker
docker model run hf.co/dcostenco/prism-coder-14b
- LM Studio
- Jan
- Ollama
How to use dcostenco/prism-coder-14b with Ollama:
ollama run hf.co/dcostenco/prism-coder-14b
- Unsloth Studio
How to use dcostenco/prism-coder-14b with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for dcostenco/prism-coder-14b to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for dcostenco/prism-coder-14b to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for dcostenco/prism-coder-14b to start chatting
- Pi
How to use dcostenco/prism-coder-14b with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf dcostenco/prism-coder-14b
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "dcostenco/prism-coder-14b" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use dcostenco/prism-coder-14b with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf dcostenco/prism-coder-14b
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:8080/v1 hermes config set model.default dcostenco/prism-coder-14b
Run Hermes
hermes
- Docker Model Runner
How to use dcostenco/prism-coder-14b with Docker Model Runner:
docker model run hf.co/dcostenco/prism-coder-14b
- Lemonade
How to use dcostenco/prism-coder-14b with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull dcostenco/prism-coder-14b
Run and chat with the model
lemonade run user.prism-coder-14b-{{QUANT_TAG}}List all available models
lemonade list
docs: v27 prompt — 14B hits 98% (ties Claude Opus), labeled-category routing breakthrough
Browse files
README.md
CHANGED
|
@@ -14,51 +14,62 @@ tags:
|
|
| 14 |
- prism-coder
|
| 15 |
---
|
| 16 |
|
| 17 |
-
# prism-coder:14b (v26-polish)
|
| 18 |
-
|
| 19 |
-
LoRA fine-tune of **Qwen3-14B** for offline MCP tool routing
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
|
| 32 |
-
|
|
| 33 |
-
|
|
| 34 |
-
|
|
| 35 |
-
|
|
| 36 |
-
|
|
| 37 |
-
|
|
| 38 |
-
|
|
| 39 |
-
|
|
| 40 |
-
|
|
| 41 |
-
|
|
| 42 |
-
|
|
| 43 |
-
|
|
| 44 |
-
|
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
|
| 54 |
## Training recipe (v26-polish)
|
| 55 |
|
| 56 |
- **Base**: Qwen/Qwen3-14B (bf16)
|
| 57 |
- **LoRA**: r=8, α=16, dropout 0.05, targets `q/k/v/o_proj` only
|
| 58 |
- **Corpus**: 576 hand-crafted rows, 56% plain-text guards + 44% tool exemplars
|
| 59 |
-
- **Schedule**: 50 iters @ LR 1e-6, batch 1,
|
| 60 |
-
- **Hardware**: Mac M4 Max (MLX-LM)
|
| 61 |
-
- **
|
| 62 |
|
| 63 |
## Usage
|
| 64 |
|
|
@@ -69,19 +80,15 @@ ollama pull dcostenco/prism-coder:14b
|
|
| 69 |
ollama run dcostenco/prism-coder:14b "Load context for prism-mcp project"
|
| 70 |
```
|
| 71 |
|
| 72 |
-
**Important**: Use the `nothink` template
|
| 73 |
-
|
| 74 |
-
### System prompt
|
| 75 |
-
|
| 76 |
-
Use the [v26 routing prompt](https://github.com/dcostenco/prism-coder/blob/main/tests/benchmarks/prism-routing-100/benchmark.py#L47) verbatim. Key: rules 1-7 must say `-> respond directly (no tool)`, NOT `-> plain text` (Q4_K_M quantization misreads the latter as a tool name).
|
| 77 |
|
| 78 |
## Hardware requirements
|
| 79 |
|
| 80 |
-
- **Mac**: M2 Pro+ with ≥24 GB unified memory
|
| 81 |
- **Linux + NVIDIA**: RTX 3090 / 4090 (24 GB) or any A-series ≥ 24 GB
|
| 82 |
-
- **Inference speed**: ~1 s
|
| 83 |
- **Loaded VRAM**: ~10 GB
|
| 84 |
|
| 85 |
## License
|
| 86 |
|
| 87 |
-
|
|
|
|
| 14 |
- prism-coder
|
| 15 |
---
|
| 16 |
|
| 17 |
+
# prism-coder:14b (v26-polish) — 98% routing accuracy, ties Claude Opus
|
| 18 |
+
|
| 19 |
+
LoRA fine-tune of **Qwen3-14B** for offline MCP tool routing. **Ties Claude Opus 4.7 at 98%** on the Prism 100-case eval while running 3x faster (1.1s vs 3.0s), fully offline, at zero cost per request.
|
| 20 |
+
|
| 21 |
+
## Test results — Prism routing 100-case eval (May 15 2026, 3-seed mean)
|
| 22 |
+
|
| 23 |
+
| Model | Overall | Cost/req | Latency | Know Search | AAC |
|
| 24 |
+
|---|---|---|---|---|---|
|
| 25 |
+
| Claude Sonnet 4 | **99%** | ~$0.01 | 3.2s | 100% | 100% |
|
| 26 |
+
| **prism-coder:14b** | **98.0% ± 0.0%** | **$0** | **1.1s** | **100%** | **100%** |
|
| 27 |
+
| Claude Opus 4.7 | **98%** | ~$0.05 | 3.0s | 100% | 100% |
|
| 28 |
+
|
| 29 |
+
Per-category breakdown (3-seed mean, seeds 2027/2028/2029, zero variance):
|
| 30 |
+
|
| 31 |
+
| Category | Score |
|
| 32 |
+
|---|---|
|
| 33 |
+
| **Overall** | **98.0% ± 0.0%** |
|
| 34 |
+
| session_load_context | 100% |
|
| 35 |
+
| session_save_ledger | 100% |
|
| 36 |
+
| session_search_memory | 100% |
|
| 37 |
+
| session_save_handoff | 87% |
|
| 38 |
+
| session_compact_ledger | 100% |
|
| 39 |
+
| brave_web_search | 100% |
|
| 40 |
+
| **knowledge_search** | **100%** |
|
| 41 |
+
| AAC plain-text | 100% |
|
| 42 |
+
| translate plain-text | 100% |
|
| 43 |
+
| plain text (pred/irrel) | 100% |
|
| 44 |
+
| no-tool refusal | 100% |
|
| 45 |
+
| info / lookup | 100% |
|
| 46 |
+
| edge (multi-step) | 82% |
|
| 47 |
+
| **avg latency** | **1.1s** |
|
| 48 |
+
| **invented tools** | 0 |
|
| 49 |
+
|
| 50 |
+
## How it got to 98% — the prompt engineering breakthrough
|
| 51 |
+
|
| 52 |
+
The 14B model went from **87% to 98% with zero retraining** — purely prompt engineering:
|
| 53 |
+
|
| 54 |
+
1. **v25 → v26 (+4 pts)**: Changed `-> plain text` to `-> respond directly (no tool)`. Q4_K_M quantized models misread "plain text" as a tool name, causing AAC phrase requests to call non-existent tools.
|
| 55 |
+
|
| 56 |
+
2. **v26 → v27 (+7 pts)**: Added labeled category headers to the routing rules:
|
| 57 |
+
```
|
| 58 |
+
13. CONVERSATION RECALL: what did we discuss / previously talked about -> session_search_memory
|
| 59 |
+
14. SAVED KNOWLEDGE: what do I know / stored notes / on file about -> knowledge_search
|
| 60 |
+
```
|
| 61 |
+
The labels act as semantic anchors that are stronger than keyword matching at Q4_K_M precision. `knowledge_search` jumped from **43% to 100%** — the biggest single-category improvement.
|
| 62 |
+
|
| 63 |
+
**What this benchmark measures**: routing precision against the *exact* 7-tool Prism Coder taxonomy. It is **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).
|
| 64 |
|
| 65 |
## Training recipe (v26-polish)
|
| 66 |
|
| 67 |
- **Base**: Qwen/Qwen3-14B (bf16)
|
| 68 |
- **LoRA**: r=8, α=16, dropout 0.05, targets `q/k/v/o_proj` only
|
| 69 |
- **Corpus**: 576 hand-crafted rows, 56% plain-text guards + 44% tool exemplars
|
| 70 |
+
- **Schedule**: 50 iters @ LR 1e-6, batch 1, seq 2048
|
| 71 |
+
- **Hardware**: Mac M4 Max (MLX-LM), ~5 min training
|
| 72 |
+
- **Note**: The 87% → 98% improvement came from prompt engineering (v25→v27), NOT from retraining. The model weights are unchanged from v26-polish.
|
| 73 |
|
| 74 |
## Usage
|
| 75 |
|
|
|
|
| 80 |
ollama run dcostenco/prism-coder:14b "Load context for prism-mcp project"
|
| 81 |
```
|
| 82 |
|
| 83 |
+
**Important**: Use the `nothink` template and the [v27 system prompt](https://github.com/dcostenco/prism-coder/blob/main/tests/benchmarks/prism-routing-100/benchmark.py#L47). The 98% score requires both — without them, accuracy drops to ~87%.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 84 |
|
| 85 |
## Hardware requirements
|
| 86 |
|
| 87 |
+
- **Mac**: M2 Pro+ with ≥24 GB unified memory
|
| 88 |
- **Linux + NVIDIA**: RTX 3090 / 4090 (24 GB) or any A-series ≥ 24 GB
|
| 89 |
+
- **Inference speed**: ~1.1 s avg on M4 Max (with nothink template)
|
| 90 |
- **Loaded VRAM**: ~10 GB
|
| 91 |
|
| 92 |
## License
|
| 93 |
|
| 94 |
+
Apache-2.0 (inherits from Qwen3-14B).
|