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
Update README.md
Browse files
README.md
CHANGED
|
@@ -96,6 +96,8 @@ agent_kit = AgentKit(AgentKitConfig(
|
|
| 96 |
|
| 97 |
```
|
| 98 |
|
|
|
|
|
|
|
| 99 |
> **Security Guardrail:** To ensure the firewall cannot be bypassed by an autonomous agent, register `RiskGateActionProvider` as the **sole** payment action provider. Do not register generic native transfer or unconstrained ERC-20 providers alongside it.
|
| 100 |
|
| 101 |
### Deterministic Pre-Execution Rules
|
|
@@ -326,9 +328,9 @@ Evaluated against the 2,000-case test set in [`sra-stablecoin-risk-bench`](https
|
|
| 326 |
* **Synthetic Dataset Distribution:** The benchmark and training corpora are synthetically generated from parameterized fraud schemas and common on-chain threat models. Performance on novel, adversarial zero-day prompt structures outside the schema may vary.
|
| 327 |
* **External Oracle Dependency:** SRA-RiskGate-4B is a pre-settlement decision layer, not a smart contract formal verifier. It relies on the accuracy of upstream deterministic screening tools (e.g., chain analysis APIs, sanctions lists, and signature verifiers).
|
| 328 |
* **Greedy Decoding Required:** Always run inference with `do_sample=False` or `temperature=0.0`. Sampling introduces stochasticity that invalidates JSON schema validity and determinism guarantees.
|
| 329 |
-
* **Agent Boundary Isolation:** In autonomous agent frameworks (such as AgentKit), safety guarantees apply only when `RiskGateActionProvider`
|
| 330 |
* **Dispute adjudication is weaker than payment gating:** Dispute score is 0.837 vs. 0.995 for the risk gate. Refund details (amount, destination, idempotency key) are fully correct in about 66% of refund cases, and on some disputes containing prompt injection the model replies in the payment-gate format (`decision: hold`) instead of a dispute `outcome`. Treat any dispute response without a valid `outcome` as requiring human review.
|
| 331 |
-
* **Prompt injection is reduced, not eliminated:** About 10% of injected test cases are not flagged. Never let model output trigger irreversible actions without a deterministic check.
|
| 332 |
|
| 333 |
---
|
| 334 |
|
|
|
|
| 96 |
|
| 97 |
```
|
| 98 |
|
| 99 |
+
---
|
| 100 |
+
|
| 101 |
> **Security Guardrail:** To ensure the firewall cannot be bypassed by an autonomous agent, register `RiskGateActionProvider` as the **sole** payment action provider. Do not register generic native transfer or unconstrained ERC-20 providers alongside it.
|
| 102 |
|
| 103 |
### Deterministic Pre-Execution Rules
|
|
|
|
| 328 |
* **Synthetic Dataset Distribution:** The benchmark and training corpora are synthetically generated from parameterized fraud schemas and common on-chain threat models. Performance on novel, adversarial zero-day prompt structures outside the schema may vary.
|
| 329 |
* **External Oracle Dependency:** SRA-RiskGate-4B is a pre-settlement decision layer, not a smart contract formal verifier. It relies on the accuracy of upstream deterministic screening tools (e.g., chain analysis APIs, sanctions lists, and signature verifiers).
|
| 330 |
* **Greedy Decoding Required:** Always run inference with `do_sample=False` or `temperature=0.0`. Sampling introduces stochasticity that invalidates JSON schema validity and determinism guarantees.
|
| 331 |
+
* **Agent Boundary Isolation:** In autonomous agent frameworks (such as AgentKit), safety guarantees apply only when `RiskGateActionProvider` is the sole execution provider for transfers.
|
| 332 |
* **Dispute adjudication is weaker than payment gating:** Dispute score is 0.837 vs. 0.995 for the risk gate. Refund details (amount, destination, idempotency key) are fully correct in about 66% of refund cases, and on some disputes containing prompt injection the model replies in the payment-gate format (`decision: hold`) instead of a dispute `outcome`. Treat any dispute response without a valid `outcome` as requiring human review.
|
| 333 |
+
* **Prompt injection is reduced, not eliminated:** About 10% of injected test cases are not flagged. Never let model output trigger irreversible actions without a deterministic check.
|
| 334 |
|
| 335 |
---
|
| 336 |
|