The Evolution of Open-Source LLM Scale and Mixture of Experts (MoE) Architecture
This article explores the technical evolution of open-source large language models (LLMs), focusing on the trade-offs of scaling parameters, the decoupling of capacity and computation via the Mixture of Experts (MoE) architecture, native multimodal training, and long-context attention mechanisms. It also provides engineering insights into evaluation methodologies, cost modeling, and practical deployment considerations for developers and enterprises.
1. Background: Why Open-Source Models Continue to Scale
The parameter scale of open-source large language models (LLMs) has continued to grow over the past year. The benefits of scaling up are mainly reflected in broader knowledge coverage, complex reasoning capabilities, and stability in long-chain tasks. However, the costs are equally obvious: training compute, inference memory, and per-call costs all increase accordingly. For developers and enterprises, the key issue is not simply “the larger the parameters, the better,” but rather finding an acceptable balance between capability, latency, and cost.
Understanding this requires breaking down a few concepts. Total parameters measure the model’s capacity; activated parameters determine the actual overhead of a single forward pass; context length determines the range of information a model can process at once; and memory usage during inference is jointly determined by weights, activations, and the key-value (KV) cache. Mixing these metrics together for comparison can easily lead to misleading conclusions.
2. Mixture of Experts: Decoupling Total Capacity from Per-Token Computation
The core idea of the Mixture of Experts (MoE) architecture is that the model contains a large number of feed-forward sub-networks (experts), but each input token only passes through a small subset of them. A routing network selects experts based on the input representation and performs a weighted sum of their outputs. This allows the model to have a very large total parameter count, while the computation per token only correlates with the number of activated experts.
The basic process is as follows:
# Illustrative: Top-k routing forward passdef moe_forward(x, router, experts, k=2):scores = router(x) # Score for each experttopk_idx = top_k_indices(scores, k) # Select top k experts by scoreweights = softmax(scores[topk_idx]) # Normalize weightsout = 0for w, i in zip(weights, topk_idx):out += w * experts[i](x) # Compute only the selected expertsreturn out
This design brings three direct benefits. First, capacity is decoupled from computation, allowing more knowledge to be accommodated at the same inference cost. Second, different experts may form a certain degree of division of labor, but this division is usually implicit and should not be understood as manually designed domain modules. Third, both training and inference must consider load balancing: if routing is chronically concentrated on a few experts, it wastes parameters and slows down distributed training.
Engineering costs also exist. Expert parameters must either reside entirely in memory or be loaded on demand through communication scheduling, and cross-device all-to-all communication can become a bottleneck. Therefore, when evaluating MoE models, one should simultaneously pay attention to total parameters, activated parameters, the number of experts, routing strategies, and the parallelism methods used for deployment.
3. Native Multimodal Training: From Late Fusion to Unified Representation
Early multimodal systems commonly attached a vision encoder to the front of a language model, mapping image features into the text embedding space via an adapter layer. This approach has low engineering costs, but the alignment between vision and language often remains superficial, resulting in limited effectiveness for tasks requiring fine-grained understanding, such as charts, UI screenshots, and video timelines.
The approach of native multimodal training is to let modalities like text and images learn jointly within the same sequence during the pre-training phase. Its advantage is more natural cross-modal reasoning, such as locating UI issues based on a screenshot or inferring trends from a chart. The difficulties lie in data ratio, loss weighting across different modalities, and preventing capability degradation in one modality during training.
To determine whether a multimodal model truly employs native training, look at three aspects: whether the training data contains a large amount of interleaved image-text sequences; whether visual inputs share the same attention mechanism as text; and whether there is a noticeable capability drop on pure text tasks. Conclusions cannot be drawn solely from marketing language; they must be verified through evaluation.
4. Long Context and Engineering Trade-offs in Attention Mechanisms
The computational complexity of standard self-attention grows quadratically with sequence length, and the memory footprint of the KV cache grows linearly. When the context reaches the million-token level, simply scaling up hardware can no longer meet cost requirements, so the industry widely adopts structural improvements.
Common directions include the following:
- Sparse Attention: Focuses only on local windows or selected key positions to reduce computation, but may miss long-distance dependencies.
- Linear Attention: Reduces complexity to nearly linear through kernel function approximation, with smaller state footprint during inference, but is typically weaker than standard attention on precise retrieval tasks.
- Hybrid Structures: Alternates a few full-attention layers with efficient attention layers to strike a balance between precision and efficiency.
Another easily overlooked issue is the accumulation of residual information in deep networks. As the number of layers increases, the numerical range of hidden states may continuously expand, diluting information from early layers. Some solutions mitigate this by reorganizing how information is aggregated within residual paths. For users, such changes are usually invisible but can affect the stability of long-document understanding and should be verified through long-text retrieval and summarization tasks.
The value of a million-level context window depends on the actual task. Putting an entire code repository or a year’s worth of meeting notes into the context does not automatically mean the model can accurately use every piece of information within it. “Needle in a haystack” retrieval tests, as well as cross-paragraph reasoning tests, should be adopted to confirm the effective utilization rate of the context.
5. Switching Between Thinking and Non-Thinking Modes
Many models support switching between direct answering and explicit reasoning. Reasoning mode generates more intermediate tokens, making it suitable for mathematical proofs, complex debugging, and multi-step planning; direct mode has lower latency and cost, making it suitable for Q&A, rewriting, and simple classification. The trade-off between the two is not a matter of capability, but a matching of task complexity and cost budget.
In practice, a routing layer can be designed: first use lightweight rules or a small model to judge task difficulty. Simple requests go through direct mode, while complex requests enter reasoning mode, with a maximum reasoning token limit set to control costs. Since the output length of reasoning mode is difficult to estimate accurately, both billing and timeout strategies should leave a margin.
6. Evaluation: Reading Leaderboards and Building Custom Benchmarks
Public leaderboards are important references, but all types of leaderboards have biases. Tool-augmented evaluations measure a model’s ability to call external tools, and results are influenced by tool interfaces and prompt design; code and front-end generation voting leaderboards rely on human or model votes, reflecting preferences rather than correctness; general knowledge benchmarks may suffer from training data leakage. Therefore, a single score lead is insufficient to support a model selection conclusion.
A more reliable approach is to build an evaluation set aligned with your own business and fix the evaluation protocol:
# Illustrative: Pass rate evaluation on a fixed sample setdef evaluate(model, cases):passed = 0for case in cases:output = model.generate(case["prompt"], max_tokens=case["budget"])if case["check"](output): # Rule-based validation or unit testpassed += 1return passed / len(cases)
The evaluation set should include real failure cases, and the checking method should prioritize automatically verifiable rules or unit tests. Subjective scoring requires cross-annotation by multiple people and recording annotation consistency metrics. Whenever the model or prompt is changed, it should be re-run on the same evaluation set.
7. Cost Modeling: Task Success Rate as the Core Metric
Comparing only the unit price per million tokens fails to reflect the true cost. A more capable model might complete the same task with fewer retries, so a more reasonable metric is the cost per unit task:
Cost per unit task = Cost per call × Average number of calls ÷ Task success rate
Here, the average number of calls includes retries, tool call rounds, and internal messages in multi-agent collaboration. The task success rate needs to be provided by the aforementioned evaluation set. Calculated using this formula, a model with a lower unit price but a low success rate may ultimately cost more than a model with a higher unit price.
8. Deployment Suggestions and Selection Checklist
- Define task types. Q&A, code…
