# Air-Gapped Local AI Inference: Hardware Economics, Open Models and Zero-Egress Architecture

> An engineering blueprint for building air-gapped local LLM inference infrastructure — from Moderna's on-premise open-weight shift to evaluating frontier open models like Amazon Ergo, Qwen4-35B-A3B, DeepSeek-V4.1, GLM-5.3, Kimi K3.1 Pro, Gemma 4 and Muse Spark Open across Mac Studio Thunderbolt 5 RDMA clusters, NVIDIA DGX Spark, RTX PRO 6000 Blackwell and DGX Station GB300.

- URL: https://gigantic.work/engineering/air-gapped-local-inference-architecture/
- Published: 2026-12-04
- Author: Gigantic Work Engineering (Infrastructure & systems architecture team)
- Topics: Local Inference, Air-Gapped AI, Open-Weight Models, Amazon Ergo, Qwen4, Mac Studio, DGX Spark, vLLM, MLX
- Language: English

For three years, enterprise AI architecture assumed a single topology: send prompts over HTTPS to a cloud-hosted frontier API and absorb the per-token invoice. In late 2026, two converging forces broke that monoculture — **frontier-grade open-weight Mixture-of-Experts (MoE) models** caught up on agentic coding and reasoning, and high-security enterprises began bringing sensitive inference and post-training back inside their own walls.

The watershed signal came at the **30th Annual UBS Global Technology and AI Conference** on 2 December 2026, when **Moderna** CEO Stéphane Bancel — an organisation famous for early cloud-native adoption and company-wide OpenAI ChatGPT Enterprise deployment — disclosed that Moderna has started buying and operating **its own on-premise servers equipped with NVIDIA chips** to host and post-train **open-weight models locally**. Bancel anchored the move on two board-level realities:

1. **Data sovereignty over proprietary IP:** *"If the moat is the human data… I want to make sure the human data doesn't leave the building"* — keeping clinical and biological assets (such as Phase 3 oncology cohorts for personalised mRNA therapies) inside a controlled physical perimeter.
2. **Cost-structure inversion:** Moving high-volume and sensitive workloads off recurring per-token cloud API billing onto **server depreciation and electricity** — allowing Moderna to spend less on AI overall while retaining a **hybrid split** (cloud APIs for general staff productivity, private local servers for proprietary research and high-throughput internal workloads).

Building local or fully **air-gapped** inference for universities, biotech labs, defence contractors and regulated engineering teams requires getting three coupled engineering choices right: **physical memory sizing**, **model selection** and **zero-egress deployment**.

<div class="callout callout-tip">
  <div class="callout-title">First law of local inference hardware</div>
  <p><strong>Memory capacity</strong> (model weights plus KV cache) determines which models can load at all; <strong>memory bandwidth</strong> determines single-user token decode speed (<code>tok/s</code>); <strong>Tensor Core compute and inter-node fabric</strong> determine long-context prefill latency (TTFT) and multi-user concurrency.</p>
</div>

---

## 1. Physics of local inference sizing

Before comparing hardware boxes or GPU cards, size the actual memory and bandwidth envelope your workload demands:

- **Weight footprint by precision:**
  - `BF16` (16-bit): `~2.0 bytes × parameters` (e.g. a 70B model needs ~140 GB before KV cache).
  - `MXFP8` / `FP8` (8-bit): `~1.05 bytes × parameters` including scale metadata.
  - `MXFP4` / `NVFP4` / `Q4_K_M` (4-bit): `~0.55 bytes × parameters` including block scales.
- **KV cache growth in coding agents:** A chat bot answering 2,000-token questions barely uses KV memory. A coding agent running 30-step repository loops across 128K–1M tokens expands KV cache by tens of gigabytes per active session unless the model uses **Grouped-Query Attention (GQA)** or **Multi-Head Latent Attention (MLA)** paired with `--kv-cache-dtype fp8`.
- **Single-stream decode speed ceiling:** Token generation reads almost every active weight once per output token:
  `tok/s ≈ effective_memory_bandwidth / active_weight_bytes`
