Table of Contents
Fetching ...

Low-Rank Tensor Approximation of Weights in Large Language Models via Cosine Lanczos Bidiagonalization

A. El Ichi, K. Jbilou

TL;DR

The paper tackles the large memory and compute demands of Transformer-based LLMs by introducing a tensor-based compression framework using the c-product within the \\mathcal{L}-product. It develops TLASER, a Tensor Layer-Selective Rank Reduction method that tensorizes Transformer weights to expose multi-head and block structure, and uses tensor Lanczos bidiagonalization to efficiently extract dominant spectral components. By applying per-layer, energy-aware, and structure-preserving low-rank approximations, TLASER achieves substantial compression without retraining, preserving important cross-head and intra-head correlations. Experimental results on GPT-J-6B with TruthfulQA demonstrate favorable accuracy and loss behavior for targeted, single-layer interventions, highlighting TLASER's potential for scalable deployment of large language models.

Abstract

Large Language Models (LLMs) have demonstrated remarkable capabilities across diverse natural language tasks but suffer from extremely large memory footprints and computational costs. In this paper, we introduce a tensor compression framework based on the cproduct for computing low rank approximation In the first part of our approach, we leverage the algebraic structure of the cproduct to represent weight tensors such as those in embedding layers, attention projections, and feed forward networks in a transform domain where frontal slices can be jointly approximated by low rank tensor factors. This enables computationally efficient compression that exploits multidimensional correlations beyond traditional SVD methods.

Low-Rank Tensor Approximation of Weights in Large Language Models via Cosine Lanczos Bidiagonalization

TL;DR

The paper tackles the large memory and compute demands of Transformer-based LLMs by introducing a tensor-based compression framework using the c-product within the \\mathcal{L}-product. It develops TLASER, a Tensor Layer-Selective Rank Reduction method that tensorizes Transformer weights to expose multi-head and block structure, and uses tensor Lanczos bidiagonalization to efficiently extract dominant spectral components. By applying per-layer, energy-aware, and structure-preserving low-rank approximations, TLASER achieves substantial compression without retraining, preserving important cross-head and intra-head correlations. Experimental results on GPT-J-6B with TruthfulQA demonstrate favorable accuracy and loss behavior for targeted, single-layer interventions, highlighting TLASER's potential for scalable deployment of large language models.

Abstract

Large Language Models (LLMs) have demonstrated remarkable capabilities across diverse natural language tasks but suffer from extremely large memory footprints and computational costs. In this paper, we introduce a tensor compression framework based on the cproduct for computing low rank approximation In the first part of our approach, we leverage the algebraic structure of the cproduct to represent weight tensors such as those in embedding layers, attention projections, and feed forward networks in a transform domain where frontal slices can be jointly approximated by low rank tensor factors. This enables computationally efficient compression that exploits multidimensional correlations beyond traditional SVD methods.
Paper Structure (20 sections, 1 theorem, 51 equations, 2 figures, 7 tables, 3 algorithms)

This paper contains 20 sections, 1 theorem, 51 equations, 2 figures, 7 tables, 3 algorithms.

Key Result

Proposition 6.5

\newlabelprop:tensorization_properties All tensorization operators $\Phi \in \{\Phi_{\textup{attn}}, \Phi_{\textup{in}}, \Phi_{\textup{out}}\}$ satisfy:

Figures (2)

  • Figure 6.1: Attention tensorization $\Phi_{\textup{attn}}$: Weight matrix $W_Q \in \mathbb{R}^{d_m \times d_m}$ is transformed into tensor $\mathcal{W}_Q \in \mathbb{R}^{d_h \times d_m \times n_h}$. Mode-1 indexes intra-head features ($d_h$), mode-2 indexes input features ($d_m$), and mode-3 indexes attention heads ($n_h$). Each frontal slice $\mathcal{W}_Q(:,:,h)$ corresponds to the $h$-th head's weight block.
  • Figure 6.2: TLASER-GK pipeline: reshape 2D weights to 3D tensors, apply t-LBR (Golub-Kahan bidiagonalization) to compute only the $r$ needed singular triplets, reconstruct compressed weights.

Theorems & Definitions (17)

  • Definition 2.1: $n$-Mode Product
  • Definition 3.1: $\mathcal{L}$-Transform
  • Definition 3.2: Facewise Product
  • Definition 3.3: $\@fontswitch{}{\mathcal{}} L$-identity tensor
  • Definition 3.4: $\mathcal{L}$-transpose
  • Definition 3.5
  • remark 1
  • Definition 3.6: c-SVD
  • Definition 3.7: Average rank under the $c$-product
  • Definition 3.8: Tubal rank under the $c$-product
  • ...and 7 more