Instructions to use dcostenco/prism-coder-4b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use dcostenco/prism-coder-4b with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="dcostenco/prism-coder-4b", filename="Qwen3.5-4B-Q3_K_M.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use dcostenco/prism-coder-4b 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-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-server -hf dcostenco/prism-coder-4b:Q3_K_M # Run inference directly in the terminal: llama-cli -hf dcostenco/prism-coder-4b:Q3_K_M
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-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/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-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
- 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 Studio
How to use dcostenco/prism-coder-4b 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-4b 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-4b 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-4b to start chatting
- 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-server -hf dcostenco/prism-coder-4b:Q3_K_M
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-4b:Q3_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
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-server -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:8080/v1 hermes config set model.default dcostenco/prism-coder-4b:Q3_K_M
Run Hermes
hermes
- Atomic Chat new
- 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
prism-coder:4b — Prism Memory Tool Router
Prompt-engineered Qwen3.5-4B for MCP tool routing in the Prism Coder system. No fine-tuning — the system prompt IS the specialization.
Downloads
| File | Quantization | Size | BFCL Accuracy | Use when |
|---|---|---|---|---|
Qwen3.5-4B-Q3_K_M.gguf |
Q3_K_M | 2.3 GB | 99.1% × 3 seeds | iPhone / mobile first gate |
| (stock via Ollama) | Q4_K_M | 3.4 GB | 100% × 3 seeds | Mac / 8 GB+ devices |
Quick Start
# iPhone-optimized (2.3 GB, 99.1%)
ollama pull dcostenco/prism-coder:2b
# Full quality (3.4 GB, 100%)
ollama pull dcostenco/prism-coder:4b
BFCL Benchmark
Q3_K_M (prism-coder:2b) — 99.1% × 3 seeds
114/115 × 3 shuffled runs = 99.1%, 1 flaky case
| Category | Count | Accuracy |
|---|---|---|
| save | 17 | 100% |
| smem | 17 | 100% |
| aac | 12 | 100% |
| hand | 12 | 100% |
| irrel | 10 | 90% |
| load | 9 | 100% |
| pred | 8 | 100% |
| know | 7 | 100% |
| cmpct | 6 | 100% |
| edge | 6 | 100% |
| tran | 6 | 100% |
| info | 5 | 100% |
Single failure: "Write a regex to match email addresses" → knowledge_search instead of plain.
Q4_K_M (prism-coder:4b) — 100% × 3 seeds
115/115 × 3 shuffled runs = 100.0%, 0 flaky
Architecture
Qwen3.5-4B uses a hybrid attention architecture:
- 24 linear attention layers (Gated DeltaNet) — O(n) inference
- 8 full attention layers (standard softmax) — precise retrieval
This hybrid design is why prompt-only routing works at 4B scale but not smaller. The 8 full-attention layers are sufficient to hold the routing rules when combined with the DeltaNet layers' pattern matching.
Fleet Position
| Model | Ollama tag | Size | BFCL | Role |
|---|---|---|---|---|
| Qwen3.5-4B Q3_K_M | dcostenco/prism-coder:2b |
2.3 GB | 99.1% | iPhone / mobile |
| Qwen3.5-4B Q4_K_M | dcostenco/prism-coder:4b |
3.4 GB | 100% | Verifier / 8 GB+ |
| Qwen3.5-9B Q4_K_M | dcostenco/prism-coder:9b |
5.8 GB | 100% | Default router |
| prism-coder:32b | dcostenco/prism-coder:32b |
19 GB | 100% | Complex tasks |
Links
- Ollama model page — pull and run
- Prism MCP Server — the MCP server
- Qwen3.5-4B base — upstream model
- Downloads last month
- 225
3-bit
4-bit