Reducing LLM Pre-training Compute Costs with Token Stacking Training

    This article explores how Token Stacking Training can reduce the compute costs of large language model (LLM) pre-training. It breaks down the core mechanisms of this training method, analyzes experimental data from a 10B parameter Mixture-of-Experts (MoE) model, compares it with system-level optimization approaches, and provides a practical evaluation checklist for engineering teams looking to adopt this technique.

    1. Why Pre-training Costs Are Becoming the Focus

    Over the past few years, model capability improvements have primarily relied on three factors: larger parameter sizes, more training data, and longer training times. The combination of these three has caused the GPU hours required for a single pre-training run to scale rapidly. For enterprises, training costs directly determine the frequency of model iterations. For developers, costs dictate how many comparative experiments can be conducted within a limited budget.

    Consequently, the industry’s focus is shifting from “which model is stronger” to a more practical question: Under the same hardware and time constraints, is it possible to complete more effective experiments, process more effective data, and achieve lower loss and better downstream metrics? This question can be broken down into three quantifiable indicators:

    • Compute efficiency: The GPU hours required to reach a target loss.
    • Data efficiency: The amount of loss reduction brought by each training token.
    • Experiment throughput: The number of effective training runs that can be completed per unit of time.

    These three metrics are interconnected. Improving data efficiency allows for reaching lower loss within the same GPU hours, thereby indirectly increasing experiment throughput.

    2. The Basic Concept of Token Stacking Training

    The core of Token Stacking Training lies in changing how tokens are organized and processed during the training process. Based on its name and public reports, its goal is to reduce the computational cost per step during certain training phases, allowing the same hardware budget to cover more data. Training then switches back to the standard method to ensure the model converges to a regular quality level.

    Specific implementation details, such as the granularity of stacking, the timing of the switch, and its interaction with attention computation, should be referenced from the original paper. Without verifying the original text, this article will not speculate on these details.

    The following schematic pseudocode illustrates the structure of phased training. It only expresses the workflow and is not an actual API:

    1. # Schematic: Phased training workflow, not an actual API
    2. def train(model, data_stream, total_tokens, switch_tokens):
    3. consumed = 0
    4. for batch in data_stream:
    5. if consumed < switch_tokens:
    6. loss = run_phase_a(model, batch) # Early phase (schematic)
    7. else:
    8. loss = run_phase_b(model, batch) # Standard training phase (schematic)
    9. consumed += batch.num_tokens
    10. if consumed >= total_tokens:
    11. break
    12. return model

    The key to understanding this structure is that the improvement in training efficiency stems from phase division and changes in data processing methods, rather than a simple reduction in model capabilities.

    3. How to Interpret Public Experimental Data

    Public reports cited an experiment on a 10-billion parameter-level Mixture-of-Experts (MoE) model. The model has a total of about 10 billion parameters and activates approximately 1 billion parameters during each forward pass. The main comparison results are as follows:

    Metric Baseline Method Token Stacking Training
    Training tokens 1.05T 2T
    GPU hours 12311 4768
    Final loss 2.252 2.236

    The following code calculates the time ratio between the two:

    1. baseline_gpu_hours = 12311
    2. tst_gpu_hours = 4768
    3. ratio = tst_gpu_hours / baseline_gpu_hours
    4. print(f"Token Stacking Training time as a percentage of baseline: {ratio:.1%}") # Output: 38.7%

    When interpreting these results, note the following points:

    • The number of training tokens increased by about 90% (2T vs. 1.05T), while GPU hours decreased by about 61%, indicating a significant increase in the amount of data processed per unit of compute.
    • The final loss was slightly lower, and zero-shot evaluations for commonsense reasoning, scientific Q&A, and multi-disciplinary knowledge improved synchronously, indicating that the benefits are not limited to loss reduction.
    • The report frames the results as “compressing time to about 40% under the same final loss, achieving roughly a 2.5x speedup.” This statement relies on the “same loss” comparison baseline and needs to be verified against the training curves in the original text.
    • This is the result of a single scale and a single set of experiments. Claims in the report about reducing costs “by an order of magnitude” exceed the current evidence and need to be validated across more scales and data configurations.

    4. Comparison with System-Level Cost Reduction Approaches

    Improving training efficiency typically follows two paths:

    1. System-level optimization: Engineering methods such as Mixture-of-Experts (MoE) architectures, attention mechanism improvements, sparsity, parallel strategies, and communication and memory optimizations are used to directly reduce the cost per unit of computation. These methods rely on underlying implementations and offer stable returns, but have a high research and development barrier.
    2. Training method optimization: Altering the training process itself—for example, by adjusting data organization, learning rate and batch scheduling, and training phase division—to improve data efficiency at the algorithmic level. Token Stacking Training falls into this category.

    These two paths are not mutually exclusive. System-level optimization determines the single-step cost, while the training method determines the total number of steps required to reach the target capability. Multiplying the two together constitutes the overall training cost.

    5. Evaluation Checklist for Engineering Teams

    If you want to introduce such methods into your own training pipeline, it is recommended to verify the following in order:

    1. Unified comparison baseline: Compare GPU hours using the same final loss or the same validation set metrics as the endpoint, rather than comparing the time taken under a fixed number of steps.
    2. Multiple random seeds: Run repetitions at least multiple times to observe the variance in loss and evaluation metrics, avoiding mistaking random fluctuations for actual gains.
    3. Downstream evaluation: In addition to loss, cover tasks such as commonsense reasoning, reading comprehension, and multi-disciplinary Q&A to check whether there is any regression in specific capabilities.
    4. Scale extrapolation: Reproduce the experiment on smaller and larger scales to confirm whether the benefits persist as parameter sizes change.
    5. Hyperparameter interaction: Learning rate warm-up and…