The Trillion-Parameter Era: Compute and Data Challenges in Scaling Large Models
As large language models enter the trillion-parameter era, scaling brings unprecedented compute and data challenges. This article explores the relationship between parameter scale and model capabilities, estimates training and inference compute costs, analyzes memory and hardware planning, and discusses data bottlenecks and optimization strategies under compute constraints.
1. Why Parameter Scale Remains a Key Variable for Capability Limits
There is an empirical positive correlation between parameter scale and model capabilities. Given similar model architectures and training methods, increasing the parameter count generally improves language understanding, knowledge coverage, and complex reasoning. This is the primary reason the industry has continued to pursue larger models over the past two years.
However, parameter scale is not the only variable. The quantity and quality of training data, training compute, model architecture, and alignment methods during the post-training stage jointly determine the final performance. The returns from scaling also diminish; doubling the parameters does not usually double the capabilities. Therefore, deciding whether a larger model is worth the investment requires simultaneously evaluating compute costs, data supply, and actual task benefits.
Recent discussions regarding the parameter scale of certain models stem from unconfirmed market rumors. This article uses these figures only as a background for discussion and does not judge the capabilities or release timelines of any specific product based on them.
2. From Parameter Count to Compute: Estimating Training and Inference Costs
The parameter count determines storage requirements, while the training data size and parameter count jointly determine compute requirements. The industry commonly uses a rough estimation method: the floating-point operations (FLOPs) required to train a dense model are approximately 6 × parameters × training tokens, combining forward and backward propagation.
# Rough estimate of training compute (dense model)def train_flops(params, tokens):# The coefficient 6 comes from empirical estimation: about 2 ops for forward, 4 ops for backwardreturn 6 * params * tokens# Example: 5.4 trillion parameters, trained on 10 trillion tokens (for order-of-magnitude demonstration only)N = 5.4e12D = 1e14print(f"{train_flops(N, D):.2e} FLOPs") # Approximately 3.24e27
During inference, generating each token in a dense model requires approximately 2 × parameters FLOPs. More parameters mean higher compute overhead per response, leading to increased latency and cost.
Sparse Activation: Total Parameters ≠ Compute per Step
The Mixture of Experts (MoE) architecture divides the model into multiple expert sub-networks, activating only a portion of them for each token. This allows the total parameter count to be very large while only using a small fraction of parameters during a single inference step. Therefore, when discussing model scale, it is essential to distinguish between “total parameters” and “activated parameters.” Their impacts on memory usage, throughput, and cost are different; conflating them will lead to incorrect resource estimates.
3. Memory and Device Planning
The memory occupied by weights is approximately equal to the parameter count multiplied by the number of bytes per parameter. A 16-bit floating-point format uses 2 bytes per parameter, while a 4-bit low-bit format uses 0.5 bytes per parameter.
# Only estimates weight memory, excluding KV cache, activations, and optimizer states during trainingdef weight_memory_tb(params, bytes_per_param):return params * bytes_per_param / 1e12# Assuming 80GB memory per device, calculates the theoretical minimum number of devices (rounded up)def min_devices(total_tb, device_gb=80):return math.ceil(total_tb * 1000 / device_gb)
The table below shows the theoretical lower limits based on the above formulas:
| Parameter Scale | Storage Precision | Weight Memory | Minimum 80GB GPUs (Theoretical) |
|---|---|---|---|
| 1 Trillion | 16-bit | 2 TB | 25 |
| 3 Trillion | 16-bit | 6 TB | 75 |
| 5.4 Trillion | 16-bit | 10.8 TB | 135 |
| 5.4 Trillion | 4-bit | 2.7 TB | 34 |
The number of devices required for actual deployment will be higher. KV cache, communication overhead, and redundant replicas all require additional space. Low-bit quantization can significantly reduce memory but will introduce some precision loss, necessitating evaluation on target tasks before deployment.
Memory pressure is even greater during the training phase. Mixed-precision training requires saving master weights, gradients, and optimizer states, commonly estimated at over ten bytes per parameter. Consequently, the resource requirements for training a model of the same scale are typically much higher than for inference.
4. Data: Why Growth Rate Becomes a Bottleneck
Research related to scaling laws indicates that the number of model parameters and training tokens need to be roughly matched. If parameters increase without sufficient training data, the model becomes undertrained, and the marginal value of the parameters decreases accordingly.
The supply of high-quality text data is limited, and continued data expansion faces three main challenges:
- Data Quality: Requires removing duplicate content, filtering low-quality text, and reducing noise.
- Data Mixture: The proportions of languages, domains, and task types directly affect the model’s capability distribution.
- Synthetic Data: Using models to generate training data can supplement scarce domains, but it requires preventing error accumulation and distribution shift.
The data processing pipeline can be simplified into the following structure:
def build_corpus(raw_docs, weights, threshold):docs = deduplicate(raw_docs) # Exact and approximate deduplicationdocs = [d for d in docs if quality_score(d) >= threshold]docs = sample_by_mixture(docs, weights) # Sampling by domain weightsreturn docs
Each step should maintain traceable records, including source, processing version, and filtering rules. Once data quality issues enter training, they are difficult to eliminate later through hyperparameter tuning.
5. Coping Paths Under Compute Constraints
1. Model Compression
The goal of model compression is to reduce compute and storage overhead while preserving capabilities as much as possible. Common methods include the following categories.
- Quantization:
