Instructions to use pahajokiconsulting/anvil-ward-gate 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 pahajokiconsulting/anvil-ward-gate 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 pahajokiconsulting/anvil-ward-gate:F16 # Run inference directly in the terminal: llama cli -hf pahajokiconsulting/anvil-ward-gate:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf pahajokiconsulting/anvil-ward-gate:F16 # Run inference directly in the terminal: llama cli -hf pahajokiconsulting/anvil-ward-gate:F16
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 pahajokiconsulting/anvil-ward-gate:F16 # Run inference directly in the terminal: ./llama-cli -hf pahajokiconsulting/anvil-ward-gate:F16
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 pahajokiconsulting/anvil-ward-gate:F16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf pahajokiconsulting/anvil-ward-gate:F16
Use Docker
docker model run hf.co/pahajokiconsulting/anvil-ward-gate:F16
- LM Studio
- Jan
- vLLM
How to use pahajokiconsulting/anvil-ward-gate with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "pahajokiconsulting/anvil-ward-gate" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "pahajokiconsulting/anvil-ward-gate", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/pahajokiconsulting/anvil-ward-gate:F16
- Ollama
How to use pahajokiconsulting/anvil-ward-gate with Ollama:
ollama run hf.co/pahajokiconsulting/anvil-ward-gate:F16
- Unsloth Desktop
- Pi
How to use pahajokiconsulting/anvil-ward-gate with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf pahajokiconsulting/anvil-ward-gate:F16
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": "pahajokiconsulting/anvil-ward-gate:F16" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use pahajokiconsulting/anvil-ward-gate with Docker Model Runner:
docker model run hf.co/pahajokiconsulting/anvil-ward-gate:F16
- Lemonade
How to use pahajokiconsulting/anvil-ward-gate with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull pahajokiconsulting/anvil-ward-gate:F16
Run and chat with the model
lemonade run user.anvil-ward-gate-F16
List all available models
lemonade list
- Hermes Agent
How to use pahajokiconsulting/anvil-ward-gate with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf pahajokiconsulting/anvil-ward-gate:F16
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 pahajokiconsulting/anvil-ward-gate:F16
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use pahajokiconsulting/anvil-ward-gate with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf pahajokiconsulting/anvil-ward-gate:F16
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 "pahajokiconsulting/anvil-ward-gate:F16" \ --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"
Anvil Ward Gate — Fast Security Gate (0.8B)
Ultra-fast binary security gate for AI agent platforms. Returns SAFE/UNSAFE verdict only — no category or reason. Designed as stage 1 in a two-stage security pipeline where flagged inputs are escalated to the full Ward classifier for detailed analysis.
Fine-tuned from Qwen/Qwen3.5-0.8B using LoRA.
Intended Use
Fast pre-screening of every request in an AI agent platform. SAFE inputs pass through immediately; UNSAFE inputs are escalated to a larger model (Ward Thinker) for detailed classification. Tuned for high recall — when in doubt, flag as UNSAFE.
Output Format
VERDICT: SAFE
or
VERDICT: UNSAFE
No category or reason — binary only.
Benchmark Results
| Metric | Value |
|---|---|
| Accuracy | 82.9% |
| Recall (UNSAFE) | 98.8% |
| Precision (UNSAFE) | 72.0% |
| F1 (UNSAFE) | 83.3% |
High recall by design — false positives are acceptable because the thinker model corrects them in stage 2. Evaluated on 63 held-out examples, 472 training examples (UNSAFE 2x oversampled).
Training Details
- Base model: Qwen/Qwen3.5-0.8B
- Method: LoRA (r=16, alpha=32, dropout=0.05)
- Epochs: 3
- Precision: BF16
- Max sequence length: 256 tokens
- Mode: gate (binary VERDICT only)
- Oversampling: 2x UNSAFE examples for higher recall
- Optimizer: paged_adamw_8bit
Critical: Chat Template
This model requires an empty <think>\n\n</think>\n block before the assistant's output. See the main Ward model card for details on why this is required.
Usage with vLLM
vllm serve pahajokiconsulting/anvil-ward-gate --max-model-len 512
Construct the prompt:
<|im_start|>system
You are a fast security gate for Anvil, an AI agent platform. Classify each input as safe or unsafe. Respond with ONLY:
VERDICT: SAFE
or
VERDICT: UNSAFE
Nothing else. When in doubt, respond UNSAFE.<|im_end|>
<|im_start|>user
{user_input}<|im_end|>
<|im_start|>assistant
<think>
</think>
Usage with Ollama
See deploy/Modelfile-ward-gate-q4 in this repository.
License
Apache 2.0 (matching Qwen3.5 base model license)
- Downloads last month
- 13