Inference systems · Research feature

MoEless: Efficient MoE LLM Serving with Serverless Experts

A new serverless framework improves efficiency in mixture-of-experts language models by balancing expert load and reducing inference time and cost.

Adapted from research by Hanfei Yu, Bei Ouyang, Shwai He and colleagues.

arXiv preprint revision · 2026-09-30 · Attribution & reuse
In this article
Editorial illustration of optical fibers.

Editor’s introduction

The study evaluates MoEless, a serverless serving framework designed to address expert load imbalance in Mixture-of-Experts (MoE) large language models. It compares performance against state-of-the-art solutions by measuring inference latency and cost under real-world workloads. MoEless uses lightweight predictors to estimate incoming expert load and dynamically scales expert instances across GPUs, improving function locality and utilization. The framework was tested on open-source MoE models using an eight-GPU testbed, showing a 43% reduction in latency and 84% lower cost than existing methods.

Introduction

LLM have revolutionized NLP (NLP) research and driven breakthroughs across diverse application domains, such as content generation, information retrieval and recommendation, and AI (AI)-assisted decision-making. To mitigate the extreme training costs, modern LLM increasingly adopt the MoE (MoE) architecture as their core design. MoE layers replace the conventional FFN (FFN) layers in Transformer blocks with a gating network and a collection of experts, where only a small subset is activated during computation. This design significantly reduces the number of FLOP, enabling MoE-based LLM to deliver comparable or even superior performance to dense LLM at a fraction of the training cost.

Expert load balancing has been extensively explored to mitigate the inherent load imbalance among experts in MoE serving. However, existing approaches assume static resource configurations on serverful infrastructures, resulting in either costly real-time expert swapping with limited effectiveness, or lossy expert re-routing that compromises generation quality. Achieving expert load balance without generation performance loss requires fine-grained, elastic, and accurate expert scaling in MoE serving.

Objectives and Challenges

Accelerate MoE inference by mitigating expert load imbalance. Existing MoE-based LLM inevitably experience expert load imbalance from both workload and model perspectives, causing the expert straggler problem that prolongs inference latency. We aim to alleviate the expert load imbalance and accelerate MoE inference by eliminating expert stragglers.

Enable expert scalability via serverless computing. Existing serverful MoE serving frameworks rely on swapping out low-usage experts for popular ones limited by fixed resource allocations. By leveraging serverless computing, we aim to unlock expert scalability and elasticity to efficiently accommodate dynamic expert demands.

How to integrate serverless computing into existing MoE serving? Unlike dense LLM, the scale of MoE-based LLM is prohibitively large, making it infeasible to encapsulate the entire model within serverless functions. Therefore, our design must be fine-grained and generic to seamlessly integrate with existing MoE serving frameworks.

How to efficiently scale and place expert functions? Given the predicted expert loads, we must construct execution plans that efficiently scale serverless expert functions and place them across devices to maximize GPU utilization, function locality, and minimize communication overheads.

Architecture and Workflow

Unlike existing serverless LLM serving approaches, which encapsulate the entire LLM into serverless functions, we decouple the experts from the MoE model and package them as independent functions, while keeping the non-expert modules in DP. This design offers two key advantages. First, since expert computation dominates inference latency and cost, packaging experts as functions maximizes the benefits of serverless execution while avoiding unnecessary coordination among non-expert modules. Second, because experts are inherently decoupled and follow all-to-all communication patterns, the stateless nature of serverless functions can be naturally hidden under EP, ensuring seamless integration with existing MoE serving workflows.

Step 1: Expert load prediction. Unlike existing expert selection predictors, which operate at the single-request level, our Expert Load Predictor accurately estimates expert load distributions across request batches and identifies batch-level expert stragglers for each MoE layer (§4.1). The prediction results are then passed to the Expert Scaler for subsequent expert management.

