arXiv:2610.33404cs.LGOct 2026

Manuscript Offprint

arXiv:2610.33404

COPE: Composable Performance Emulation for Mixture-of-Experts Offloading Policies

Hanming Zhang, Erhu Feng

Abstract

As LLMs scale, mixture-of-experts (MoE) architectures increase model capacity while keeping per-token computation manageable through sparse expert activation. This sparsity also enables memory-efficient deployment by retaining most expert weights in CPU memory and transferring or executing only the routed experts on demand. Existing MoE offloading systems typically target specific model–platform configurations, yet differences in model sparsity, CPU and GPU throughput, VRAM capacity, and host-device bandwidth can change the policy ranking. Because implementing and exhaustively evaluating all candidate policies incurs substantial engineering cost, efficiently selecting the best-performing policy for each model–platform configuration remains a key challenge for practical MoE offloading.

We present COPE (Composable Offloading Policy Emulator), which selects the best-performing MoE offloading policy for a target model–platform configuration before runtime integration. COPE comprises two components. Its Policy Matrix factors the design space into two independent axes, expert residency and MoE execution strategy, enabling mechanism reuse across candidate policies and exposing four new candidates. Its Virtual Heterogeneous Machine profiles combined-operator schedules on the target platform and combines these measurements with offline routing traces to estimate candidate performance. Compared with the evaluated baselines, COPE improves fastest-policy selection accuracy by 24%–100% and reduces performance-prediction error by 1.7×–6.8×. By identifying the preferred policy before integration, COPE further reduces policy-specific implementation effort by up to 74%.

1 Introduction

Sparse mixture-of-experts (MoE) architectures have become a widely adopted approach to scaling LLM capacity without proportionally increasing per-token computation. A router activates only a small subset of experts for each token, allowing Switch Transformer [14], Mixtral [25], DeepSeek-V2 [9], and Qwen3 [55] to combine a large parameter space with a much smaller active working set. This sparsity also creates a natural opportunity to tier expert weights across the memory hierarchy: CPU RAM can retain the complete expert set, while GPU VRAM holds only a selected subset. Academic systems and production runtimes [13, 27, 47, 54, 57, 64, 67] have consequently developed a range of expert offloading, caching, and prefetching mechanisms for deploying MoE models whose weights exceed GPU memory capacity.

However, deploying MoE models through offloading is considerably more complicated in practice. This complexity arises from three sources: variations in model sparsity, the diversity of offloading mechanisms, and the heterogeneity of hardware configurations. First, although MoE architectures have been widely adopted by recent LLMs, different models exhibit substantially different routing sparsity and expert-popularity distributions. Consequently, the number of experts activated per token and the distinction between frequently and infrequently accessed experts vary across models. Second, existing offloading systems adopt fundamentally different mechanisms. For example, llama.cpp [32] performs sequential offloading at layer granularity, vLLM [50] uses a unified CPU-GPU address space to access host-resident weights, and KTransformers [3] assigns different categories of model weights to different processors. Finally, hardware heterogeneity further complicates policy selection. MoE offloading often targets edge systems, including mobile phones, personal computers, and AI cubes. These platforms combine diverse CPU, GPU, and NPU architectures, providing no uniform hardware profile.

As a result of this complexity, no single offloading strategy performs best across all model–platform configurations. A strategy that performs well in one setting can exhibit substantially different behavior in another. Implementing every candidate offloading strategy on each target platform would incur substantial engineering cost. Therefore, efficiently selecting the best-performing strategy for a given model–platform pair remains a key challenge for edge MoE deployment.

We present COPE (Composable Offloading Policy Emulator), which structures the policy space and selects the MoE offloading policy expected to perform best for a target model–platform configuration before runtime integration. COPE answers two questions: (1) How can offloading designs be organized into reusable choices, and (2) which candidate is expected to deliver the best performance? To answer the first question, COPE introduces the Policy Matrix, which decomposes an MoE offloading design into two composable dimensions: expert residency and MoE execution strategy. Expert residency determines where each expert is stored in the memory hierarchy, including static schemes such as layer-wise and hot/cold placement, as well as dynamic schemes that update expert residency at runtime. Expert execution strategy determines where and how each routed expert is computed, including CPU execution, weight transfer followed by GPU execution, and concurrent CPU-GPU execution, etc. The mechanisms in these two dimensions can be implemented independently and reused across policies. Combining one choice from each dimension yields a concrete offloading policy. This factorization exposes four candidate policies not covered by existing MoE offloading systems.

The performance ranking of candidate offloading policies is highly sensitive to both model characteristics and the target hardware platform. Differences in CPU and GPU performance, interconnect bandwidth, synchronization overhead, and model sparsity can change which policy performs best. Selecting the best policy for each platform by implementing and benchmarking every candidate on real hardware would incur prohibitive engineering costs. Therefore, to answer the second question, COPE provides the Virtual Heterogeneous Machine (VHM). VHM profiles atomic compute, data-transfer, synchronization, and asynchronous-dispatch operators on the target hardware, as well as combined-operator schedules that capture their interactions. These measured costs absorb differences in accelerator speed, bandwidth, and overlap. Given the profile and timing-free routing traces containing routed and predicted expert IDs, VHM replays each candidate's cache states and computes its predicted TPOT without consulting hardware specifications again. Across hardware configurations, COPE reuses the same offloading-policy mechanism in VHM, thereby reducing the engineering effort for new target platforms.

We evaluate COPE’s policy-selection accuracy and its potential to reduce engineering effort through two complementary implementations. First, we implement nine Policy Matrix candidates, including those newly exposed by COPE, in llama.cpp [32]. We benchmark these implementations on three CPU-GPU platforms (A100, RTX 4090, and RTX 5090) and across 11 additional controlled A100 resource configurations. The end-to-end measurements serve as ground truth for policy selection. Second, we implement the same nine policies in the Virtual Heterogeneous Machine using existing computation-graph and operator interfaces, and compare its TPOT predictions with the measured ground truth.

COPE selects the measured minimum-TPOT candidate in 134/150 A100, 20/20 RTX 4090, and 42/45 RTX 5090 cases. Compared with the Hierarchical Roofline Model [2], COPE reduces TPOT-prediction MAPE across the evaluated models from 61.53–68.52% to 9.39–17.43% on the RTX 4090, and from 47.21–53.92% to 7.95–13.34% on the RTX 5090. By identifying the best-performing candidate before runtime integration, COPE avoids unnecessary policy-specific engineering effort. For Qwen-3 on the RTX 4090, implementing only the COPE-selected Fixed Parallel policy reduces policy-specific code by 74% compared with implementing all candidates using the Policy Matrix’s shared mechanisms.

References (19)