Air-Gapped LLM Deployment Guide
Deploy open-source LLMs on classified, isolated, or air-gapped SOC infrastructure with zero internet dependency. Covers Ollama, vLLM, llama.cpp — from hardware to first query.
🏗️ Architecture of an Air-Gapped LLM SOC
An air-gapped LLM setup replaces cloud API calls with local inference. The model runs on your hardware, inside your perimeter. Analysts query it over your internal network. No query, log, or alert ever leaves the building.
Core components
| Component | Cloud equivalent | Air-gapped replacement |
|---|---|---|
| LLM inference | Anthropic API / OpenAI API | Ollama or vLLM running locally on GPU server |
| Model | Claude / GPT-4o | Llama 3.1 70B / Mistral 7B / Phi-3 Medium |
| Knowledge base (RAG) | Cloud vector DB | ChromaDB or FAISS running on local server |
| Embeddings | OpenAI text-embedding-3 | nomic-embed-text or all-MiniLM (local) |
| Analyst interface | ChatGPT / Claude.ai | Open WebUI or custom Python app on intranet |
What works well offline vs what degrades
| Task | 70B model quality | 7-13B model quality | Notes |
|---|---|---|---|
| Log explanation in plain English | Excellent | Good | Best offline use case |
| MITRE ATT&CK mapping | Excellent | Acceptable | May miss sub-techniques |
| CERT-In report drafting | Good | Acceptable | Needs good system prompt |
| Alert triage verdict | Good | Acceptable | JSON output less reliable on 7B |
| Complex multi-step reasoning | Acceptable | Limited | Significant quality gap vs cloud |
| Tool-calling / function calling | Acceptable | Unreliable | Only llama3.1 and mistral support this |
💻 Hardware Requirements
GPU VRAM requirements by model and quantisation
| Model | Full (FP16) | Q8 (8-bit) | Q4 (4-bit) | Recommended for |
|---|---|---|---|---|
| Phi-3 Mini 3.8B | 8 GB | 4 GB | 2.5 GB | Low-resource / embedded systems |
| Mistral 7B | 14 GB | 8 GB | 4.5 GB | Single consumer GPU (RTX 4090) |
| Llama 3.1 8B | 16 GB | 9 GB | 5 GB | Entry-level GPU server |
| Phi-3 Medium 14B | 28 GB | 15 GB | 9 GB | RTX 4090 (Q4) or A100 40GB |
| Mistral Nemo 12B | 24 GB | 13 GB | 8 GB | Single A100 40GB |
| Llama 3.1 70B | 140 GB | 75 GB | 43 GB | 2× A100 80GB or 4× RTX 4090 |
| Qwen 2.5 72B | 144 GB | 76 GB | 45 GB | 2× A100 80GB — best quality/size |
Recommended hardware configurations for Indian govt / defence SOC
| Tier | Hardware | Model recommendation | Concurrent users |
|---|---|---|---|
| Minimal (POC) | 1× NVIDIA RTX 4090 (24GB VRAM), 64GB RAM, 2TB NVMe | Mistral 7B Q8 or Llama 3.1 8B Q8 | 1-2 analysts |
| Small SOC | 1× NVIDIA A100 40GB or 2× RTX 4090, 128GB RAM, 4TB NVMe | Phi-3 Medium Q8 or Llama 3.1 8B FP16 | 3-5 analysts |
| Medium SOC | 1× NVIDIA A100 80GB, 256GB RAM, 8TB NVMe RAID | Llama 3.1 70B Q4 or Qwen 2.5 72B Q4 | 5-10 analysts |
| Enterprise | 2× NVIDIA A100 80GB or H100 80GB, 512GB RAM, NVMe RAID | Llama 3.1 70B Q8 or Qwen 2.5 72B Q8 | 10-20 analysts |
CPU-only fallback (no GPU)
If GPU procurement is blocked, llama.cpp can run models on CPU-only. Quality is identical but speed is 10-50× slower. Acceptable for batch analysis (not real-time triage). Recommendation: Phi-3 Mini Q4 on a 64-core server with 256GB RAM gives usable response times (15-30 seconds per query).
⚙️ Runtime Choice: Ollama vs vLLM vs llama.cpp
| Runtime | Best for | Setup complexity | API compatibility | Windows support |
|---|---|---|---|---|
| Ollama | Single-server SOC, easy deployment, analyst-facing | Low | OpenAI-compatible REST API | Yes |
| vLLM | High-throughput, many concurrent analysts, production | Medium | OpenAI-compatible REST API | No (Linux only) |
| llama.cpp | CPU-only, minimal dependencies, embedded systems | Medium | OpenAI-compatible REST API | Yes |
| LM Studio | Single analyst workstation, GUI, evaluation | Very Low | OpenAI-compatible REST API | Yes |
Recommendation for Indian govt/defence SOC
Start with Ollama. It is the simplest to deploy, has the lowest operational overhead, supports all major models, and exposes an OpenAI-compatible API that works with any agent framework. Move to vLLM only when you need to serve 10+ concurrent analysts with strict latency requirements.
Ollama quick reference
vLLM for production deployments
📦 Offline Model Transfer Procedure
🔧 Full Installation Walkthrough (Ubuntu 22.04 + Ollama)
This assumes all packages have been downloaded on an internet-connected system and transferred to the air-gapped server via approved media.
Step 1 — Prepare offline package bundles (on internet-connected staging)
Step 2 — Install on air-gapped server
Step 3 — Register model with Ollama
Step 4 — Install Open WebUI for analyst access (optional)
🛡️ Operational Security & Maintenance
Access control
Monitoring the inference server
Updating models offline
When a better model version is released: download and verify on staging, transfer via approved procedure, register as a new Ollama model name (keep the old one available), test with your standard prompt set, then switch analysts to the new model. Never delete the old model until the new one is validated.
Key operational differences from cloud AI
| Aspect | Cloud LLM | Air-gapped local LLM |
|---|---|---|
| Model knowledge cutoff | Updated periodically by provider | Fixed at training cutoff — use RAG for recent TI |
| Latency | 1-3 seconds (shared compute) | 2-15 seconds depending on hardware and model size |
| Downtime | Provider-managed (rare) | Your responsibility — plan for GPU failures |
| Model updates | Transparent, automatic | Manual transfer procedure required |
| Context window | 200K+ tokens (Claude) | Typically 8K-128K depending on model |
| Cost per query | $0.001-0.01 per query | Electricity + amortised hardware (~$0.0001) |