TTrace: Lightweight Error Checking and Diagnosis for Distributed Training

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Jiang, Haitian, Zhu, Shaowei, Zhang, Zhen, Song, Zhenyu, Fu, Xinwei, Jia, Zhen, Wang, Yida, Li, Jinyang
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866908749992558592
author Jiang, Haitian
Zhu, Shaowei
Zhang, Zhen
Song, Zhenyu
Fu, Xinwei
Jia, Zhen
Wang, Yida
Li, Jinyang
author_facet Jiang, Haitian
Zhu, Shaowei
Zhang, Zhen
Song, Zhenyu
Fu, Xinwei
Jia, Zhen
Wang, Yida
Li, Jinyang
contents Distributed training is essential for scaling the training of large neural network models, such as large language models (LLMs), across thousands of GPUs. However, the complexity of distributed training programs makes them particularly prone to silent bugs, which do not produce explicit error signals but lead to incorrect training outcomes. Effectively detecting and localizing such silent bugs in distributed training is challenging. Common debugging practices based on monitoring training loss or gradient norm curves are indirect, inefficient, and provide no way to localize bugs. To address those challenges, we design and implement TTrace, the first systematic differential testing system for detecting and localizing silent bugs in distributed training. TTrace aligns intermediate tensors from distributed training with those from a trusted reference implementation. To properly compare the floating-point values in the corresponding tensors, we propose a novel mathematical analysis that provides a guideline for setting tolerances, enabling TTrace to distinguish bug-induced errors from numerical errors. Experimental results demonstrate that TTrace effectively detects 11 existing bugs and 3 new bugs in the widely used Megatron-LM framework, while requiring fewer than 10 lines of code changes. TTrace is effective in various training recipes, including low-precision recipes involving BF16 and FP8. Notably, a popular open-source training framework has already adopted the method proposed by TTrace in its development workflow.
format Preprint
id arxiv_https___arxiv_org_abs_2506_09280
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle TTrace: Lightweight Error Checking and Diagnosis for Distributed Training
Jiang, Haitian
Zhu, Shaowei
Zhang, Zhen
Song, Zhenyu
Fu, Xinwei
Jia, Zhen
Wang, Yida
Li, Jinyang
Distributed, Parallel, and Cluster Computing
Machine Learning
Numerical Analysis
Distributed training is essential for scaling the training of large neural network models, such as large language models (LLMs), across thousands of GPUs. However, the complexity of distributed training programs makes them particularly prone to silent bugs, which do not produce explicit error signals but lead to incorrect training outcomes. Effectively detecting and localizing such silent bugs in distributed training is challenging. Common debugging practices based on monitoring training loss or gradient norm curves are indirect, inefficient, and provide no way to localize bugs. To address those challenges, we design and implement TTrace, the first systematic differential testing system for detecting and localizing silent bugs in distributed training. TTrace aligns intermediate tensors from distributed training with those from a trusted reference implementation. To properly compare the floating-point values in the corresponding tensors, we propose a novel mathematical analysis that provides a guideline for setting tolerances, enabling TTrace to distinguish bug-induced errors from numerical errors. Experimental results demonstrate that TTrace effectively detects 11 existing bugs and 3 new bugs in the widely used Megatron-LM framework, while requiring fewer than 10 lines of code changes. TTrace is effective in various training recipes, including low-precision recipes involving BF16 and FP8. Notably, a popular open-source training framework has already adopted the method proposed by TTrace in its development workflow.
title TTrace: Lightweight Error Checking and Diagnosis for Distributed Training
topic Distributed, Parallel, and Cluster Computing
Machine Learning
Numerical Analysis
url https://arxiv.org/abs/2506.09280