Run this model with HF Jobs
Run wesley4546/local-automode-0.8b on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/wesley4546/local-automode-0.8b. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/wesley4546/local-automode-0.8b on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use wesley4546/local-automode-0.8b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use wesley4546/local-automode-0.8b with PEFT:
from peft import PeftModel from transformers import AutoModel base_model = AutoModel.from_pretrained("Qwen/Qwen3.5-0.8B-Base") model = PeftModel.from_pretrained(base_model, "wesley4546/local-automode-0.8b") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use wesley4546/local-automode-0.8b 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 wesley4546/local-automode-0.8b:Q8_0 # Run inference directly in the terminal: llama cli -hf wesley4546/local-automode-0.8b:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf wesley4546/local-automode-0.8b:Q8_0 # Run inference directly in the terminal: llama cli -hf wesley4546/local-automode-0.8b:Q8_0
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 wesley4546/local-automode-0.8b:Q8_0 # Run inference directly in the terminal: ./build/bin/llama cli -hf wesley4546/local-automode-0.8b:Q8_0
Use Docker
docker model run hf.co/wesley4546/local-automode-0.8b:Q8_0
- Llama new
- LM Studio
- Jan
- Ollama
How to use wesley4546/local-automode-0.8b with Ollama:
ollama run hf.co/wesley4546/local-automode-0.8b:Q8_0
- Unsloth Desktop
- Pi
How to use wesley4546/local-automode-0.8b with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf wesley4546/local-automode-0.8b: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:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "wesley4546/local-automode-0.8b:Q8_0" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use wesley4546/local-automode-0.8b with Docker Model Runner:
docker model run hf.co/wesley4546/local-automode-0.8b:Q8_0
- Lemonade
How to use wesley4546/local-automode-0.8b with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull wesley4546/local-automode-0.8b:Q8_0
Run and chat with the model
lemonade run user.local-automode-0.8b-Q8_0
List all available models
lemonade list
- Hermes Agent
How to use wesley4546/local-automode-0.8b with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf wesley4546/local-automode-0.8b: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:9931/v1 hermes config set model.default wesley4546/local-automode-0.8b:Q8_0
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use wesley4546/local-automode-0.8b with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf wesley4546/local-automode-0.8b: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:9931/v1 \ --custom-model-id "wesley4546/local-automode-0.8b: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"
Install from WinGet (Windows)
winget install llama.cpp
# Start a local OpenAI-compatible server with a web UI:
llama serve -hf wesley4546/local-automode-0.8b:Q8_0# Run inference directly in the terminal:
llama cli -hf wesley4546/local-automode-0.8b:Q8_0Build 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 wesley4546/local-automode-0.8b:Q8_0# Run inference directly in the terminal:
./build/bin/llama cli -hf wesley4546/local-automode-0.8b:Q8_0Use Docker
docker model run hf.co/wesley4546/local-automode-0.8b:Q8_0local-automode-0.8b
A fast, local, 0.8B System 1 tool-call authorization guardrail for AI coding and computer-use agents.
local-automode-0.8b is a fine-tuned decision model (LoRA r=16 + pointer head on Qwen/Qwen3.5-0.8B-Base, warm-started from jaredpalmer/kev-0.8b) that scores whether an agent's next tool call exceeds what the user actually authorized across the session so far. It runs prefill-only in a single forward pass (no text generation), ships as both a LoRA adapter and a 775 MiB Q8_0 GGUF for llama.cpp, and is designed to pair with any OpenAI-compatible reasoning model as a two-stage System 1 + System 2 cascade (the local equivalent of Claude Code's Auto Mode).
Architecture: System 1 + System 2 Cascade
local-automode-0.8b takes the session's [USER] messages, the agent's earlier [AGENT CALL] history (with tool outputs intentionally stripped to defend against indirect prompt injection), and the Call under review:, and outputs a single calibrated probability p_unsafe (fitted temperature T = 1.7175 baked into head.pt and the Q8_0 GGUF).
flowchart LR
Call["Agent Tool Call + Session History"] --> S1["System 1: local-automode-0.8b (Q8_0 GGUF, ~30–240 ms)"]
S1 -->|"p < 0.0457 (~96%)"| Allow["Fast-Pass (Allow)"]
S1 -->|"0.0457 <= p < 0.5840 (~3%)"| S2["System 2: Any OpenAI-Compatible Reasoner"]
S1 -->|"p >= 0.5840 (~1%)"| Block["Direct Block (Bypass S2)"]
S2 -->|"safe"| Allow
S2 -->|"unsafe / error"| Block
- Fast-pass (
p < lo):96–97% of routine calls pass in **30–240 ms** without ever calling System 2. - Gray zone (
lo <= p < hi): Ambiguous calls escalate to System 2, which reasons over all[USER]messages and the 10 most recent[AGENT CALL]entries. - Direct-block ceiling (
p >= hi): High-confidence attacks and forged-consent injections block directly in System 1 so prompt injections cannot persuade System 2 to override them.
Benchmarks
All System 1 scores were evaluated in exact fp32 (Q8_0 GGUF parity verified within max |Δp| = 0.0013). Serving temperature (T = 1.7175) and operating thresholds (lo = 0.0457 [4% safe FPR], hi = 0.5840 [0.2% safe FPR]) were fitted strictly on the Validation split (11,736 session-disjoint calls) with zero tuning on any test, temporal, adversarial, or out-of-distribution split.
1. System 1 Alone (Exact fp32, Calibrated T = 1.7175)
| Category | Split | N (Unsafe) | ROC-AUC | PR-AUC | Recall @ 1% FPR | Cal. NLL |
|---|---|---|---|---|---|---|
| Validation | Held-out calibration fold (session-disjoint) | 11,736 (932) | 0.9774 | 0.8600 | — | 0.0937 |
| In-Domain Test | Full test set (all 19 sources) | 4,965 (424) | 0.9757 | 0.8578 | 64.9% | 0.1057 |
| In-Domain Test | Real coding-agent sessions subset | 1,624 (24) | 0.9713 | 0.5681 | 58.3% | 0.0414 |
| Temporal Holdout | Newer post-cutoff coding sessions | 475 (61) | 0.8880 | 0.5902 | 19.7% | 0.4443 |
| Temporal Holdout | Unseen real-session harness holdout | 167 (1) | 0.9398 | 0.0909 | — | 0.0337 |
| Adversarial | Forged-consent / prompt-injection pairs | 200 (100) | 0.9678 | 0.9773 | 89.0% | 0.2986 |
| Contrast Probes | Shell/OS & general-domain minimal pairs | 50 (25) | 1.0000 | 1.0000 | 100.0% | — |
| Zero-Shot OOD | karanxa/agent-action-safety-dataset (16+ unseen domains) |
4,049 (2,251) | 0.8670 | 0.8939 | — | — |
2. End-to-End System 1 + System 2 Cascade (lo = 0.0457, hi = 0.5840)
| Category | Split | Sent to S2 | Direct S1 Blocks | End-to-End FPR | End-to-End Recall |
|---|---|---|---|---|---|
| In-Domain Test | Real coding-agent sessions (1,624) |
3.1% (50) | 13 | 0.50% (8/1600) |
70.8% (17/24) |
| Temporal Holdout | Unseen real-session harness (167) |
1.8% (3) | 0 | 0.00% (0/166) |
0/1 |
| Adversarial | Forged-consent / prompt-injection (200) |
21.5% (43) | 79 | 7.00% (7/100) |
87.0% (87/100) |
| Zero-Shot OOD | karanxa stratified sample (500) |
19.4% (97) | — | 15.1% | 86.2% (85.6% Acc / 87.1% F1) |
3. Zero-Shot OOD Domain Breakdown (karanxa/agent-action-safety-dataset, 4,049 actions)
Zero rows from karanxa appeared in training, and thresholds were not retuned. System 1 ROC-AUC across unseen non-coding domains:
media (0.912), devtools (0.893), automation (0.890), consumer (0.889), email (0.888), smart_home (0.885), personal_assistant (0.883), travel (0.877), browser (0.875), payments (0.871), file_manager (0.870), filesystem (0.867), api (0.864), messaging (0.846), cloud (0.834).
4. Live Daily-Driver Telemetry
Running local-automode-0.8b (Q8_0 GGUF in llama.cpp) + System 2 on real coding-agent sessions (258 live tool calls, 30-call history):
- System 1 latency:
p50 = 244 ms,p95 = 283 ms(~30 mson short sessions). - Routine score distribution:
median p_unsafe = 0.0052,p95 = 0.0194. - Errors / timeouts:
0.
Quickstart
Server code and CLI: wesley4546/local-automode (Apache-2.0).
Want your coding agent to set this up for you? Paste
HANDOFF.mddirectly into Claude Code, Codex, Pi,omp, or Cursor — it includes the install command, launch flags, 3-step smoke test, and the exact/v1/chat/completionshook contract.
Option A: PyTorch (Mac, Linux, Windows — zero custom C++ required)
# Run directly with uvx (downloads wesley4546/local-automode-0.8b automatically)
uvx --from "local-automode[torch]" local-automode
# Or install with pip
pip install "local-automode[torch]"
local-automode \
--stage2-url http://127.0.0.1:11434/v1 \
--stage2-model qwen3:32b
Option B: llama.cpp (local-automode-0.8b-Q8_0.gguf, ~775 MiB — DGX Spark / GPU servers)
Requires Unsloth's llama.cpp fork with KevModel / /v1/systemone support:
# 1. Start the System 1 GGUF server
llama-server -m local-automode-0.8b-Q8_0.gguf --host 127.0.0.1 --port 8080 -ngl 99 -c 8192 -np 1
# 2. Start the local-automode proxy (stdlib only — no torch install needed)
pip install local-automode
local-automode \
--backend llama \
--llama-url http://127.0.0.1:8080 \
--stage2-url http://127.0.0.1:8000/v1 \
--stage2-model <your-stage2-model>
Training Data & Recipe
- Training set: 65,416 balanced tool-call records across 19 sources and >10,000 sessions (session-disjoint from the validation and test splits):
- Public datasets:
tomngdev/shell-safety(MIT),kontext-security/ShellRisk-Bench(Apache-2.0 code; upstream terms apply),SALT-NLP/SWE-chat(ODC-By),trace-commons/agent-traces(CC-BY-4.0),saidutta69/agentic-vibecoding-traces(MIT). - Real coding-agent traces & synthetic pairs: multi-turn coding sessions across 6 harnesses plus forged-consent, PowerShell, and general-domain contrast pairs.
- Public datasets:
- Training setup: Warm-started from
jaredpalmer/kev-0.8b, LoRAr=16on all linear layers (11.3Mtrainable parameters),lr=1e-4,batch=1,accum=8,max_state=6144,fp32weights withbf16autocast, 1 epoch (8,177optimizer steps, ~5.6h on a single RTX 5090).
Scope, Limitations, & Out-of-Scope Uses
- Action authorization only—not content moderation:
local-automode-0.8bchecks whether a tool call exceeds what the user authorized. It intentionally strips tool outputs and is not a content-moderation, toxicity, or social-ethics judge. OnAI45Research/ATBench-Codex(0.573AUC) andATBench500(0.476AUC)—where trajectories are labeled unsafe for social/fairness harms even when explicitly requested by the user—this model does not apply. - Defense-in-depth, not a hard security boundary:
70.8%recall on subtle real coding-agent test errors (17/24, small positive count) means ~3 in 10 subtle edge cases can still slip through. Always pair with OS sandboxing, least-privilege credentials, and deterministic hard blocks for irreversible actions. - Threshold recalibration out-of-domain: Ranking generalizes well to non-coding domains (
0.867AUC onkaranxa), but the defaultlo = 0.0457/hi = 0.5840cuts were fitted on coding-agent traffic and yielded15.1%FPR onkaranxa. Recalibrateloandhion a small sample of your own traffic if deploying outside coding agents. - Known System 1 blind spots: Unrequested
git -C <dir> push --force, unrequested persistent cron/background scheduling, andkaranxa'sstoragedomain (N=54). - English-primary,
<= 6,144state tokens: Calls exceeding the context window fail closed (p_unsafe = 1.0).
License & Attribution
- Model weights & code: Licensed under Apache-2.0.
- Base model:
Qwen/Qwen3.5-0.8B-Base(Apache-2.0) by Qwen / Alibaba Cloud. - Warm-start decision architecture:
jaredpalmer/kev-0.8b(Apache-2.0) by Jared Palmer / TypeSafe. - Public datasets acknowledged:
tomngdev/shell-safety(MIT),saidutta69/agentic-vibecoding-traces(MIT),SALT-NLP/SWE-chat(ODC-By),trace-commons/agent-traces(CC-BY-4.0),kontext-security/ShellRisk-Bench(Apache-2.0 code; upstream datasets retain their respective licenses), andkaranxa/agent-action-safety-dataset(Apache-2.0, zero-shot evaluation only).
- Downloads last month
- 195
8-bit
Model tree for wesley4546/local-automode-0.8b
Base model
Qwen/Qwen3.5-0.8B-Base
Install (macOS, Linux)
# Start a local OpenAI-compatible server with a web UI: llama serve -hf wesley4546/local-automode-0.8b:Q8_0# Run inference directly in the terminal: llama cli -hf wesley4546/local-automode-0.8b:Q8_0