Step 2: Expert scaling. The Expert Scaler receives the predicted expert loads and determines expert scaling decisions under inference budget constraints (§4.2). It first analyzes expert stragglers and sets a target forward latency for each predicted layer. Next, it trims excessive straggler loads to meet the latency target and allocates additional replicas to handle the overflow. The resulting expert scaling plan is then forwarded to the Expert Placer for deployment.

Step 3: Expert placement. With EP, each expert instance must be assigned to a GPU for execution. The Expert Placer generates an optimized GPU placement strategy based on prior expert states and hardware characteristics, given the new scaling plan (§4.3). The placement is designed to maximize function locality, improve GPU utilization, and minimize communication overhead (e.g., expert migration between GPU and CPU, or all-to-all data transfers).

Expert Placer

Reuse expert replicas for warm-starts. If a previously placed expert replica is kept alive on a GPU, we immediately reuse it to avoid data transfer and initialization delays (i.e., function warm-starts ). Thus, we eliminate expert cold-start overheads with pre-warming and keep-alive techniques from serverless computing.

Balance per-GPU loads. Since each GPU’s computation and communication times are proportional to its aggregated expert load, balancing these loads minimizes straggler effects and ensures efficient parallel execution among GPUs. Hence, we distribute replicas across GPUs to achieve balanced utilization while satisfying per-GPU capacity constraints via a classic Join-the-Shortest-Queue algorithm.

Implementation

Implementing predictors. We implement the predictors as lightweight NN that share the same architecture and parameter size as the MoE model’s gate networks, using PyTorch. To eliminate prediction overheads, we invoke predictors asynchronously from the main model computation using dedicated CUDA streams. For each Transformer layer, a separate CUDA stream is launched to execute the predictor on the current hidden states concurrently with the MoE layer’s forward pass. This design ensures that prediction is fully overlapped with computation, introducing no blocking or additional latency.

Fine-tuning predictors. We collect input hidden states and the corresponding gate network outputs from each MoE layer to construct the fine-tuning dataset. The dataset is split into training and testing subsets with a 7:3 ratio. For each layer, we fine-tune multiple predictors with varying inter-layer prediction distances for flexible deployment. The fine-tuning process is lightweight, completing within five minutes on a single GPU. To further improve training efficiency, we parallelize fine-tuning across all layers.

Scaling and placing serverless experts. We support two types of expert scaling: (1) intra-GPU scaling, which replicates or removes expert weights within a single GPU, and (2) inter-GPU scaling, which adjusts the number of GPUs that host expert replicas. Both expert scaling and placement are implemented asynchronously to minimize inference delay. We use the NCCL library for all-to-all communication between serverless experts and the Megatron-LM framework. We integrate Megatron-LM’s EP with Docker containers, where experts are distributed across GPU-enabled containers for execution. Additionally, we adopt standard pre-warming and keep-alive techniques from serverless computing to eliminate expert cold-start latency.

System configuration. Our prototype system determines its parameters (e.g., prediction distance and load-balancing thresholds) and container configurations primarily through offline profiling, rather than dynamic runtime adaptation across different models and datasets. We leave more advanced runtime optimization mechanisms to future work.

Evaluation

This section conducts extensive experiments to evaluate MoEless, including the experimental setup (§6.1), overall performance against SOTA baselines (§6.2), effectiveness of the expert load predictors (§6.3), sensitivity analysis (§6.4), ablation study (§6.5), and system overheads of MoEless (§6.6).

Experimental Setup

Testbed. We conduct all experiments on an eight-GPU testbed, with GPUs interconnected via pairwise NVLinks. Each GPU is an NVIDIA A6000 equipped with 48 GB of GPU memory and connected to the host CPUs through PCIe 5.0 links, providing up to 64 GB/s bidirectional bandwidth per GPU. The system is provisioned with 256 vCPUs backed by AMD EPYC 7C13 processors and 500 GB of system memory.

