On-Device Multimodal MoE Models: Practical Memory Optimization

    Deploying a large multimodal mixture-of-experts model on a smartphone requires more than sparse computation. This article examines how flash-backed expert loading, Lookahead Expert Scheduling, mixed-precision quantization, contiguous weight storage, speculative decoding, and visual token compression work together to reduce memory use and improve generation speed. Reported results illustrate the potential of these techniques, while highlighting the hardware constraints and deployment trade-offs that determine real-world performance.

    1. The Core Constraint: Model Size Versus Physical Memory

    Deploying a multimodal large language model on a mobile device starts with a demanding physical constraint: flagship smartphones typically have 8–16 GB of RAM, while the full weights of a capable general-purpose model can occupy tens or even hundreds of gigabytes.

    For a model with 35 billion parameters, the full weights occupy approximately 65.6 GiB—more than four times the memory capacity of a typical 16 GB device. Even with aggressive 4-bit quantization, the weights still take up roughly 15 GB, making it difficult to load the entire model into the memory available on a flagship phone.

    On-device deployment therefore cannot simply inherit the cloud assumption of abundant memory and high bandwidth. It requires coordinated optimization across model architecture, storage, scheduling, and decoding, balancing latency, throughput, power consumption, and model capability within tight physical limits.

    Conversational responsiveness also has practical thresholds. Early deployment experience suggests that generation at around 8 tokens/s avoids obvious stuttering for many users, while slower output noticeably degrades the interaction. At approximately 15 tokens/s, output is generally perceived as fluent. As a result, 15 tokens/s is often used as an engineering reference for sufficiently smooth conversational generation, rather than a universal guarantee of user experience.

    As hardware and inference efficiency improve, the goal is no longer merely to make a model run. It is to use the phone’s available compute capacity to support a more capable model within the same memory budget.

    2. Sparse MoE: Large Parameter Capacity, Limited Active Computation

    Mixture-of-experts, or MoE, architectures offer an important route through the mismatch between parameter count and memory capacity.

    The multimodal 35B-A3B model discussed here uses a sparse MoE design: it has 35 billion total parameters but activates only about 3 billion parameters per token. Its expert weights account for 32.2 billion parameters across 10,240 experts, representing a reported 93.6% of the model’s parameters. Each token invokes only 320 of those experts, an activation ratio of approximately 3.1%.

    This separates total parameter capacity from the amount of computation performed for each token. The model can retain a large pool of parameters for representing knowledge while using only a small subset of experts during a forward pass.

    Sparse activation, however, does not automatically solve the memory problem. All expert weights still exist. If they must remain resident in RAM, their combined footprint still exceeds the device’s capacity. Architectural sparsity must therefore be paired with on-demand weight loading to make deployment practical.

    3. Loading Expert Weights from Flash on Demand

    The central storage strategy is to keep inactive expert weights in the phone’s flash storage and load them into RAM only when needed. In the reported implementation, this reduces memory consumption to approximately one-fifteenth of the original level.

    The challenge is that flash storage has much higher latency and lower bandwidth than RAM. Poorly timed reads can leave inference waiting for weights and turn decoding into an I/O-bound workload. Early on-demand loading implementations generated only about 2–3 tokens/s, well below the target for fluent conversation.

    A workable solution therefore cannot rely solely on reading an expert’s weights after they are requested. Loading must be predictive and pipelined so that storage operations overlap with computation.

    That is the role of Lookahead Expert Scheduling.

    4. Lookahead Expert Scheduling: Prepare the Next Layer’s Experts Early

    Lookahead Expert Scheduling, or LES, predicts which experts the next model layer is likely to use. It begins loading their weights before the current layer finishes computing, hiding part of the flash-read latency behind ongoing computation.

    In the reported tests, LES prepared more than 80% of the required experts in advance in most scenarios. Device testing showed an average speedup of approximately 5×, while outputs remained identical to those produced with LES disabled. In those tests, the acceleration did not come at the expense of generation quality.

    Implementing LES requires balancing several factors:

    • Prediction accuracy: Prefetched weights must correspond closely to the experts that will actually be selected.
    • Pipeline depth and buffer capacity: Looking further ahead can provide more time for I/O, but requires more memory for prefetched weights.
    • Read concurrency: Multiple expert-loading operations compete for the available flash bandwidth.

    Predict too early, and prefetched weights consume excessive buffer space. Predict too late, and the system cannot hide enough of the read latency.

    Aligning prediction granularity with the model’s layer structure, together with scheduling that accounts for locality in expert usage, helps maintain a high prefetch hit rate within a limited memory budget.

    A later LES 2.0 implementation reportedly increased decoding speed to more than 30 tokens/s with approximately 3 GB of memory use. Under the tested conditions, this enabled a 35B-class MoE model to run on a flagship smartphone at a generation rate well above the practical fluency reference.

    5. Quantization and Storage Layout: Smaller, More Sequential Reads

    On-demand loading performance depends not only on when weights are read, but also on how much data is read and how it is laid out.

    The implementation combines two storage optimizations: layer-wise mixed-precision quantization and contiguous expert-weight storage.

    Layer-Wise Mixed-Precision Quantization

    Different layers or experts can use different quantization bit widths according to their sensitivity. This reduces the overall weight footprint while keeping accuracy loss within acceptable limits.

    For flash-backed inference, smaller weights also mean less data must be transferred each time an expert is loaded.

    Contiguous Expert-Weight Storage

    Weights belonging to an expert, or to a group of experts, are stored contiguously in flash. This reduces the overhead associated with fragmented and random reads, making loading more efficient and reducing storage and bandwidth demands.

    These techniques complement LES:

    • Quantization reduces the amount of data required for each load.
    • Contiguous storage improves effective read throughput.
    • LES starts the reads early enough to overlap them with computation.

    In a reported flagship-phone test, the combined optimizations increased decoding speed from 3.38 to 20.51 tokens/s—a roughly sixfold improvement.

    6. Decoding and Multimodal Input Optimization

    Memory scheduling addresses a major bottleneck, but decoding and visual input processing offer additional opportunities to improve end-to-end performance.

    Speculative Decoding

    The model’s generation pipeline incorporates speculative decoding. A lightweight draft model or drafting strategy quickly proposes a sequence of candidate tokens, which the main model then verifies in parallel.

    With distribution-preserving verification, this reduces the number of serial decoding steps required from the main model while retaining the target output distribution.

    Across multiple tested task types on a tablet with 16 GB of memory, the best configuration delivered an average generation-speed improvement of 1.17×. This is smaller than the gains from storage scheduling, but remains a useful incremental improvement and can be combined with quantization and expert-loading optimizations.

    Visual Token Compression

    Multimodal inputs introduce their own compute and memory costs. The model supports visual token compression at two levels: 4× and 16×.

    The 4× mode prioritizes finer-grained visual understanding, while the 16× mode targets scenarios where efficiency is more important.

    Reducing the number of visual tokens lowers subsequent attention computation and key-value cache requirements. For on-device multimodal workloads, this is an important upstream optimization for controlling both memory use and latency.

    7. Engineering Lessons and Deployment Limits

    Making a large multimodal MoE model practical on a mobile device is not the result of a single optimization. It is a coordinated response to the memory bottleneck:

    • Sparse MoE limits the parameters activated for each token.
    • Flash-backed expert loading avoids keeping all expert weights in RAM.
    • Lookahead scheduling overlaps storage reads with computation.
    • Quantization and contiguous storage reduce the cost of loading weights.
    • Speculative decoding and visual token compression improve end-to-end efficiency.

    Each technique involves trade-offs among speed, memory consumption, power use, and output quality.

    The performance figures discussed here come from specific hardware and configurations. They should not be treated as directly interchangeable benchmark results or as guarantees for every device. Flash performance, memory bandwidth, thermal conditions, and system scheduling can all affect deployment outcomes.

    Developers should profile the target device and tune the configuration to its actual constraints rather than reuse fixed settings without validation.

    Ultimately, on-device large-model deployment is an exercise in optimizing near physical limits. Architecture establishes what is possible, scheduling determines how effectively the hardware is used, and quantization and decoding optimizations shape the experience delivered within that envelope.