Manuscript Offprint

arXiv:2609.38090

Mira: Memory-Efficient MoE Inference Using Adaptive Caching and Predictive Expert Staging

Sanjali Yadav, Bahar Asgari

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

Sanjali Yadav, Bahar Asgari

University of Maryland, College Park

{sanjali7, bahar}@umd.edu

Abstract—Mixture-of-Experts (MoE) models are a compelling architecture for scaling model capacity, making them especially attractive for deployment on resource-constrained, single-GPU systems. However, this benefit is difficult to realize because expert parameters dominate memory, and token-level routing is dynamic, unpredictable, and skewed. Prior work using offloading and caching remains fundamentally reactive as systems wait for router outputs before moving experts, leading to inefficient cache utilization, and an inability to overlap transfers with compute under tight VRAM budgets.

To address these challenges, we propose Mira, an algorithm-system co-design that enables high-capacity MoE inference on a single GPU. Mira shifts from a reactive to a proactive stance by coupling predictive expert management with a tailored quantization format. It introduces lightweight per-layer predictors that anticipate expert usage two layers ahead, enabling proactive prefetching. These predictions feed a two-tier HOT+STAGE GPU cache managed by token-level routing telemetry to retain frequently used experts while staging predicted ones. To minimize transfer overhead, Mira implements a custom compression for expert parameters, which reduces metadata and improves packing efficiency, while minimally degrading accuracy.

Mira is implemented as a fully integrated runtime that coordinates predictors, caching policies, and quantized transfers to maximize overlap between communication and compute. Our experiments show that Mira reduces expert-induced stalls. Compared against state-of-the-art baselines, Mira achieves a 5.71×5.71\times speedup in average throughput on a memory-constrained GPU. It accelerates Time-to-First-Token by 11.71×11.71\times and achieves a 3.84×3.84\times average speedup in beam search inference, demonstrating its effectiveness across diverse inference scenarios.

I. INTRODUCTION

Large Language Models (LLMs) deployed as chat-style interfaces [4] have become a standard part of modern software stacks, powering search, productivity tools, programming assistants, and consumer applications. The dominant deployment model involves large-scale distributed inference systems, which are the focus of substantial research and capital investment aimed at serving millions of users [29], [40]. Concurrently, a compelling need for local, on-device LLM inference is emerging [1], [14], [37]. This trend is driven by critical requirements that cloud-centric systems cannot easily satisfy: data privacy and security, particularly when handling sensitive healthcare or government data [3]; the ability to personalize models through fine-tuning on confidential datasets [26]; and democratizing access to LLMs, especially for users without access to high-end GPUs or large-scale compute clusters.

However, executing local inference presents a significant system optimization challenge driven by the vast disparity between the memory footprint of the state-of-the-art models, which often contain billions of parameters, and the limited VRAM in typical consumer-grade single-GPU setups. The local inference environments lack the terabytes of high-bandwidth memory and massive parallelism found in industry-scale accelerator clusters, making the task to optimize them non-trivial, as every available gigabyte of VRAM must be optimally utilized to accommodate the model's parameters and activation cache.

Additionally, the quest for higher generation quality has driven a massive increase in model scale, which in turn has escalated computational requirements. To address these high compute demands, Mixture of Experts (MoE) models have been proposed as an alternative to traditional dense LLMs [7], [10], [35]. The primary advantage of the MoE architecture is its ability to decouple model capacity from computational cost; unlike dense models that activate all parameters for every token, MoE models employ sparse activation where a trained router network contextually selects a small subset of experts to process each token. This allows the model to scale its parameter count significantly while keeping the per-token compute cost manageable.

However, the strengths of MoE at the algorithm level translate into acute system-level pressure on memory and I/O. The aggregate parameter count of the experts dominates the model's memory footprint, and the token-dependent, sparse activation pattern causes highly skewed and dynamic expert usage. On resource-constrained, single-GPU setups, this combination creates a challenge: experts cannot all reside on GPU in high precision, yet loading them just-in-time from CPU DRAM risks adding PCIe latency on the critical path.