Baselines. We compare MoEless against three SOTA serverful MoE serving baselines: 1) Megatron-LM: a basic EP-enabled MoE inference system without expert load balancing, and 2) EPLB: the load balancer proposed by DeepSeek, which periodically (e.g., every ten minutes) creates redundant experts based on historical expert usage to mitigate high expert loads. 3) Oracle: an upper-bound baseline that ignores gate network outputs and performs perfect expert load balancing. Note that Oracle directly affects model generation quality, as it ignores a subset of the original expert routing decisions during computation. We integrate EPLB and Oracle into Megatron-LM for fair comparison.

Metrics. We measure the MoE layer forward latency to directly evaluate the overheads caused by expert stragglers. We also report the overall serving cost, estimated as the product of memory consumption and inference latency aggregated across all input batches, representing the total monetary cost of serving the entire workload. In addition, we evaluate detailed metrics, including expert load prediction accuracy and system overheads.

Overall Performance

We evaluate the overall performance of Megatron-LM, Oracle, EPLB, and MoEless by running three MoE models on the LMSYS-Chat-1M and ShareGPT datasets, measuring MoE layer forward latency and total inference cost. Due to continuous batching, batch-level latency varies across iterations. Therefore, we record the per-layer forward latency for all layers across all input batches and aggregate them into a unified CDF (CDF) for comparison.

Figures 11 and 12 present the CDF of MoE layer forward latency of four approaches across three models on LMSYS-Chat-1M and ShareGPT, respectively. With scalable and elastic serverless experts, MoEless achieves significant performance improvements, reducing the average MoE layer forward latency by 43.19% and 21.89% compared to Megatron-LM and EPLB, respectively. While Oracle is a lossy baseline that achieves perfect load balance by affecting generation quality, MoEless consistently stays closest to Oracle across all cases, indicating superior performance over existing SOTA expert load balancing methods.

Prediction Accuracy

We compare MoEless’s predictor against two SOTA expert prediction solutions: 1) Mixtral-offloading, which directly employs the original gate networks to predict expert selections of subsequent layers, and 2) ProMoE, which trains a large, layer-specific predictor from scratch to model the mapping between gate inputs and expert selections. We use the same experimental setup as in §6.2.

Sensitivity Analysis

We evaluate the sensitivity of two key system parameters in MoEless: 1) the expert prediction distance, which determines the overlap overhead (§4.1), and 2) the expert load CV threshold, which governs expert replica scaling (§4.2). For both parameters, we measure the average MoE layer forward time and the average number of expert replicas per layer to analyze their impact on inference latency and expert serving cost.

Expert prediction distance. Figures 17 and 18 show the average MoE layer forward time and the average number of expert replicas per layer as the prediction distance varies, evaluated across three models and two datasets. We increase the prediction distance from 1 to 5 in increments of 1. As the prediction distance increases, the MoE layer forward time rises due to less accurate estimation of future expert load distributions, while the number of expert replicas decreases as load predictions become coarser. Based on this trade-off, we set the prediction distance of MoEless to 1 in all evaluations, achieving high prediction accuracy with negligible inference overhead.

Expert load CV threshold. Figures 19 and 20 present the sensitivity of the average MoE layer forward time and the average number of expert replicas per layer to different CV thresholds, evaluated across three models and two datasets. We vary the CV threshold from 0.2 to 1.0 in increments of 0.2. Larger CV thresholds permit greater load imbalance and trigger less aggressive expert scaling, reducing the number of expert replicas per layer but increasing the MoE layer forward time due to straggler effects. We therefore set the CV threshold of MoEless to 0.2 in the evaluation.

System Overheads

Predictor fine-tuning overheads. The fine-tuning process is computationally lightweight across three models, as the largest predictor contains only 80K parameters. Across all three MoE models, the complete set of predictors can be fine-tuned within five minutes on a single GPU, incurring negligible overhead and enabling rapid deployment.

Expert operation overheads. The prediction delay is below 0.2 ms per layer, and nearly all expert scaling and placement operations are warm-started without runtime delays. Moreover, all expert-related operations are executed asynchronously, ensuring minimal impact on inference latency.

