A Developer’s Guide to Compressing Pre-Trained Transformer Neural Networks Across Different Domains
Open Access
- 18 September 2025
- journal article
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Access
- Vol. 13, 166873-166891
Abstract
Transformer neural networks have become the benchmark across a variety of domains in part thanks to their competence in comprehending the importance and dependencies between large input segments. Pre-trained transformer models typically contain millions of parameters that have been trained with comprehensive datasets improving their generalization, allowing them to be fine-tuned quicker and with less data. Therefore, starting with a pre-trained model provides a substantial advantage over developing a network from the ground up. However, the race to exceed the accuracy of previous model generations leads pre-trained model to increase in size and the required computational resources for inference, as well as training. This is where compression techniques are vital to maximize the impact and performance of the models, while minimizing the cost to deploy. This work covers six of the most successful compression techniques including pruning, knowledge distillation, quantization, adaptive inference (early exit), low-rank factorization and mixture of experts. The study presents a comprehensive overview of their methods, strengths, and weaknesses meant to serve as a guide for machine learning practitioners. The key areas explored are model speedup, model size, accuracy retention, and training requirements.Keywords
This publication has 67 references indexed in Scilit:
- Structured pruning of neural networks for constraints learningOperations Research Letters, 2024
- Deep Learning-Based Motion Prediction Leveraging Autonomous Driving Datasets: State-of-the-ArtIEEE Access, 2024
- Sparsity in transformers: A systematic literature reviewNeurocomputing, 2024
- A survey of techniques for optimizing transformer inferenceJournal of Systems Architecture, 2023
- Single-layer vision transformers for more accurate early exits with less overheadNeural Networks, 2022
- Joint structured pruning and dense knowledge distillation for efficient transformer model compressionNeurocomputing, 2021
- Knowledge Distillation: A SurveyInternational Journal of Computer Vision, 2021
- End-to-End Object Detection with Transformers2020
- Automatic Neural Network Compression by Sparsity-Quantization Joint Learning: A Constrained Optimization-Based Approach2020
- Foundations of Data Science2020