Scaling Bottlenecks of Trillion-Parameter LLMs: Compute, Data, and Compression
This article examines the main constraints on scaling large language models to trillions of parameters. It covers how training compute, data supply, memory and storage, and mixture-of-experts architectures limit model size. It also outlines compression techniques, including quantization, pruning, and knowledge distillation, as ways to approach the capability of larger models under limited resources.
1. Why Parameter Count Still Matters as a Capability Ceiling
Parameters are the adjustable weights a model learns during training. They determine the function space the model can represent. With similar architectures and training methods, a larger parameter count usually yields stronger fitting and generalization. A widely cited empirical rule shows that validation loss scales roughly as a power law with parameter count, dataset size, and training compute. Scaling therefore remains the main path to a higher capability ceiling, but the gains diminish with each step. Every expansion also requires training and deployment conditions to be upgraded in parallel.
Discussing trillion-parameter models requires considering three constraints at once. Training compute must support enough computation. Training data must cover enough knowledge and task types. Deployment cost must be acceptable to the business. If any one of these falls short, the benefit of a larger parameter count is weakened.
Parameter counts for some models reported publicly are often industry estimates that have not been verified by official technical reports. Engineering decisions should rely on officially disclosed information. This article only discusses general estimation methods.
2. Training Compute: The Product of Model Size and Data
Training a Transformer-based language model requires a number of floating-point operations that can be estimated with a common approximation:
C ≈ 6 × N × D
In this formula, N is the number of parameters, D is the number of training tokens, and the factor 6 comes from the common estimate for forward and backward passes. The formula only supports order-of-magnitude judgments. Actual training time also depends on hardware utilization, parallelization strategy, communication overhead, and other factors.
Consider a hypothetical example. If the parameter count N is 1 trillion and the training data D is 20 trillion tokens, then:
C ≈ 6 × 10^12 × 2 × 10^13 = 1.2 × 10^26 FLOPs
This result illustrates two points. First, parameters and data multiply together, so increasing either one raises the total compute demand. Second, under a fixed compute budget, increasing the parameter count reduces the amount of data you can use, and vice versa. Choosing a model size is therefore essentially a matter of allocating a compute budget between parameters and data.
In practice, insufficient data leads to undertrained models, where parameters sit idle and capability improves slowly. When data is abundant relative to parameters, model capacity becomes the bottleneck. The two must be balanced rather than maximized separately.
3. Data Supply: Quality and Mixture Matter More Than Volume
Large-scale pretraining demands data that is abundant, high quality, diverse, and up to date. The supply of high-quality text is limited. As scale grows, the share of low-quality data rises and training returns decline. For this reason, data engineering increasingly focuses on selecting better data rather than collecting more.
Common data processing steps include the following:
- Deduplication: Remove exact and near-duplicate documents to reduce the model’s over-memorization of frequently repeated passages.
- Quality filtering: Use rules and classifier models to identify garbled text, advertising, and machine-generated content with little information value.
- Domain mixing: Set sampling ratios across categories such as languages, disciplines, code, and mathematics, and adjust them dynamically during training.
- Safety and compliance filtering: Remove content that is illegal, involves personal privacy, or carries copyright risk.
Post-training data requirements differ. Instruction data determines how the model interprets and responds to tasks. Preference data shapes the style and trade-offs in model outputs. Reasoning and code data directly affect the quality of complex task completion. These datasets are usually much smaller, but they require higher labeling consistency and correctness.
4. Memory and Storage: The Hard Constraint on Parameter Scale
Parameter scale is first limited by storage capacity. Storing the weights alone requires space equal to the parameter count multiplied by the bytes used per parameter. The memory footprint varies greatly across numerical precisions:
def weight_size_tb(params_trillion: float, bytes_per_param: float) -> float:"""Calculate only the weight footprint in decimal TB, excluding optimizer states and activations."""# 1 trillion parameters × 1 byte = 1 TBreturn params_trillion * bytes_per_paramfor precision, nbytes in [("BF16", 2), ("FP8", 1), ("INT4", 0.5)]:print(f"{precision}: {weight_size_tb(5.4, nbytes):.1f} TB")# Example output:# BF16: 10.8 TB# FP8: 5.4 TB# INT4: 2.7 TB
These results cover only the weights. Training also requires storing gradients, optimizer states, and intermediate activations. In mixed-precision training, the combined footprint per parameter is often estimated at about 16 bytes. The total memory needed for training is therefore far higher than for inference. The resource configuration for the same model can differ enormously between training clusters and inference clusters.
The way memory is distributed also shapes engineering design. The model must be split across multiple accelerators using tensor parallelism, pipeline parallelism, data parallelism, and other methods. Cross-device communication bandwidth often becomes the bottleneck. The larger the model and the finer the partitioning, the higher the share of communication overhead.
5. Mixture of Experts: Evaluate Total and Active Parameters Separately
A mixture-of-experts architecture splits some layers of the network into multiple expert sub-networks. Each input token passes through only a few of these experts. As a result, the total parameter count can be very large while the number of parameters activated in each forward pass stays comparatively small.
This architecture requires distinguishing two metrics:
- Total parameters: These determine storage capacity, the model’s capacity ceiling, and the parameter scale that must be maintained during training.
- Active parameters: These determine the compute and latency of a single inference pass.
Suppose a model has 5.4 trillion total parameters and activates about one tenth of them in each forward pass. Each forward pass then costs roughly the same as a dense model with 540 billion parameters, but storage still scales with 5.4 trillion. This structure partly decouples capability capacity from inference cost, which is a common way to control costs.
Mixture-of-experts also introduces new problems. If routing is unbalanced, some experts become overloaded while others stay idle for long periods. Training requires a load-balancing loss and management of communication between experts. The complexity of these components is often underestimated.
6. Compression: Approaching Larger-Model Capability with Limited Resources
When compute and storage cannot support the ideal model size, compression is a common complementary approach. It includes three main categories.
6.1 Quantization
Quantization maps high-precision values to lower-precision representations, such as reducing 16-bit floating point to 8-bit or 4-bit integers. It significantly reduces storage and bandwidth requirements but introduces rounding error. In practice, methods such as per-channel and group-wise quantization are common, and calibration data is used to control accuracy loss. Evaluation should check both general benchmarks and the key metrics of the target application rather than relying only on average scores.
6.2 Pruning
Pruning reduces model size by removing weights or structures that contribute little. Unstructured pruning achieves high compression ratios but requires specific hardware or sparse computation libraries to deliver speedups. Structured pruning removes channels, attention heads, or entire layers directly, which makes deployment easier. Its accuracy impact is typically larger, however.
6.3 Knowledge Distillation and Self-Distillation
Knowledge distillation trains a smaller student model to learn the output distribution of a larger teacher model, not just hard labels. Self-distillation uses outputs generated by the model itself, or by a stronger version from the same family, as the supervision signal to train a model of similar or smaller size. The core idea is that soft labels encode relative relationships between classes, which carry richer information than a single correct answer.
The following illustrative loss function is pseudocode. The actual implementation must be adjusted to the tensor shapes of the task:
def distill_loss(student_logits, teacher_logits, labels, T=2.0, alpha=0.5):# Soft targets: KL divergence between the student distribution and the# teacher distribution, both smoothed by temperature Tsoft_target = softmax(teacher_logits / T)soft_pred = log_softmax(student_logits / T)soft_loss = kl_divergence(soft_pred, soft_target) * (T * T)# Hard target: cross-entropy with the ground-truth labelshard_loss = cross_entropy(student_logits, labels)return alpha * soft_loss + (1 - alpha) * hard_loss
A higher temperature T produces a smoother output distribution, which helps the student learn the relative relationships between classes. The coefficient alpha controls the weight between the two loss terms and should be tuned using validation results.
7. Post-Training: Turning Scale into Usable Capability
A pretrained model has broad language and knowledge foundations, but it may not reliably complete specific tasks. Post-training usually includes the following steps:
- Supervised fine-tuning: Use high-quality instruction data to teach the model to answer in the required format and according to instructions.
- Preference optimization: Adjust output tendencies in helpfulness, safety, and style based on preference pairs labeled by humans or models.
- Targeted reinforcement: For scenarios such as code, mathematics, and tool use, continue training with verifiable reward signals or test suites.
- **Regression ev
