LEGO: Sizing Rules for Budget-Aware Dense-to-MoE Conversion of Vision-Language Models

Qishen Yin, ZiangWu, Juntong Wu, Peng Jin, Hao Li, Tanghui Jia, Liuhan Chen, Bin Zhu, Li YuanNeurIPS 2026

TL;DR

Converting bulky, pretrained Vision-Language Models (VLMs) into faster Mixture-of-Experts (MoE) architectures usually involves blind guesswork—applying rules of thumb that work on one model only to watch them catastrophically break another. LEGO replaces that guesswork with simple architectural "sizing rules," revealing a hidden geometric sweet spot that keeps models sharp while shrinking their compute footprint. Give LEGO a memory and compute budget, and it automatically snaps together and stabilizes the best sparse VLM from existing dense parts.

What Problem Does This Paper Address?

Vision-Language Models (VLMs) pair a visual encoder (like a Vision Transformer, or ViT) with a Large Language Model (LLM). Scaling them up makes them smarter, but deploying a monolithic giant on an edge device or tight server budget is painful.

Mixture-of-Experts (MoE) offers an elegant escape hatch: replace the LLM’s dense Feed-Forward Networks (FFNs) with a pool of smaller "expert" sub-networks, and route each token to only a few of them. You get high parameter capacity (memory) with low per-token compute. Because training MoEs from scratch is notoriously expensive and unstable, researchers often convert pretrained dense models into MoEs ("Dense-to-MoE") followed by a lightweight recovery fine-tuning phase.

Here is the catch: nobody had clear rules for what MoE structure to build. Engineers typically rely on raw sparsity heuristics—like "activate 4 out of 16 experts (1/4)." Yet the authors noticed a puzzling anomaly: applying a 1/4 activation ratio to an 8B VLM caused a mild 4.8% performance dip, whereas the exact same recipe on a larger 14B model triggered a steep 10.2% nosedive. Why would a bigger model be more fragile at the exact same sparsity?

Figure 2: Motivating observation: fixed activation ratios yield different relative drops across model scales under the same recovery budget; drops are relative to trained-Dense controls.

Methods

To solve this, the authors introduce LEGO (ruLes-guided Experts Generation and Orchestration), a framework built on three pillars:

  1. Budget-Aware Hybrid Search: Given a target budget of total parameters ($P_{\text{total}}$, dictating VRAM) and active parameters per token ($P_{\text{active}}$, dictating compute), LEGO searches across candidate base models and three standard FFN conversion operators: Split (slicing a dense FFN into $N_S$ thinner shards), Upcycle (duplicating shards to create $N_E$ total experts), and Hybrid (splitting then duplicating for precise budget control). Instead of testing everything, an algorithm filters and ranks candidates using empirical sizing rules (keeping the ratio of activated FFN width to hidden dimension, $D_I/D_H$, ideally within $[1.5, 8]$).
  2. Moment-Matching Scaling Factor: Splitting and duplicating weights introduces a sneaky mathematical bug at initialization: aggregating a sparse subset of shards shifts the output scale and variance compared to the original dense layer, spiking early training loss. LEGO derives a closed-form scalar $C$ (a geometric mean of mean-shift and variance corrections, accounting for repeated shard hits) applied right after expert aggregation to restore smooth optimization.
  3. Two-Stage Multimodal Recovery: Because surgery on the LLM’s FFNs temporarily scrambles its gradients, training the whole VLM at once sends noisy signals back into the delicate pretrained vision tower. LEGO freezes the ViT in Stage 1 to let the LLM and projector heal first, then unfreezes everything for joint fine-tuning in Stage 2.
Figure 3: LEGO framework. Under a target budget, LEGO selects a base VLM, searches Split/Upcycle/Hybrid FFN-MoE structures under the sizing rules, and applies two-stage recovery.

Datasets

