Multi-Model GPU Serving: Capacity Planning When Models Share a Fleet
As enterprise AI applications mature, production architectures rarely rely on a single generative model. A real-world enterprise copilot stack typically orchestrates a composite pipeline: an embedding model for vector retrieval (e.g. BGE-Large), a cross-encoder for re-ranking, a high-parameter generative model for complex reasoning (e.g. Llama-3 70B), a lightweight draft model for speculative decoding (e.g. Llama-3 8B), and specialized classification or guardrail models. Dedicating a separate, isolated GPU server to each individual model results in massive infrastructure sprawl, stranded compute, and astronomical cloud invoices. To maximize operational efficiency, platform engineers must implement multi-model GPU serving—co-locating heterogeneous models across a shared fleet of GPUs. However, sharing GPU capacity introduces severe risks: out-of-memory (OOM) crashes, memory bus contention, and tail-latency degradation. On OneSource Cloud dedicated bare-metal infrastructure, mastering multi-model capacity planning transforms fragmented compute into a high-density, cost-optimized serving engine.
Quick Answer: Multi-Model GPU Capacity Planning
Multi-model GPU serving co-locates multiple machine learning models across a shared GPU fleet to eliminate stranded capacity. Successful capacity planning requires strict VRAM bin-packing: summing static model weight footprints, peak dynamic KV cache allocations, CUDA context overhead, and runtime headroom. When models exhibit divergent latency SLOs, hardware partitioning via NVIDIA Multi-Instance GPU (MIG) guarantees physical isolation, while Multi-Process Service (MPS) or Multi-LoRA continuous batching maximizes throughput for homogeneous workloads.
The Mathematical VRAM Capacity Bin-Packing Formula
The primary constraint in multi-model GPU colocation is High Bandwidth Memory (HBM). Running out of VRAM causes immediate CUDA out-of-memory exceptions, terminating container processes and dropping in-flight user requests. To safely pack $M$ distinct models onto a shared GPU or node pool, the total available memory must satisfy the following inequality:
$$\text{VRAM}_{\text{total}} \times \eta_{\text{limit}} \ge \sum_{i=1}^{M} \left( \text{VRAM}_{\text{weights}, i} + \text{VRAM}_{\text{cuda\_ctx}, i} \right) + \sum_{j \in \text{LLMs}} \left( \text{KV}_{\text{peak}, j} \right) + \text{VRAM}_{\text{buffer}}$$
Where:
- $\text{VRAM}_{\text{weights}, i}$: The static parameter footprint of model $i$: $\text{Parameters} \times \text{Bytes per parameter}$ (e.g. 16 GB for an 8B model in FP16/BF16, or 8 GB in FP8).
- $\text{VRAM}_{\text{cuda\_ctx}, i}$: Fixed runtime CUDA driver and PyTorch context overhead (typically 1.2 GB to 2.0 GB per model process).
- $\text{KV}_{\text{peak}, j}$: Dynamic Key-Value cache allocation for generative model $j$: $2 \times n_{\text{layers}} \times n_{\text{heads}} \times d_{\text{head}} \times b \times L_{\text{max\_seq}} \times B_{\text{max\_batch}}$.
- $\text{VRAM}_{\text{buffer}}$: Safety margin (minimum 10% to 15%) to prevent memory fragmentation crashes during peak traffic bursts.
- $\eta_{\text{limit}}$: Maximum target utilization factor (typically set to 0.90 to 0.92 in vLLM or Triton).
| Model Co-Location Profile | Role in Pipeline | Static Weight Footprint | Dynamic Runtime Headroom | Hardware Partition Method |
|---|---|---|---|---|
| BAAI/bge-m3 (Embeddings) | Dense Vector Retrieval | 2.2 GB (FP16) | 1.5 GB (Batch Activation) | Shared GPU / NVIDIA MIG (1g.10gb) |
| bge-reranker-large | Cross-Encoder Scoring | 2.4 GB (FP16) | 2.0 GB (Peak Batch Attention) | Shared GPU / NVIDIA MIG (1g.10gb) |
| Llama-3.1-8B-Instruct | Guardrails & Routing | 16.0 GB (BF16) / 8.5 GB (FP8) | 8.0 GB (KV Cache Concurrency) | Shared GPU / NVIDIA MPS |
| Llama-3.1-70B-Instruct | Core Reasoning Engine | 140.0 GB (BF16) / 72 GB (FP8) | 40.0 GB (Production KV Pool) | Dedicated 4-GPU / 8-GPU Tensor Slice |
Hardware Isolation: NVIDIA MIG vs MPS vs Multi-LoRA
When multiple models share physical silicon, platform engineers choose between three isolation architectures depending on their latency sensitivity and architectural similarity:
- NVIDIA Multi-Instance GPU (MIG): Physically partitions a single H100 or A100 into up to seven independent GPU instances, each with dedicated streaming multiprocessors (SMs), memory controllers, and isolated memory channels. MIG provides complete hardware isolation: one model running out of memory cannot crash another model. However, MIG slice sizes are rigid (e.g. 10GB, 20GB, 40GB slices) and do not support dynamic memory sharing.
- NVIDIA Multi-Process Service (MPS): Enables multiple CUDA processes to share streaming multiprocessors and a single unified memory address space dynamically. MPS minimizes compute stranding by allowing high-throughput embedding models to interleave compute with low-traffic classifiers. However, MPS lacks hard memory isolation: an unexpected allocation burst in Model A can trigger an OOM exception that halts Model B.
- Multi-LoRA Serving (vLLM / S-LoRA): For architectures using task-specific fine-tuned models, Multi-LoRA is the most efficient pattern. A single foundation model base weight (e.g. Llama-3 70B) is loaded into VRAM once. Multiple Low-Rank Adaptation (LoRA) adapter matrices (typically 50MB to 200MB each) are dynamically loaded into high-speed memory and swapped at request time, allowing dozens of specialized models to serve from a single model footprint.
Dynamic Triton Multi-Model Repository Configuration
Triton Inference Server is the enterprise standard for co-locating heterogeneous framework runtimes (TensorRT-LLM, ONNX, PyTorch) on a shared GPU node. The model configuration file defines execution concurrency and GPU device placement:
# sample config.pbtxt for co-located embedding model on Triton
name: "bge_embedding_ensemble"
platform: "onnxruntime_onnx"
max_batch_size: 64
dynamic_batching {
max_queue_delay_microseconds: 5000
}
instance_group [
{
count: 2
kind: KIND_GPU
gpus: [ 0 ] # Pinned to GPU 0 alongside guardrail model
}
]
To support dynamic model swapping without blocking production traffic, configure local NVMe-oF scratch drives. Hydrating an 8B parameter model from local Gen5 NVMe storage into GPU HBM takes under 2.5 seconds, compared to over 45 seconds when streaming across virtualized network storage.
High-Density Bare-Metal Economics on OneSource Cloud
In multi-tenant public cloud environments, noisy neighbors on shared host PCIe buses create uncontrollable memory bandwidth jitter, making multi-model colocation dangerous. OneSource Cloud provides single-tenant bare-metal GPU servers with massive memory configurations (up to 8x 141GB H200 nodes) and direct PCIe Gen5 interconnects. With flat-rate monthly billing and unthrottled local NVMe storage, OneSource Cloud enables enterprise teams to maximize multi-model packing density with absolute operational stability.
FAQ
What is the recommended memory headroom when packing multiple models on one GPU?
Infrastructure teams should maintain a minimum of 10% to 15% unallocated VRAM headroom on any GPU hosting shared models under NVIDIA MPS. This buffer absorbs temporary activation spikes, variable KV cache allocations during long-context generation, and PyTorch memory fragmentation without triggering fatal out-of-memory crashes.
Can NVIDIA MIG be reconfigured on the fly without rebooting the server?
Yes. MIG instances can be created and destroyed dynamically using the nvidia-smi mig CLI or Kubernetes GPU operator without rebooting the host machine. However, reconfiguring MIG slices requires draining and terminating all active containers running on that physical GPU before applying the new partition profile.
How does Multi-LoRA serving compare to deploying separate fine-tuned models?
Deploying ten separate 70B fine-tuned models requires ten 8x GPU nodes (80 GPUs total). Deploying one 70B base model with ten dynamically served LoRA adapters requires only a single 8x GPU node (8 GPUs total), delivering a 90% reduction in hardware expenditure with virtually zero degradation in inference latency.