NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

LLM Compression with Neural Architecture Search

Rhea Sanjay Sukthanker, Benedikt Staffler, Frank Hutter, Aaron Klein · DOI

Introduction

Large Language Models (LLMs) have revolutionized natural language processing but present significant deployment challenges due to their immense size. High inference costs, substantial memory footprints, and prohibitive latency often restrict their use on mobile or edge devices. While techniques like knowledge distillation and structural pruning have been explored, they often rely on manual heuristics or computationally expensive retraining for every target size. This paper introduces an automated framework that treats structural pruning as a Neural Architecture Search (NAS) problem, finding optimal sub-networks that balance performance and efficiency.

Methodology

The authors propose a two-stage NAS approach to find a "Pareto-optimal" set of sub-networks within a pre-trained model like Llama-3.1-8B.

1. Super-network Training and Importance Sorting

The pre-trained LLM is treated as a "super-network" containing numerous potential sub-architectures. To ensure high-quality sub-networks from the start, the authors implement Importance-Based Sorting. Components such as attention heads, MLP neurons, and layers are ranked by their activation magnitudes. The model is then reordered so that the most critical weights are prioritized in smaller sub-networks.

Overview of the super-network structure and importance scoring mechanism.

2. Training Dynamics

  • Sandwich Rule & Grid Sampling: The super-network is fine-tuned by simultaneously updating the full model and several sampled sub-networks. To avoid the "Tiny Model Trap"—where random sampling over-indexes on non-functional, extremely small models—a Calibrated Grid Sampling strategy ensures that medium-sized sub-networks (4B to 8B range) receive sufficient training.
  • LoRA Integration: To maintain efficiency on consumer-grade hardware, the framework utilizes Low-Rank Adaptation (LoRA). Only small adapter matrices are updated, even as the search space dynamically prunes layers and dimensions.
  • In-place Knowledge Distillation: Smaller sub-networks are trained to match the predictions of the full teacher model using KL-divergence or cosine-similarity loss, preserving accuracy throughout the pruning process.

Experimental Results

The method was evaluated on Llama-3.1-8B across 11 diverse benchmarks, including commonsense reasoning (BoolQ, PIQA) and arithmetic tasks (GSM8K, MATH).

Performance and Latency

The proposed approach significantly outperformed state-of-the-art structural pruning methods like LLM-Pruner, LaCO, and SliceGPT. Key findings include:

  • Accuracy Boost: An average improvement of 6.5% to 9.8% in accuracy across various target parameter counts.
  • Latency Reduction: On-device latency improved by up to 22% compared to existing baselines.
  • Pareto Efficiency: Unlike traditional methods that produce a single model, this NAS approach generates a Pareto front, providing a "menu" of models optimized for different hardware constraints.
Comparison of accuracy versus latency and parameter count, showing the superior Pareto front of the proposed method.

Conclusion

By framing LLM compression as an automated architecture search, this work demonstrates that structural pruning can be both highly efficient and performant. The integration of importance sorting, grid sampling, and LoRA allows for the discovery of a family of optimized models in a single training run. Future work may explore the use of synthetic data for further distillation and the adaptation of architectures for specific edge hardware like NPUs.

Summary updated

BibTeX
@misc{sukthanker2024llm,
  author = {Rhea Sanjay Sukthanker and Benedikt Staffler and Frank Hutter and Aaron Klein},
  title = {{LLM Compression with Neural Architecture Search}},
  year = {2024},
  eprint = {2410.06479},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2410.06479},
}
Figure