Instructions to use Frankenstein-Labs/Cortex.0 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 Frankenstein-Labs/Cortex.0 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 Frankenstein-Labs/Cortex.0:Q8_0 # Run inference directly in the terminal: llama cli -hf Frankenstein-Labs/Cortex.0:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Frankenstein-Labs/Cortex.0:Q8_0 # Run inference directly in the terminal: llama cli -hf Frankenstein-Labs/Cortex.0: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 Frankenstein-Labs/Cortex.0:Q8_0 # Run inference directly in the terminal: ./llama-cli -hf Frankenstein-Labs/Cortex.0: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 Frankenstein-Labs/Cortex.0:Q8_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf Frankenstein-Labs/Cortex.0:Q8_0
Use Docker
docker model run hf.co/Frankenstein-Labs/Cortex.0:Q8_0
- Llama new
- LM Studio
- Jan
- Ollama
How to use Frankenstein-Labs/Cortex.0 with Ollama:
ollama run hf.co/Frankenstein-Labs/Cortex.0:Q8_0
- Unsloth Desktop
- Pi
How to use Frankenstein-Labs/Cortex.0 with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Frankenstein-Labs/Cortex.0:Q8_0
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": "Frankenstein-Labs/Cortex.0:Q8_0" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use Frankenstein-Labs/Cortex.0 with Docker Model Runner:
docker model run hf.co/Frankenstein-Labs/Cortex.0:Q8_0
- Lemonade
How to use Frankenstein-Labs/Cortex.0 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Frankenstein-Labs/Cortex.0:Q8_0
Run and chat with the model
lemonade run user.Cortex.0-Q8_0
List all available models
lemonade list
- Hermes Agent
How to use Frankenstein-Labs/Cortex.0 with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Frankenstein-Labs/Cortex.0: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 Frankenstein-Labs/Cortex.0:Q8_0
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use Frankenstein-Labs/Cortex.0 with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Frankenstein-Labs/Cortex.0:Q8_0
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 "Frankenstein-Labs/Cortex.0:Q8_0" \ --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"
File size: 3,097 Bytes
c429240 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 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 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | # Changing the number of active experts
## What was measured
The experiment ran on a real MoE model (OLMoE-1B-7B, 64 experts, 8 active) on
this machine: 4 CPU threads, Q4_K_M, 128 tokens, temperature 0.
| Experts active | Throughput | Relative to native |
|---|---|---|
| 2 | 51.6 tok/s | ×1.71 faster |
| **8 (native)** | **30.2 tok/s** | reference |
| 15 | 21.1 tok/s | ×1.43 slower |
| 64 | crash | memory pool exhausted |
The override was confirmed to reach the compute graph: at 64 experts the
process aborted inside `build_moe_ffn` with `ggml_new_object: not enough space
in the context's memory pool`. The setting is applied, not ignored.
## What this means
Raising the number of active experts makes the model **slower**, not smarter.
More experts per token means more feed-forward work per layer, so throughput
drops and memory grows. It does not add knowledge, and it does not add
reasoning ability.
The value is baked in during training. When a model is trained with 6 experts
per token, the router learns to distribute work across exactly that budget.
Forcing 15 at inference time asks the network to combine expert outputs it was
never trained to combine, and past a point the output degrades.
So `flint.expert_used_count = 6` in the Cortex.0 GGUF is not a limiter to
remove. It is a trained property.
## Where the cost actually goes
For Cortex.0: 6 experts out of 256, each with a 512-wide feed-forward, plus 2
shared experts at 1024. Only about 2.4% of expert weights are touched per
token. That is the design of the architecture, and it is why a 40B model can
run on one GPU.
## What actually makes the system more capable
Ordered by real effect, for this setup:
1. **Fine-tuning for tool use.** The agent's quality depends on the model
emitting correct tool calls. If that is weak, no serving flag fixes it.
This needs GPU training.
2. **Higher-precision weights.** Q8_0 instead of Q4_K_XL recovers quality that
quantization removed. Real, measurable, no training needed.
3. **Larger context at inference.** `--ctx-size` controls how much of the 262k
window is actually usable. Raising it costs memory but improves long tasks.
4. **Speculative decoding.** A small draft model proposes tokens the big model
verifies. This raises speed several-fold with no quality loss. This is the
real answer to "make it faster".
5. **Serving engine choice.** SGLang handles MoE batching better than
llama.cpp on GPU. Flint ships SGLang deployment scripts upstream.
## How to change it anyway
If you want to experiment, the override is supported:
```bash
# llama.cpp
llama-server --model Cortex.0-Q8_0.gguf --kv-override flint.expert_used_count=15
```
```python
# llama-cpp-python
from llama_cpp import Llama
model = Llama(
model_path="Cortex.0-Q8_0.gguf",
kv_overrides={"flint.expert_used_count": 15},
)
```
Measure before and after with the benchmark in this repository:
```bash
python3 scripts/experiments/bench_experts.py Cortex.0-Q8_0.gguf \
--experts 2,6,15 --tokens 128
```
If the numbers come out worse, the native value was right.
|