TLDR: This research paper explores how the distribution of weights in Large Language Models (LLMs) impacts LoRA (Low-Rank Adaptation) training. The authors analyze singular values of weight matrices, finding that cosine distances between them often follow a power-law distribution, though specific inter-layer relationships can vary. They propose a qualitative method to characterize these distributions and design a distribution generator to simulate them. By reshaping LoRA’s low-rank matrices during initialization to align with the distribution characteristics of larger, more capable LLMs, they demonstrate improved performance in fine-tuning smaller models on various benchmarks, without increasing training complexity or resource usage.
Large Language Models (LLMs) have become incredibly powerful, tackling complex tasks with their vast number of parameters. However, fine-tuning these models, which involves adjusting all their weights, demands significant computational resources. To address this, a method called LoRA (Low-Rank Adaptation) was introduced. LoRA works by decomposing the large weight matrices of an LLM into two smaller, low-rank matrices (A and B) and only updating these smaller matrices during training. This significantly reduces resource consumption, but sometimes at the cost of performance.
Many studies have explored ways to improve LoRA, often by modifying the model’s architecture or adjusting the training process. However, these approaches can add complexity, potentially undermining LoRA’s original goal of simplicity and efficiency. This research paper, titled “Exploring and Reshaping the Weight Distribution in LLM,” by Chunming Ye, Songzhou Li, and Xu Xu from Suzhou University, proposes a novel and simpler initialization scheme to enhance LoRA training without increasing resource demands or altering the neural network structure.
Understanding Weight Distributions
The core idea of this research is to analyze the characteristics of weight distributions within LLMs and use this understanding to improve LoRA. The authors focused on decoder-only LLaMA models. They extracted specific weight matrices from different layers, such as Query-projection, Key-projection, and down-projection matrices, which are crucial for the model’s self-attention and feedforward networks.
To simplify the analysis of these numerous weights, the researchers employed Singular Value Decomposition (SVD). SVD helps break down a matrix into its core components, including ‘singular values’ that represent the importance or magnitude of different aspects of the data. They then grouped these singular values from similar types of projection matrices across all layers into what they call ‘Matrices of Singular Values’ (MSVs).
By calculating the cosine distance between these singular value vectors and MSVs, the study revealed fascinating patterns. Firstly, the cosine distances between all singular values within a model consistently exhibit a ‘power-law distribution.’ This means that many distances are very small, with fewer larger distances, suggesting a high degree of similarity among many weights. This pattern was observed across various LLMs, regardless of their type, size, or the specific rank of singular values considered.
However, when looking at the cosine distances *between different types of MSVs* (e.g., comparing the Query-projection MSV with the Gate-projection MSV), the distributions were more varied. While some still showed power-law characteristics, others deviated significantly, sometimes resembling a normal distribution or something in between. This variation suggests that different functional blocks within an LLM have distinct weight distribution relationships, which could be influenced by their specific roles, the model’s architecture, or even the training data.
A New Approach to Reshape LoRA Weights
Based on these findings, the researchers developed a ‘qualitative method’ to describe a model’s unique distribution characteristics. This method identifies which MSVs have power-law relationships with each other, effectively grouping them. For instance, in a LLaMA3-8B model, the Query-projection MSV might have a power-law relationship with Key-projection, Output-projection, and Gate-projection MSVs, while the Value-projection MSV might have a different relationship with Up-projection and Down-projection MSVs.
To leverage this, they designed a ‘distribution generator’ using a combination of Gaussian Process and Pareto distribution functions. This generator can create synthetic data (representing weights) such that the cosine distances between them conform to either a Gaussian-like or a power-law-like distribution, as observed in real LLMs. The key insight here is that while the generated weight values themselves might follow a Gaussian distribution, the *relationships* (cosine distances) between them can be made to mimic the observed power-law or other distributions.
The final step involves applying this to LoRA training. Instead of the default random initialization for LoRA’s low-rank A and B matrices, this method ‘reshapes’ them during initialization. It does this by using the distribution generator to align the initialization of a smaller model’s LoRA matrices with the distribution characteristics extracted from a ‘reference model’ – typically a larger, better-performing LLM.
Experimental Validation and Results
The researchers conducted experiments using small-scale pre-trained models like SmolLM2-135M and LLaMA3.2-1B-Instruct, with larger models such as SmolLM2-1.7B and LLaMA3.2-8B-Instruct serving as reference models. They fine-tuned these models using LoRA on the alpaca-gpt4-data-en dataset and evaluated their performance on standard benchmarks like GPQA Diamond Zero-Shot, Arc_Challenge, and HellaSwag.
The results were promising. The reshaping distribution method generally improved LoRA quality in most tests. Notably, when SmolLM-135M was initialized using the distribution characteristics of larger LLaMA3 models (1B, 3B, or 8B), it showed significant performance gains, especially on the GPQA dataset. The best results for SmolLM-135M were achieved when using LLaMA3-8B as the reference model. Similarly, for LLaMA3-1B, using LLaMA3-8B as a reference model also yielded the best performance across all tests.
The training loss values remained stable and converged, indicating that this method does not introduce instability into the training process. This suggests that by simply describing and reshaping the initial weight distributions, LoRA training on smaller language models can achieve better quality than both the original pre-trained model and normal LoRA training.
Also Read:
- Decoding How AI Models Learn to Control Text Length
- Understanding How LLMs Reason: The Dance Between Learning from Examples and Prior Knowledge
Conclusion
This research offers a simple yet effective way to enhance LoRA training for LLMs. By meticulously analyzing the power-law and non-power-law distribution characteristics of cosine distances between singular values of weight matrices, the authors developed a qualitative method and a distribution generator to reshape LoRA’s initialization. The experimental results demonstrate that aligning the initialization of smaller models with the distribution characteristics of larger, more capable models can lead to improved performance without adding complexity or increasing resource consumption. This work provides a valuable insight into the impact of weight distributions on model performance and offers a practical method for better parameter-efficient fine-tuning. You can read the full paper here.


