# Four Dimensions of Open-Source LLM Scaling: A Deep Dive
Open-source LLMs evolve along four coupled dimensions: data scaling, architecture and efficiency, post-training paradigms, and environment scaling toward agents. This article breaks down each dimension, from token counts and preprocessing pipelines to grouped-query attention, MoE sparsity, verifiable outcome-based RL such as GRPO, thinking budgets, and parallel sandbox infrastructure, and translates them into practical guidance for choosing, deploying, and post-training models.
1. Introduction: From Version Bumps to Systematic Evolution
Open-source LLMs have been iterating faster and faster. Version numbers keep climbing, but behind them lies a highly systematic, decomposable technical evolution path. Abstracting away the generational differences, that path resolves into four tightly coupled dimensions: data scaling, architecture scaling and efficiency optimization, post-training paradigm upgrades, and environment scaling plus agentization.
These dimensions do not advance in isolation. They reinforce one another, and together they determine both the capability ceiling on real tasks and the inference cost. Understanding them is far more valuable than memorizing the parameter counts of any single generation.
2. Data Scaling: From Token Stacking to Multi-Stage Pipelines and Synthetic Data
2.1 Scale Leaps and Multilingual Coverage
The scale of pretraining data in open-source LLMs has grown substantially: roughly 3 trillion tokens in the first generation, then 7 trillion and above, then 18 trillion, and up to 36 trillion tokens in the latest generation, spanning over a hundred languages and dialects.
This follows classic scaling-law intuition: when compute and parameters expand in tandem, the data volume has to grow to match. Otherwise the model quickly slides into diminishing returns.
2.2 Preprocessing Pipelines Determine Data Quality
Token count is only the surface. What actually determines model quality is the data governance pipeline. A mature preprocessing chain typically includes:
- Language identification: accurately separating languages and dialects to avoid contamination;
- Exact deduplication: exact-match deduplication after text normalization, to eliminate fully duplicated samples;
- Fuzzy deduplication: MinHash with LSH (locality-sensitive hashing) to detect near-duplicates, reducing memorization and overfitting risk;
- Quality and rule-based filtering: heuristic rules combined with lightweight classifiers to strip out low-quality, spam, advertising, and garbled text;
- Targeted upsampling: modest repeated sampling of high-quality, scarce-domain data to raise the density of useful signal.
2.3 Multi-Stage Pretraining and Synthetic Data
Modern training is no longer a single “one-pot” run. It is split into stages: first build foundational capability on a very large general-purpose corpus, then switch to high-quality, reasoning-dense corpora to strengthen capabilities, and finally run targeted optimization for specific goals such as long context.
Meanwhile, high-quality synthetic data has become the key supplement for scarce reasoning samples: strong models generate problems and solutions with complete reasoning chains, filling the gap left by insufficient real high-quality corpora. One caveat matters here — synthetic data must be strictly validated, otherwise it introduces hallucination and bias.
3. Architecture Scaling and Efficiency: Balancing Expressiveness Against Compute Cost
3.1 From a Standard Dense Foundation
Early models mostly used a standard decoder-only Transformer paired with SwiGLU activations, RMSNorm normalization, RoPE relative positional encoding (with the inverse frequency matrix typically computed in FP32 to prioritize numerical stability), and QKV bias terms. This combination is thoroughly validated and forms a robust engineering baseline.
3.2 GQA and KV Cache Optimization
During inference, the KV cache often consumes a large amount of GPU memory. Grouped-query attention (GQA) lets multiple query heads share the same set of key/value heads, sharply shrinking the KV cache while barely degrading quality. That in turn supports longer contexts and higher throughput:
# Simplified GQA: multiple query heads share one group of KV headsdef gqa_attention(q, k, v, num_kv_groups):# q: [batch, num_heads, seq, dim]# k,v: [batch, num_kv_heads, seq, dim] where num_kv_heads < num_headsk = repeat_kv(k, num_kv_groups) # replicate KV to match the head countv = repeat_kv(v, num_kv_groups)return scaled_dot_product_attention(q, k, v)
3.3 The Two Routes: Dense and MoE
Later, Dense and MoE (mixture-of-experts) emerged as parallel routes. The core idea of MoE is “a large total parameter count, but each token activates only a small subset of experts,” which expands model capacity while keeping the actual compute under control:
# Simplified sparse MoE forward passdef moe_forward(x, experts, gate, top_k=8):scores = gate(x) # score each token against every experttopk_val, topk_idx = topk(scores, k=top_k)topk_weight = softmax(topk_val, dim=-1)output = zeros_like(x)for idx, w in zip(topk_idx, topk_weight):output += w * experts[idx](x) # only the selected top_k experts are activatedreturn output
A common engineering naming convention reports both total and active parameters (for example, “30B total / ~3B active”). Together they define the tradeoff between memory footprint and actual compute.
3.4 Hybrid Attention and Higher-Sparsity MoE
Newer versions push further with hybrid attention: combining linear attention (gated DeltaNet-style structures) with standard gated attention. Linear attention scales roughly linearly with sequence length, which suits long contexts, while standard attention remains irreplaceable for local precision. Mixing the two captures both efficiency and expressiveness.
At the same time, higher-sparsity MoE makes it possible to trade an extremely small activation cost for an enormous parameter capacity. All of these directions share a single goal: approximating a larger effective model under a limited compute budget.
4. Post-Training Upgrades: From Alignment to Verifiable Reasoning
4.1 The Three-Stage Paradigm
Post-training usually follows a combination of SFT plus preference alignment: supervised fine-tuning (SFT) first injects instruction-following ability, then reinforcement learning aligns the model with human preferences (for example PPO/RLHF, reinforcement learning from human feedback).
Open-source practice has evolved further into large-scale SFT plus multi-stage RL: direct preference optimization (DPO) handles efficient alignment offline, while group relative policy optimization (GRPO) provides continued reinforcement online.
4.2 Outcome-Based Reinforcement Learning
For verifiable-outcome tasks such as math and code, it is possible to skip training a reward model and use an outcome verifier directly as the reward signal (Outcome RL).
The elegance of GRPO is that it samples a group of outputs for the same prompt and uses the relative ranking of rewards within the group as the advantage estimate, eliminating the need for a separate value network:
# Simplified GRPO step: group-relative rewards, no value networkdef grpo_step(policy, ref_model, prompt, reward_fn, group_size=8):group = [policy.sample(prompt) for _ in range(group_size)]rewards = [reward_fn(prompt, o) for o in group]baseline = mean(rewards)advs = [(r - baseline) / (std(rewards) + 1e-8) for r in rewards]# Combine a PPO-clip objective with KL regularization to keep the policy# from drifting too far from the reference modelupdate(policy, group, advs, ref_model)
4.3 Unifying Thinking and Non-Thinking Modes with Budget Control
An important product-level advance is unifying “deep thinking” and “fast direct answering” inside a single model, with a thinking budget that controls compute spend flexibly at inference time. Simple questions take the non-thinking path to save compute; complex reasoning gets more thinking tokens. This turns “reasoning cost” into a tunable parameter, which matters a great deal for real deployments.
5. Environment Scaling and Agentization: From Generating Code to Completing Tasks
Traditional code generation only handles single-turn completion. Agentization requires the model to handle multi-step interaction, tool invocation, and strategy adjustment based on feedback from the environment. This main line includes:
- Agentic coding: upgrading code generation into a full closed loop that can read and write files, execute commands, and debug iteratively;
- Large-scale parallel sandboxes: tens of thousands of parallel execution sandboxes that supply training with massive, realistic, recoverable environment trajectories;
- Long-horizon agent RL: optimizing performance on long chains of tasks spanning many steps;
- Realistic environments and multimodal collaboration: strengthening execution in real settings and multimodal cooperation;
- Language world models to simulate environment feedback: using a modeled environment to approximate real feedback and cut expensive sampling costs.
At its core this is “environment as data”: the more interactive, verifiable environments you have, the faster agent capabilities improve.
6. Engineering Takeaways for Developers
- Size on active parameters, not total: MoE total parameter counts are large, but throughput is actually driven by active parameters and the KV cache. Estimate compute from the active size when planning deployment.
- Match post-training to the task: prefer outcome-verification RL for verifiable tasks, and preference alignment for open-ended conversation.
- Make inference cost tunable: use thinking-budget-style mechanisms so simple requests take lightweight paths.
- Deployment depends on supporting infrastructure: agentic training and inference place heavy demands on general capabilities such as parallel sandboxes, object storage, container platforms, logging services, and monitoring and alerting. Stable infrastructure is a prerequisite for good results.
7. Conclusion
The rapid progress of open-source LLMs is fundamentally the result of coordinated scaling across four dimensions: data, architecture, post-training, and environment. For developers, following these four threads matters more than chasing a specific release. It lets you quickly judge the capability boundary, cost structure, and fit of any new generation of models.
