Open-Source LLM Selection: MoE Architecture and On-Device Deployment Explained
Choosing an open-source LLM is about matching architecture to hardware, not picking the largest parameter count. This article explains how MoE separates total from activated parameters to deliver high throughput on servers, how per-layer embedding keeps on-device models' effective parameters far below their total size, and how to build a selection framework for cloud and mobile/edge deployments — covering benchmark methodology, memory footprint, and quantization.
Introduction: Why Model Selection Should Be “Tailored to Fit”
The open-source model ecosystem has grown rapidly, and a bigger parameter count no longer means a better fit. A real selection decision has to answer three questions at once:
- Can the model’s inference throughput (tokens per second, TPS) keep up with your workload?
- Is end-to-end latency — first-token latency in particular — within acceptable bounds?
- Can it fit within the memory budget and power envelope of the target hardware?
Within a single model family, vendors typically ship several sizes aimed at different deployment shapes: some optimized for server-side inference efficiency, others slimmed down for mobile and edge devices. Understanding the architectural trade-offs behind these specs is what keeps you from making two classic mistakes — forcing a large model onto edge hardware, or forcing a small model to carry high concurrency. What follows works through the architecture, the parameter-efficiency techniques, and the evaluation approach in turn.
MoE Architecture: Why a Large Total Parameter Count Can Still Run Fast
A traditional dense model activates every parameter at each inference step. More parameters means more computation, so inference speed drops noticeably as the model scales up. The mixture-of-experts (MoE) architecture breaks this coupling.
The core idea of MoE is to split the feed-forward (FFN) layers into multiple parallel expert subnetworks and add a routing mechanism (gating/router) that selects only a few experts per step. A configuration common in the industry illustrates the effect: a model may hold roughly 26B parameters in total while only about 3.8B are activated per forward pass. The vast majority of parameters simply stand by, and only the subset chosen by the router takes part in computation.
This leads to a key takeaway: inference cost scales with activated parameters, not total parameters. That is why MoE versions often show lower latency and higher throughput in practice — on the same accelerator, their TPS typically beats a dense model of comparable quality. If raw inference speed and concurrency are your top priority, MoE is usually the better choice.
MoE does come with costs:
- Memory still scales with the total parameter count. All expert weights must stay resident in memory, so the memory requirement is higher than that of a dense model with a similar activation count.
- Routing load can become unbalanced. If certain experts get hit disproportionately, they become hotspots that need load-balancing measures.
- Training and deployment are more complex. The router adds engineering overhead in training stability and expert-parallelism strategy.
It is also worth stressing that a model’s position on a public leaderboard — sixth place, say — is only one data point. Such rankings measure general capability and do not translate directly into performance on your specific task and hardware. Validate with your own workloads instead of relying on rankings alone.
On-Device Small Models: Effective Parameters, Embedding Overhead, and Tiered Design
Beyond the server-side MoE models, a family usually also ships smaller specs for on-device use (phones, IoT, embedded systems). The concept most easily misunderstood here is “effective parameters.”
Take two typical on-device specs:
- One with roughly 4.5B effective parameters (about 8B once embeddings are counted), aimed at higher-powered mobile terminals and edge computing platforms.
- One with roughly 2.3B effective parameters (about 5B with embeddings), targeting phones, IoT, and lightweight edge devices — the best fit for on-device deployment in the entire family.
The letter markers often seen in these model names point to exactly this effective-parameter dimension. Effective parameters are those that take part in core computation such as attention and Transformer layers, and they differ substantially from the total parameter count.
Why Is the Total Parameter Count So Much Larger Than the Effective One?
The answer lies in a parameter-efficiency technique called per-layer embedding. Each decoder layer gets its own small embedding table, used to represent the tokens going in and out.
These embedding tables are not small, but their role is mainly embedding lookup — retrieving the corresponding vectors through an index rather than performing large matrix multiplications. Lookup is memory-bound and computationally cheap. So although counting the tables inflates the total parameter count, the parameters actually activated during the forward pass are still dominated by the core Transformer layers.
The engineering payoff: vocabulary coverage and representational capacity are expanded with almost no added compute, so a small model can still achieve solid language understanding under a limited compute budget. That is the essence of “effective parameters far smaller than total parameters.”
A Selection Framework by Deployment Scenario
Once the architecture is clear, selection has a solid basis. The dimensions below form a workable framework:
| Dimension | Server / cloud | Mobile / edge |
|---|---|---|
| Primary goal | High throughput, high concurrency | Low latency, low power, small footprint |
| Architectural preference | MoE (small activation, high TPS) | Small dense or efficient on-device spec |
| Memory sensitivity | Medium (large memory acceptable) | High (limited by device memory) |
| Optimization focus | Batching, expert parallelism | Quantization, pruning, lookup-friendly design |
Concrete recommendations:
- Benchmark your real workload, not the leaderboard. Run stress tests with your typical inputs and load, and measure first-token latency, TPS, and quality metrics.
- Favor MoE for high-concurrency server scenarios. Its small activation count gives it a natural throughput advantage, but check memory headroom early.
- Focus on effective parameters and memory footprint on-device. Lookup-friendly designs such as per-layer embedding hold quality while keeping compute cost low, making them a better fit for constrained hardware.
- Watch out for the parameter-count trap. A large total count neither guarantees an edge device can run it nor guarantees better quality; look at effective parameters, activation size, and measured results.
- Treat quantization as a key step in on-device deployment. Compressing footprint and memory use with INT8/INT4 and similar techniques is standard practice for mobile and IoT.
Conclusion
Selecting an open-source model is fundamentally a process of matching business needs, architectural traits, and hardware constraints. MoE achieves both quality and inference efficiency through sparse activation — large in total, small in activation — which suits server scenarios where throughput and low latency matter. On-device models use parameter-efficiency techniques such as per-layer embedding to hit a clever balance: small effective parameters with low lookup overhead on limited hardware.
Back to the opening question — how should you evaluate an open-source model? Not in isolation from its parameter count or leaderboard position, but against your deployment shape, hardware conditions, and real workload. Parameter efficiency, scenario fit, and empirical validation are the three main lines of sound selection. If you are planning to deploy model capabilities in the cloud or on-device, the model development and service offerings from Baidu AI Cloud can help lower the engineering barrier from selection to deployment.
