This site uses cookies to serve ads via Google AdSense and to analyse site usage. By continuing to use this site, you consent to our use of cookies. Privacy Policy
Deploy local LLMs in air-gapped or restricted environments — Ollama vs vLLM vs LM Studio, hardware specs, multi-analyst serving, and RBI/SEBI compliance architecture patterns.
🇮🇳 Regulatory context: RBI Master Direction on IT (2023) and SEBI CSCRF require that sensitive financial data not leave approved infrastructure. Cloud AI APIs (GPT-4, Claude, Gemini) are not permitted for processing payment data, trade data, or customer PII. Local LLM deployment is the only compliant path for AI-assisted SOC operations in regulated Indian entities.
Architecture Pattern 1 — Single Analyst Workstation
Simplest deployment. Each analyst runs Ollama locally. No server required. Suitable for small teams or proof-of-concept.
⚠️ VRAM is the critical constraint — the model must fit in GPU VRAM for GPU acceleration. If it doesn't fit, it falls back to CPU which is 10-50x slower.
Setup
Model
GPU
VRAM
System RAM
Approx Cost (India)
Throughput
Analyst laptop (minimum)
Phi-3.5 Mini (2.2 GB)
None (CPU)
N/A
8 GB
Existing hardware
~8 tok/sec
Analyst workstation
Llama 3.2 8B
RTX 4060 (8 GB)
8 GB
16 GB
₹35,000 GPU
~25 tok/sec
Power analyst / researcher
Llama 3.2 8B / 70B
RTX 4090 (24 GB)
24 GB
32 GB
₹1.6L GPU
~60 tok/sec (8B)
Small team server (5-10 users)
Llama 3.2 8B
RTX 3090 (24 GB)
24 GB
64 GB
₹1.2L GPU + server
~50 tok/sec shared
Medium team server (10-20 users)
Llama 3.1 70B
2x RTX 3090 (48 GB total)
48 GB
128 GB
₹2.5L GPUs + server
~20 tok/sec shared
Enterprise BFSI (20+ users)
Llama 3.1 70B
NVIDIA A100 80 GB
80 GB
256 GB
₹30-40L (A100)
~100 tok/sec shared
Large bank / RBI-regulated
Llama 3.1 70B
2x A100 80 GB
160 GB
512 GB
₹60-80L
~200 tok/sec shared
OpenAI-Compatible API Wrapper
Ollama and vLLM both expose an OpenAI-compatible API. This means any tool built for OpenAI can be redirected to your local model by changing just the base URL and model name — no code changes needed.
## Drop-in replacement: point OpenAI SDK to local Ollama
from openai import OpenAI
# Instead of:
# client = OpenAI(api_key="sk-...")
# Use local Ollama — no API key needed, no data leaves your network
client = OpenAI(
base_url="http://localhost:11434/v1",
api_key="ollama" # Required by SDK but not validated
)
def soc_query(user_message: str, system_prompt: str = None) -> str:
messages = []
if system_prompt:
messages.append({"role": "system", "content": system_prompt})
messages.append({"role": "user", "content": user_message})
response = client.chat.completions.create(
model="llama3.2", # Change to any pulled Ollama model
messages=messages,
temperature=0.1, # Low temperature for factual security analysis
max_tokens=1000
)
return response.choices[0].message.content
# Usage — works exactly like OpenAI but locally
result = soc_query(
"Analyse this alert: Outbound DNS query to mining-pool-xyz.com from 10.0.1.50",
system_prompt="You are a SOC analyst. Classify alerts and provide CERT-In reporting guidance."
)
print(result)
Nginx reverse proxy for SOC-wide access
# /etc/nginx/sites-available/soc-ai
server {
listen 80;
server_name soc-ai.internal; # Internal DNS name
# Only allow SOC VLAN
allow 10.0.1.0/24; # SOC analyst subnet
allow 10.0.2.0/24; # SOC server subnet
deny all;
# Open WebUI (analyst chat interface)
location / {
proxy_pass http://localhost:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
}
# Ollama API (for tool integrations)
location /api/ {
proxy_pass http://localhost:11434;
proxy_read_timeout 300s; # Allow long inference
}
}
Compliance Checklist for Local LLM Deployment
1.
No internet egress from AI serverMandatory for BFSI/Gov
Configure firewall rules to block all outbound traffic from the AI server. The model runs fully offline after initial download.
2.
Model downloaded before air-gappingMandatory
Download model weights (Llama 3.2, Mistral, etc.) before cutting internet access. Weights are static files — no internet needed at inference time.
3.
Access restricted to SOC VLAN onlyMandatory
Nginx/firewall restricts AI server access to SOC analyst subnet. No other network segments can reach it.
4.
No customer/policyholder data in promptsMandatory per RBI/SEBI
Define clear data classification: only anonymised or de-identified data may be sent to AI. Never include Aadhaar, PAN, account numbers, or full payment data in prompts.
5.
Prompt logging and audit trailMandatory
Log all queries sent to local AI with analyst username, timestamp, and response. Retain logs as per CERT-In 180-day requirement.
6.
Model version documentedMandatory for regulated entities
Document which model version (e.g., Llama-3.2-8B-Instruct, SHA256 hash of weights) is deployed. Include in IT asset register.
7.
Approval in IT risk frameworkMandatory per RBI IT Framework
Local LLM deployment covered in IT Risk Assessment. Board/IT Committee awareness documented.
8.
Incident response plan for AI failureRecommended
What happens if AI server goes down? Analysts must be able to triage alerts manually. AI is a productivity tool, not a control.
9.
Periodic model evaluationRecommended
Quarterly review of model accuracy on your specific log types and alert categories. Update to newer model version if accuracy degrades.
10.
Staff training on AI limitationsMandatory — document in training records
Analysts trained: AI can hallucinate, AI is not authoritative, AI output must be verified for critical decisions. Cannot replace analyst judgment.
We use cookies to remember your preferences. No advertising or tracking cookies. Privacy Policy