- **Why Sparse MoE changed local economics:** Dense 400B+ models are painful locally because every parameter executes on every token. Sparse MoE models such as **Amazon Ergo** (1.1T total / 55B active), **GLM-5.3** (~744B / 40B active), **GLM-5.3-Flash** (~320B / 18B active) and **Qwen4-35B-A3B** (~35B backbone + ~20.5B PLE / ~3–3.8B active) need larger RAM *capacity* to stay resident, yet only stream 3B–55B *active* parameters per generated token — unlocking fluent interactive speed on workstations and mid-size GPU nodes.
- **Per-Layer N-gram Embeddings ("Engram" / PLE) and NVMe SSD offloading:** Newer late-2026 architectures such as **Qwen4-35B-A3B** and **DeepSeek-V4.1-Flash** decouple large static pattern lookup tables (~20.5B PLE parameters in Qwen4) from the active transformer backbone. Because these lookup rows are fetched lazily rather than streamed across every layer, memory-mapping (`mmap`) the table from a fast NVMe SSD keeps resident VRAM around **21–25 GB** at 4-bit quantization for a ~57B-parameter stored checkpoint.
- **Interactive solo developer vs. multi-user team concurrency:** Unified memory machines (Mac Studio, DGX Spark, Strix Halo) shine for **1–4 concurrent streams** where memory bandwidth per dollar dominates. Above **10–50+ concurrent developers**, continuous batching and PagedAttention in **vLLM** or **SGLang** become compute- and HBM/GDDR7-bound, strongly favouring discrete datacenter/workstation NVIDIA GPUs.

---

## 2. Best open-weight models for air-gapped deployment (late 2026)

Picking the largest checkpoint on Hugging Face without checking its active-parameter count, Engram/PLE offloading layout, context scaling and license terms is the most common local deployment mistake. Below is the late-2026 shortlist (current through December 2026) for enterprise engineering, RAG and agentic harnesses:

