Instructions to use dcostenco/prism-coder-8b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use dcostenco/prism-coder-8b with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="dcostenco/prism-coder-8b", filename="prism-aac-8b-q4km.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use dcostenco/prism-coder-8b 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-8b # Run inference directly in the terminal: llama-cli -hf dcostenco/prism-coder-8b
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf dcostenco/prism-coder-8b # Run inference directly in the terminal: llama-cli -hf dcostenco/prism-coder-8b
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-8b # Run inference directly in the terminal: ./llama-cli -hf dcostenco/prism-coder-8b
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-8b # Run inference directly in the terminal: ./build/bin/llama-cli -hf dcostenco/prism-coder-8b
Use Docker
docker model run hf.co/dcostenco/prism-coder-8b
- LM Studio
- Jan
- Ollama
How to use dcostenco/prism-coder-8b with Ollama:
ollama run hf.co/dcostenco/prism-coder-8b
- Unsloth Studio new
How to use dcostenco/prism-coder-8b 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-8b 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-8b 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-8b to start chatting
- Pi new
How to use dcostenco/prism-coder-8b 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-8b
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-8b" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use dcostenco/prism-coder-8b 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-8b
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-8b
Run Hermes
hermes
- Docker Model Runner
How to use dcostenco/prism-coder-8b with Docker Model Runner:
docker model run hf.co/dcostenco/prism-coder-8b
- Lemonade
How to use dcostenco/prism-coder-8b with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull dcostenco/prism-coder-8b
Run and chat with the model
lemonade run user.prism-coder-8b-{{QUANT_TAG}}List all available models
lemonade list
Update model card: v36 100.0% PERFECT — smem fix
Browse files
README.md
CHANGED
|
@@ -15,71 +15,66 @@ base_model: Qwen/Qwen3-8B
|
|
| 15 |
Fine-tuned Qwen3-8B for 6-tool routing in the [Prism AAC](https://github.com/dcostenco/prism-aac) system.
|
| 16 |
Primary deployment: **iOS and edge devices** via llama.cpp GGUF.
|
| 17 |
|
| 18 |
-
## BFCL Routing Benchmark —
|
| 19 |
-
|
| 20 |
-
**Mean:
|
| 21 |
-
|
| 22 |
-
| Category | Description | Accuracy |
|
| 23 |
-
|----------|-------------|:--------:|
|
| 24 |
-
| aac | AAC phrase requests → plain text | 100% |
|
| 25 |
-
| cmpct | Ledger compaction | 100% |
|
| 26 |
-
| edge | Multi-step / compound requests | 100% |
|
| 27 |
-
| hand | Agent handoff / relay | 100% |
|
| 28 |
-
| info | General facts → plain text | 100% |
|
| 29 |
-
| irrel | Irrelevant / live queries → plain text | 100% |
|
| 30 |
-
| know | Knowledge base search | 100% |
|
| 31 |
-
| load | Session context loading | 100% |
|
| 32 |
-
| pred | Factual / knowledge queries → plain text | 100% |
|
| 33 |
-
| save | Session ledger save | 100% |
|
| 34 |
-
| smem | Session memory search |
|
| 35 |
-
| tran | Translation requests → plain text | 100% |
|
| 36 |
-
|
| 37 |
-
Eval:
|
| 38 |
Gate: ≥90% = deploy.
|
| 39 |
|
| 40 |
## Version History
|
| 41 |
|
| 42 |
| Version | BFCL | Notes |
|
| 43 |
|---------|------|-------|
|
|
|
|
| 44 |
| v35 | 98.0% | Proper safetensors merge — fixes mlx_lm.fuse LoRA loss |
|
| 45 |
| v32 | 98.0% | Routing corpus v32_8b, direct safetensors merge |
|
| 46 |
-
| v31 | 95.1% | Surgical smem/know boundary
|
| 47 |
-
| v30 |
|
| 48 |
|
| 49 |
## Tools
|
| 50 |
|
| 51 |
-
The model routes
|
| 52 |
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
|
|
|
|
|
|
| 59 |
|
| 60 |
-
|
| 61 |
|
| 62 |
-
|
| 63 |
-
|------|------|-----|
|
| 64 |
-
| `qwen3-8b-v35-q4km.gguf` | 4.7 GB | Ollama / desktop |
|
| 65 |
-
| `prism-aac-8b-q4km.gguf` | 4.7 GB | iOS app download |
|
| 66 |
|
| 67 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 68 |
|
| 69 |
-
|
| 70 |
-
8B handles offline/low-RAM scenarios (< 6 GB available).
|
| 71 |
-
|
| 72 |
-
## Usage (Ollama)
|
| 73 |
|
| 74 |
```bash
|
| 75 |
-
ollama
|
|
|
|
| 76 |
```
|
| 77 |
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
- **Base**: `Qwen/Qwen3-8B` (fp16, 8.2B params)
|
| 81 |
-
- **Framework**: MLX-LM LoRA (rank=8, scale=20, 4 layers)
|
| 82 |
-
- **Data**: v32_8b corpus (788 train, 44 valid, text format)
|
| 83 |
-
- **Hyperparams**: LR=5e-5, 400 iters, seq=1024
|
| 84 |
-
- **Merge**: Direct safetensors manipulation (delta = scale/rank × B^T A^T)
|
| 85 |
-
- **Peak memory**: 18 GB (M-series Mac)
|
|
|
|
| 15 |
Fine-tuned Qwen3-8B for 6-tool routing in the [Prism AAC](https://github.com/dcostenco/prism-aac) system.
|
| 16 |
Primary deployment: **iOS and edge devices** via llama.cpp GGUF.
|
| 17 |
|
| 18 |
+
## BFCL Routing Benchmark — v36 (Current)
|
| 19 |
+
|
| 20 |
+
**Mean: 100.0%** (3-seed average, seeds 2027/2028/2029, 102 cases each)
|
| 21 |
+
|
| 22 |
+
| Category | Count | Description | Accuracy |
|
| 23 |
+
|----------|------:|-------------|:--------:|
|
| 24 |
+
| aac | 12 | AAC phrase requests → plain text | 100% |
|
| 25 |
+
| cmpct | 6 | Ledger compaction | 100% |
|
| 26 |
+
| edge | 6 | Multi-step / compound requests | 100% |
|
| 27 |
+
| hand | 8 | Agent handoff / relay | 100% |
|
| 28 |
+
| info | 5 | General facts → plain text | 100% |
|
| 29 |
+
| irrel | 10 | Irrelevant / live queries → plain text | 100% |
|
| 30 |
+
| know | 7 | Knowledge base search | 100% |
|
| 31 |
+
| load | 9 | Session context loading | 100% |
|
| 32 |
+
| pred | 8 | Factual / knowledge queries → plain text | 100% |
|
| 33 |
+
| save | 13 | Session ledger save | 100% |
|
| 34 |
+
| smem | 12 | Session memory search | 100% |
|
| 35 |
+
| tran | 6 | Translation requests → plain text | 100% |
|
| 36 |
+
|
| 37 |
+
Eval: MLX inference + thinking, temperature=0, 3-seed mean.
|
| 38 |
Gate: ≥90% = deploy.
|
| 39 |
|
| 40 |
## Version History
|
| 41 |
|
| 42 |
| Version | BFCL | Notes |
|
| 43 |
|---------|------|-------|
|
| 44 |
+
| v36 | **100.0%** | Fixed: smem "BFCL v4 notes" and "training loss" → session_search_memory |
|
| 45 |
| v35 | 98.0% | Proper safetensors merge — fixes mlx_lm.fuse LoRA loss |
|
| 46 |
| v32 | 98.0% | Routing corpus v32_8b, direct safetensors merge |
|
| 47 |
+
| v31 | 95.1% | Surgical smem/know boundary fix |
|
| 48 |
+
| v30 | ~93% | Baseline 8B routing |
|
| 49 |
|
| 50 |
## Tools
|
| 51 |
|
| 52 |
+
The model routes to exactly 6 tools:
|
| 53 |
|
| 54 |
+
| Tool | Trigger |
|
| 55 |
+
|------|---------|
|
| 56 |
+
| `session_load_context` | Load/resume project context |
|
| 57 |
+
| `session_save_ledger` | Note/log/record/remember something |
|
| 58 |
+
| `session_save_handoff` | Pass state to next agent/session |
|
| 59 |
+
| `session_compact_ledger` | Shrink/prune ledger (no relay) |
|
| 60 |
+
| `session_search_memory` | Recall prior session discussions |
|
| 61 |
+
| `knowledge_search` | Search stored knowledge base |
|
| 62 |
|
| 63 |
+
Plain text (no tool) for: AAC phrases, translations, weather, general facts, code, math.
|
| 64 |
|
| 65 |
+
## Model Details
|
|
|
|
|
|
|
|
|
|
| 66 |
|
| 67 |
+
- **Base**: Qwen/Qwen3-8B
|
| 68 |
+
- **Format**: GGUF Q4_K_M (~4.9 GB)
|
| 69 |
+
- **Context**: 32,768 tokens
|
| 70 |
+
- **Training**: MLX LoRA, rank=16, 16 layers, 1000 iters, LR=2e-6, v36 corpus (806 examples)
|
| 71 |
+
- **Merge**: mlx_lm.fuse → llama.cpp convert → Q4_K_M quantization
|
| 72 |
|
| 73 |
+
## Usage
|
|
|
|
|
|
|
|
|
|
| 74 |
|
| 75 |
```bash
|
| 76 |
+
ollama pull dcostenco/prism-coder-8b
|
| 77 |
+
ollama run prism-coder:8b
|
| 78 |
```
|
| 79 |
|
| 80 |
+
Or in the [Prism Coder IDE](https://github.com/dcostenco/prism-aac) — set model to `prism-coder:8b` in Settings.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|