LoRTA: Low Rank Tensor Adaptation of Large Language Models

Ignacio Hounie, Charilaos I. Kanatsoulis, Arnuv Tandon, Alejandro Ribeiro · DOI

Abstract

Fine-tuning large language models (LLMs) remains a significant challenge due to the massive number of parameters involved. While Low-Rank Adaptation (LoRA) has become a standard for parameter-efficient fine-tuning (PEFT), its parameter count still scales linearly with model depth and width. We introduce LoRTA (Low Rank Tensor Adaptation), a method that represents model updates as a single, high-order tensor. By applying Candecomp/Parafac (CP) decomposition across layers, heads, and weight types, LoRTA achieves extreme parameter efficiency—often reducing trainable parameters by over 10x compared to LoRA—while maintaining or improving performance across diverse tasks, including natural language understanding and protein folding.

Introduction

As LLMs scale to hundreds of billions of parameters, even efficient methods like LoRA encounter limitations. LoRA adds trainable low-rank matrices to frozen weights, but it treats every weight matrix in every layer as an independent entity. This independence ignores significant redundancy across different layers, attention heads, and weight types (e.g., Query, Key, and Value matrices). For massive models, managing many task-specific LoRA adapters still incurs substantial storage and memory overhead.

LoRTA addresses this by exploiting global redundancies. Instead of independent matrix updates, it views the entire set of model updates through the lens of tensor decomposition, allowing for global information sharing and a drastic reduction in the number of parameters that need to be learned.

Methods: The Unified 5th-Order Tensor

The core innovation of LoRTA is representing all model updates as a unified 5th-order tensor. While standard LoRA decomposes a weight update into two matrices ($A$ and $B$) per layer and head, LoRTA stacks all updates into a single tensor with five dimensions: Input Dimension ($d$), Output Dimension per Head ($d/H$), Attention Heads ($H$), Layers ($L$), and Matrix Type ($M$).

Comparison of LoRA (left), which uses independent matrices for each head and layer, and LoRTA (right), which uses a unified CP decomposition with shared factor matrices.

Using CP (Candecomp/Parafac) decomposition, LoRTA learns five small "factor matrices"—one for each dimension. This structure allows the model to capture global patterns; for instance, the "Layer" factor matrix learns how updates evolve through the model's depth. Unlike previous tensor methods that rely on fixed random bases, LoRTA is fully trainable, ensuring that all factor matrices are optimized for the specific task during fine-tuning.

Key Results and Insights

LoRTA was evaluated across a wide range of benchmarks, including GLUE for natural language understanding, various question-answering tasks (SQuAD, DROP), instruction tuning (Alpaca), and even scientific domains like protein folding (ESMFold).

Extreme Parameter Efficiency and Performance Parity

LoRTA consistently matches or exceeds the performance of LoRA while using a fraction of the parameters. On the GLUE benchmark, LoRTA achieved comparable results to LoRA while using as few as 3.4k parameters—a nearly 100x reduction from LoRA's 300k parameters.

Performance and parameter count comparison on GLUE benchmarks. LoRTA achieves competitive accuracy with significantly fewer trainable parameters than LoRA and other PEFT methods.

In Llama-2 7B tasks, LoRTA achieved a 17x reduction in parameter count compared to the most efficient previous methods, requiring only 30,000 parameters to fine-tune the entire model. This efficiency also translates to I/O gains: in multi-task scenarios, LoRTA adapters can be transferred from CPU to GPU up to 26x faster than LoRA adapters.

The Power of the Tensor Constraint

A key finding is that the tensor structure acts as a powerful regularizer. The authors observed that one cannot simply compress a pre-trained LoRA adapter into a LoRTA tensor; the model must be trained with the tensor constraint from the start to achieve high performance. This suggests that LoRTA guides the fine-tuning process toward more generalizable and compressible solutions.

Conclusion and Future Work

LoRTA demonstrates that treating model updates as a unified tensor is a highly effective strategy for extreme parameter-efficient fine-tuning. While it significantly reduces storage and transfer overhead, current implementations do not yet provide a major reduction in GPU memory during training, as memory usage is dominated by activations. Future work includes extending LoRTA to MLP and embedding layers, scaling to models beyond 70B parameters, and developing optimized CUDA kernels to further improve computational efficiency.

Summary updated

BibTeX
@misc{hounie2024lorta,
  author = {Ignacio Hounie and Charilaos I. Kanatsoulis and Arnuv Tandon and Alejandro Ribeiro},
  title = {{LoRTA: Low Rank Tensor Adaptation of Large Language Models}},
  year = {2024},
  eprint = {2410.04060},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2410.04060},
}
Figure