Llama SLayer 8B: Shallow Layers Hold the Key to Knowledge Injection
Not on the map. Why?
Abstract (arXiv)
As a manner to augment pre-trained large language models (LLM), knowledge injection is critical to develop vertical domain large models and has been widely studied. Although most current approaches, including parameter-efficient fine-tuning (PEFT) and block expansion methods, uniformly apply knowledge across all LLM layers, it raises the question: are all layers equally crucial for knowledge injection? We begin by evaluating the importance of each layer in finding the optimal layer range for knowledge injection. Intuitively, the more important layers should play a more critical role in knowledge injection and deserve a denser injection. We observe performance dips in question-answering benchmarks after the removal or expansion of the shallow layers, and the degradation shrinks as the layer gets deeper, indicating that the shallow layers hold the key to knowledge injection. This insight leads us to propose the S strategy, a post-pretraining strategy of selectively enhancing shallow layers while pruning the less effective deep ones. Based on this strategy, we introduce Llama Slayer-8B and Llama Slayer-8B-Instruct. We experimented on the corpus of code & math and demonstrated the effectiveness of our strategy. Further experiments across different LLM, Mistral-7B, and a legal corpus confirmed the general applicability of the approach, underscoring its wide-ranging efficacy. Our code is available at: https://github.com/txchen-USTC/Llama-Slayer
Key facts. Cited by 6 papers in the map (data through 14 Oct 2026). Builds on 30 of its 43 references that are in the map. First posted on arXiv 3 Oct 2024.
Builds on
30 of 43 references.
References · 30
- 2023GPT-4 Technical Reportcited by 18,396
- 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,380
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
- 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,372
- 2021Training Verifiers to Solve Math Word Problemscited by 10,109
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2020Measuring Massive Multitask Language Understandingcited by 7,963
- 2018Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challengecited by 4,886
- 2019Parameter-Efficient Transfer Learning for NLPcited by 4,236
- 2019HellaSwag: Can a Machine Really Finish Your Sentence?cited by 4,100
- 2021TruthfulQA: Measuring How Models Mimic Human Falsehoodscited by 2,975
- 2020The Pile: An 800GB Dataset of Diverse Text for Language Modelingcited by 2,411
18 more
- 2023Code Llama: Open Foundation Models for Codecited by 2,139
- 2023WizardLM: Empowering large pre-trained language models to follow complex instructionscited by 1,125
- 2023StarCoder: may the source be with you!cited by 799
- 2020AdapterFusion: Non-Destructive Task Composition for Transfer Learningcited by 788
- 2023WizardCoder: Empowering Code Large Language Models with Evol-Instructcited by 733
- 2023Language Models are Super Mario: Absorbing Abilities from Homologous Models as a Free Lunchcited by 694
- 2023The Falcon Series of Open Language Modelscited by 535
- 2023MAmmoTH: Building Math Generalist Models through Hybrid Instruction Tuningcited by 487
- 2024LoRA Learns Less and Forgets Lesscited by 328
- 2021LexGLUE: A Benchmark Dataset for Legal Language Understanding in Englishcited by 310
- 2024Evolutionary Optimization of Model Merging Recipescited by 208
- 2023Making LLaMA SEE and Draw with SEED Tokenizercited by 185
- 2023SOLAR 10.7B: Scaling Large Language Models with Simple yet Effective Depth Up-Scalingcited by 172
- 2023LLM360: Towards Fully Transparent Open-Source LLMscited by 104
- 2024LLaMA Pro: Progressive LLaMA with Block Expansioncited by 101
- 2018CLAUDETTE: an Automated Detector of Potentially Unfair Clauses in Online Terms of Servicecited by 73
- 2023Conditional Adapters: Parameter-efficient Transfer Learning with Fast Inferencecited by 69
- 2024When Life gives you LLMs, make LLM-ADE: Large Language Models with Adaptive Data Engineeringcited by 1
Built on by
Citing papers per year: 2024: 2; 2025: 3; 2026: 1.
6 papers.
- 2025MemOS: A Memory OS for AI Systemcited by 138
- 2024MLLM can see? Dynamic Correction Decoding for Hallucination Mitigationcited by 88
- 2024FineTuneBench: How well do commercial fine-tuning APIs infuse knowledge into LLMs?cited by 12
- 2025Spectral Insights into Data-Oblivious Critical Layers in Large Language Modelscited by 4
- 2026ART: Attention Replacement Technique to Improve Factuality in LLMscited by 1
- 2025Extracting Visual Facts from Intermediate Layers for Mitigating Hallucinations in Multimodal Large Language Modelscited by 0
- 2026ART: Attention Replacement Technique to Improve Factuality in LLMs7 Apr 2026
- 2025Extracting Visual Facts from Intermediate Layers for Mitigating Hallucinations in Multimodal Large Language Models21 Jul 2025
- 2025MemOS: A Memory OS for AI System4 Jul 2025
- 2025Spectral Insights into Data-Oblivious Critical Layers in Large Language Models31 May 2025
- 2024FineTuneBench: How well do commercial fine-tuning APIs infuse knowledge into LLMs?7 Nov 2024
- 2024MLLM can see? Dynamic Correction Decoding for Hallucination Mitigation15 Oct 2024