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
Link SDK Colab notebook
Browse files
README.md
CHANGED
|
@@ -140,7 +140,7 @@ If this is useful for your agent, a ❤️ like on this page helps others find i
|
|
| 140 |
| In a CrewAI crew | `pip install crewai-sra-riskgate` ([GitHub](https://github.com/sriram1983007-dev/crewai-sra-riskgate)): a check tool, or `risk_gated()` to wrap the tool that sends money |
|
| 141 |
| In an ElizaOS agent (TypeScript) | `npm install elizaos-plugin-sra-riskgate viem` ([GitHub](https://github.com/sriram1983007-dev/elizaos-plugin-sra-riskgate)): guards the agent's viem wallet, so only approved USDC payments are broadcast; [demo agent](https://github.com/sriram1983007-dev/elizaos-plugin-sra-riskgate/tree/main/examples/eliza-demo) |
|
| 142 |
| In LangChain / Coinbase AgentKit (Python) | `pip install langchain-sra-riskgate` ([GitHub](https://github.com/sriram1983007-dev/langchain-sra-riskgate)) |
|
| 143 |
-
| Rule checks in Python, no GPU | `pip install sra-riskgate` ([details](#📦-python-sdk-one-call-before-every-payment-pypi)) |
|
| 144 |
| Test your agent's payments in CI | [GitHub Action](https://github.com/sriram1983007-dev/sra-riskgate-action): `uses: sriram1983007-dev/sra-riskgate-action@v1` |
|
| 145 |
| Your own cloud API, no setup | [Runpod Serverless](https://console.runpod.io/serverless): **Deploy LLM API**, model `sriram1983007/SRA-RiskGate-4B`, Max Model Length `8192`, a 24 GB or 48 GB GPU, min workers 0. Use `https://api.runpod.ai/v2/<ENDPOINT_ID>/openai/v1` as an OpenAI-compatible base URL with your Runpod API key. About 2.4 s per check once warm (measured on a 48 GB GPU); the first request after idle takes about 2 minutes |
|
| 146 |
| Your own OpenAI-compatible server (GPU) | [vLLM](#⚡-serve-with-vllm-openai-compatible-api): `docker run --gpus all -p 8000:8000 --ipc=host vllm/vllm-openai:v0.31.0 --model sriram1983007/SRA-RiskGate-4B --max-model-len 8192` |
|
|
|
|
| 140 |
| In a CrewAI crew | `pip install crewai-sra-riskgate` ([GitHub](https://github.com/sriram1983007-dev/crewai-sra-riskgate)): a check tool, or `risk_gated()` to wrap the tool that sends money |
|
| 141 |
| In an ElizaOS agent (TypeScript) | `npm install elizaos-plugin-sra-riskgate viem` ([GitHub](https://github.com/sriram1983007-dev/elizaos-plugin-sra-riskgate)): guards the agent's viem wallet, so only approved USDC payments are broadcast; [demo agent](https://github.com/sriram1983007-dev/elizaos-plugin-sra-riskgate/tree/main/examples/eliza-demo) |
|
| 142 |
| In LangChain / Coinbase AgentKit (Python) | `pip install langchain-sra-riskgate` ([GitHub](https://github.com/sriram1983007-dev/langchain-sra-riskgate)) |
|
| 143 |
+
| Rule checks in Python, no GPU | `pip install sra-riskgate` ([details](#📦-python-sdk-one-call-before-every-payment-pypi)) · [try them in Colab](https://colab.research.google.com/github/sriram1983007-dev/sra-riskgate/blob/main/notebooks/try-sra-riskgate.ipynb) |
|
| 144 |
| Test your agent's payments in CI | [GitHub Action](https://github.com/sriram1983007-dev/sra-riskgate-action): `uses: sriram1983007-dev/sra-riskgate-action@v1` |
|
| 145 |
| Your own cloud API, no setup | [Runpod Serverless](https://console.runpod.io/serverless): **Deploy LLM API**, model `sriram1983007/SRA-RiskGate-4B`, Max Model Length `8192`, a 24 GB or 48 GB GPU, min workers 0. Use `https://api.runpod.ai/v2/<ENDPOINT_ID>/openai/v1` as an OpenAI-compatible base URL with your Runpod API key. About 2.4 s per check once warm (measured on a 48 GB GPU); the first request after idle takes about 2 minutes |
|
| 146 |
| Your own OpenAI-compatible server (GPU) | [vLLM](#⚡-serve-with-vllm-openai-compatible-api): `docker run --gpus all -p 8000:8000 --ipc=host vllm/vllm-openai:v0.31.0 --model sriram1983007/SRA-RiskGate-4B --max-model-len 8192` |
|