arXiv:2611.01859cs.DCNov 2026

Manuscript Offprint

arXiv:2611.01859

Apto: Self-Adaptive CPU-GPU Hybrid MoE Inference on Shared PCs

Zihang Zhong, Jiali Wang, Rong Chen

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

CPU/GPU hybrid inference enables Mixture-of-Experts (MoE) models to run on memory-constrained PCs by keeping all expert weights in host memory and executing activated experts across both processors. Existing hybrid systems, however, assume exclusive resource access and determine an upfront CPU/GPU partition, so CPU contention from colocated applications can severely imbalance the two execution paths. This paper presents APTO, a self-adaptive hybrid inference system that applies dynamic scheduling to expert execution. The CPU and GPU executors claim experts from opposite ends of a dual-ended queue as they progress, allowing the CPU/GPU work split to adapt to their execution progress without predicting contention. APTO further uses affinity-aware scheduling to expose each executor's preferred experts at its queue end and cancellable tail racing to mitigate final-expert stragglers. Compared with state-of-the-art GPU-only and hybrid baselines, APTO achieves average prefill and decode speedups of 2.96× and 1.52× under standalone execution, and 5.97× and 3.45× under concurrent CPU workloads. It also accelerates real-world coding-agent applications by 2.02× on average.

1 Introduction

Mixture-of-Experts (MoE) models increase capacity by replacing each dense feed-forward network with multiple experts while activating only a few per token [20, 22, 29, 30, 53]. This sparse activation limits per-token computation and parameter traffic, making MoE models attractive for local inference on PCs [16, 23, 44]. Yet the complete set of expert weights often exceeds GPU memory. Recent systems therefore keep all experts in host memory and execute activated experts across the CPU and GPU in parallel [16, 25, 33, 58, 64]. Such hybrid execution reduces expert-loading overhead by using CPU compute, but its performance hinges on balancing the GPU path, including GPU computation and expert-loading stalls, with the typically slower CPU path [64].

Unlike datacenter servers that dedicate resources to LLM inference [35, 59, 65], PCs routinely run inference alongside other CPU applications. Such colocation is increasingly common in agentic workloads: coding agents interleave inference with CPU-intensive tools [4, 31, 54, 63], while multi-agent systems may run tools and inference concurrently [4, 13, 24, 36, 62]. The inference engine generally has no prior knowledge of the colocated applications, their arrival times, execution durations, or scheduling priorities.

Figure

Figure 1. Decode latency (TPOT) breakdown for Qwen3-30B-A3B at batch size 4 when running (a) standalone and (b) colocated with CPU-intensive workloads (e.g., parallel compilation). GO, SP, and DP denote FineMoE [60] (GPU-only), KTransformers [16] (static partitioning) and HybriMoE [64] (dynamic partitioning), respectively. Labels above the bars show the fraction of activated experts executed on the CPU.

Consequently, OS scheduling and contention for shared resources cause the effective CPU capacity available to inference to fluctuate rapidly and unpredictably, both across and within requests. Therefore, the amount of expert work that the CPU can sustain cannot be determined reliably before execution.

Existing MoE inference systems are self-centered: they optimize expert execution assuming exclusive access to the PC's CPU, GPU, and memory resources. In GPU-only offloading, all activated experts execute on the GPU, making expert loading from host memory into GPU memory a major bottleneck [23, 44, 52, 60]. Hybrid systems reduce this overhead by executing some experts on the CPU. Static partitioning (SP) avoids expert loading by letting the GPU execute only resident experts, while the CPU executes the rest [16, 33]. Dynamic partitioning (DP) uses predicted execution times to determine the CPU/GPU partition before expert execution begins and overlaps expert loading with computation [14, 56, 58, 64]. With exclusive access to the CPU, they can eliminate or hide expert-loading stalls and improve inference performance, as shown in Figure 1(a).

