TL;DR
ExpertWeave is a novel serving system designed to handle multiple Expert-Specialized Fine-Tuning (ESFT) adapters concurrently over a single shared Mixture-of-Experts (MoE) base model. By leveraging virtual memory management and a fused rerouting kernel, it achieves up to 85× more KV cache capacity and over 100% higher throughput than traditional merged-model serving, scaling efficiently to over 100 concurrent adapters with minimal latency overhead.
What Problem Does This Paper Address?
Mixture-of-Experts (MoE) architectures have become the backbone of modern large language models (LLMs) because they offer massive capacity with bounded per-token computation costs. To adapt these models to specific tasks, researchers recently introduced Expert-Specialized Fine-Tuning (ESFT), which tunes only the most relevant experts for a given task.
However, serving these adapters at scale is a nightmare for infrastructure engineers. Standard multi-adapter systems like S-LoRA are designed for additive updates (LoRA) and don't work for ESFT, where specific expert weights are replaced entirely. The "naive" solution—merging each adapter into a full model copy—is prohibitively memory-hungry. Furthermore, optimized inference kernels expect expert weights to be stored in a single, contiguous tensor. ESFT breaks this assumption because different adapters update different, non-contiguous subsets of experts, leading to severe memory fragmentation and complex routing logic during batched inference.
Methods
ExpertWeave introduces two core innovations to reconcile the flexibility of adapters with the rigidity of high-performance kernels:
-
Virtual-Memory-Assisted Expert Weight Management: The system manages weights in a virtual weight tensor. Logically, this tensor is a massive, contiguous 3D block that includes the base model and slots for all possible adapter experts. Physically, however, ExpertWeave only allocates memory pages for the experts actually in use. This decoupling, illustrated in Figure 1, allows the system to present a "standard" contiguous layout to optimized Grouped Matrix Multiplication (GMM) kernels without wasting gigabytes of memory on empty padding.
Figure 1: An illustration of a virtual weight tensor unfolded alongside its first dimension and a physical memory pool. -
Batched Rerouting Operator: To handle batches containing requests for different adapters, ExpertWeave uses a fused kernel that intercepts the MoE router's output. It uses an ESFT expert map to dynamically swap base-model expert IDs for adapter-specific IDs at runtime. This process is transparent to the rest of the inference pipeline, as shown in Figure 2.
Figure 2: An example of batched rerouting.
The system is built as a plugin for vLLM, supporting advanced features like continuous batching and chunked prefill.
Datasets
The authors evaluated ExpertWeave using a 16B MoE model (DeepSeek-V2-Lite architecture) across five real-world task domains:
- Math: GSM8K dataset.
- Intent Recognition: Real-world intent datasets.
- Summarization, Law, and Translation: Sampling from diverse real-world test sets to mimic multi-domain traffic.
Workloads were generated using a power-law distribution to simulate realistic "skewed" traffic, where some adapters are much more popular than others.
Key Insights and Ideas
- Logical Contiguity vs. Physical Sparsity: The most powerful idea here is using Virtual Memory Management (VMM) primitives (like
mmapequivalents on NPUs) to trick the hardware into seeing a contiguous tensor while keeping physical memory usage strictly proportional to the number of active experts. - Sub-page Allocation: Since expert sizes rarely align perfectly with hardware page sizes (e.g., 2MB), ExpertWeave tracks "reference counts" for pages to allow neighboring adapters to share a single physical page, further squeezing out memory waste.
- Zero Accuracy Trade-off: Because ExpertWeave only manipulates expert indexes and not the weights themselves, it provides the exact same numerical output as a fully merged model, but at a fraction of the cost.
Key Results
ExpertWeave was tested on a cluster of 16 Ascend NPUs, showing dramatic improvements over the vLLM-Ascend-Merged baseline:
- Massive Scaling: ExpertWeave successfully served 120 concurrent adapters on a single node. In contrast, the baseline ran out of memory (OOM) after just 4-6 adapters.
- Throughput Gains: Under highly skewed workloads, ExpertWeave delivered over 100% higher prefill throughput and consistently higher decode throughput (see Figure 4).
- Memory Efficiency: It provided up to 85× more KV cache capacity than serving merged models. This is critical because KV cache size is often the primary bottleneck for serving long-context LLMs.
- Low Overhead: The latency cost for rerouting is negligible—less than 1% of total execution time. Even when scaling to 120 adapters, the total latency overhead remained under 18%.
Limitations and Future Work
While ExpertWeave is highly effective, the authors note a few areas for improvement:
- Expert Parallelism (EP) Placement: The current placement policy for adapter experts across multiple NPUs is relatively simple (modulo-based). While functional, it doesn't guarantee perfectly balanced memory usage across all ranks in a distributed setup.
- Hybrid Adaptation: The paper focuses on ESFT. Future work could explore combining ESFT with other Parameter-Efficient Fine-Tuning (PEFT) methods, like LoRA, to create even more flexible multi-tenant serving systems.
- Hardware Portability: While implemented on Ascend NPUs, the authors emphasize that the underlying VMM logic is compatible with NVIDIA (CUDA) and AMD (ROCm) architectures.
Summary updated