| Model family | Total / active params | Max context | Approx. quantized weight footprint | License & enterprise note | Best air-gapped workload & minimum hardware |
| :--- | :--- | :--- | :--- | :--- | :--- |
| **Qwen4-35B-A3B** *(Alibaba, Dec 4, 2026)* | **~35B MoE backbone (~3–3.8B active)** + ~20.5B PLE ("Engram") + ~2B MTP *(~57B stored)* | **1M** *(Gated DeltaNet + QSA)* | **~21–25 GB** resident (`Q4` / `IQ4_XS`) + ~11.5–20 GB Engram on NVMe SSD · **~75 GB** (`FP8`) | **Apache 2.0** *(ungated, zero commercial restrictions)* | **Best workstation & single-GPU multimodal coding agent**: **DeepSWE v1.1 61.8%**, **Terminal-Bench 4.1 21.2%**, **GPQA 86.9%**; day-0 vLLM, SGLang, `llama.cpp`, Ollama & MLX; fits **24 GB RTX 4090/5090** or **32–128 GB Mac Studio / DGX Spark** (`Q4`), or single **80–96 GB GPU** (`FP8`). Use `Qwen3.8-27B` or `Qwen3.5-397B-A17B` (Apache 2.0) where traditional dense/large-MoE weights are preferred |
| **Amazon Ergo** *(Amazon FMR, Dec 1, 2026)* | **1.1T / 55B** MoE *(256 experts, 8 + 1 shared)* | **1M** *(128K out, text-only)* | **~626 GB** (`MXFP4`) · ~1.17 TB (`MXFP8`) · ~2.22 TB (`BF16`) | **Amazon Ergo Open-Weights License** *(free internal & commercial use; separate deal for >$20M-revenue third-party MaaS)* | **#1 U.S. open coding & agent specialist** (**DeepSWE 74.2%**, **FrontierSWE v2 31.5%**, **Terminal-Bench 4.0 46.2%**, **FMR-Bench 65.4%**); day-1 vLLM & SGLang; needs **DGX Station GB300 (748 GB)**, **2× 512 GB Mac Studio M5 Ultra**, or **8× 96 GB GPU server** |
| **DeepSeek-V4 Pro & V4.1-Flash** *(Aug–Oct 2026)* | `V4-Pro`: **~1.6T / ~49B** · `V4.1-Flash`: **~552B backbone (~763B incl. Engram) / ~8B prefill, ~16B decode** | **1M** *(384K out on Pro)* | ~320–420 GB (`V4.1-Flash`) · ~900+ GB (`V4-Pro`) | **MIT License** *(published V4/V4.1 stay MIT; Dec 3, 2026 policy gates future L3 frontier weights)* | Deep algorithmic reasoning & multimodal coding (`V4.1-Flash`); `Flash` fits **512 GB Mac Studio** or **4×–8× RTX PRO 6000**, `Pro` requires multi-GPU racks or **4× 512 GB Mac Studio** |
| **GLM-5.3 & GLM-5.3-Flash** *(Z.ai, Aug 2026)* | `GLM-5.3`: **~744–753B / ~40B** (text) · `Flash`: **~320B / ~18B** (multimodal) | **1M** | ~420–450 GB (`5.3`) · ~180–200 GB (`5.3-Flash`) | `Flash`: **MIT License** · Flagship `5.3`: **Bespoke GLM-5.3 License** *(security review only for >$10B MaaS providers)* | Heavy RL tuning for long-horizon coding & multi-step CLI loops; `Flash` runs smoothly on **256–512 GB Mac Studio** or **4× RTX PRO 6000**, flagship `5.3` on **512 GB–1 TB** / **8× GPU** |
| **Kimi K3.1 Pro & K2.7-Code** *(Jun–Nov 2026)* | `K3.1 Pro`: **2.8T / 104B** (multimodal) · `K2.7-Code`: **1T / 32B** | **1M** (`K3.1 Pro`) · 256K (`K2.7`) | **~1.56 TB** (`K3.1 Pro` `MXFP4`, 96 shards) · ~550–600 GB (`K2.7`) | `K3.1 Pro`: **Custom Kimi K3/K3.1 License** · `K2.7`: **Modified MIT** | Frontier multimodal agent swarms & repository-wide refactoring; `K2.7-Code` fits **2× 512 GB Mac Studio** / **DGX Station GB300**, `K3.1 Pro` needs **4× 512 GB Mac Studio (2 TB)** or multi-node H200/B200 |
| **Muse Spark Open** *(Meta, Oct 2026)* | **816B / 42B** multimodal MoE | Long context | ~450–500 GB (`NVFP4`) | **Muse Model License** *(separate deal for >$20M-revenue MaaS)* | Multimodal + coding; Apple Research benchmarked **36.73 tok/s** across 4× Mac Studio M5 Ultra via TB5 RDMA; fits single 512 GB node at tight context or 2–4× cluster |
| **MiniMax-M3 / M3.1-Flash & M2.7** *(Mar–Jun 2026)* | `M3`/`M3.1-Flash`: **~428B / ~23B** (multimodal) · `M2.7`: **~229B / ~10B** | **1M** (`M3`) · 205K (`M2.7`) | ~240–260 GB (`M3`) · ~130–140 GB (`M2.7`) | **MiniMax Non-Commercial License** *(commercial production requires prior written agreement)* | Strong multimodal and tool-use benchmarks for **research & internal evaluation only** unless commercial licensing is executed |
| **Google Gemma 4** *(Apr–Jun 2026)* | `E2B` · `E4B` · `12B` · **`26B MoE` (~3.8B active)** · **`31B Dense`** | Long context | ~15–20 GB (`26B MoE` / `31B` at 4-bit) | **Apache 2.0** | Lightweight, zero-restriction edge, laptop and single-24 GB-GPU air-gapped baseline |
| **OpenAI `gpt-oss`** | `gpt-oss-120b` (**116.8B / 5.1B**) · `gpt-oss-20b` (**20.9B / 3.6B**) | 128K | ~65 GB (`120b`) · ~12 GB (`20b`) | **Apache 2.0** | Mature single-80/96 GB GPU or 128 GB unified-memory baseline with configurable reasoning effort |

### Procurement & hardware-matching realities

