Learn how to scale offline local LLMs like Qwen 3.8 using llm-d 1.0 multi GPU orchestration on Kubernetes with prefix caching and prefill disaggregation.

Enterprises are pulling their critical artificial intelligence workloads out of public clouds. Data privacy regulations, unpredictable token pricing, and strict latency service level agreements have made self-hosted, air-gapped language models a board-level priority. Running dense, high-capability models like Alibaba's Qwen 3.8 series inside a private data center is no longer a luxury. It is a core requirement for teams building autonomous agents, processing sensitive internal codebases, and handling confidential customer records.
Deploying a single model server on a single GPU node is straightforward. Scaling that deployment across dozens of multi-GPU nodes without internet connectivity is where most engineering teams hit a wall. Traditional Kubernetes ingress controllers treat language model inference like standard HTTP web traffic. Round-robin load balancers route requests blindly, ignoring whether a target GPU node already holds the prompt's context in its high-bandwidth memory. The result is massive latency spikes, wasted compute power, and crippled throughput.
To address these exact infrastructure bottlenecks, the Cloud Native Computing Foundation sandbox project llm-d, originally backed by Red Hat, Google Cloud, IBM Research, CoreWeave, and NVIDIA, released its 1.0 production milestone. Built specifically as a Kubernetes-native control plane for inference engines like vLLM and SGLang, llm-d 1.0 transforms scattered GPU nodes into a single, high-throughput inference fabric.
In client engineering engagements at Algoramming, we frequently help engineering leaders design private AI clusters that remain fully functional without external network access. In this technical deep dive, we walk through how to execute llm-d 1.0 multi GPU orchestration for Qwen 3.8 in air-gapped environment builds. We examine the underlying architecture, prefix-cache aware routing, prefill and decode disaggregation, hardware topology selection, and real-world deployment patterns.
llm-d 1.0 multi GPU orchestration is an open-source, Kubernetes-native control plane that manages distributed inference engines across multiple graphics processing units in isolated, air-gapped network environments. It coordinates prompt caching, workload placement, and memory management across GPU clusters to maximize request throughput and reduce time-to-first-token without relying on public cloud APIs.
When deploying language models on local hardware, engineering teams quickly run into physical hardware boundaries. A dense model like Qwen 3.8-27B features a native 262,144-token context window. While a single desktop graphics card or server GPU with 24GB of VRAM can load a heavily quantized 4-bit version of a 27B model for single-user testing, it collapses under concurrent production traffic.
Inference memory consumption is split into two distinct pools: static model weights and dynamic key-value (KV) cache memory. Model weights remain constant, but the KV cache grows linearly with every active token and context window length. When multiple background agents or employees submit long queries simultaneously, the KV cache rapidly exhausts available VRAM. When VRAM fills up, the inference engine must either drop incoming connections or swap memory pages to system host RAM, causing latency to jump from milliseconds to tens of seconds.
Single-node inference architectures face three critical failure points under heavy local load:
Standard cloud-native load balancers compound these issues. If an employee submits a 20,000-token internal document to a enterprise assistant, Node A processes the prompt and stores the generated KV cache in its local GPU memory. If the user sends a follow-up question two seconds later and a round-robin Ingress routes that second request to Node B, Node B must re-read and re-process the entire 20,000-token document from scratch.
According to published benchmarks co-authored by Red Hat and industry partners, routing requests without prompt-cache awareness wastes up to 60% of cluster GPU compute on duplicate prefill operations.
When operating completely offline, you cannot simply burst excess traffic to commercial cloud endpoints like OpenAI or Anthropic. Your local cluster is your only execution environment. Optimizing GPU utilization and memory retention across your entire physical fleet is the only way to maintain strict latency service level objectives without buying twice as many accelerator cards as you actually need.
To overcome the limits of single-node inference, the open-source community created llm-d as a dedicated distributed serving layer. Rather than replacing proven inference engines like vLLM or SGLang, llm-d 1.0 sits directly above them as a cluster-level orchestrator. It translates high-level Kubernetes manifests into precise multi-GPU, multi-node execution strategies.
The llm-d 1.0 control plane relies on four foundational Kubernetes custom resources and architectural mechanisms:
In traditional Kubernetes deployments, pods are treated as identical, interchangeable units. Multi-GPU inference requires a strict hierarchical structure. When running tensor parallelism across multiple nodes, one node must act as the primary coordinator (Leader) while other nodes execute parallel matrix multiplications (Workers). The LeaderWorkerSet controller manages this pod group lifecycle as a single atomic unit. If a worker pod experiences a hardware failure, the entire worker group is gracefully drained and rescheduled together, preventing orphaned processes from locking up GPU memory.
llm-d 1.0 introduces the DisaggregatedSet API to separate the computational responsibilities of language model processing. Instead of requiring every node to handle every phase of text generation, the cluster can divide nodes into dedicated prefill pools and decode pools. This structural separation allows infrastructure teams to pair compute-heavy prefill operations with specialized accelerator hardware while assigning memory-bandwidth-bound decode operations to cards with high VRAM capacity.
The Endpoint Picker functions as an intelligent, GPU-aware router placed at the cluster ingress. It maintains an active global index of the KV cache states across every running model instance in the cluster. Before forwarding an incoming API call, the Endpoint Picker inspects the prompt's token IDs, checks its global prefix tree, and sends the request directly to the specific GPU node that already holds the largest matching prefix in its local VRAM.
Through integration with Kubernetes Kueue, llm-d 1.0 schedules multi-pod workloads based on physical network interconnect topology. It ensures that pods executing pipeline or tensor parallelism are placed on physical host nodes sharing high-speed NVLink switches or high-bandwidth InfiniBand subnets, preventing cross-rack network congestion from throttling token generation rates.
By pairing these orchestration tools with an enterprise deployment strategy, organizations can build private GPU clouds that deliver cloud-scale responsiveness. In our work delivering custom software development services, we emphasize building modular infrastructure pipelines that allow clients to adopt frameworks like llm-d without rewriting their underlying application business logic.
In autonomous enterprise workloads, prompts share a substantial portion of their underlying text. Coding agents continually prepend system prompts, repository schemas, and recent git histories to every invocation. Similarly, internal document analysis systems re-send long regulatory manuals alongside user questions. In an unoptimized multi-GPU cluster, each GPU node builds its own local KV cache independently, leading to massive memory duplication.
llm-d 1.0 resolves this inefficiency through precise global prefix-cache aware routing. The Endpoint Picker maintains a lightweight, low-latency radix tree that maps cached token sequences across every active vLLM worker pod in the cluster.
When an API request hits the cluster ingress, the router performs a fast token hash calculation on the incoming prompt prefix. It compares this hash against the global KV cache index to evaluate candidate nodes based on two primary factors:
If Node 3 contains 8,000 matching tokens from an earlier turn of an ongoing conversation, the router directs the new request directly to Node 3. Rather than re-computing attention scores across all 8,000 tokens, Node 3 reuses its local KV cache immediately. It only calculates prefill values for the newly appended user message.
In real-world enterprise trials, Google Cloud integrated the llm-d Endpoint Picker into its GKE Inference Gateway infrastructure. Official published data confirms that implementing prefix-cache aware routing doubled global prefix-cache hit rates from 35% to 70% while cutting time-to-first-token (TTFT) by more than 35% across coding agent workloads. In air-gapped environments where hardware supply is hard-capped, doubling your effective cache hit rate is equivalent to adding 40% more physical GPU capacity without installing a single additional expansion card.
For organizations evaluating private AI infrastructure, managing stateful routing requires careful technical planning across both software and platform layers. Teams often consult our guidance on self-hosting NVIDIA Run:ai for private GPU orchestration to understand how underlying hardware virtualization interacts with high-level routing planes like llm-d.
Language model inference consists of two distinct mathematical phases, each with radically different compute requirements:
When prefill and decode tasks run on the same GPU, compute-intensive prefill requests cause temporary micro-stutters in active decode streams. Users experience this interference as erratic token delivery, where generation pauses mid-sentence while the GPU processes an incoming heavy prompt from another concurrent user.
llm-d 1.0 eliminates this resource contention by disaggregating prefill and decode tasks across dedicated hardware pools. Using the DisaggregatedSet controller, infrastructure administrators split their offline cluster into two specialized tiers:
Configured with maximum compute throughput. These nodes accept raw input prompts, compute initial attention states, and construct the initial KV cache tensor. Once computed, the KV cache state is transmitted across a high-speed network interconnect (such as NVLink or 400Gbps RoCE) directly to the target decode node.
Optimized for high VRAM capacity and memory bandwidth. These nodes receive the pre-calculated KV cache state from the prefill pool and execute continuous token generation without interruption. Because decode nodes never process raw incoming prompt batches, inter-token latency (ITL) remains remarkably consistent regardless of incoming traffic spikes.
When serving Alibaba's Qwen 3.8-27B model, disaggregation provides exceptional operational flexibility. Qwen 3.8 utilizes a sophisticated transformer architecture with native 262K context capabilities. Under heavy multi-turn agent execution, prompt prefill operations for a 100,000-token context window can easily stall decode operations on unified nodes for several seconds. Disaggregating these roles guarantees that interactive chat tools maintain real-time responsiveness even while background data processing agents flood the prefill pool with massive context workloads.
Running llm-d 1.0 offline requires aligning your Kubernetes software configuration with physical host hardware realities. Unlike cloud deployments where uniform GPU instances can be rented on demand, private data center environments often contain a mix of hardware generations acquired over multiple procurement cycles.
High-performance multi-GPU orchestration depends heavily on three physical topology considerations:
When executing tensor parallelism across multiple graphics cards in a single server chassis, cards must exchange activation tensors during every single transformer layer. If GPUs are plugged into consumer motherboards with mismatched PCIe configurations (such as one slot running at PCIe Gen4 x16 and a second operating at PCIe Gen4 x4 via the motherboard chipset), the slower slot bottlenecks the entire inference pipeline. Motherboards must support CPU-level PCIe bifurcation to supply full, unthrottled lane capacity to every installed card.
For multi-node setups where tensor or pipeline parallelism spans separate server chassis, standard Gigabit Ethernet is insufficient. High-speed fabrics like NVIDIA NVLink, AMD Infinity Fabric, or enterprise RDMA over Converged Ethernet (RoCE v2) with 200Gbps to 400Gbps network interface cards are mandatory. Without high-speed RDMA interconnects, cross-node tensor parallelism introduces excessive latency, making pipeline parallelism or disaggregated prefill transfer the only viable multi-node strategies.
One of the most powerful capabilities of llm-d 1.0 is its native support for heterogeneous GPU pools. IBM Research demonstrated that llm-d can route production workloads across mixed clusters comprising NVIDIA H100s, AMD MI300X accelerators, and older NVIDIA A100 cards.
In a heterogeneous offline cluster running Qwen 3.8, administrators can direct high-priority compute tasks to top-tier cards while assigning background batch jobs or simple decode streams to secondary hardware pools.
+---------------------------------------+
| Client / Agent Request |
+---------------------------------------+
|
v
+---------------------------------------+
| llm-d 1.0 Endpoint Picker |
| (Global KV Cache & Load Aware Router)|
+---------------------------------------+
/ \
Prefix Match / \ Cache Miss
v v
+----------------------------------+ +----------------------------------+
| Prefill Node Pool | | Prefill Node Pool |
| (Compute-Bound: H100 / MI300X) | | (Compute-Bound: H100 / MI300X) |
+----------------------------------+ +----------------------------------+
\ /
\ KV Cache Transfer via RDMA /
v v
+-------------------------------------------------------------------------+
| Decode Node Pool |
| (Memory-Bandwidth Bound: High-VRAM Nodes) |
+-------------------------------------------------------------------------+When designing local hardware architecture for AI applications, engineering leaders must balance software requirements against hardware availability. Working with an experienced tech partnership and consultation partner helps prevent costly hardware purchasing errors, ensuring that physical PCIe topologies, power distribution units, and network fabrics match your planned LLM serving layer.
While disaggregation isolates compute workloads, massive long-context models like Qwen 3.8 still push physical memory limits. Alibaba's Qwen 3.8-27B features an architectural design that supports context lengths extending from 262,144 tokens up to 1 million tokens via RoPE scaling. Storing uncompressed floating-point KV tensors for a 262K context window can easily consume over 30GB of VRAM for a single request sequence.
To prevent out-of-memory errors during long-context execution, llm-d 1.0 implements a robust, multi-tier KV cache management hierarchy:
When a user or agent submits a new query to an ongoing session, the llm-d control plane checks the global index, identifies where the session's KV cache is currently stored, and asynchronously pre-loads the cached state back into Tier 1 GPU VRAM before execution begins.
By pairing tiered offloading with FP8 or INT4 KV cache quantization, offline clusters can comfortably host long-horizon agentic workflows without requiring prohibitive amounts of expensive GPU hardware. In enterprise agent evaluation, as detailed in our analysis of enterprise coding agent benchmarks, efficient context retention directly correlates with higher task completion rates in autonomous code generation benchmarks.
In an offline enterprise deployment, a single shared GPU cluster must serve multiple competing internal applications simultaneously. Human developers using interactive coding assistants expect instant, low-latency token generation. At the same time, automated background processes, such as nighttime document indexing or agentic code sweep loops, submit bulk requests that threaten to saturate cluster queue capacity.
Without sophisticated flow control, bulk background processes can monopolize cluster resources, causing interactive chat response times to skyrocket. llm-d 1.0 solves this multi-tenant resource conflict by introducing agent-aware quality of service (QoS) and adaptive flow control policies directly into the serving layer.
The llm-d flow control engine operates across three operational mechanisms:
This multi-tenant control mechanism allows infrastructure teams to maximize GPU utilization. During business hours, the cluster prioritizes human user queries. At night, the system automatically adjusts flow control rules, dedicating 90% of available GPU capacity to asynchronous background rollouts, batch inference, and continuous agent loops.
Setting up an air-gapped llm-d 1.0 cluster for Qwen 3.8 requires careful ordering of container images, model weight mirror configurations, and Kubernetes controllers. The following high-level deployment workflow outlines how our engineering team configures private installations:
Before deploying to an isolated network, container images for the llm-d control plane, LeaderWorkerSet operator, Kueue scheduler, and vLLM backend must be mirrored to an internal private container registry (such as Harbor or GitLab Container Registry). Similarly, Qwen 3.8 model weights, including Qwen3.8-27B safetensors and tokenizer configs, must be pre-downloaded and stored on local high-performance object storage or enterprise NFS volumes.
Deploy the required custom controllers into the target offline Kubernetes cluster:
InferenceModel, DisaggregatedSet, and EndpointPicker configs.Define the worker node pools by instantiating a DisaggregatedSet resource. Specify the vLLM runtime arguments, declaring explicit GPU memory utilization percentages, maximum model context lengths (e.g., setting context length to 262,144 tokens), and tensor parallel sizes matching your server card counts (e.g., tensor-parallel-size=4 for quad-GPU nodes).
Deploy the llm-d Endpoint Picker router behind your internal API gateway. Configure the router to maintain active connection channels with all underlying vLLM leader pods. Enable precise prefix caching, setting the hash cache refresh interval and establishing memory headroom thresholds for dynamic KV offloading.
Run synthetic multi-turn load testing using open-source evaluation tools like Prism. Verify that request routing correctly targets nodes with matching prefix caches, confirm that inter-GPU communication remains within expected bandwidth bounds, and validate that flow control policies successfully insulate interactive queries from concurrent batch background spikes.
When building complex web platforms or modern SaaS offerings backed by private AI backends, establishing clean client-side APIs is essential. Organizations building full-stack AI integrations frequently leverage our web application design and development services to craft resilient frontend applications that seamlessly process streaming server-sent events (SSE) generated by private llm-d clusters.
To understand why llm-d 1.0 has quickly become the preferred standard for distributed local inference, infrastructure architects must compare it against existing orchestration tools like KubeRay or standalone vLLM StatefulSets.
The following table outlines the technical differences across key operational criteria:
| Feature / Capability | Standalone vLLM StatefulSet | KubeRay Cluster Operator | llm-d 1.0 Orchestration Stack |
|---|---|---|---|
| Request Routing Logic | Round-Robin / Least Connections | Ray Head Node / Basic Proxy | Prefix-Cache & Load-Aware Global Routing |
| Prefill / Decode Separation | Manual / Monolithic Node Config | Custom Code Required | Native DisaggregatedSet API Support |
| Multi-Node Pod Management | Unmanaged / Independent Pods | Ray Pod Group Tracking | Atomic LeaderWorkerSet (LWS) Lifecycle |
| Multi-Tier KV Cache Offload | Local Host RAM Swap Only | Manual Object Store Offload | Automated VRAM / RAM / Storage Offloading |
| Heterogeneous GPU Support | Single GPU Model per Set | Complex Custom Scheduling | Native Mixed Vendor & Generation Routing |
| Multi-Tenant QoS & Flow Control | Basic Concurrent Request Limits | Application-Level Scheduling | Agent-Aware SLO & Priority Queuing |
| Air-Gapped Day-2 Operations | Manual Pod Draining | High Operational Overhead | Zero-Downtime Rolling Upgrades |
While standalone vLLM works well for small development environments, it lacks the cluster-wide context awareness required for enterprise production. KubeRay provides strong multi-node task distribution for training and fine-tuning, but introduces unnecessary python runtime overhead when applied strictly to real-time serving. llm-d 1.0 delivers a focused, C++ and Go native control plane designed specifically to solve real-time inference latency and hardware utilization challenges on Kubernetes.
Engineering teams considering architectural rewrites or platform upgrades often work with an experienced technical lead. Many growing companies utilize our fractional CTO services to evaluate complex infrastructure choices like llm-d before committing substantial capital to physical hardware purchases.
Deploying a private, air-gapped LLM orchestration stack with llm-d 1.0 offers complete data sovereignty and zero per-token cloud API costs. However, engineering teams must evaluate the substantial upfront costs, operational complexity, and physical infrastructure demands before proceeding.
Building a high-availability private GPU cluster requires significant financial investment:
Despite its performance benefits, self-hosting llm-d 1.0 is completely unnecessary for many software projects. You should skip private multi-GPU orchestration if:
In client engagements, the single most common pitfall we encounter is miscalculating physical PCIe network interconnect speeds. Engineering teams frequently install secondary GPUs into low-bandwidth PCIe expansion slots connected via consumer chipsets.
When tensor parallelism attempts to synchronize model layers across a slow PCIe x4 link, inter-card transfer latencies destroy generation performance, resulting in token speeds that are slower than a single card running a smaller quantized model. Always verify physical slot layout and bus allocation before acquiring multi-GPU hardware.
For teams building new web products or software platforms from scratch, exploring our guide on how to build a SaaS product provides valuable insights into balancing cloud API convenience against long-term infrastructure ownership costs.
Key takeaways
- llm-d 1.0 transforms fragmented offline GPU clusters into a high-throughput, production-grade serving fabric for models like Qwen 3.8.
- Prefix-cache aware routing doubles prompt-cache hit rates from 35% to 70%, dramatically reducing time-to-first-token in agentic workloads.
- Prefill and decode disaggregation prevents heavy input prompts from stalling active output token generation streams.
- Hardware setup matters: Multi-GPU setups require full PCIe bifurcation, fast network interconnects, and balanced VRAM allocation to avoid severe latency bottlenecks.
- Self-hosting requires scale: Private orchestration makes financial sense for high-volume, air-gapped, or regulated workloads, but managed cloud APIs remain superior for low-concurrency applications.
llm-d 1.0 is a Kubernetes-native orchestration framework that manages multiple distributed vLLM or SGLang instances across a cluster. Plain vLLM manages inference on a single node or fixed group, whereas llm-d adds global prefix-cache routing, disaggregated prefill/decode pools, multi-tenant flow control, and zero-downtime upgrades across full clusters.
llm-d 1.0 runs completely inside local Kubernetes clusters without requiring external cloud telephone calls or telemetry connections. All container images, custom resource definitions, and model weights like Qwen 3.8 can be hosted on local internal enterprise registries and private network storage volumes.
Qwen 3.8, particularly the Qwen 3.8-27B model, features a native 262,144-token context window and exceptional reasoning capabilities for coding and agent tasks. Running its long context across multi-GPU setups using llm-d allows teams to preserve context state across complex multi-turn sessions without exhausting single-card VRAM.
For multi-node tensor parallelism, high-speed interconnects like NVIDIA NVLink, AMD Infinity Fabric, or 200Gbps+ InfiniBand/RoCE network cards are essential. Standard Gigabit Ethernet causes severe latency bottlenecks during cross-node layer synchronization, though pipeline parallelism and disaggregated prefill transfer can operate over standard 100Gbps datacenter networks.
The Endpoint Picker router tracks cached token sequences across every worker pod in the cluster. When an incoming request matches a pre-existing prompt prefix, the router forwards the job to the node holding that context in VRAM. This eliminates redundant compute, cutting time-to-first-token by over 35%.
Yes, llm-d 1.0 natively supports heterogeneous hardware pools. Infrastructure teams can combine different GPU generations, such as NVIDIA H100s, A100s, and AMD MI300X accelerators, within one serving fabric, assigning heavy prefill tasks to faster cards while utilizing older hardware for lighter decode queues.
Prefill nodes handle compute-intensive input prompt processing, generating initial attention matrices. Decode nodes focus on memory-bandwidth-bound autoregressive token generation. Disaggregating these roles prevents large input prompts from creating latency spikes for users actively receiving streaming text.
llm-d includes an agent-aware flow control engine that prioritizes traffic based on configurable service level objectives. Interactive human requests receive high-priority processing to maintain low latency, while automated background batch jobs or coding agent loops are dynamically rate-limited during peak usage periods.
Scaling offline local language models requires bridging the gap between deep machine learning research and hard-nosed cloud-native software engineering. As frameworks like llm-d 1.0 mature, enterprise engineering teams have the tools needed to build private, sovereign AI execution environments that deliver cloud-grade performance inside their own physical firewalls.
From configuring custom Kubernetes controllers and optimizing multi-GPU hardware topologies to designing full-stack web applications that interface with high-throughput inference backends, managing private infrastructure demands focused engineering discipline.
If you are planning an offline AI deployment, evaluating local hardware requirements, or designing a custom software platform backed by private language models, our engineering team is happy to help you talk through your architecture. Explore our services to see how we partner with forward-thinking technical teams to ship resilient, production-ready software solutions.
01 · RelatedLearn how self-hosting NVIDIA Run:ai on private Kubernetes clusters unlocks dynamic fractional GPUs, gang scheduling, and automated workflow efficiency.
Read post
02 · RelatedLearn how pairing Next.js 16 Cache Components, PPR, and vector databases like pgvector and Qdrant powers fast, scalable AI native content management systems.
Read post
03 · RelatedA technical evaluation guide for CTOs and product leaders looking to screen, evaluate, and hire top Flutter, iOS, and Android developers in Bangladesh.
Read postWe will reply in plain English within one business day, NDA on request. Discovery call is free.
We design and engineer software, mobile, and web products end-to-end. Send the brief, we will reply within one business day.
Start a projectWe send a short email whenever we publish a new field note or ship a studio update. No fixed schedule, no filler.
Unsubscribe in one click. We never share your address.