Instructions to use dcostenco/prism-coder-1.7b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use dcostenco/prism-coder-1.7b with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="dcostenco/prism-coder-1.7b", filename="prism-aac-1b7-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-1.7b 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-1.7b:Q8_0 # Run inference directly in the terminal: llama-cli -hf dcostenco/prism-coder-1.7b:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf dcostenco/prism-coder-1.7b:Q8_0 # Run inference directly in the terminal: llama-cli -hf dcostenco/prism-coder-1.7b:Q8_0
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-1.7b:Q8_0 # Run inference directly in the terminal: ./llama-cli -hf dcostenco/prism-coder-1.7b:Q8_0
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-1.7b:Q8_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf dcostenco/prism-coder-1.7b:Q8_0
Use Docker
docker model run hf.co/dcostenco/prism-coder-1.7b:Q8_0
- LM Studio
- Jan
- Ollama
How to use dcostenco/prism-coder-1.7b with Ollama:
ollama run hf.co/dcostenco/prism-coder-1.7b:Q8_0
- Unsloth Studio
How to use dcostenco/prism-coder-1.7b 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-1.7b 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-1.7b 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-1.7b to start chatting
- Pi
How to use dcostenco/prism-coder-1.7b 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-1.7b:Q8_0
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-1.7b:Q8_0" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use dcostenco/prism-coder-1.7b 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-1.7b:Q8_0
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-1.7b:Q8_0
Run Hermes
hermes
- Docker Model Runner
How to use dcostenco/prism-coder-1.7b with Docker Model Runner:
docker model run hf.co/dcostenco/prism-coder-1.7b:Q8_0
- Lemonade
How to use dcostenco/prism-coder-1.7b with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull dcostenco/prism-coder-1.7b:Q8_0
Run and chat with the model
lemonade run user.prism-coder-1.7b-Q8_0
List all available models
lemonade list
docs: v27 prompt — 14B hits 98% (ties Claude Opus), labeled-category routing breakthrough
Browse files
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
|
| 19 |
|
| 20 |
-
## Test results — Prism routing 100-case eval (May
|
| 21 |
|
| 22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
|
| 24 |
-
|
| 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 |
-
|
| 44 |
|
| 45 |
-
|
| 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 |
-
##
|
| 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
|
| 84 |
-
- **Mac**: any M-series
|
| 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
|
|
|
|
| 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).
|