Lillama: Large Language Models Compression via Low-Rank Feature Distillation

Yaya Sy, Christophe Cerisara, Irina Illina
12/21/2024
cs.LGcs.AI

No official code found. Best implementation: yaya-sy/lillama (11 stars, last commit 2025-04-10).

Abstract

Current LLM structured pruning methods typically involve two steps: (1) compression with calibration data and (2) costly continued pretraining on billions of tokens to recover lost performance. This second step is necessary as the first significantly impacts model accuracy. Prior research suggests pretrained Transformer weights aren't inherently low-rank, unlike their activations, which may explain this drop. Based on this observation, we propose Lillama, a compression method that locally distills activations with low-rank weights. Using SVD for initialization and a joint loss combining teacher and student activations, we accelerate convergence and reduce memory use with local gradient updates. Lillama compresses Mixtral-8x7B within minutes on a single A100 GPU, removing 10 billion parameters while retaining over 95% of its original performance. Phi-2 3B can be compressed by 40% with just 13 million calibration tokens, resulting in a small model that competes with recent models of similar size. The method generalizes well to non-transformer architectures, compressing Mamba-3B by 20% while maintaining 99% performance.

View on arXivView PDF

Code Implementations(1)

yaya-sy/lillamaCommunity71%

[NAACL' 25 main] Lillama: Large Language Model Compression via Low-Rank Feature Distillation

111Python, Jupyter NotebookJan 6, 20251 years ago
distillationefficient-llmllmllm-inferencemamba+2 more

Similar Papers

Cite this paper

@article{sy2024lillama,
  title  = {Lillama: Large Language Models Compression via Low-Rank Feature Distillation},
  author = {Yaya Sy and Christophe Cerisara and Irina Illina},
  year   = {2024},
  eprint = {2412.16719},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2412.16719v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2412.16719.svg)](https://codeofpaper.com/paper/2412.16719)

Discussion