No new benchmarks are introduced. For evaluation, the authors test across nine public multimodal benchmarks spanning three categories: VQA/OCR, Document/Chart understanding, and Multi-image/Comprehensive tasks (reporting arithmetic means across three runs; individual benchmark names and exact training data mixtures are deferred to the paper's appendices).

Key Insights and Ideas

  • Raw sparsity is an illusion; $D_I/D_H$ is the true compass: Different LLM backbones have wildly different native FFN-to-attention width ratios ($D_{\text{dense}}/D_H$). That 14B model crashed at 1/4 sparsity because its native FFN was relatively narrow, pushing its activated FFN-to-hidden ratio ($D_I/D_H$) down to $0.67$. Across model families, $D_I/D_H < 1$ creates a severe information bottleneck, $[1.5, 8]$ is the sweet spot, and going higher yields diminishing returns—proving that more active parameters do not automatically mean better recovery.
  • Sparsity still has boundaries: Even when $D_I/D_H$ sits comfortably in the green zone, extreme sparsity is fragile. Activating between $1/8$ and $1/2$ of the expert pool strikes the safest balance during fast recovery.
  • Protect the eyes while the brain heals: Synchronously updating the ViT while converted MoE layers are still chaotic triggers cascading multimodal errors. Delaying ViT unfreezing visibly lowers and stabilizes early training loss.
Figure 4: Sizing rule. Score (blue) and Pactive (orange) versus DI/DH at TopK/NE = 4/16. Green and grey bands mark the empirical recommended (1.5–8) and feasible (1–12) ranges.

Key Results

  • Superior Budgeted Construction: Under a 17B total / 5B active LLM budget, naive Split-only conversion of InternVL3-14B collapses to an average score of 58.2 (-29.5% vs. dense) due to an extreme width bottleneck ($D_I/D_H = 0.17$), while Upcycling a 2B model hits diminishing returns at 76.9. LEGO selects an 8B base with a Hybrid 8s24E4A configuration ($D_I/D_H = 2.64$), scoring 80.7—within 2.2% of the dense 14B ceiling.
  • Surpassing Smaller Dense Baselines: At an 8B/3B budget, LEGO’s hybrid Qwen2-VL-2B (2s16E4A) reaches 75.9, outperforming its equivalently trained dense 2B parent (73.1) by +3.8% and beating external pruning/shared-expert conversion baselines like ToMoE and CMoE on InternVL3.
  • Real-World Speedups: On an NVIDIA A100 (batch size 1), converting InternVL3-8B via LEGO (16s16E8A) cuts mean query latency from 0.801s to 0.702s and boosts generation throughput by 20.3% (from 80.02 to 96.29 tokens/s) at virtually identical peak VRAM (~17.8 GiB), trading ~3.1 points of accuracy for snappy execution.

Limitations and Future Work

The authors candidly note that their sizing rules ($D_I/D_H \in [1.5, 8]$) are empirical guidelines for fast Dense-to-MoE recovery, not universal physical laws for training MoEs from scratch. Furthermore, because LEGO jointly picks both the source backbone and the MoE structure to meet a budget, cross-source table comparisons reflect practical end-to-end engineering rather than isolated, single-backbone causal effects. Finally, hardware speedups were measured at batch size 1 on an A100 where all expert weights stay resident in memory; different serving batch sizes or offloading setups will shift the efficiency picture.

Summary updated

Abstract

We propose LEGO, a budget-aware Dense-to-MoE methodology that converts pretrained vision-language models into sparse FFN-MoE variants under a target architectural budget $(P_{\mathrm{total}}, P_{\mathrm{active}})$. Our study is motivated by a counterintuitive recovery pattern: the same activation ratio can work well for some dense backbones but lead to sharp performance drops in others under the same recovery recipe, indicating that raw sparsity alone is an unreliable design rule. Through controlled recovery experiments across VLM families and scales, we identify the activated-FFN-to-hidden ratio $D_I/D_H$ as a backbone-comparable structural measure and summarize empirical sizing rules for avoiding severe bottlenecks and identifying where gains taper off. LEGO operationalizes these rules through a discrete budget-aware search over Split, Upcycle, and Hybrid constructions and introduces a moment-matching scaling factor to reduce the initialization scale shift caused by sparse FFN aggregation. Finally, we use a two-stage multimodal recovery recipe that first stabilizes the sparse LLM with the vision tower frozen, then jointly fine-tunes the full VLM. Under matched data and training protocols, the reported LEGO configurations match or exceed the recovery quality of the Split-only and Upcycle-only baselines, while the sizing rules help focus architecture search on a small set of candidates.
BibTeX
@inproceedings{yin2026lego,
  author = {Qishen Yin and ZiangWu and Juntong Wu and Peng Jin and Hao Li and Tanghui Jia and Liuhan Chen and Bin Zhu and Li Yuan},
  title = {{LEGO: Sizing Rules for Budget-Aware Dense-to-MoE Conversion of Vision-Language Models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=VMSa6ZsqsD},
}
Figure