On shared PCs, however, this self-centered assumption does not hold. As shown in Figure 1(b), when inference is colocated with a CPU-intensive workload, static and dynamic partitioning still eliminate or hide expert-loading time, yet their latencies increase to 3.64× and 2.58× their standalone values and reach 2.60× and 1.80× the GPU-only latency, respectively. Because these methods continue to partition experts as if the full CPU were available, they assign nearly the same fraction of experts to the CPU despite contention. The CPU path consequently becomes the bottleneck, leaving the GPU underutilized or idle. A partition that better exploits the CPU under exclusive execution may therefore suffer greater degradation when resources are shared. The fundamental problem is not the quality of the partition under exclusive execution, but the assumption that this partition remains appropriate under colocation.

Key insight. Because CPU resources under colocation are dynamic and unpredictable, MoE inference should shift from self-centered upfront partitioning to self-adaptive runtime scheduling. Rather than predicting an optimal partition and committing all expert assignments before execution, the system should defer assignment decisions until execution and adapt the CPU/GPU work split as execution progresses. In this way, resource variation becomes feedback that guides scheduling rather than uncertainty that must be predicted.

Our approach. To realize this principle, we design APTO, a self-adaptive CPU/GPU hybrid inference system that applies dynamic scheduling [18, 38] to expert execution. APTO treats each activated expert as a task and lets the CPU and GPU executors claim new tasks only after completing their current ones. Task completion thereby feeds the realized capacity of each path directly into subsequent assignments, implicitly capturing interference from OS scheduling and shared resources. When contention slows the CPU path, the CPU completes and claims fewer subsequent tasks, while the GPU naturally takes over more work. The CPU/GPU work split thus emerges from realized execution progress rather than being decided upfront. Although CPU contention is our primary focus, the mechanism also adapts to slowdowns on the GPU path.

Although dynamic scheduling provides flexibility, general-purpose implementations introduce runtime overhead for task management and coordination among multiple competing executors [5, 10, 15, 48]. However, several characteristics of MoE hybrid inference simplify these requirements and enable efficient dynamic scheduling. First, expert computations within an MoE block are independent until their outputs are merged, avoiding the dependency-tracking overhead of general task runtimes [48]. Second, the set of expert tasks can be determined upfront, without the need to handle dynamic task generation [15]. Third, CPU/GPU hybrid scheduling involves only two logical executors, one for the CPU path and one for the GPU path, avoiding complex coordination across large worker pools [5, 40]. A simple shared deque suffices to distribute expert tasks between the CPU and GPU paths.

Affinity-aware scheduling. Dynamic scheduling adapts how much work each path receives, but efficient execution also depends on which tasks it selects. Expert affinities to the CPU and GPU are largely complementary: GPU-resident experts, experts with more input tokens, and frequently activated experts favor GPU execution, whereas their counterparts favor CPU execution [33, 64]. APTO captures these preferences in a unified affinity ordering that places the most GPU-preferred

and CPU-preferred experts at opposite ends of the queue. Each executor therefore claims its preferred remaining task from its own end, preserving locality and processor efficiency without cross-executor coordination.

Cancellable tail racing. Dynamic scheduling can rebalance only tasks that remain in the queue. Once the final expert has been claimed, a slowdown on its execution path can leave the other path idle and delay the entire MoE block. Since expert computation can be repeated, APTO allows both executors to race the final expert when the two queue ends meet and accepts only the first completed result, following the principle of backup execution [21]. The two copies share the same PC resources, so the slower copy can continue consuming resources or delay subsequent inference even after its result is no longer needed. APTO therefore cancels the slower copy's remaining execution once the faster copy completes, limiting both tail latency and unnecessary resource consumption.

We implemented APTO atop llama.cpp [25] with ProMoE [44] for expert caching and prefetching, and evaluate it against state-of-the-art GPU-only and CPU/GPU hybrid baselines. When the inference process exclusively occupied the PC resources, APTO achieved average speedups of 2.96× and 1.52× in the prefill and decode stages, respectively. When co-executing with a CPU-intensive workload under different configurations, APTO achieved average speedups of 5.97× and 3.45× in the prefill and decode stages, respectively, by adapting to dynamic CPU availability. Meanwhile, the colocated workload achieved 1.08× the throughput obtained alongside the baselines on average. For real-world coding agent applications, APTO achieved an average speedup of 2.02× over the baselines. A controlled experiment further confirms that APTO also adapts to GPU contention.

References (22)