Towards Understanding Bugs in Distributed Training and Inference Frameworks for Large Language Models
Preprint
Abstract
With the rapid development of large language models (LLMs), distributed training and inference frameworks like DeepSpeed have become essential for scaling model training and inference across multiple GPUs or nodes. However, the increasing complexity of these frameworks brings non-trivial software bugs, which may degrade training performance, cause unexpected failures, and result in significant resource waste. Understanding framework bugs' characteristics is fundamental for quality assurance, allowing the design of more effective debugging and repair methods. Thus, our paper conducts the first large-scale empirical analysis of 308 fixed bugs across three popular distributed training/inference frameworks: DeepSpeed, Megatron-LM, and Colossal-AI. We examine bug symptoms, root causes, bug identification and fixing efforts, and common low-effort fixing strategies. Additionally, the distributed nature of these frameworks introduces unique bug root causes, such as allocation strategy error and distributed communication error. Diagnosing and fixing complex bugs remains challenging due to factors like the disconnect between symptoms and root causes, high bug reproduction costs, and low-level or cross-component interactions. Interestingly, we observe that 48% of bug fixes require minimal code changes (<=10 LOC) and follow simple strategies such as conditional logic optimization, parameter handling enhancement, or version compatibility handling, indicating potential for automation. Based on these insights, we offer several implications for improving the reliability of both distributed training and inference frameworks and their dependent LLM projects, while also identifying opportunities to leverage LLM-based tools for automated debugging and repair.Keywords
All Related Versions
This publication has 14 references indexed in Scilit:
- On Security Weaknesses and Vulnerabilities in Deep Learning SystemsIEEE Transactions on Dependable and Secure Computing, 2024
- Bug characterization in machine learning-based systemsEmpirical Software Engineering, 2023
- Silent bugs in deep learning frameworks: an empirical study of Keras and TensorFlowEmpirical Software Engineering, 2023
- Rise of Distributed Deep Learning Training in the Big Model Era: From a Software Engineering PerspectiveACM Transactions on Software Engineering and Methodology, 2023
- Toward Understanding Deep Learning Framework BugsACM Transactions on Software Engineering and Methodology, 2023
- A comprehensive empirical study on bug characteristics of deep learning frameworksInformation and Software Technology, 2022
- Reveal training performance mystery between TensorFlow and PyTorch in the single GPU environmentScience China Information Sciences, 2021
- The symptoms, causes, and repairs of bugs inside a deep learning libraryJournal of Systems and Software, 2021
- Scaling TensorFlow, PyTorch, and MXNet using MVAPICH2 for High-Performance Deep Learning on Frontera2019
- Qualitative methods in empirical studies of software engineeringIEEE Transactions on Software Engineering, 1999