DiffSkip: Differential Layer Skipping in Large Language Models
Existing Large Language Models (LLMs) enforce uniform computation across all tokens.We analyze the correlation between the input-output difference of self-attention block and Feed-Forward Network (FFN) within the same transformer layer, and find that these two differential vectors are highly correlated.Thus, we propose to dynamically skip the FFN blocks based on the self-attention difference and introduce Diffential Layer Skipping (DiffSkip) to show that LLMs are inherently dynamic-depth models, capable of adjusting computational depth when generating different tokens.DiffSkip employs a lightweight router module to dynamically skip a set of FFN blocks in LLMs and only requires efficient fine-tuning while keeping the pre-trained LLM frozen.Experimental results demonstrate that DiffSkip effectively enables dynamic FFN skipping in decoder-only language models, even in continuous token generation tasks where many layer-skipping methods struggle.We open sourced our model at DiffSkip-Llama-3-8B-Instruct.
Authors
- Xuan Luo (ORCID: https://orcid.org/0000-0002-0592-0610)
- Xi‐Feng Yan (ORCID: https://orcid.org/0000-0002-7291-3525)
- Weizhi Wang (ORCID: https://orcid.org/0000-0003-1567-2371)
Institutions
- University of California, Santa Barbara (US)
Publication Details
- Published
- 2025-01-01
- DOI
- https://doi.org/10.18653/v1/2025.findings-acl.377
- Primary Topic
- Topic Modeling
- Type
- article
- Field-Weighted Citation Impact
- 0.00
Funders
- National Science Foundation
- Division of Materials Research