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,428 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 86 87 88 89 90 91 92 93 94 95 96 97 | """Configuration for the Cortex.0 / OpenHands fusion."""
from __future__ import annotations
import os
from dataclasses import dataclass, field
from pathlib import Path
import yaml
DEFAULT_SYSTEM_PROMPT = Path(__file__).resolve().parent.parent / "prompts" / "cortex0_system.txt"
@dataclass
class Cortex0Settings:
"""Everything needed to reach Cortex.0 and configure the agent."""
# --- inference endpoint -------------------------------------------------
base_url: str = "http://127.0.0.1:8080/v1"
api_key: str = "cortex0-local"
# Name the endpoint actually serves.
served_model_name: str = "cortex0"
# litellm routes by provider prefix; any OpenAI-compatible server is
# reached through the "openai/" prefix plus an explicit base_url.
model: str = "openai/cortex0"
# --- generation ---------------------------------------------------------
max_output_tokens: int = 32768
temperature: float = 1.0
top_p: float = 0.95
top_k: int = 20
context_window: int = 262144
# --- robustness ---------------------------------------------------------
num_retries: int = 5
timeout: float = 600.0
native_tool_calling: bool = True
# --- agent --------------------------------------------------------------
tools: list[str] = field(
default_factory=lambda: [
"terminal",
"file_editor",
"task_tracker",
"glob",
"grep",
]
)
max_iterations_per_run: int = 500
condenser_max_size: int = 240
system_prompt_path: str = str(DEFAULT_SYSTEM_PROMPT)
workspace: str = "workspace/project"
@classmethod
def load(cls, path: str | Path | None = None) -> "Cortex0Settings":
"""Load settings from YAML, then let environment variables win.
Precedence: defaults < YAML file < CORTEX0_* environment variables.
"""
data: dict = {}
candidate = Path(path) if path else Path("configs/cortex0.yaml")
if candidate.is_file():
loaded = yaml.safe_load(candidate.read_text(encoding="utf-8")) or {}
if not isinstance(loaded, dict):
raise ValueError(f"{candidate} must contain a YAML mapping")
data = loaded
for key in cls.__dataclass_fields__:
env_key = f"CORTEX0_{key.upper()}"
if env_key in os.environ:
raw = os.environ[env_key]
data[key] = _coerce(raw, cls.__dataclass_fields__[key].default)
known = {k: v for k, v in data.items() if k in cls.__dataclass_fields__}
return cls(**known)
def system_prompt(self) -> str:
path = Path(self.system_prompt_path)
if not path.is_file():
raise FileNotFoundError(
f"System prompt not found: {path}. Set system_prompt_path or create the file."
)
return path.read_text(encoding="utf-8")
def _coerce(raw: str, default: object) -> object:
"""Turn an environment string into the type of the dataclass default."""
if isinstance(default, bool):
return raw.strip().lower() in {"1", "true", "yes", "on"}
if isinstance(default, int) and not isinstance(default, bool):
return int(raw)
if isinstance(default, float):
return float(raw)
if isinstance(default, list):
return [item.strip() for item in raw.split(",") if item.strip()]
return raw
|