QoS-Efficient Serving of Multiple Mixture-of-Expert LLMs Using Partial Runtime Reconfiguration
TL;DR
This paper introduces a novel serving system for Mixture-of-Expert (MoE) models that allows a single GPU to efficiently host multiple fine-tuned variants simultaneously. By sharing similar "experts" across models and dynamically swapping small "non-expert" layers at runtime, the system achieves an 85% reduction in turnaround time compared to standard hardware partitioning (NVIDIA MIG) while maintaining high output quality.
The Challenge: Multi-Tenant MoE Serving
Large Language Models (LLMs) based on the Mixture-of-Experts (MoE) architecture—like Mixtral or Switch Transformer—are highly computationally efficient because only a fraction of their parameters are active for any given token. However, their massive total parameter count makes them notorious memory hogs, often struggling to fit into standard GPU memory.
The challenge intensifies in "multi-tenant" environments where a provider needs to serve several different fine-tuned versions of the same base model (e.g., one specialized for medical advice, another for coding, and a third for general chat). Currently, providers are forced to choose between two suboptimal paths:
- Time-sharing: Swapping the entire model in and out of memory, which can take up to 2 minutes and destroys real-time responsiveness.
- Space-sharing: Using technologies like NVIDIA’s Multi-Instance GPU (MIG) to physically split the GPU into smaller chunks. This severely limits the compute and PCIe bandwidth available to each individual model.
The authors seek a "middle ground" that allows multiple models to coexist without the massive overhead of full model swaps or the performance penalties of hardware partitioning.
Proposed Solution: Consolidation and Reconfiguration
The researchers propose two primary techniques to optimize multi-model serving on a single GPU:
1. Similarity-Based Expert Consolidation The authors observed a crucial pattern: different fine-tuned versions of the same base model often have experts that remain remarkably similar. By using the L2 distance to measure similarity between experts across models, they create a "unified" expert layout on the GPU. The system loads the most similar experts as shared resources, significantly reducing the total memory footprint.
2. Runtime Partial Reconfiguration While experts can be shared, the "non-expert" layers (like self-attention and layer normalization) are crucial for maintaining the specific, specialized behavior of a fine-tuned model. Fortunately, these layers are relatively small (e.g., about 3GB for Mixtral-8x7B). The system dynamically swaps these non-expert layers on the GPU whenever a request for a different model variant arrives. This "partial" swap is exponentially faster than a full model reload.
The system is managed by an Inference Orchestrator that routes tokens through the shared experts on the GPU or fetches specific experts from the CPU (offloading) if a "miss" occurs in the GPU cache.
Key Insights
- The "Soul" is in the Non-Experts: A key realization is that you don't need to keep the entire fine-tuned model unique to preserve fine-tuned performance. Swapping just the non-expert layers (the "glue" of the transformer) maintains most of the model's specialized quality.
- Expert Redundancy: Fine-tuning often shifts weights only slightly. By identifying and consolidating these near-identical experts, the system can serve four models in the memory footprint of roughly 1.5 models.
- MIG is Suboptimal for MoE: Hardware partitioning (MIG) splits the PCIe bandwidth. Because MoE models are often bottlenecked by moving experts from CPU to GPU, MIG effectively doubles the latency of these transfers compared to the authors' approach, which utilizes the full bandwidth for the active request.
Performance and Results
The authors evaluated their system using Mixtral-8x7B and Google’s Switch Transformer Base-8 across a wide battery of benchmarks, including WikiText2, MT-Bench, MMLU, and TruthfulQA.
- Massive Speedup: Compared to NVIDIA MIG, the proposed system showed an 85% average reduction in turnaround time.
- High Throughput: As shown above, the system maintains a throughput nearly identical to serving a single model, even when juggling multiple variants, vastly outperforming MIG at higher arrival rates.
- Low Overhead: Swapping non-expert layers adds only about 0.5 to 1.2 seconds to the Time-to-First-Token (TTFT), a negligible delay for most interactive applications.
- Resilient Quality: In scalability tests with four different Switch Transformer variants, the proposed method maintained a ROUGE-1 score of 0.46, whereas standard "model merging" (weight averaging) saw performance plummet to 0.25.
Limitations and Future Work
The current method requires the models being served to share the same base architecture (e.g., all must be Mixtral-8x7B variants); it cannot consolidate fundamentally different models. Additionally, the experiments primarily focused on single-batch requests to provide a controlled baseline, meaning real-world high-load scenarios will require extending this to continuous batching environments.
Looking forward, the authors suggest that combining this approach with advanced quantization (like 4-bit or 2-bit weights) could allow even more models to be packed onto a single GPU. They also aim to explore more sophisticated expert selection strategies beyond simple L2 distance.
Summary updated