- **Stored checkpoint size vs. resident VRAM (`Qwen4-35B-A3B` Engram offloading):** Do not size `Qwen4-35B-A3B` purely by its ~57B stored parameter count. With `llama.cpp` memory-mapping (`--load-mode mmap --lazy-mode on -ot per_layer_token_embd=CPU`) or vLLM's automatic host/SSD routing for the ~20.5B N-gram table, the active MoE backbone fits comfortably in **24 GB VRAM** at 4-bit while keeping full **1M-token context** viable on NVMe-backed workstations. By contrast, monolithic checkpoints without SSD-offloaded embeddings — such as **Amazon Ergo** (`MXFP4` ~626 GB) and **Kimi K3.1 Pro** (~1.56 TB) — still require multi-GPU servers or clustered high-memory nodes.
- **Four-tier license hygiene before mirroring weights into an air gap:**
  1. **Zero-friction OSI (Apache 2.0 / MIT):** `Qwen4-35B-A3B`, `Qwen3.8`, `Gemma 4`, `gpt-oss`, `GLM-5.3-Flash` and published `DeepSeek-V4`/`V4.1` checkpoints carry no revenue caps or commercial approvals.
  2. **Enterprise-friendly with high-revenue MaaS clauses:** `Amazon Ergo` (>$20M MaaS), `Muse Spark Open` (>$20M MaaS) and `GLM-5.3` flagship (>$10B MaaS security review) allow free internal air-gapped deployment and fine-tuning; legal only needs to review if you sell multi-tenant hosted APIs.
  3. **Custom or non-commercial restrictions:** **MiniMax-M2.7 / M3 / M3.1-Flash** carry a **Non-Commercial License** requiring prior written authorisation for commercial deployment — flag them out of commercial production pipelines unless licensed. Review custom terms on **Kimi K3.1 Pro** before redistributing derivatives.
  4. **Future supply-chain continuity:** DeepSeek's 3 December 2026 *AI Systemic Risk Management Policy* leaves existing V4/V4.1 weights under MIT, but notes that future L3 frontier releases may be gated behind safety reviews rather than automatic public weight drops.

---

## 3. Hardware shootout: cost-effective vs. high-performance setups

*Note: All hardware figures below reflect indicative late-2026 third-party hardware MSRP/street ranges for architecture sizing — not Gigantic Work consulting fees.*