Prior work largely addresses this memory challenge through two orthogonal techniques: expert offloading [8], [17], [19], [35] and quantization [11], [21], [22]. Offloading keeps expert parameters in CPU memory and migrates only the selected experts to GPU when the router activates them. Quantization reduces the bit-precision of parameters to shrink their storage footprint and accelerate transfers over the PCIe bus. Recent systems combine both ideas [9], [31], [38], [47], aggressively quantizing experts while offloading them to CPU, and then using general-purpose caching or eviction policies to decide which experts to keep resident on GPU.

Yet, this hybrid approach leaves an optimization gap. First, existing systems typically treat quantization as a passive compression step and ignore the rich, token-level routing signals available in MoE, resorting to coarse-grained policies such as recency-based eviction [9], [34], [43], or static popularity heuristics [19], [43], [44]. Second, expert offloading is often reactive: the system learns which experts are needed only after the gate has already made its decision, forcing the runtime into an unfavorable trade-off. Fetching experts late incurs stalls on CPU to GPU transfers, while speculative prefetching without high accuracy wastes VRAM on experts that may never be used. The alternative relies on ultra-low-bit quantization to keep all experts on GPU, trading I/O stalls for potential degradation in model quality.

To address these limitations, we introduce Mira 1^{1}, an algorithm-system co-design for MoE inference on memory-constrained GPUs. Mira couples modest, accuracy-preserving post-training quantization with an adaptive, prediction-driven expert cache that is explicitly aware of token-level routing behavior. At the algorithm level, Mira trains lightweight per-layer predictors that learn to anticipate which experts will be activated in future MoE layers. At the system level, Mira uses these predictions to pre-stage just the right experts into GPU memory, managing VRAM as a two-tier HOT+STAGE cache backed by a CPU-resident, INT8-compressed expert store.

Concretely, Mira makes three key design choices:

• Quantization-aware expert store: Mira applies a custom INT8 post-training quantization exclusively to MoE expert parameters, while keeping non-expert layers in higher precision. All experts are stored as CPU-pinned compressed tensors, enabling high-throughput CPU to GPU transfers and a unified representation across off-loaded, staged, and hot-resident experts. This design avoids ultra-low-bit quantization that risks quality loss, while still reducing the memory and bandwidth cost per expert.

• Predictive expert staging: Mira augments each MoE layer with a small predictor that uses features derived from the current hidden states, router logits, and recent routing history to forecast the top experts required in the next MoE layers (e.g., an i→i+2i \rightarrow i+2 pattern). These predictions drive a speculative prefetcher that stages only the most likely experts into GPU memory, overlapping CPU to GPU transfers with ongoing computation and reducing PCIe-induced stalls.

• Adaptive HOT+STAGE caching under VRAM budgets: Mira partitions GPU memory into a stable HOT region for long-lived, frequently used experts and a smaller STAGE window for predicted experts. At execution time, Mira maintains lightweight per-expert metrics (e.g., routed volume and cache hit/miss behavior) and uses them to continuously rebalance the HOT set. This metric-driven accounting allows Mira to evict underutilized experts from GPU, promote frequently used experts from CPU to GPU, and adapt to changing workloads without manual tuning.

By tightly integrating predictive expert selection with a quantization-aware caching and staging runtime, Mira enables high-capacity MoE models to run efficiently on a single, memory-constrained GPU. Our evaluation shows that Mira reduces expert-migration stalls and improves end-to-end throughput over prior offloading schemes, while maintaining model quality and supporting larger MoE configurations within the same VRAM budget. Our evaluation shows that Mira improves end-to-end throughput by 10.46×10.46\times over DeepSpeed and 2.86×2.86\times over MoE-Infinity on a 48GB GPU, and by 5.71×5.71\times over MoE-Infinity on a 24GB GPU, while reducing time-to-first-token by up to 18.38×18.38\times and achieving up to a 3.84×3.84\times speedup over Fiddler in beam-search decoding, all with accuracy close to an FP16 baseline on downstream tasks.

References (76)