Instructions to use pahajokiconsulting/anvil-ward-gate with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use pahajokiconsulting/anvil-ward-gate with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="pahajokiconsulting/anvil-ward-gate", filename="anvil-ward-gate.f16.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use pahajokiconsulting/anvil-ward-gate with llama.cpp:
Install from brew
brew install llama.cpp # 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
Install from WinGet (Windows)
winget install llama.cpp # 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
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 Studio
How to use pahajokiconsulting/anvil-ward-gate with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for pahajokiconsulting/anvil-ward-gate to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for pahajokiconsulting/anvil-ward-gate to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for pahajokiconsulting/anvil-ward-gate to start chatting
- 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-server -hf pahajokiconsulting/anvil-ward-gate:F16
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/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
- Hermes Agent new
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-server -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
- 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
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
- 8