Mitigating expert load imbalance in MoE systems. Expert load imbalance is a major performance bottleneck in distributed MoE systems, as a small subset of popular experts often become stragglers while the remaining experts are underutilized. Existing approaches address this problem through expert replication, routing optimization, and dynamic expert placement. FasterMoE introduces a dynamic shadowing mechanism to mitigate skewed expert selection during training. NetMoE improves expert routing efficiency by considering the locality of training samples and dynamically rearranging expert placements to reduce all-to-all communication costs. Lina alleviates communication bottlenecks during inference through dynamic resource scheduling. DeepSeek proposes EPLB, which periodically swaps low-usage experts with replicas of popular ones to balance expert loads. Although effective at reducing expert stragglers, these methods rely on persistent GPU-resident expert replicas, causing GPU memory consumption to increase with replication aggressiveness. Unlike these serverful approaches, MoEless mitigates expert load imbalance through elastic serverless experts.

Optimizing expert parallelism in MoE training. Another line of work improves MoE efficiency by optimizing expert parallelism during distributed training. SmartMoE adaptively combines multiple parallelism strategies to accelerate MoE training. ScMoE overlaps different forms of parallelism to effectively reduce all-to-all communication latency. Comet achieves fine-grained communication–computation overlap by leveraging data dependency analysis and task rescheduling. MoE Parallel Folding decouples attention and MoE layers in Transformer blocks, allowing each to independently select the most efficient parallelism strategy. These systems improve distributed training throughput by reducing communication overhead and improving parallel execution efficiency, but they assume relatively stable expert placement and long-running training workloads. Orthogonal to these efforts, MoEless targets online MoE serving, where dynamically changing request distributions require elastic expert provisioning rather than optimized training schedules.

Expert offloading for resource-limited MoE serving. Expert offloading reduces GPU memory pressure by dynamically moving experts between GPU, CPU, and storage. MoE-Infinity traces expert selection patterns to offload inactive experts and prefetch important ones based on predictions. FineMoE predicts, prefetches, and caches experts to reduce resource pressure. ProMoE proactively predicts and prefetches experts using neural-network predictors. DeepSpeed-Inference performs parameter offloading at the layer level without considering expert awareness. Mixtral-offloading leverages gate network inputs from preceding layers to speculate expert selections. These approaches primarily optimize memory usage for resource-constrained serving by reducing the number of resident experts. In contrast, MoEless focuses on distributed MoE serving, where expert load imbalance and communication overhead dominate performance, and dynamically provisions serverless experts to improve both latency and resource efficiency.

MoE serving in serverless computing. Recent works have explored serving MoE models on serverless platforms to improve resource utilization and reduce inference cost. Liu et al. optimize the deployment cost of MoE models on serverless platforms using Bayesian optimization. Remoe offloads expert modules to CPUs to reduce memory overhead and inference cost on heterogeneous hardware. sMoE uses DRL (DRL) to configure serverless functions for MoE serving, which incurs heavy DRL training overheads. FaaSMoE leverages serverless functions to share experts in multi-tenant MoE serving. These systems leverage serverless infrastructures primarily as a cost optimization mechanism. In contrast, MoEless leverages elastic serverless experts as the core abstraction for expert replication and placement, simultaneously reducing inference latency, expert memory footprint, and serving cost.

Conclusion

This paper proposes MoEless, an efficient serverless MoE serving framework that explicitly targets expert load imbalance while accelerating inference through fine-grained serverless expert execution. MoEless employs lightweight, low-overhead predictors to accurately capture incoming expert load distributions and proactively identify expert stragglers. Guided by these predictions, we design optimized expert scaling and placement strategies that dynamically adjust expert instances across GPUs. We prototype MoEless on top of Megatron-LM and deploy it on an eight-GPU testbed for evaluation. Experiments with open-source MoE models and real-world workloads demonstrate that MoEless reduces inference latency by up to 43% and inference cost by up to 84% compared to SOTA solutions.