Introduction
Deploying Large Language Models (LLMs) on edge devices like smartphones and laptops has traditionally been a game of compromise. Developers face the "Device AI Impossible Triangle": the challenge of achieving high accuracy, fast inference, and low cost simultaneously. Striving for low cost often sacrifices accuracy, while improving models typically requires high-performance hardware, increasing costs.
A new technical report from Infinigence-AI, in collaboration with researchers from Tsinghua University, Shanghai Jiao Tong University, and Aalto University, introduces Megrez2. This novel Mixture-of-Experts (MoE) architecture is specifically designed to break this trilemma by rethinking expert sharing and loading mechanisms.
Architectural Innovation: Cross-Layer Sharing and Pre-gating
The primary hurdle for on-device AI is hardware constraints. Standard dense models are often too large for mobile memory, while traditional MoE models—despite activating only a fraction of parameters per token—suffer from high storage requirements and memory bandwidth bottlenecks.
Megrez2 addresses these issues through two core innovations:
- Cross-Layer Expert Sharing: Unlike typical MoEs where each layer has unique experts, Megrez2 partitions the model into groups that share a common pool of experts. This significantly reduces the total parameter count (storage cost) without compromising the activated parameters (intelligence) available during computation.
- Pre-gated Routing: To mitigate latency caused by dynamic expert loading, Megrez2 moves the routing decision to the preceding layer. This allows the system to identify and begin loading necessary experts before they are needed, enabling a "pipelining" effect where weight loading overlaps with computation.
Performance and Benchmarks
The first instantiation, Megrez2-Preview, features 3B activated parameters and 7.5B total stored parameters. Despite its lean footprint, it demonstrates remarkable reasoning capabilities across various domains. The model was pre-trained on a 5-trillion-token corpus and further refined using Reinforcement Learning with Verified Rewards (RLVR) for math and reasoning tasks.
As shown in the results, Megrez2-Preview punches significantly above its weight class:
- General Knowledge: On C-EVAL, it scored 91.7, outperforming Qwen2.5-7B (76.2) and GPT-4o-mini (66.3).
- Mathematics: It achieved 81.6 on MATH-500, nearly matching the much larger Qwen3-8B.
- Coding: It dominated the MBPP benchmark with a score of 88.0, the highest among all compared models.
Conclusion
Megrez2 represents a significant step forward for on-device AI. By optimizing for memory bandwidth and parameter efficiency, it provides a blueprint for deploying high-performance LLMs on consumer hardware. Future work will likely explore scaling these sharing mechanisms and providing more detailed hardware-specific latency benchmarks on mobile chipsets.
Summary updated