| Platform archetype | Memory capacity & bandwidth | Indicative hardware cost (late 2026) | Interconnect & ecosystem | Observed performance & sweet spot |
| :--- | :--- | :--- | :--- | :--- |
| **AMD Strix Halo** *(Ryzen AI Max+ 395, 128 GB)* | **128 GB** LPDDR5X-8000 · **~256 GB/s** | ~$3,450–$4,000 | x86 Linux/Windows; ROCm / Vulkan / `llama.cpp` | ~45–53 tok/s (8B) and ~31–34 tok/s (120B MoE); lowest-cost 128 GB x86 box, though ROCm trails CUDA on day-0 MoE kernels |
| **NVIDIA DGX Spark** *(GB10 Superchip)* | **128 GB** unified LPDDR5X · **273 GB/s** | ~$4,699 MSRP *(higher street under tight stock)* | **200 Gb/s ConnectX-7**; native **CUDA, vLLM, SGLang, TensorRT-LLM**, DGX OS | Native Blackwell FP4/NVFP4 prefill acceleration (~38–80 tok/s on 120B MoE); clusters to 256–512 GB via ConnectX-7; best entry **CUDA prototyping & LoRA box** |
| **Apple Mac Studio (Single)** *(M5 Max / M5 Ultra)* | **128 GB** (~614 GB/s) to **512 GB** (**1.2 TB/s**) | ~$3,500+ (`M5 Max`) · ~$5,500–$18,300+ (`M5 Ultra 96–512 GB`) | Apple Silicon; **MLX**, `llama.cpp`; ~100–200W silent draw; **no CUDA** | **Highest capacity + decode bandwidth per dollar for 1–4 users**; M5 Neural Accelerators cut TTFT up to 4.6× vs. M3 Ultra; ideal for `Qwen4-35B-A3B`, `GLM-5.3-Flash` or `DeepSeek-V4.1-Flash` |
| **Mac Studio Cluster (2×–4× M5 Ultra)** | **1 TB – 2 TB** pooled unified memory · **1.2 TB/s per node** | ~$36,600 (2× 512 GB) to ~$73,200+ (4× 512 GB) | **RDMA over Thunderbolt 5** (`rdma_ctl enable`) + full-mesh TB5 + **MLX 0.30+ JACCL** / `exo` | **36.73 tok/s** on 816B/42B *Muse Spark Open* (`4×`); **2× 512 GB** hosts **Amazon Ergo MXFP4 (~626 GB)** quietly, and **4× 512 GB (2 TB)** can even hold **Kimi K3.1 Pro (~1.56 TB)**; weak at 20+ concurrent users or full RL post-training |
| **NVIDIA RTX PRO 6000 Blackwell** *(1×, 4× or 8× 96 GB PCIe)* | **96 GB ECC GDDR7** per GPU (**1.79 TB/s**); **384 GB** (`4×`) / **768 GB** (`8×`) | ~$8,500–$9,500/card *(~$45k–$95k+ built 4×/8× server)* | PCIe Gen5 *(no NVLink)*; full **CUDA, vLLM, SGLang, FP4/FP8 Tensor Cores** | **Best multi-user enterprise perf/dollar**; `1×` runs **Qwen4-35B-A3B (`FP8`)**, `4×` fits `GLM-5.3-Flash` / `DeepSeek-V4.1-Flash`, `8×` fits **Amazon Ergo MXFP4** + large batched KV cache for 20–100+ developers; requires PCIe/NUMA topology tuning for TP=4/8 |
| **NVIDIA DGX Station GB300** *(Deskside Superchip)* | **748 GB coherent** (HBM3e + LPDDR5X) · **~7.1 TB/s HBM3e** | ~$92,500–$99,000+ | Dedicated 20A (~1,600W) circuit; **MIG (up to 7 isolated slices)**; full NVIDIA AI Enterprise | **~35–60 tok/s** on 500B–1.1T models (`Amazon Ergo MXFP4`, `GLM-5.3`, `Kimi K2.7-Code`) + **local LoRA/RL post-training** (matching Moderna's on-prem workflow) |
| **8× H200 / B200 Datacenter Node** | **1.1 TB – 1.4 TB+ HBM3e** · NVLink fabric | ~$250k–$450k+ rack node | 900 GB/s+ NVLink/NVSwitch; InfiniBand/RoCE | Full `MXFP8` / `BF16` **Amazon Ergo**, **DeepSeek-V4-Pro** & multi-node **Kimi K3.1 Pro** serving at high concurrency (100–500+ users) plus heavy post-training |

### Deep dive: RDMA over Thunderbolt 5 on Mac Studio clusters

Before late 2026, clustering Macs over Thunderbolt or 10GbE IP suffered ~300 µs TCP/IP socket overhead, forcing teams into slow pipeline parallelism where GPUs sat idle waiting on activations. Apple's **RDMA over Thunderbolt 5** driver (enabled via macOS Recovery `rdma_ctl enable`) combined with a multi-cable full mesh and **MLX 0.30+ (`mlx.distributed` / JACCL)** slashes inter-node latency to **single-digit microseconds** — making fine-grained **tensor parallelism** (160+ collective exchanges per layer) fast enough for production use.

That unlocks a compelling niche: **two 512 GB Mac Studio M5 Ultras (1 TB pooled memory, <400W combined power, silent under a lab bench)** can hold **Amazon Ergo MXFP4 (~626 GB)** with over 350 GB of KV headroom at less than half the hardware cost of a DGX Station GB300 — provided your team only needs 1–4 concurrent interactive streams and accepts MLX instead of CUDA/vLLM.

### Workload-to-hardware selection matrix

| Team & workload profile | Recommended hardware | Primary model(s) | Serving engine |
| :--- | :--- | :--- | :--- |
| **Solo developer / air-gapped field workstation** | **24 GB RTX 4090/5090**, **Mac Studio M5 Max (128 GB)** or **NVIDIA DGX Spark (128 GB)** *(CUDA required)* | `Qwen4-35B-A3B`, `Gemma 4 26B/31B`, `gpt-oss-120b` | `llama.cpp` / MLX *(Mac/GPU)* · vLLM *(Spark)* |
| **Small lab / 2–5 researchers running massive models quietly** | `1×` **Mac Studio M5 Ultra (512 GB)** *(or `2×`–`4×` TB5 RDMA for 1–2 TB)* | `GLM-5.3-Flash`, `DeepSeek-V4.1-Flash`, `Amazon Ergo MXFP4` (`2×`), `Kimi K3.1 Pro` (`4×`) | MLX (`mlx.distributed` / JACCL) |
| **15–80 engineers / university department coding-agent gateway** | **4× or 8× NVIDIA RTX PRO 6000 Blackwell** 4U server (384–768 GB ECC) | `Qwen4-35B-A3B` (`FP8` on `1×`), `GLM-5.3-Flash` (`4×`), `Amazon Ergo MXFP4` (`8×`) | **vLLM** or **SGLang** (`--enable-prefix-caching`, FP8 KV) |
| **Regulated biotech / R&D post-training + inference** *(Moderna pattern)* | **NVIDIA DGX Station GB300 (748 GB)** or **8× H200 / B200 rack** | `Amazon Ergo`, `GLM-5.3`, `DeepSeek-V4-Pro`, `Kimi K3.1 Pro` + domain fine-tuning | vLLM / SGLang + NeMo / PyTorch FSDP |

### Break-even economics checklist

Before buying hardware solely to save money, run a 36-month total cost of ownership (TCO) check against managed zero-retention cloud endpoints (for comparison, Amazon Bedrock prices Amazon Ergo around $1/M input [$0.03/M cached] and $3/M output tokens):

1. **Compute true annualised CapEx + OpEx:** `(Hardware + Redundant Storage + Networking) / 3 years` + `(kW × PUE × 8,760h × industrial electricity rate)` + `SRE/MLOps fraction` + `rack cooling`.
2. **Measure sustained token volume, not peak bursts:** An 8× RTX PRO 6000 server sitting at 8% average utilisation costs *more* per token than a zero-retention cloud endpoint; at **>35–50% sustained workday utilisation** across dozens of coding-agent loops (where prompts repeatedly hit 100K+ context), local depreciation + electricity wins sharply.
3. **Price data sovereignty separately:** In clinical biotech, defence or restricted university grants, avoiding IP leakage is a **hard binary requirement** — hardware economics then decides *which* local tier fits best, not *whether* to stay local.

---

## 4. Zero-egress air-gapped deployment playbook (5 phases)

A local server still connected to the public internet with `pip install`, Hugging Face Hub downloads and default CLI telemetry is **not** air-gapped. Production isolation enforces a strict **two-zone transfer boundary**:

```text
CONNECTED STAGING ZONE                     AIR-GAPPED ENCLAVE (ZERO EGRESS)
─────────────────────────                  ────────────────────────────────────
1. Pull Safetensors only                   4. Verify SHA-256 BoM bit-for-bit
   (no .bin / pickle)                      5. Load OCI images into private registry
2. Pin vLLM / SGLang OCI     ══ One-Way ══►6. Serve via vLLM / SGLang / MLX
   image + offline wheels       Diode /       (HF_HUB_OFFLINE=1, zero DNS egress)
3. Sign SHA-256 BoM             Media      7. Internal OpenAI gateway (mTLS + SSO)
                                              ──► Coding agents + immutable SIEM logs
```

### Phase 1: Connected staging & artifact harvesting

1. **Enforce a Safetensors-only policy:** Reject legacy PyTorch `.bin` / pickle checkpoints outright (`safetensors` prevents arbitrary code execution during weight deserialisation). Audit any model requiring `trust_remote_code=True` line by line before mirroring.
2. **Collect a complete matched snapshot:** Download all `*.safetensors` shards together with `config.json`, `generation_config.json`, `tokenizer.json`, `tokenizer_config.json` and `special_tokens_map.json`.
3. **Generate a cryptographic Bill of Materials (BoM):** Compute `sha256sum` across every weight shard, config file, container tarball and offline Python wheel.
4. **Export pinned container images:** Never use `:latest` in an enclave; pin exact digest tags and export via `docker save`:

```bash
docker pull vllm/vllm-openai:v0.12.0
docker save vllm/vllm-openai:v0.12.0 -o vllm-v0.12.0.tar
sha256sum vllm-v0.12.0.tar /staging/models/amazon-ergo-mxfp4/* > enclave-bom.sha256
```

### Phase 2: Cross-gap transfer & destination verification

Move the artifact bundle across a one-way data diode, hardware-enforced transfer station or write-once media. On the air-gapped destination host, verify every byte **before** loading any container or mounting weights:

```bash
sha256sum -c enclave-bom.sha256 || { echo "CHECKSUM MISMATCH — ABORT"; exit 1; }
docker load -i vllm-v0.12.0.tar
```

Mount the weight directory **read-only** (`ro`) into the inference container so a compromised process cannot tamper with model files.

### Phase 3: Hardened offline runtime lockdown

Lock every Hugging Face and serving library environment variable into absolute offline mode and disable all usage telemetry:

```bash
export HF_HUB_OFFLINE=1
export TRANSFORMERS_OFFLINE=1
export HF_DATASETS_OFFLINE=1
export VLLM_NO_USAGE_STATS=1
export SGLANG_NO_USAGE_STATS=1
export DO_NOT_TRACK=1
```

**Production NVIDIA multi-GPU launch (vLLM pointing strictly to local mount path, never a repo ID):**

```bash
vllm serve /mnt/airgapped-models/amazon-ergo-mxfp4 \
  --served-model-name enterprise-ergo \
  --tensor-parallel-size 8 \
  --enable-prefix-caching \
  --kv-cache-dtype fp8 \
  --max-model-len 262144 \
  --host 127.0.0.1 --port 8000
```

*(For SGLang, pass `--model-path /mnt/airgapped-models/amazon-ergo-mxfp4 --tp 8` against the same offline environment variables.)*

**Apple Silicon Mac Studio cluster launch (Thunderbolt 5 RDMA + MLX JACCL):**

After booting each node once into macOS Recovery to enable RDMA (`rdma_ctl enable`), wiring the full-mesh Thunderbolt 5 links and validating the hostfile topology:

```bash
mlx.launch --backend jaccl --hostfile /etc/mlx/hosts.json \
  python3 -m mlx_lm.server \
    --model /Volumes/EnclaveModels/GLM-5.3-Flash-4bit \
    --host 127.0.0.1 --port 8000
```

**Single-GPU / workstation NVMe Engram-offload launch (`Qwen4-35B-A3B` via `llama.cpp`):**

```bash
./llama-server \
  -m /mnt/airgapped-models/qwen4-35b-a3b-iq4xs.gguf \
  --load-mode mmap \
  --lazy-mode on \
  -ot per_layer_token_embd=CPU \
  --host 127.0.0.1 --port 8000
```

### Phase 4: Network isolation, egress audit & agent harness wiring

1. **Zero-egress proof before handover:** Place inference hosts on an air-gapped VLAN with no default gateway (or blackhole egress firewall rules). Run `tcpdump -ni any port 53 or tcp[tcpflags] & tcp-syn != 0` during a cold container boot and confirm **zero outbound DNS or SYN packets** fire — and confirm container logs contain zero `"connection refused"` or `"telemetry timeout"` retries.
2. **Internal OpenAI-compatible gateway:** Never bind inference engines directly to `0.0.0.0` unauthenticated. Terminate internal traffic through an API gateway (e.g., an internal reverse proxy or LiteLLM/vLLM router) enforcing **mTLS** (aligned with [Post-Quantum SSH and Git Infrastructure](https://gigantic.work/engineering/post-quantum-ssh-and-git-hardening/)), **SAML 2.0 / OIDC SSO** per-user quotas, prompt/token audit logging to an append-only SIEM and zero external fallback providers.
3. **Wire coding agent harnesses safely:** Configure developer harnesses (Claude Code via Anthropic-compatible local proxy adapters, OpenCode, Aider or Google Antigravity SDK) to point solely at `https://llm.internal.enclave/v1`, with all client-side crash reporting and analytics flags disabled.

### Phase 5: Day-2 operations & common pitfalls

- **KV-cache OOM under 1M-context agents:** Long-horizon coding agents push context windows fast. Reserve explicit GPU memory headroom (`--gpu-memory-utilization 0.90`), enable `--enable-prefix-caching` so multi-turn system prompts and repo trees reuse KV blocks without recomputing prefill, and cap `--max-model-len` to what your VRAM math genuinely supports.
- **Physical power & thermal reality:** Four Mac Studios pull ~400–800W on a standard office circuit; a single **DGX Station GB300** pulls up to **~1,600W** and requires a dedicated **20A circuit**; an **8× RTX PRO 6000** or **8× H200** server needs rack-grade cooling and acoustic isolation outside open offices.
- **Offline patch cadence:** Schedule quarterly (or urgent CVE) staging runs through Phases 1–2 so air-gapped nodes do not drift onto unpatched container kernels or stale model checkpoints.

---

*Related engineering notes:* [Enterprise Coding Agents: Harness Discipline, pstack and Formal Verification (TDD, TLA+ & Lean 4)](https://gigantic.work/engineering/enterprise-coding-agents-formal-verification/), [Post-Quantum SSH and Git Infrastructure: Engineering Around NSA PP-26-4956](https://gigantic.work/engineering/post-quantum-ssh-and-git-hardening/), and [Scaling Managed Agents: Brains, Hands and Sessions](https://gigantic.work/engineering/scaling-managed-agents-orchestration/).

---

Published by Gigantic Work, an IT vendor with a team in London and Hong Kong, building AI, learning platforms, web platforms, research portals, cloud and 3D/VR projects for universities, grant-funded projects, NGOs, schools and SMEs. Contact: info@gigantic.work · https://gigantic.work/contact/ · Site overview: https://gigantic.work/llms.txt
