Instructions to use Osakra/Project-Norn-K-Mini-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 Osakra/Project-Norn-K-Mini-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 Osakra/Project-Norn-K-Mini-4B:Q4_K_M # Run inference directly in the terminal: llama cli -hf Osakra/Project-Norn-K-Mini-4B:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Osakra/Project-Norn-K-Mini-4B:Q4_K_M # Run inference directly in the terminal: llama cli -hf Osakra/Project-Norn-K-Mini-4B:Q4_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 Osakra/Project-Norn-K-Mini-4B:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf Osakra/Project-Norn-K-Mini-4B:Q4_K_M
Use Docker
docker model run hf.co/Osakra/Project-Norn-K-Mini-4B:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use Osakra/Project-Norn-K-Mini-4B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Osakra/Project-Norn-K-Mini-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": "Osakra/Project-Norn-K-Mini-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Osakra/Project-Norn-K-Mini-4B:Q4_K_M
- Ollama
How to use Osakra/Project-Norn-K-Mini-4B with Ollama:
ollama run hf.co/Osakra/Project-Norn-K-Mini-4B:Q4_K_M
- Unsloth Desktop
- Pi
How to use Osakra/Project-Norn-K-Mini-4B with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Osakra/Project-Norn-K-Mini-4B:Q4_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:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "Osakra/Project-Norn-K-Mini-4B:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use Osakra/Project-Norn-K-Mini-4B with Docker Model Runner:
docker model run hf.co/Osakra/Project-Norn-K-Mini-4B:Q4_K_M
- Lemonade
How to use Osakra/Project-Norn-K-Mini-4B with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Osakra/Project-Norn-K-Mini-4B:Q4_K_M
Run and chat with the model
lemonade run user.Project-Norn-K-Mini-4B-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use Osakra/Project-Norn-K-Mini-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 Osakra/Project-Norn-K-Mini-4B:Q4_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 Osakra/Project-Norn-K-Mini-4B:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use Osakra/Project-Norn-K-Mini-4B with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Osakra/Project-Norn-K-Mini-4B:Q4_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:8080/v1 \ --custom-model-id "Osakra/Project-Norn-K-Mini-4B:Q4_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"
Project Norn: K-Mini 4B & Titans-NCM
Local Code Generation, Multi-Turn Tool Calling, and Neuro-Symbolic Executive Routing for 8GB Edge Devices
Osakra Research โข November 2026
Model Summary & Architectural Transparency
Project Norn: K-Mini 4B is the 4.02-billion parameter edge-native successor in the Project Norn series by Osakra Research. Built on Qwen3-4B-Base and fine-tuned across verifiable coding, math, and error-recovery agent trajectories, it is engineered to run entirely within a consumer 8 GB VRAM envelope (requiring 4.8 GB VRAM with an 8,192-token context window in Q4_K_M quantization at ~70 tokens/second).
What Is Included in This Repository (Two Operating Modes)
To ensure complete academic honesty and out-of-the-box usability across standard runtimes, this release provides both the standalone GGUF backbone and the optional Python/CUDA Titans-NCM executive sidecar:
- Mode A โ Standalone GGUF (
k-mini-Q4_K_M.gguf+Modelfile):- Runs natively on 100% unmodified stock Ollama,
llama.cpp, and LM Studioโno custom C++ patches or custom Ollama binaries required. - Uses in-vocabulary neurochemical conditioning tokens (
<|state:acetylcholine|>,<|state:serotonin|>,<|state:dopamine|>,<|state:boredom_decay|>) trained directly into the 4.02B weights. - Achieves 83.54% HumanEval (
137/164), 83.0% GSM8K (83/100), 77.0% MBPP (77/100), 70.0% MMLU (70/100), 82.22% (37/45) on the 45-Pillar Executive Suite, and 100.0% (50/50) first-turn tool routing and state token adherence.
- Runs natively on 100% unmodified stock Ollama,
- Mode B โ Full Neuro-Symbolic Stack (
neuro_symbolic_ncm/ncm_server.py+hrr_adapter.pt+swarm_proxy.py):- Wraps the 4B GGUF engine with our PyTorch/CUDA Titans-NCM Executive Router (
port 8092) and Swarm Proxy (port 1234). - Loads the trained 10,000-dimension Holographic Reduced Representation adapter (
hrr_adapter.pt,2560 -> 512 -> 10000 -> 512 -> 2560via FFT circular convolution) and the 2,560-dimensionTitansConceptMemory($\mathbf{M}_t$) module to track surprise norms $|\mathbf{S}_t|_2$ and episodic recall across turns. - Lifts performance on the 45-Pillar Executive Reasoning Suite from 82.22% (
37/45) to 86.67% (39/45, 9/15 flawless pillars) while maintaining 100.0% (50/50) tool routing accuracy.
- Wraps the 4B GGUF engine with our PyTorch/CUDA Titans-NCM Executive Router (
Architecture Evolution Note (Why Custom Ollama Builds Are No Longer Required): In earlier Project Norn prototypes (V17โV21), experimental HRR memory layers were coupled directly inside custom model graph code, which required custom runtime wrappers or larger 9Bโ14B footprints. In this release, we decoupled the architecture: neuromodulatory state routing (
<|state:*|>) is baked directly into a standard 4.02BQwen3GGUF so it runs at 70 tok/s on stock Ollama,llama.cpp, and LM Studio, while the stateful 10,000-dim HRR binding layer and Titans associative memory ($\mathbf{M}_t$) run as a modular sidecar service (ncm_server.py). Native in-graph custom GGML operators remain on our research roadmap for future generations.
Comprehensive Industry Benchmark Leaderboard
All evaluations are bifurcated into two explicit categories:
- Edge Workstation Parity (Table 1): Every model running under identical local constraints (4-bit quantization on an NVIDIA GeForce RTX 4070 Laptop GPU with 8.0 GB VRAM, greedy decoding $T=0.0$, and real Python subprocess test execution).
- Official Server Baselines (Table 2): Published unquantized (BF16/FP16) numbers reported by original model authors on datacenter GPU clusters.
Every score reported for Norn K-Mini 4B is backed by raw per-problem evaluation transcripts included directly in this repository:
./benchmarks/live_verified_humaneval_164.jsonโ 137 / 164 (83.54% pass@1) in 606.3s./benchmarks/live_verified_gsm8k_100.jsonโ 83 / 100 (83.0% strict match) in 367.5s./benchmarks/live_verified_mbpp_test.jsonโ 77 / 100 (77.0% pass@1) in 171.8s./benchmarks/executive_suite_45_results.jsonโ 37 / 45 (82.22% standalone) / 39 / 45 (86.67% with Titans-NCM sidecar)
Table 1: Edge Workstation Leaderboard (4-Bit Quantized on Single 8GB Consumer GPU)
| Model | Architecture & Scale | VRAM Footprint | HumanEval pass@1 |
MBPP Sanitized | GSM8K Math | MMLU Academic | Generation Speed |
|---|---|---|---|---|---|---|---|
| Norn K-Mini 4B (Ours) | 4.02B Dense (+ NCM) | 4.8 GB | 83.54% (137/164) | 77.0% (77/100) | 83.0% (83/100) | 70.0% | โก 70.0 tok/s (100% VRAM) |
| Gemma 4 26B-A4B (Q4) | 26B MoE (~3.8B Active) | 15.0 GB | 73.2% (82.0% CoT) | 75.0% | 88.4% | 82.6% | โ ๏ธ 12.0 tok/s (CPU offload) |
| Qwen2.5-Coder-3B (Q4) | 3.09B Dense | 3.2 GB | 72.56% | 68.0% | 79.2% | 60.4% | 75.0 tok/s |
| Ministral 3B (Q4) | 3.20B Dense | 3.5 GB | 71.4% | 69.5% | 81.0% | 68.5% | 68.0 tok/s |
| Gemma 4 E4B (Q4) | ~4.5B Effective (PLE) | 4.8 GB | 62.1% (68.5% CoT) | 64.0% | 76.3% | 73.9% | 65.0 tok/s |
| Phi-4-mini (3.8B Q4) | 3.82B Dense | 3.9 GB | 74.0% | 71.0% | 88.2% | 71.5% | 62.0 tok/s |
| Qwen3.8-27B (Q4) | 27.0B Dense | 17.0 GB | 92.0% | 78.5% | 94.0% | 84.5% | โ ๏ธ 3.0 tok/s (PCIe offload) |
Table 2: Official Unquantized Server Baselines (Technical Reports & System Cards)
| Model | Parameters | Target Precision / Environment | HumanEval pass@1 |
GSM8K Math | MMLU Academic | Official Citation Source |
|---|---|---|---|---|---|---|
| Qwen3.8-27B | 27.0B | BF16 (55 GB VRAM) | 95.5% | 96.7% | 86.2% | Alibaba Qwen3.8 Technical Report |
| Claude-3.5-Haiku | Proprietary (~8B) | Cloud API | 88.1% | 92.0% | 85.0% | Anthropic Model Card (Oct 2024) |
| Gemma 4 26B-A4B | 25.2B (MoE) | BF16 (52 GB VRAM) | 82.0% (CoT) | 88.4% | 82.6% | Google DeepMind Gemma 4 Report |
| GPT-4o-mini | Proprietary | Cloud API | 87.0% | 87.0% | 82.0% | OpenAI System Card (July 2024) |
| Qwen2.5-Coder-3B | 3.09B | BF16 (6.2 GB VRAM) | 84.1% | 80.5% | 73.6% | Alibaba Qwen2.5-Coder Tech Report |
| Norn K-Mini 4B (Ours) | 4.02B | Q4_K_M (4.8 GB VRAM) | 83.54% | 83.0% | 70.0% | Live Verified Automated Runner |
| Phi-4-mini | 3.82B | BF16 (7.6 GB VRAM) | 74.0% | 88.2% | 71.5% | Microsoft Phi-4 Technical Report |
| Ministral 3B | 3.20B | BF16 (6.4 GB VRAM) | 71.4% | 81.0% | 68.5% | Mistral AI Ministral Report |
| Gemma 4 E4B | ~4.5B (PLE) | BF16 (9.0 GB VRAM) | 68.5% (CoT) | 79.2% | 73.9% | Google DeepMind Gemma 4 Report |
Visual Benchmark Comparisons
Chart 1: Coding Accuracy Under Local 4-bit Quantization (HumanEval % pass@1)
Chart 2: Interactive Generation Speed on Single 8GB Consumer GPU (Tokens / Second)
Architecture & Mathematical Foundations
flowchart TD
Prompt["User Input / Multi-Turn Context"] --> Router{"Titans-NCM Executive Router<br>(Optional Sidecar โข Port 8092 โข CUDA)"}
Router -->|State Token Injection| StateToken["Emit Modulatory State Prefix:<br><|state:acetylcholine|> / <|state:serotonin|>"]
Router -->|Associative Recall| TitansMemory["Titans Neural Memory Bank (M_t)<br>10,000-dim HRR + Surprise Modulation"]
StateToken --> Backbone["Norn K-Mini 4B Core<br>(GGUF Q4_K_M โข 8192 ctx โข 4.8 GB VRAM)"]
TitansMemory --> Backbone
Backbone --> Output{"Decoded Action"}
Output -->|Tool Dispatch| ToolCall["<tool_call>{'name': ..., 'arguments': {...}}</tool_call>"]
Output -->|Direct Prose| FinalAnswer["Methodical Step-by-Step Solution"]
1. Neurochemical Conditioning Tokens (Built into GGUF Weights)
Every assistant turn begins with an explicit conditioning token $\tau_0 \in \mathcal{V}_{\text{state}}$:
<|state:acetylcholine|>: High-precision code synthesis, math, and deterministic<tool_call>JSON emission ($T = 0.0$).<|state:serotonin|>: Analytical explanation, counterfactual premise verification, and structured prose.<|state:dopamine|>: Divergent architectural brainstorming and creative exploration ($T \approx 0.6$).<|state:noradrenaline|>: Triggered by the NCM sidecar upon detecting tool errors or stack traces to enforce root-cause repair.<|state:boredom_decay|>: Read-only workspace inspection mode with destructive tool lockout.
2. Titans Recurrent Memory ($\mathbf{M}_t$) & 10,000-D HRR Adapter (Sidecar Mode)
When running with neuro_symbolic_ncm/ncm_server.py, user turns are projected through the trained HRRBindingLayer (hrr_adapter.pt) via FFT circular convolution:
and integrated into the complex Fourier memory bank $\mathbf{M}_t$ (titans_concept_memory.py), tracking surprise norms $|\mathbf{S}_t|_2$ across multi-turn sessions.
Quickstart & Deployment
Option 1: Stock Ollama (Single Command, 4.8 GB VRAM)
No custom Ollama build is required. Using the included Modelfile:
ollama create norn-k-mini -f Modelfile
ollama run norn-k-mini
Option 2: llama.cpp Server (Standalone GGUF on Port 8096)
llama-server -m k-mini-Q4_K_M.gguf -ngl 99 -c 8192 -fa on -ctk q8_0 -ctv q8_0 --jinja --alias k-mini --host 127.0.0.1 --port 8096
Option 3: Full Neuro-Symbolic Stack (GGUF + Titans-NCM Sidecar + Swarm Proxy)
# 1. Start the 4B GGUF Core Engine (Port 8096)
llama-server -m k-mini-Q4_K_M.gguf -ngl 99 -c 8192 -fa on -ctk q8_0 -ctv q8_0 --jinja --alias k-mini --host 127.0.0.1 --port 8096
# 2. Start the Titans-NCM CUDA Executive Router (Port 8092)
python -m uvicorn neuro_symbolic_ncm.ncm_server:app --host 127.0.0.1 --port 8092
# 3. Start the Unified OpenAI Swarm Proxy (Port 1234)
python swarm_proxy.py --port 1234 --brain http://127.0.0.1:8096 --ncm http://127.0.0.1:8092
Python OpenAI Client Usage
from openai import OpenAI
# Connect to Port 8096 (standalone llama-server) or Port 1234 (Titans-NCM + Swarm Proxy)
client = OpenAI(base_url="http://127.0.0.1:1234/v1", api_key="local")
response = client.chat.completions.create(
model="norn-4b",
messages=[
{"role": "user", "content": "Write a Python function to compute the longest palindromic substring in O(N) time using Manacher's algorithm."}
],
temperature=0.0
)
print(response.choices[0].message.content)
Training Curriculum & Provenance
The 4.02B backbone (Qwen3-4B-Base) was aligned across four curated datasets:
- Jarvis-Mini Trajectory Corpus (4,190 Trajectories): 20 agentic task categories (filesystem navigation, shell execution, SQL, PDF generation, cron scheduling) with a 30% injected error-recovery loop (
ENOENT,KeyError,EADDRINUSE,403 Forbidden). - STaR Consequence Rollouts (284 Traces): Multi-step verifiable tool traces reinforcing strict parameter schemas.
- Swarm Failure DPO Pairs (254 Pairs): Direct Preference Optimization trained on swarm logs to eliminate repetitive tool loops and overwrite traps.
- Epistemic Counterfactual Invariants: Calibration examples enforcing explicit refutation of impossible historical or physical premises.
Citation
@misc{osakra_norn_kmini_4b_2026,
title={Project Norn K-Mini 4B: Edge-Native Code Synthesis, Neuromodulatory State Dispatch, and Titans-HRR Executive Routing},
author={{Osakra Research}},
year={2026},
month={November},
howpublished={\url{https://huggingface.co/TheEpiales/Project-Norn-K-Mini-4B}},
note={Osakra Research Technical Report and Model Card}
}
- Downloads last month
- 130
4-bit
Model tree for Osakra/Project-Norn-K-Mini-4B
Base model
Qwen/Qwen3-4B-Base