Sorted LLaMA: Unlocking the Potential of Intermediate Layers of Large Language Models for Dynamic Inference
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
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2022Training language models to follow instructions with human feedbackcited by 15,712
- 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,084
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
- 2015Distilling the Knowledge in a Neural Networkcited by 10,076
- 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,304
- 2019Parameter-Efficient Transfer Learning for NLPcited by 4,195
- 2021Finetuned Language Models Are Zero-Shot Learnerscited by 3,747
- 2023QLoRA: Efficient Finetuning of Quantized LLMscited by 3,355
- 2022Training Compute-Optimal Large Language Modelscited by 2,927
- 2017TriviaQA: A Large Scale Distantly Supervised Challenge Dataset for Reading Comprehensioncited by 2,895
22 more
- 2022Self-Instruct: Aligning Language Models with Self-Generated Instructionscited by 2,674
- 2022BLOOM: A 176B-Parameter Open-Access Multilingual Language Modelcited by 1,968
- 2019Root Mean Square Layer Normalizationcited by 1,425
- 2023Accelerating Large Language Model Decoding with Speculative Samplingcited by 975
- 2020AdapterFusion: Non-Destructive Task Composition for Transfer Learningcited by 780
- 2019Once-for-All: Train One Network and Specialize it for Efficient Deploymentcited by 778
- 2023The RefinedWeb Dataset for Falcon LLM: Outperforming Curated Corpora with Web Data, and Web Data Onlycited by 755
- 2023Distilling Step-by-Step! Outperforming Larger Language Models with Less Training Data and Smaller Model Sizescited by 710
- 2021Compacter: Efficient Low-Rank Hypercomplex Adapter Layerscited by 458
- 2019Reducing Transformer Depth on Demand with Structured Dropoutcited by 434
- 2020DeeBERT: Dynamic Early Exiting for Accelerating BERT Inferencecited by 322
- 2023PandaLM: An Automatic Evaluation Benchmark for LLM Instruction Tuning Optimizationcited by 311
- 2023A Survey on Model Compression for Large Language Modelscited by 263
- 2022Black-Box Tuning for Language-Model-as-a-Servicecited by 254
- 2020DynaBERT: Dynamic BERT with Adaptive Width and Depthcited by 246
- 2022DyLoRA: Parameter Efficient Tuning of Pre-trained Models using Dynamic Search-Free Low-Rank Adaptationcited by 229
- 2022LST: Ladder Side-Tuning for Parameter and Memory Efficient Transfer Learningcited by 228
- 2022KronA: Parameter Efficient Tuning with Kronecker Adaptercited by 130
- 2023LaMini-LM: A Diverse Herd of Distilled Models from Large-Scale Instructionscited by 124
- 2022Rethinking the Role of Scale for In-Context Learning: An Interpretability-based Case Study at 66 Billion Scalecited by 64
- 2019Fully Quantized Transformer for Machine Translationcited by 36
- 2023SortedNet: A Scalable and Generalized Framework for Training Modular Deep Neural Networkscited by 5
Built on by
Citing papers per year: 2024: 3; 2025: 3; 2026: 1.
7 papers.
- 2024EAGLE-2: Faster Inference of Language Models with Dynamic Draft Treescited by 362
- 2025Layerwise Recall and the Geometry of Interwoven Knowledge in LLMscited by 5
- 2024Context-Aware Assistant Selection for Improved Inference Acceleration with Large Language Modelscited by 4
- 2025Balcony: A Lightweight Approach to Dynamic Inference of Generative Language Modelscited by 4
- 2024S2D: Sorted Speculative Decoding For More Efficient Deployment of Nested Large Language Modelscited by 1
- 2025SimLens for Early Exit in Large Language Models: Eliciting Accurate Latent Predictions with One More Tokencited by 0
- 2026N-vium: Mixture-of-Exits Transformer for Accelerated Exact Generationcited by 0
- 2026N-vium: Mixture-of-Exits Transformer for Accelerated Exact Generation13 May 2026
- 2025SimLens for Early Exit in Large Language Models: Eliciting Accurate Latent Predictions with One More Token23 Jul 2025
- 2025Balcony: A Lightweight Approach to Dynamic Inference of Generative Language Models6 Mar 2025
- 2025Layerwise Recall and the Geometry of Interwoven Knowledge in LLMs15 Feb 2025
- 2024Context-Aware Assistant Selection for Improved Inference Acceleration with Large Language Models16 Aug 2024
- 2024S2D: Sorted Speculative Decoding For More Efficient Deployment of Nested Large Language Models2 Jul 2024
- 2024EAGLE-2: Faster Inference of Language Models with Dynamic Draft Trees24 Jun 2024
Similar, not cited
Close in wording, no citation either way
- 2025Towards Efficient Multi-LLM Inference: Characterization and Analysis of LLM Routing and Hierarchical Techniques
- 2023Accelerating LLaMA Inference by Enabling Intermediate Layer Decoding via Instruction Tuning with LITE
- 2024A Survey on Efficient Inference for Large Language Models
- 2025Leveraging the true depth of LLMs
- 2026Skip a Layer or Loop It? Learning Program-of-Layers in LLMs
- 2024Large Language Model Inference Acceleration: A Comprehensive Hardware Perspective
- 2024Compressing Large Language Models with Automated Sub-Network Search
- 2023LLMRefine: Pinpointing and Refining Large Language Models via Fine-Grained Actionable Feedback