A Semantic-Aware Layer-Freezing Approach to Computation-Efficient Fine-Tuning of Language Models

Jian Gu, Aldeida Aleti, Chunyang Chen, Hongyu Zhang
6/17/2024
cs.CLcs.LG

No confident code implementation found for this paper. 5 possible matches can be shown below.

Abstract

Finetuning language models (LMs) is crucial for adapting the models to downstream data and tasks. However, full finetuning is usually costly. Existing work, such as parameter-efficient finetuning (PEFT), often focuses on \textit{how to finetune} but neglects the issue of \textit{where to finetune}. As a pioneering work on reducing the cost of backpropagation (at the layer level) by answering where to finetune, we conduct a semantic analysis of the LM inference process. We first propose using transition traces of the latent representation to compute deviations (or loss). Then, using a derived formula of scaling law, we estimate the gain of each layer in reducing deviation (or loss). Further, we narrow down the scope for finetuning, and also, study the cost-benefit balance of LM finetuning. We perform extensive experiments across well-known LMs and datasets. The results show that our approach is effective and efficient, and outperforms the existing baselines. Our approach is orthogonal to other techniques for improving finetuning efficiency, such as PEFT methods, offering practical values on LM finetuning.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 5 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{gu2024semanticaware,
  title  = {A Semantic-Aware Layer-Freezing Approach to Computation-Efficient Fine-Tuning of Language Models},
  author = {Jian Gu and Aldeida Aleti and Chunyang Chen and Hongyu Zhang},
  year   = {2024},
  eprint = {2406.11753},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2406.11753v3}
}

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/2406.11753.svg)](https://codeofpaper.com/paper/2406.11753)

Discussion