Instructions to use sriram1983007/SRA-RiskGate-4B-GGUF 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 sriram1983007/SRA-RiskGate-4B-GGUF 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 sriram1983007/SRA-RiskGate-4B-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf sriram1983007/SRA-RiskGate-4B-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf sriram1983007/SRA-RiskGate-4B-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf sriram1983007/SRA-RiskGate-4B-GGUF: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 sriram1983007/SRA-RiskGate-4B-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf sriram1983007/SRA-RiskGate-4B-GGUF:Q4_K_M
Use Docker
docker model run hf.co/sriram1983007/SRA-RiskGate-4B-GGUF:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use sriram1983007/SRA-RiskGate-4B-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "sriram1983007/SRA-RiskGate-4B-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sriram1983007/SRA-RiskGate-4B-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/sriram1983007/SRA-RiskGate-4B-GGUF:Q4_K_M
- Ollama
How to use sriram1983007/SRA-RiskGate-4B-GGUF with Ollama:
ollama run hf.co/sriram1983007/SRA-RiskGate-4B-GGUF:Q4_K_M
- Unsloth Desktop
- Pi
How to use sriram1983007/SRA-RiskGate-4B-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf sriram1983007/SRA-RiskGate-4B-GGUF: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:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "sriram1983007/SRA-RiskGate-4B-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use sriram1983007/SRA-RiskGate-4B-GGUF with Docker Model Runner:
docker model run hf.co/sriram1983007/SRA-RiskGate-4B-GGUF:Q4_K_M
- Lemonade
How to use sriram1983007/SRA-RiskGate-4B-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull sriram1983007/SRA-RiskGate-4B-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.SRA-RiskGate-4B-GGUF-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use sriram1983007/SRA-RiskGate-4B-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf sriram1983007/SRA-RiskGate-4B-GGUF: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:9931/v1 hermes config set model.default sriram1983007/SRA-RiskGate-4B-GGUF:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use sriram1983007/SRA-RiskGate-4B-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf sriram1983007/SRA-RiskGate-4B-GGUF: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:9931/v1 \ --custom-model-id "sriram1983007/SRA-RiskGate-4B-GGUF: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"
SRA-RiskGate-4B (GGUF)
GGUF builds of SRA-RiskGate-4B, a 4B model that checks a stablecoin payment before an AI agent sends it and answers approve, hold or reject. For llama.cpp, LM Studio, Ollama and similar.
These files are v2 (2026-11-13), built from the v2 merged weights (full precision: dispute accuracy 90.2% vs 77.8% for v1, unsafe payment approvals 0.35% vs 0.47%). Q8_0 and Q4_K_M were checked on 12 benchmark cases (12 of 12 correct each) but have not yet been run on the full benchmark; the full-benchmark table below was measured on the v1 builds, which stay available at revision
v1. The Ollama registry model is still v1 until it is updated.
📄 Paper: preprint on Zenodo · full write-up on Ready Tensor · discuss on alphaXiv
🔁 Verified in the open (November 2026). The companion sra-riskgate library's checks, in front of real agents:
- Base Sepolia, independently re-checked: an approved 0.01 USDC payment (tx) was read back from the chain and verified, and a 2.00 USDC payment to an unknown payee was held before signing. Flow Executor, an independent agent settlement verifier, re-checked both from the chain (log · Flow Executor's page).
- Circle Gateway on Arc testnet: one agent task, three proposed payments. One was approved, accepted by Gateway and settled to the payee (agent 0.09 → 0.08 USDC, payee 0.01 → 0.02); an unlimited approval was held and a look-alike payee rejected, neither signed (log).
- Grok as the paying agent: Grok (grok-4.7) refused both attacks on its own; told to submit everything to the gate, it got APPROVE for the real invoice, HOLD for the unlimited approval and REJECT for the look-alike (logs).
- Someone else's agent, on mainnet: Minimum Viable Agent's 25.075 USDG loan repayment on Robinhood Chain was pulled by the lender's contract, so there was nothing to sign. It was found on chain by amount and time and checked with
verify_settlement: exactly 25.075 USDG to the lender, nothing else moved, allowance left 0 at the block checked. The agent confirmed the result publicly (tx · check · confirmation).
These runs used the library's deterministic checks, not this model.
| File | Size | Notes |
|---|---|---|
SRA-RiskGate-4B-Q8_0.gguf |
4.3 GB | v2. Closest to full precision; use for disputes |
SRA-RiskGate-4B-Q6_K.gguf |
3.3 GB | v2 |
SRA-RiskGate-4B-Q5_K_M.gguf |
2.9 GB | v2 |
SRA-RiskGate-4B-Q4_K_M.gguf |
2.5 GB | v2. Payment checks on a laptop |
v1 builds on the full benchmark (Q8_0 and Q4_K_M, measured 2026-11-11):
| Full precision | Q8_0 (4.3 GB) | Q4_K_M (2.5 GB) | |
|---|---|---|---|
| Payment decision accuracy ↑ | 99.5% | 99.5% | 99.3% |
| Unsafe approvals ↓ | 0.47% | 0.47% | 0.83% |
| Legitimate payments blocked ↓ | 0% | 0% | 0% |
| Dispute outcome accuracy ↑ | 77.8% | 78.6% | 67.4% |
| Wrongful denials ↓ | 26.0% | 23.4% | 55.3% |
Wrongful denials with check_dispute_verdict ↓ |
0.85% | 0.85% | 0.85% |
All 2,000 held-out test cases, the exact training prompts, greedy decoding and the benchmark's own score.py;
measured 2026-11-11 by the author with Ollama on a T4. Every prediction is published in
sra-bench-results. Q8_0 matches full precision. Q4_K_M keeps the payment gate (no legitimate
payment blocked; 3 more unsafe approvals than full precision, all where the payer's attestation is missing) but is
weaker on disputes: it more often claims a dispute was filed outside the policy's window when it was not, which turns
owed refunds into dismissals. That is date arithmetic, so code fixes it: check_dispute_verdict in sra-riskgate
brings every build to 0.85% wrongful denials without adding a wrongful refund. Builds other than these two have not
been benchmarked.
Which file: Q4_K_M for payment checks on a laptop; Q8_0 (or the full model) for disputes. With any file, run check_dispute_verdict on dispute verdicts.
Run it
Ollama (payment risk-gate system prompt, temperature 0 and an 8K context built in):
ollama run sriram1983007/sra-riskgate
llama.cpp:
llama-server -hf sriram1983007/SRA-RiskGate-4B-GGUF:Q4_K_M -c 8192 --temp 0
LM Studio: search for SRA-RiskGate-4B-GGUF, pick a file, and set temperature to 0.
Use the exact training prompt format from the main model card: the system prompt, then Evaluate this stablecoin payment. with the <context>, <payload> and <tool_results> blocks. Treat any answer that isn't a valid verdict as a hold. In Python, payment_messages() and dispute_messages() in sra-riskgate 1.3.0+ build the prompts for you.
More quantization sizes, including imatrix builds, are available from mradermacher: static and imatrix, and from tinyopsec: SRA-RiskGate-4B-GGUF (Q2_K to F16; builds below Q4 have not been evaluated).
📄 Citation
@misc{ramakrishnan2026srariskgate,
author = {Sriram Ramakrishnan},
title = {SRA-RiskGate: A Benchmark and a 4B Model for Gating Stablecoin Payments Made by AI Agents, and the Checks the Model Still Needs},
year = {2026},
publisher = {Zenodo},
doi = {10.5281/zenodo.23715017},
url = {https://doi.org/10.5281/zenodo.23715017}
}
Full write-up: Ready Tensor.
License
Apache 2.0
- Downloads last month
- 920
4-bit
5-bit
6-bit
8-bit
Model tree for sriram1983007/SRA-RiskGate-4B-GGUF
Base model
Qwen/Qwen3-4B-Instruct-2507