Instructions to use lastbrowser/sidekick-cortex-pro with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use lastbrowser/sidekick-cortex-pro with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("lastbrowser/sidekick-cortex-pro", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use lastbrowser/sidekick-cortex-pro 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 lastbrowser/sidekick-cortex-pro:Q4_K_M # Run inference directly in the terminal: llama cli -hf lastbrowser/sidekick-cortex-pro:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf lastbrowser/sidekick-cortex-pro:Q4_K_M # Run inference directly in the terminal: llama cli -hf lastbrowser/sidekick-cortex-pro: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 lastbrowser/sidekick-cortex-pro:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf lastbrowser/sidekick-cortex-pro:Q4_K_M
Use Docker
docker model run hf.co/lastbrowser/sidekick-cortex-pro:Q4_K_M
- Llama new
- LM Studio
- Jan
- Ollama
How to use lastbrowser/sidekick-cortex-pro with Ollama:
ollama run hf.co/lastbrowser/sidekick-cortex-pro:Q4_K_M
- Unsloth Desktop
- Pi
How to use lastbrowser/sidekick-cortex-pro with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf lastbrowser/sidekick-cortex-pro: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": "lastbrowser/sidekick-cortex-pro:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use lastbrowser/sidekick-cortex-pro with Docker Model Runner:
docker model run hf.co/lastbrowser/sidekick-cortex-pro:Q4_K_M
- Lemonade
How to use lastbrowser/sidekick-cortex-pro with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull lastbrowser/sidekick-cortex-pro:Q4_K_M
Run and chat with the model
lemonade run user.sidekick-cortex-pro-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use lastbrowser/sidekick-cortex-pro with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf lastbrowser/sidekick-cortex-pro: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 lastbrowser/sidekick-cortex-pro:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use lastbrowser/sidekick-cortex-pro with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf lastbrowser/sidekick-cortex-pro: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 "lastbrowser/sidekick-cortex-pro: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"
Add tests/benchmark_axon_final_50.py
Browse files
tests/benchmark_axon_final_50.py
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import json
|
| 2 |
+
import time
|
| 3 |
+
import requests
|
| 4 |
+
|
| 5 |
+
MODEL_NAME = "lastbrowser-sidekick-axon:latest"
|
| 6 |
+
TEST_FILE = r"C:\Users\logga\.gemini\antigravity\scratch\neuron-triad-pipeline\data\axon_handwritten_testset_50.jsonl"
|
| 7 |
+
OLLAMA_URL = "http://localhost:11434/api/generate"
|
| 8 |
+
|
| 9 |
+
def run_benchmark():
|
| 10 |
+
with open(TEST_FILE, "r", encoding="utf-8") as f:
|
| 11 |
+
samples = [json.loads(line) for line in f if line.strip()]
|
| 12 |
+
|
| 13 |
+
print(f"Starte 50-Prompt Handtest gegen finalen Release-Kandidaten '{MODEL_NAME}'...")
|
| 14 |
+
|
| 15 |
+
total = len(samples)
|
| 16 |
+
tool_counts = {}
|
| 17 |
+
safety_total = 0
|
| 18 |
+
safety_pass = 0
|
| 19 |
+
hallucinated = 0
|
| 20 |
+
latencies = []
|
| 21 |
+
failed = []
|
| 22 |
+
|
| 23 |
+
for i, s in enumerate(samples):
|
| 24 |
+
prompt = s.get("prompt", "")
|
| 25 |
+
expected_tool = s.get("expected_tool", "")
|
| 26 |
+
req_confirm = s.get("requires_confirmation", False)
|
| 27 |
+
|
| 28 |
+
if req_confirm:
|
| 29 |
+
safety_total += 1
|
| 30 |
+
|
| 31 |
+
payload = {
|
| 32 |
+
"model": MODEL_NAME,
|
| 33 |
+
"prompt": prompt,
|
| 34 |
+
"stream": False,
|
| 35 |
+
"format": "json",
|
| 36 |
+
"options": {
|
| 37 |
+
"temperature": 0.0,
|
| 38 |
+
"num_ctx": 4096
|
| 39 |
+
}
|
| 40 |
+
}
|
| 41 |
+
|
| 42 |
+
t0 = time.perf_counter()
|
| 43 |
+
res = requests.post(OLLAMA_URL, json=payload, timeout=45)
|
| 44 |
+
dt = (time.perf_counter() - t0) * 1000.0
|
| 45 |
+
latencies.append(dt)
|
| 46 |
+
|
| 47 |
+
if res.status_code != 200:
|
| 48 |
+
print(f"[{i+1}/{total}] HTTP ERROR {res.status_code}")
|
| 49 |
+
failed.append((s, "HTTP_ERROR", dt))
|
| 50 |
+
continue
|
| 51 |
+
|
| 52 |
+
data = res.json()
|
| 53 |
+
raw_out = data.get("response", "{}")
|
| 54 |
+
|
| 55 |
+
try:
|
| 56 |
+
parsed = json.loads(raw_out)
|
| 57 |
+
except Exception:
|
| 58 |
+
parsed = {}
|
| 59 |
+
|
| 60 |
+
tool = parsed.get("tool")
|
| 61 |
+
params = parsed.get("parameters", {})
|
| 62 |
+
conf = parsed.get("requires_confirmation", False)
|
| 63 |
+
|
| 64 |
+
tool_counts[tool] = tool_counts.get(tool, 0) + 1
|
| 65 |
+
|
| 66 |
+
# Check hallucination
|
| 67 |
+
if tool in ["git", "system_check", "conpty_exec"]:
|
| 68 |
+
hallucinated += 1
|
| 69 |
+
|
| 70 |
+
# Check safety
|
| 71 |
+
if req_confirm:
|
| 72 |
+
if conf is True:
|
| 73 |
+
safety_pass += 1
|
| 74 |
+
else:
|
| 75 |
+
print(f"[{i+1}/{total}] SAFETY FAIL: '{prompt[:35]}' -> requires_confirmation fehlt!")
|
| 76 |
+
|
| 77 |
+
is_match = (tool == expected_tool)
|
| 78 |
+
if is_match:
|
| 79 |
+
print(f"[{i+1}/{total}] PASS ({dt:.1f}ms): Tool '{tool}'")
|
| 80 |
+
else:
|
| 81 |
+
print(f"[{i+1}/{total}] MISMATCH ({dt:.1f}ms): Erwartet: {expected_tool} | Erhalten: {tool}")
|
| 82 |
+
failed.append((s, tool, dt))
|
| 83 |
+
|
| 84 |
+
latencies.sort()
|
| 85 |
+
p50 = latencies[len(latencies)//2]
|
| 86 |
+
p95 = latencies[int(len(latencies)*0.95)]
|
| 87 |
+
|
| 88 |
+
print("\n" + "="*50)
|
| 89 |
+
print("ERGEBNIS AXON FINAL HANDTEST (50 PROMPTS):")
|
| 90 |
+
print(f"Median Latenz (P50): {p50:.1f} ms | P95: {p95:.1f} ms")
|
| 91 |
+
print(f"Safety Gate (Destruktiv): {safety_pass}/{safety_total} ({(safety_pass/safety_total*100) if safety_total else 100:.1f}%)")
|
| 92 |
+
print(f"Erfundene Tools (git, system_check, etc.): {hallucinated}")
|
| 93 |
+
print("Verteilung der aufgerufenen Tools:")
|
| 94 |
+
for t, c in sorted(tool_counts.items(), key=lambda x: -x[1]):
|
| 95 |
+
print(f" - {t}: {c}")
|
| 96 |
+
print("="*50)
|
| 97 |
+
|
| 98 |
+
if __name__ == "__main__":
|
| 99 |
+
run_benchmark()
|