Large model training slow node detection method based on NARX model
The node traffic anomaly detection method based on the NARX model solves the problem that slow nodes are difficult to detect in time in distributed training, achieves efficient prediction and processing of slow nodes, improves training efficiency, reduces the waste of repeated training, and avoids Requirements for hardware fault detection and software monitoring.
Patent Information
- Application Number
- CN202410864138.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-30
- Publication Date
- 2024-09-03
AI Technical Summary
In the process of large-scale multi-node distributed training, the emergence of slow nodes leads to a decrease in training speed, and it is difficult for existing technology to effectively detect and process them in a timely manner, resulting in low training efficiency.
A node traffic anomaly detection method based on the NARX model is adopted. By deploying network data collection agents on each node to collect and clean data, a time series NARX feedback neural network model is constructed to predict and discover slow nodes, and to automate when abnormalities are discovered. Processing, including culling or saving checkpoints.
It improves the discovery time and positioning of slow nodes, improves the training efficiency of large models, reduces the waste of repeated training due to node abnormalities, reduces the need for hardware fault detection and software monitoring, and can identify network anomalies immediately.
Smart Images

Figure CN118586473A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data detection, and in particular to a large model training slow node detection method based on a NARX model. Background Art
[0002] During the distributed training of large models, a node whose training speed slows down due to software or hardware failure in a single node, which eventually causes the training speed of the entire distributed training task to decrease, is defined as a slow node. With the popularity of LLM models, the number of parameters has evolved from billions to hundreds of billions and trillions. The number of nodes required for distributed training is also increasing. During multi-node distributed training, all nodes need to work together. Once a slow node appears and cannot be discovered in time, it will greatly slow down the training speed.
[0003] According to statistics, the probability of slow nodes appearing in large-scale multi-node distributed training is as high as 30%. How to find slow nodes or faulty nodes is a current industry problem. This patent hopes to predict and discover slow nodes in advance through a node traffic anomaly detection method based on the narx model, so that checkpoints can be saved in advance or problem nodes can be removed from the distributed training cluster in advance to ensure efficient distributed training. Summary of the invention
[0004] The purpose of this section is to summarize some aspects of embodiments of the present invention and briefly introduce some preferred embodiments. Some simplifications or omissions may be made in this section and the specification abstract and the invention title of this application to avoid blurring the purpose of this section, the specification abstract and the invention title, and such simplifications or omissions cannot be used to limit the scope of the present invention.
[0005] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0006] A large model training slow node detection method based on NARX model, comprising:
[0007] S1. Model preparation, obtaining a NARX model through actual training;
[0008] S2. Application of the model: Use the trained model to detect nodes in the actual training process, find anomalies, and automatically process them according to the actual situation of the model.
[0009] As a preferred solution of the large model training slow node detection method based on the NARX model described in the present invention, the specific steps of preparing the model in S1 include:
[0010] S11, start the distributed training task for a single model and deploy the network data collection agent on each node;
[0011] S12, collect the input and output data of all network cards during the training process and store them in the time series database;
[0012] S13, cleaning the stored data;
[0013] S14. Collect relevant data through multiple rounds of training to build a high-quality data set;
[0014] S15. Design time series NARX feedback neural network;
[0015] S16. Use the previously constructed data set to train the model;
[0016] S17. The quality-qualified models are stored in the model warehouse.
[0017] As a preferred solution of the large model training slow node detection method based on the NARX model described in the present invention, wherein: the network card in S12 includes a parameter plane network card and a storage plane network card.
[0018] As a preferred solution of the large model training slow node detection method based on the NARX model described in the present invention, wherein: the database in S12 is specifically a TSDB time series database.
[0019] As a preferred solution of the large model training slow node detection method based on the NARX model described in the present invention, wherein: the parameter surface network card, storage surface network card, and input bandwidth and output bandwidth of each network card in the feedback neural network in S15 are used as neural network parameter inputs.
[0020] As a preferred solution of the large model training slow node detection method based on the NARX model described in the present invention, the specific steps of applying the model in S2 include:
[0021] S21. Start the distributed large model training task;
[0022] S22, start the large model trained in the first part at the same time;
[0023] S23, input the network inflow and outflow traffic of each network card of each node as a parameter into the inference task;
[0024] S24, performing time series prediction on each node situation by inputting parameters;
[0025] S25. After finding the slow node, evaluate the training task;
[0026] S26. If the task is a flexible training task, the abnormally slow node is directly removed, the task is rescheduled, and the training continues;
[0027] S27, if the task cannot be trained flexibly, the framework is triggered to save the checkpoint;
[0028] S28. After the Checkpoint is saved, stop the task.
[0029] As a preferred solution of the large model training slow node detection method based on the NARX model described in the present invention, wherein: the large model in S22 selects a suitable model in the model warehouse.
[0030] As a preferred solution of the large model training slow node detection method based on the NARX model described in the present invention, wherein: the input and output data of each node are obtained through monitoring in S23.
[0031] As a preferred solution of the large model training slow node detection method based on the NARX model described in the present invention, the data obtained in S23 are all stored in TSDB.
[0032] As a preferred solution of the large model training slow node detection method based on the NARX model described in the present invention, wherein: the checkpoint is saved in S27, specifically saved in HPFS.
[0033] Beneficial effects of the present invention:
[0034] A NARX model corresponding to the framework and model is trained through the input and output data of the node parameter plane and storage plane network cards, and then the trained NARX model is used in distributed model training. Through real-time detection of multi-network card data of each node during the training process, network anomalies are discovered, and node anomalies are predicted. Abnormal nodes are processed according to the actual situation of model training, which improves the discovery time and positioning of slow nodes, and ultimately improves the training efficiency of large models, reduces the waste of repeated training and other card time caused by node anomalies, and does not require end-to-end hardware fault detection, nor does it need to monitor software processes. When traffic anomalies occur, they can be identified at the first time. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor. Among them:
[0036] Figure 1 A model preparation flow chart of a large model training slow node detection method based on the NARX model proposed by the present invention;
[0037] Figure 2 This is a model application flow chart of a large model training slow node detection method based on the NARX model proposed in the present invention. DETAILED DESCRIPTION
[0038] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the accompanying drawings.
[0039] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0040] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.
[0041] Secondly, the present invention is described in detail with reference to the schematic diagram. When describing the embodiments of the present invention in detail, for the sake of convenience, the cross-sectional diagrams showing the device structure will not be partially enlarged according to the general scale, and the schematic diagrams are only examples, which should not limit the scope of protection of the present invention. In addition, in actual production, the three-dimensional dimensions of length, width and depth should be included.
[0042] Reference Figure 1-2 The present invention provides a large model training slow node detection method based on NARX model, comprising:
[0043] S1. Model preparation, obtaining a NARX model through actual training;
[0044] S2. Application of the model: Use the trained model to detect nodes in the actual training process, find anomalies, and automatically process them according to the actual situation of the model.
[0045] Among them, the specific steps for preparing the model in S1 include:
[0046] S11, start the distributed training task for a single model and deploy the network data collection agent on each node;
[0047] S12, collect the input and output data of all network cards during the training process and store them in the time series database;
[0048] S13, cleaning the stored data to remove obviously erroneous data and invalid data collected during the interruption of training;
[0049] S14. Collect relevant data through multiple rounds of training to build a high-quality data set;
[0050] S15. Design time series NARX feedback neural network;
[0051] S16. Use the previously constructed data set to train the model;
[0052] S17. The qualified model is stored in the model warehouse for subsequent use.
[0053] Furthermore, the network card in S12 includes parameter plane network card and storage plane network card
[0054] Furthermore, the database in S12 is specifically a TSDB time series database, which can be easily elastically expanded under high load and large-scale data volume, allowing users to dynamically plan and adjust according to business traffic characteristics.
[0055] Furthermore, the parameter plane network card, storage plane network card, and input bandwidth and output bandwidth of each network card in the feedback neural network in S15 are used as neural network parameter inputs, wherein the hidden layer hidden-size can be set to between 10 and 20 according to actual conditions.
[0056] Furthermore, the specific steps of applying the model in S2 include:
[0057] S21. Start the distributed large model training task;
[0058] S22, start the large model trained in the first part at the same time;
[0059] S23, input the network inflow and outflow traffic of each network card of each node as a parameter into the inference task;
[0060] S24, performing time series prediction on each node situation by inputting parameters;
[0061] S25. After finding the slow node, evaluate the training task;
[0062] S26. If the task is a flexible training task, the abnormally slow node is directly removed, the task is rescheduled, and the training continues;
[0063] S27, if the task cannot be trained flexibly, the framework is triggered to save the checkpoint;
[0064] S28. After the checkpoint is saved, stop the task, repair or replace the abnormal node, and restart the training task from the most recent checkpoint.
[0065] Furthermore, the large model in S22 selects a suitable model in the model warehouse so that it can select the model according to its own needs during work.
[0066] Furthermore, in S23, input and output data of each node are obtained through monitoring, and the data are obtained through monitoring and input into the trained large model.
[0067] Furthermore, the data acquired in S23 are all stored in TSDB, making data reading and writing more efficient and the storage performance better.
[0068] Furthermore, S27 saves the checkpoint, specifically saves it in HPFS, to facilitate later calls.
[0069] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. A large model training slow node detection method based on NARX model, Features: include: S1. Model preparation, obtaining a NARX model through actual training; S2. Application of the model: Use the trained model to detect nodes in the actual training process, find anomalies, and automatically process them according to the actual situation of the model.
2. According to the method for detecting slow nodes in large model training based on NARX model in claim 1, Features: The specific steps of preparing the model in S1 include: S11, start the distributed training task for a single model and deploy the network data collection agent on each node; S12, collect the input and output data of all network cards during the training process and store them in the time series database; S13, cleaning the stored data to remove obviously erroneous data and invalid data collected during the interruption of training; S14. Collect relevant data through multiple rounds of training to build a high-quality data set; S15. Design time series NARX feedback neural network; S16. Use the previously constructed data set to train the model; S17. The quality-qualified models are stored in the model warehouse.
3. According to the method for detecting slow nodes in large model training based on NARX model in claim 2, Features: The network card in S12 includes a parameter plane network card and a storage plane network card.
4. According to the method for detecting slow nodes in large model training based on NARX model in claim 3, Features: The database in S12 is specifically a TSDB time series database.
5. According to the method for detecting slow nodes in large model training based on NARX model in claim 4, Features: In the S15, the parameter plane network card, the storage plane network card, and the input bandwidth and output bandwidth of each network card in the feedback neural network are used as neural network parameter inputs.
6. According to the method for detecting slow nodes in large model training based on NARX model in claim 5, Features: The specific steps of applying the model in S2 include: S21. Start the distributed large model training task; S22, start the large model trained in the first part at the same time; S23, input the network inflow and outflow traffic of each network card of each node as a parameter into the inference task; S24, performing time series prediction on each node situation by inputting parameters; S25. After finding the slow node, evaluate the training task; S26. If the task is a flexible training task, the abnormally slow node is directly removed, the task is rescheduled, and the training continues; S27, if the task cannot be trained flexibly, the framework is triggered to save the checkpoint; S28. After the Checkpoint is saved, stop the task.
7. According to claim 6, a large model training slow node detection method based on NARX model, Features: The large model in S22 selects a suitable model from the model warehouse.
8. According to the method for detecting slow nodes in large model training based on NARX model in claim 7, Features: In S23, input and output data of each node are obtained through monitoring.
9. According to claim 8, a large model training slow node detection method based on NARX model, Features: The data acquired in S23 are all stored in TSDB.
10. A large model training slow node detection method based on NARX model according to claim 9, Features: In S27, the checkpoint is saved, specifically, it is saved in HPFS.
Citation Information
Patent Citations
Parameter server synchronization method and system and readable storage medium
CN113656494A
Machine learning model training checkpoints
CN113822438A
Slow node detection method and device, electronic equipment and storage medium
CN114328098A
Power communication network business risk assessment method and system based on comprehensive entropy
CN114881452A
Fault file storage method and related device
CN114968947A
