AI System Design

Deploy an On-Prem LLM

Step 1 / 9

Learn AI system design by deploying a large language model inside a customer’s own environment — the constraint a forward deployed engineer meets when a regulated customer won’t send data to a…

The numbers to beatfixed VRAMnot elasticINT4 / INT8quantize to fitvalidateon their box

In the interview room

How you’d open this design in an interview

Before any boxes: agree what it must do, pin the qualities that shape everything, then build — naming each trade-off as you make it. The walkthrough above is that exact order.

Functional requirements

What it must do — agree on these before drawing a single box.

  • Serve in-environment: the customer’s apps call an Inference Gateway inside their network — no byte leaves.
  • Right-size: pick a model and precision (quantization) that fit the VRAM they actually own.
  • Serve efficiently: continuous batching + a KV cache keep limited GPUs busy for usable throughput.
  • No egress: block all outbound calls — offline licensing, no telemetry beacons, no URL fetches.
  • Update + observe offline: import signed update bundles, and keep telemetry on a dashboard the customer owns.

Non-functional requirements

The qualities that shape the whole design — each one names the mechanism that buys it.

The customer’s data never leaves their walls
Move the model to the data — an Inference Gateway and server run inside their environment loading local weights; the endpoint just changes location.
The model actually loads on fixed hardware
Right-sizing — a smaller and/or quantized (INT8/INT4) model that fits VRAM with KV headroom, latency validated on their own box.
Usable throughput without adding machines
Continuous batching packs concurrent requests through the GPU pool and a paged KV cache makes each token cheap.
Nothing can call home
A no-egress boundary denies outbound traffic, licensing and config are offline, and any URL-fetching tool is disabled — and it’s verified.
Ship CVE fixes into a locked-down box
Offline updates as signed, verifiable bundles the customer imports on their schedule, with a clean rollback — no auto-updater.
Operate it without flying blind or exfiltrating
Local telemetry stays in-environment on a customer-owned dashboard; they export and share only what they choose.

The trade-offs you say out loud

Senior signal isn’t the boxes — it’s naming what you gave up and why it was the right price.

Move the model to the dataover a hosted cloud endpoint

A regulated customer’s data can’t reach a public API — compliance, contracts, sometimes law forbid it. Running the model inside their walls keeps every prompt and output local, turning a hard "no" into a deal.

Right-size to their hardwareover deploying the largest, highest-quality model

The biggest full-precision model won’t fit fixed, modest VRAM — it fails to load or OOMs on a long prompt, and on-prem you can’t just provision a bigger GPU. Fit first (model + quantization), maximize quality inside that envelope.

Raise utilizationover brute-forcing throughput with more machines

On modest, fixed hardware you can’t add boxes. Continuous batching and a paged KV cache serve many users at once from the same GPU pool — utilization is the only lever left.

Zero egressover encrypting outbound telemetry

Encryption protects data in transit, but the requirement is that data doesn’t leave at all. An encrypted beacon still exfiltrates prompts to a third party — a compliance failure regardless of TLS. No outbound call, period.

Signed import bundlesover an auto-updater that phones home

No egress cuts both ways — you can’t push. Hand over signed, verifiable bundles the customer imports and can roll back; trust comes from the signature, not a live channel to you.

What this teaches

Learn AI system design by deploying a large language model inside a customer’s own environment — the constraint a forward deployed engineer meets when a regulated customer won’t send data to a public API. An interactive guide covering right-sizing the model to the hardware they actually have, serving it efficiently on limited GPUs, running with no network egress (air-gapped, no phone-home), shipping model and security updates into a locked-down environment, and getting observability out without exfiltrating customer data.

Key takeaways

  • When data can’t leave, move the model to the data — deploy inside the customer’s walls.
  • Right-size the model and precision to the fixed hardware they actually own; fit first.
  • Serve with continuous batching + a KV cache to use limited GPUs well — utilization, not more boxes.
  • Enforce no egress: offline licensing, no beacons, no URL fetches — and prove it.
  • Ship updates as signed bundles the customer imports and can roll back — no auto-update.
  • Keep telemetry local on a dashboard they own; share only by explicit export.

Concepts covered

  • Why deploy in the customer’s walls?
  • Run the model where the data is
  • Right-size to their hardware
  • Serve efficiently on limited GPUs
  • No egress / air-gap
  • Updates in a locked-down env
  • Local observability

Deploy an LLM in a Customer’s Environment — read the full walkthrough as text

the same steps, decisions & trade-offs, for reading, reference & search

The big idea

Why deploy in the customer’s walls?

A regulated customer — a bank, a hospital, a defense contractor — wants your AI product, but their data cannot leave their environment to hit a public API. Compliance, contracts, and sometimes law forbid it. A hosted endpoint, however good, is a non-starter for them.

Bring the model to the data: deploy the LLM inside the customer’s own environment (their VPC, their data center, or fully air-gapped). Right-size it to their hardware, serve it efficiently, run it with no network egress, and patch and observe it without anything leaving. It’s the deployment shape that turns a hard "no" into a signed deal.

How to read this: We add one piece at a time, problem then fix, and the diagram grows. Hit Begin.

Step 1 · The skeleton

Run the model where the data is

