Text Generation
Transformers
Safetensors
English
qwen3
stablecoin
payments
compliance
x402
eip-3009
eip-712
disputes
refunds
agents
agentkit
trl
web3
usdc
fraud-detection
financial-risk
qwen
mcp
ai-agents
prompt-injection
agentic-payments
payment-security
risk-assessment
ofac
conversational
Eval Results (legacy)
Eval Results
text-generation-inference
Instructions to use sriram1983007/SRA-RiskGate-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use sriram1983007/SRA-RiskGate-4B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="sriram1983007/SRA-RiskGate-4B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("sriram1983007/SRA-RiskGate-4B") model = AutoModelForCausalLM.from_pretrained("sriram1983007/SRA-RiskGate-4B", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use sriram1983007/SRA-RiskGate-4B 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" # 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", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/sriram1983007/SRA-RiskGate-4B
- SGLang
How to use sriram1983007/SRA-RiskGate-4B with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "sriram1983007/SRA-RiskGate-4B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sriram1983007/SRA-RiskGate-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "sriram1983007/SRA-RiskGate-4B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sriram1983007/SRA-RiskGate-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use sriram1983007/SRA-RiskGate-4B with Docker Model Runner:
docker model run hf.co/sriram1983007/SRA-RiskGate-4B
Card: badges for the Nov 2026 live runs; MCP eleven tools
Browse files
README.md
CHANGED
|
@@ -115,6 +115,10 @@ model-index:
|
|
| 115 |
[](https://www.alphaxiv.org/abs/2610.sra-riskgate-stablecoin-payment-safety)
|
| 116 |
[](https://www.youtube.com/watch?v=NeyFklYSfkA)
|
| 117 |
[](https://www.youtube.com/watch?v=mPinl8ikUlE)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 118 |

|
| 119 |
|
| 120 |
**SRA-RiskGate-4B checks a stablecoin payment before an AI agent sends it, and answers `approve`, `hold` or `reject`** with reason codes. It is a 4B model, fine-tuned from `Qwen/Qwen3-4B-Instruct-2507`, that runs on a laptop.
|
|
@@ -175,7 +179,7 @@ If this is useful for your agent, a ❤️ like on this page helps others find i
|
|
| 175 |
|
| 176 |
## 🔌 Use It From an AI Agent (MCP)
|
| 177 |
|
| 178 |
-
[`sra-riskgate-mcp`](https://pypi.org/project/sra-riskgate-mcp/) gives Claude Desktop, Cursor and other MCP clients
|
| 179 |
|
| 180 |
| Tool | What it does | Needs |
|
| 181 |
| --- | --- | --- |
|
|
@@ -187,6 +191,8 @@ If this is useful for your agent, a ❤️ like on this page helps others find i
|
|
| 187 |
| `check_circle_wallets_request` | The same checks for a Circle Wallets API request (transfer, contract execution, signing) before it is sent to Circle; approvals, raw messages and wallet upgrades are held | Nothing |
|
| 188 |
| `check_delegation` | An EIP-7702 authorization before signing: always held, naming the contract and whether it is valid on every chain | Nothing |
|
| 189 |
| `check_user_operation` | An ERC-4337 UserOperation from a smart account (Coinbase Smart Wallet, Safe, Kernel, Nexus, SimpleAccount), call by call: an approval hidden in a batch is held, payments to the same payee are summed | Nothing |
|
|
|
|
|
|
|
| 190 |
| `check_payment_with_model` | Full review by SRA-RiskGate-4B over your policy, the payment and your verification results | This model served locally (for example with Ollama) |
|
| 191 |
|
| 192 |
```json
|
|
|
|
| 115 |
[](https://www.alphaxiv.org/abs/2610.sra-riskgate-stablecoin-payment-safety)
|
| 116 |
[](https://www.youtube.com/watch?v=NeyFklYSfkA)
|
| 117 |
[](https://www.youtube.com/watch?v=mPinl8ikUlE)
|
| 118 |
+
[](https://sepolia.basescan.org/tx/0xf12e9084becefd94fa6e26e54761fbfc8f3c04215d7fc724d0fca6077ba084fc)
|
| 119 |
+
[](https://flow-kg4x.vercel.app/row)
|
| 120 |
+
[](https://gist.github.com/sriram1983007-dev/8cd44e78adec20a0157368ec38c2fb42)
|
| 121 |
+
[](https://gist.github.com/sriram1983007-dev/1555e11a57682496f710a8224415c9e2)
|
| 122 |

|
| 123 |
|
| 124 |
**SRA-RiskGate-4B checks a stablecoin payment before an AI agent sends it, and answers `approve`, `hold` or `reject`** with reason codes. It is a 4B model, fine-tuned from `Qwen/Qwen3-4B-Instruct-2507`, that runs on a laptop.
|
|
|
|
| 179 |
|
| 180 |
## 🔌 Use It From an AI Agent (MCP)
|
| 181 |
|
| 182 |
+
[`sra-riskgate-mcp`](https://pypi.org/project/sra-riskgate-mcp/) gives Claude Desktop, Cursor and other MCP clients eleven tools: nine to call **before** paying, and two to confirm the payment **after** it settles:
|
| 183 |
|
| 184 |
| Tool | What it does | Needs |
|
| 185 |
| --- | --- | --- |
|
|
|
|
| 191 |
| `check_circle_wallets_request` | The same checks for a Circle Wallets API request (transfer, contract execution, signing) before it is sent to Circle; approvals, raw messages and wallet upgrades are held | Nothing |
|
| 192 |
| `check_delegation` | An EIP-7702 authorization before signing: always held, naming the contract and whether it is valid on every chain | Nothing |
|
| 193 |
| `check_user_operation` | An ERC-4337 UserOperation from a smart account (Coinbase Smart Wallet, Safe, Kernel, Nexus, SimpleAccount), call by call: an approval hidden in a batch is held, payments to the same payee are summed | Nothing |
|
| 194 |
+
| `verify_settlement` | **After** settlement: the mined receipt must hold exactly the approved USDC payment (payer, payee, amount, and for x402 the approved authorization) | Nothing (you pass the receipt) |
|
| 195 |
+
| `verify_gateway_balances` | **After** a Circle Gateway payment: the payer's balance went down, and the payee's up, by at least the amount | Nothing (you pass the balances) |
|
| 196 |
| `check_payment_with_model` | Full review by SRA-RiskGate-4B over your policy, the payment and your verification results | This model served locally (for example with Ollama) |
|
| 197 |
|
| 198 |
```json
|