LESA: Learnable LLM Layer Scaling-Up

Yifei Yang, Zouying Cao, Xinbei Ma, Yao Yao, Zhi Chen, Libo Qin, Hai Zhao

Abstract

Training Large Language Models (LLMs) from scratch requires immense computational resources. Model scaling-up—expanding a pre-trained smaller model into a larger one—offers a more efficient alternative. While width scaling is well-studied, depth scaling has traditionally relied on heuristic "copy-paste" methods that fail to account for the specialized roles of different layers. This paper introduces LESA (Learnable LLM Layer Scaling-Up), a novel approach that treats depth scaling as a learning problem. By utilizing Singular Value Decomposition (SVD) to identify latent trajectories between layers, LESA trains a neural network to predictively interpolate new layers. Experimental results demonstrate that LESA provides superior model initialization, cutting continual pre-training costs by over 50% while outperforming existing depth-scaling baselines across multiple benchmarks.

Introduction

The astronomical costs associated with training Large Language Models (LLMs) have driven research into model expansion techniques. By leveraging the knowledge already embedded in a smaller, pre-trained model, researchers can initialize a larger model and perform "continual pre-training" at a fraction of the cost of training from scratch.

Depth scaling, the process of adding layers to a model, is a primary method for increasing model capacity. However, current state-of-the-art methods like LLaMA Pro and SOLAR rely on simple heuristic rules, such as duplicating existing blocks or layers. These methods assume that layers are interchangeable, ignoring the functional specialization that develops during training. Consequently, these "cloned" layers often result in poor initial performance and slow convergence, as the model must work to integrate redundant parameters into a cohesive architecture. LESA addresses these limitations by learning the underlying continuity of layer parameters to generate optimized initializations for new layers.

Methodology

LESA moves beyond simple duplication by framing depth scaling as a predictive interpolation task. The method consists of three primary components: SVD-based analysis, a learned predictor, and a dual-loss training objective.

SVD Analysis and Layer Trajectories

To understand the relationship between sequential layers, the researchers applied Singular Value Decomposition (SVD) to the weight matrices of existing LLMs. By projecting these parameters into a lower-dimensional mathematical space and visualizing them (e.g., via t-SNE), they discovered a "continuity pattern." Rather than being random or identical, the parameters of sequential layers follow a visible trajectory. This suggests that the "space" between layers contains predictable information that can be modeled.

The Predictor Network ($G_W$)

LESA employs a small, three-layer Multi-Layer Perceptron (MLP) to act as an interpolator. Given the parameters of layer $i-1$ and layer $i+1$, the predictor $G_W$ is trained to estimate the parameters of the intermediate layer $i$. This allows the model to generate new layers that logically fit within the existing parameter trajectory of the pre-trained model.

Dual-Loss Training

The predictor is optimized using two distinct loss functions:

  1. MSE Loss: Ensures the predicted weights closely match the numerical values of the target layer.
  2. Norm Loss: Prevents the predicted weights from "collapsing" toward zero. This ensures that the new layers maintain a mathematical magnitude consistent with the original architecture, preserving signal flow during the initial stages of training.

Model Expansion

Once the MLP is trained, it generates new layers that are inserted between the original layers of the base model. For example, in the primary experiment, a Llama3-8B model (32 layers) was expanded to a 48-layer configuration (11.5B parameters) using these interpolated weights.

Experimental Setup

To evaluate LESA, the researchers conducted extensive experiments across various model families, including Llama 2/3, Qwen 2.5, and Mistral.

  • Continual Pre-training: Models were trained on a fresh slice of Wikipedia data (November 2024) to ensure the evaluation measured the learning of new information.
  • Supervised Fine-Tuning (SFT): The Alpaca-GPT4 dataset was used to assess instruction-following capabilities.
  • Domain-Specific Training: A subset of BigCode was utilized to test effectiveness in specialized fields like programming.
  • Benchmarks: Performance was measured using the OpenCompass framework, covering MMLU (general knowledge), GSM8K (mathematics), HumanEval (coding), and reasoning tasks such as HellaSwag and PIQA.

Results and Discussion

Efficiency and Convergence

LESA significantly reduces the computational overhead of model expansion. In comparative tests, LESA reached the same loss level as the LLaMA Pro baseline in 45.6 hours, compared to over 56.4 hours for the baseline—a reduction in training time of more than 50% when considering the total convergence trajectory. This efficiency stems from LESA's superior initialization; the model starts with a much lower initial loss than duplication-based methods.

Performance Stability

Heuristic methods often suffer from "perplexity explosion" when applied to certain architectures (e.g., Qwen2.5-32B). In contrast, LESA’s learned initialization remains stable across different model families. On downstream tasks, LESA-expanded models consistently outperformed baselines. In SFT evaluations, LESA achieved an average score of 31.57 across benchmarks, significantly higher than the 26.47 achieved by the SOLAR baseline.

The Importance of Freezing

Consistent with findings in LLaMA Pro, the authors observed that freezing the original pre-trained layers and only training the newly inserted "interpolated" layers during the initial phase of continual pre-training leads to faster and more stable convergence. This suggests that LESA effectively creates "plugs" that bridge the functional gaps between existing layers.

Limitations and Future Work

While LESA represents a significant advancement in depth scaling, several challenges remain:

  • Scaling Ratios: The current study focused on scaling models by 1.5x to 3x. For larger jumps in parameter count, a hybrid approach combining depth scaling with width scaling (expanding matrix dimensions) may be required.
  • Mixture-of-Experts (MoE): LESA currently struggles with MoE architectures, such as DeepSeek. The complexity of the "router" mechanism—which directs tokens to specific experts—presents a challenge for predictive weight generation that the current MLP architecture does not yet address.
  • Hybrid Expansion: Future research will explore combining LESA’s learnable depth scaling with width scaling techniques to provide a holistic framework for model growth.

Conclusion

LESA demonstrates that the internal structure of LLMs is more continuous and predictable than previously assumed. By replacing heuristic layer duplication with learned interpolation, LESA provides a more mathematically sound and computationally efficient path for scaling large language models. The method's ability to halve training costs while improving downstream performance makes it a powerful tool for the sustainable development of increasingly capable AI systems.

Summary updated

BibTeX
@inproceedings{yang2025lesa,
  author = {Yifei Yang and Zouying Cao and Xinbei Ma and Yao Yao and Zhi Chen and Libo Qin and Hai Zhao},
  title = {{LESA: Learnable LLM Layer Scaling-Up}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2025},
}
Figure