The naive plan is your cloud endpoint — but the customer’s data can’t reach it. So the request path itself has to move: their apps must call a model that lives inside their network, not across the internet.

Stand up an Inference Gateway and Inference Server inside the customer’s environment, loading local Model Weights. To the customer’s apps it looks like the same API — but every byte of prompt and response stays in their walls.

Move the model to the data, not the data to the model: When data can’t travel, compute has to. The endpoint the app calls is identical; only its location changes — which is exactly what unblocks the regulated customer.

Step 2 · Make it fit

Right-size to their hardware

In the cloud you pick the GPU. On-prem, the customer already owns fixed, often modest hardware — and you can’t add more on demand. Ship the biggest full-precision model and it won’t load, or OOMs on the first long prompt.

Design decision: The customer has two mid-range GPUs with fixed VRAM. How do you choose what to deploy?

The call: Pick a model and precision (e.g. INT4/INT8 quantization) that fit their VRAM at acceptable latency. — Right-sizing is the on-prem skill: choose a model whose weights, quantized as needed, fit their VRAM with room for the KV cache, and validate latency on their actual hardware. Fit first, then maximize quality within that envelope.

Add a Right-Sizing step: pick the model and precision that fit the customer’s VRAM — a smaller and/or quantized (INT8/INT4) model — leaving headroom for the KV cache, and validate latency on their hardware before you commit.

Fit the hardware first, then maximize quality: On-prem the GPU budget is fixed and unexpandable. Model size and quantization are the dials you turn to fit it; quality is maximized inside that envelope, not above it.

Step 3 · Keep the GPUs busy

Serve efficiently on limited GPUs

A right-sized model that answers one request at a time wastes the very GPUs you fought to fit it on. On modest hardware you can’t brute-force throughput with more machines — you have to use what’s there well.

Serve through a runtime built for it: continuous batching packs concurrent requests through the GPU Pool, and a KV cache (with paged attention) makes each token cheap. You get usable throughput and latency from fixed hardware instead of one-at-a-time serving.

Utilization is the lever when you can’t add hardware: In the cloud you scale out; on-prem you scale up utilization. Continuous batching and a KV cache are how a fixed GPU pool serves many users at once.

Step 4 · Nothing leaves

No egress / air-gap

Everything so far runs locally — but a single outbound call breaks the promise. A telemetry beacon, an online license check, or a model tool that fetches a URL can carry prompts and outputs out of the customer’s environment. The requirement isn’t "encrypted egress" — it’s no egress.

Design decision: The customer requires that data never leave their network. What must the deployment guarantee?

The call: No outbound network calls at all — offline licensing, no telemetry beacon, no URL-fetching tools. — The guarantee is zero egress: block outbound traffic at the boundary, make licensing and config fully offline, and disable any model tool that can fetch a URL. If nothing can call out, nothing can leak — which is the exact requirement that justified running on-prem.

Enforce a No-Egress Boundary: deny outbound traffic, make licensing and configuration fully offline, and disable any tool or feature that can fetch a URL. Verify it — a locked-down customer will test that the box truly can’t call home.

No egress is the deliverable, not a setting: The deployment’s core promise is that data can’t leave. That means zero outbound calls — offline licensing, no beacons, no URL fetches — and proving it, because the customer will check.

Step 5 · Ship fixes without internet

Updates in a locked-down env

A model with no egress also can’t auto-update. But it still needs new model versions and security patches — and CVEs don’t wait. You need a way to get changes in that respects the same no-egress rule you just enforced.

Distribute Offline Updates as signed, verifiable bundles the customer’s Ops team imports on their schedule — weights, runtime, and patches together — with a clear rollback. Signing lets them trust the artifact without trusting a network connection to you.

Updates come in as signed artifacts, not live downloads: No egress cuts both ways: you can’t push, so you hand over signed bundles the customer imports and can roll back. Trust comes from the signature, not from a live channel.

Step 6 · See without exfiltrating

Local observability

You still need to know the deployment is healthy — latency, errors, GPU saturation — but you can’t stream metrics back to yourself without breaking no-egress. Flying blind isn’t acceptable either; a stuck GPU or a bad rollout has to be visible.

Collect Local Telemetry that stays in the customer’s environment on a dashboard they own. When you need to debug, the customer exports and shares exactly what they choose. You get observability; they keep control of every byte that leaves.

Observability the customer controls: Metrics live where the model lives. The customer owns the dashboard and decides what, if anything, is shared back — so you can operate without ever violating no-egress.

You did it

You just deployed an LLM in a customer’s environment.

  • When data can’t leave, move the model to the data — deploy inside the customer’s walls.
  • Right-size the model and precision to the fixed hardware they actually own; fit first.
  • Serve with continuous batching + a KV cache to use limited GPUs well — utilization, not more boxes.
  • Enforce no egress: offline licensing, no beacons, no URL fetches — and prove it.
  • Ship updates as signed bundles the customer imports and can roll back — no auto-update.
  • Keep telemetry local on a dashboard they own; share only by explicit export.
built to run in the customer’s walls, not memorized — right-size, serve, no egress, patch offline, watch locally.
Finished this one? 0 / 61 AI System Designs done

Explore the topic

See this alongside everything else on the same subject — handbooks, system designs, challenges and tools, in one place.

More AI System Designs