mlsanityData to 7 Oct 2026

Sorted LLaMA: Unlocking the Potential of Intermediate Layers of Large Language Models for Dynamic Inference

arXiv 2309.08968 ↗First posted 16 Sep 2023cs.CL cs.LGcited by 7

Not on the map. Why?

Abstract (arXiv)

Large language models (LLMs) have revolutionized natural language processing (NLP) by excelling at understanding and generating human-like text. However, their widespread deployment can be prohibitively expensive. SortedNet is a recent training technique for enabling dynamic inference by leveraging the modularity in networks and sorting sub-models based on computation/accuracy in a nested manner. We extend SortedNet to generative NLP tasks, making large language models dynamic without any Pre-Training and by only replacing Standard Fine-Tuning (SFT) with Sorted Fine-Tuning (SoFT). Our approach boosts model efficiency, eliminating the need for multiple models for various scenarios during inference. We show that this approach can unlock the power of intermediate layers of transformers in generating the target output. Our sub-models remain integral components of the original model, minimizing storage requirements and transition costs between different computational/latency budgets. The efficacy of our proposed method was demonstrated by applying it to tune LLaMA 2 13B on the Stanford Alpaca dataset for instruction following and TriviaQA for closed-book question answering. Our results show the superior performance of sub-models in comparison to Standard Fine-Tuning and SFT+ICT (Early-Exit), all achieved with efficient tuning and without additional memory usage during inference.

Key facts. Cited by 7 papers in the map (data through 7 Oct 2026). Builds on 34 of its 37 references that are in the map. First posted on arXiv 16 Sep 2023.

Builds on

34 of 37 references.

References · 34

  1. 2020Language Models are Few-Shot Learnerscited by 32,199
  2. 2022Training language models to follow instructions with human feedbackcited by 15,712
  3. 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,084
  4. 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
  5. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
  6. 2015Distilling the Knowledge in a Neural Networkcited by 10,076
  7. 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,304
  8. 2019Parameter-Efficient Transfer Learning for NLPcited by 4,195
  9. 2021Finetuned Language Models Are Zero-Shot Learnerscited by 3,747
  10. 2023QLoRA: Efficient Finetuning of Quantized LLMscited by 3,355
  11. 2022Training Compute-Optimal Large Language Modelscited by 2,927
  12. 2017TriviaQA: A Large Scale Distantly Supervised Challenge Dataset for Reading Comprehensioncited by 2,895
22 more
  1. 2022Self-Instruct: Aligning Language Models with Self-Generated Instructionscited by 2,674
  2. 2022BLOOM: A 176B-Parameter Open-Access Multilingual Language Modelcited by 1,968
  3. 2019Root Mean Square Layer Normalizationcited by 1,425
  4. 2023Accelerating Large Language Model Decoding with Speculative Samplingcited by 975
  5. 2020AdapterFusion: Non-Destructive Task Composition for Transfer Learningcited by 780
  6. 2019Once-for-All: Train One Network and Specialize it for Efficient Deploymentcited by 778
  7. 2023The RefinedWeb Dataset for Falcon LLM: Outperforming Curated Corpora with Web Data, and Web Data Onlycited by 755
  8. 2023Distilling Step-by-Step! Outperforming Larger Language Models with Less Training Data and Smaller Model Sizescited by 710
  9. 2021Compacter: Efficient Low-Rank Hypercomplex Adapter Layerscited by 458
  10. 2019Reducing Transformer Depth on Demand with Structured Dropoutcited by 434
  11. 2020DeeBERT: Dynamic Early Exiting for Accelerating BERT Inferencecited by 322
  12. 2023PandaLM: An Automatic Evaluation Benchmark for LLM Instruction Tuning Optimizationcited by 311
  13. 2023A Survey on Model Compression for Large Language Modelscited by 263
  14. 2022Black-Box Tuning for Language-Model-as-a-Servicecited by 254
  15. 2020DynaBERT: Dynamic BERT with Adaptive Width and Depthcited by 246
  16. 2022DyLoRA: Parameter Efficient Tuning of Pre-trained Models using Dynamic Search-Free Low-Rank Adaptationcited by 229
  17. 2022LST: Ladder Side-Tuning for Parameter and Memory Efficient Transfer Learningcited by 228
  18. 2022KronA: Parameter Efficient Tuning with Kronecker Adaptercited by 130
  19. 2023LaMini-LM: A Diverse Herd of Distilled Models from Large-Scale Instructionscited by 124
  20. 2022Rethinking the Role of Scale for In-Context Learning: An Interpretability-based Case Study at 66 Billion Scalecited by 64
  21. 2019Fully Quantized Transformer for Machine Translationcited by 36
  22. 2023SortedNet: A Scalable and Generalized Framework for Training Modular Deep Neural Networkscited by 5

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 3; 2025: 3; 2026: 1.

7 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2025Towards Efficient Multi-LLM Inference: Characterization and Analysis of LLM Routing and Hierarchical Techniques
  2. 2023Accelerating LLaMA Inference by Enabling Intermediate Layer Decoding via Instruction Tuning with LITE
  3. 2024A Survey on Efficient Inference for Large Language Models
  4. 2025Leveraging the true depth of LLMs
  5. 2026Skip a Layer or Loop It? Learning Program-of-Layers in LLMs
  6. 2024Large Language Model Inference Acceleration: A Comprehensive Hardware Perspective
  7. 2024Compressing Large Language Models with Automated Sub-Network Search
  8. 2023LLMRefine: Pinpointing and Refining Large Language Models via Fine-Grained Actionable Feedback