Deep learning model optimization method for large-scale distributed training

Through adaptive data parallel processing, sparse model mixed precision training and gradient priority parameter updating, the problem of insufficient computing resources and slow training speed of deep learning models in large-scale distributed training is solved, and efficient model training and resource utilization are achieved. .

CN118535340APending Publication Date: 2024-08-23OBJECTEYE (BEIJING) TECH CO LTD +1
View PDF 0 Cites 5 Cited by

Patent Information

Application Number
CN202410717237.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-04
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

The training of deep learning models faces the problems of insufficient computing resources, slow training speed, and low model accuracy in large-scale distributed environments. Traditional methods have problems such as high communication overhead and slow convergence speed.

Method used

The adaptive data parallel processing module is used to automatically select the data partition mode. By dividing the expert model and dynamically adjusting the floating point precision, the model parameters are sorted and updated based on the gradient priority principle to improve training efficiency and resource utilization.

Benefits of technology

It significantly improves the speed of large-scale distributed training, reduces computing resource overhead, while maintaining model accuracy, and is suitable for fields such as image recognition and natural language processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118535340A
    Figure CN118535340A
Patent Text Reader

Abstract

The invention discloses a deep learning model optimization method for large-scale distributed training. The method comprises the following steps: firstly, inputting training sample data, calculating a resource difference value of each calculation node in a current distributed training system, and selecting a data division mode according to the difference value; dividing the model structure into a plurality of expert models, deploying a corresponding expert model on each computing node, and dynamically adjusting the floating-point number precision of each training stage in combination with a precision control and conversion module; and finally, performing parameter calculation on the deep learning model parameters of the calculation nodes, performing descending sorting on the parameters from large to small, and updating the corresponding model parameters from large to small in sequence according to a gradient priority principle. According to the method, gradient communication and back propagation calculation are mixed in parallel, the efficiency of calculation and network communication in model training is improved, and the requirements of large-scale distributed training for calculation resources and storage space are effectively reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of deep learning technology, and in particular to a deep learning model optimization method for large-scale distributed training. Background Art

[0002] With the advent of the big data era, deep learning has achieved remarkable results in many fields. However, with the continuous development and application of deep learning models, the model scale and data volume are showing an explosive growth trend. The training of deep learning models faces problems such as insufficient computing resources, slow training speed, and low model accuracy.

[0003] Traditional large-scale distributed training technology can solve these problems to a certain extent by distributing computing tasks to multiple computing nodes for parallel processing, but there are still some problems, such as high communication overhead, slow convergence speed, and low model accuracy. How to improve the efficiency of large-scale distributed training, reduce resource consumption and ensure model accuracy is still an urgent problem to be solved. Summary of the invention

[0004] Based on this, an embodiment of the present application provides a deep learning model optimization method for large-scale distributed training, which can significantly improve the speed of large-scale distributed training of existing deep learning models and reduce the overhead of computing resources while maintaining the model accuracy.

[0005] In a first aspect, a deep learning model optimization method for large-scale distributed training is provided, the method comprising:

[0006] S1, input training sample data, calculate the resource difference value of each computing node in the current distributed training system, and automatically select a data partitioning mode according to the difference value; wherein the data partitioning mode at least includes data partitioning based on sample quantity and data partitioning based on sample feature dimension;

[0007] S2, for the determined deep learning model, divide the model structure into multiple expert models according to the selected data partitioning mode, then deploy the corresponding expert model on each computing node, and dynamically adjust the floating point precision of each training stage in combination with the precision control and conversion module;

[0008] S3, calculate the parameters of the deep learning model of each computing node, and sort the parameters in descending order from large to small, and update the corresponding model parameters in order from large to small according to the gradient priority principle.

[0009] Optionally, training sample data is input in S1, resource difference values ​​of various computing nodes in the current distributed training system are calculated, and a data partitioning mode is automatically selected according to the difference value, specifically including:

[0010] When the idle resources of each computing node in the current distributed training system are the same, a data partitioning strategy based on the number of samples is selected;

[0011] When the difference in idle resources of each computing node in the current distributed training system exceeds the set threshold, a data parallel partitioning strategy based on the sample feature dimension is selected.

[0012] Optionally, when data is divided based on the number of samples, it specifically includes:

[0013] Perform a global shuffle reset to shuffle the order of all input sample data;

[0014] According to the number of computing nodes n, the sample data is evenly divided into n parts, each containing m / n samples;

[0015] Each computing node performs random sampling without replacement to ensure that each node is assigned a roughly equal number of samples.

[0016] Optionally, when data is divided in parallel based on sample feature dimensions, it specifically includes:

[0017] Analyze the characteristic dimension D of the data set and split the sample data according to the characteristic dimension; assign different sample subsets to each computing node according to the characteristic dimension, or each node processes different characteristic subsets of all samples;

[0018] Distribute the split sample data to the corresponding computing nodes.

[0019] Optionally, S2, for the determined deep learning model, divide the model structure into multiple expert models according to the selected data partitioning mode, then deploy the corresponding expert model on each computing node, and dynamically adjust the floating point precision of each training stage in combination with the precision control and conversion module, specifically including:

[0020] According to the selected data partitioning mode, the determined deep learning model structure is split into multiple expert models;

[0021] According to the architecture of the distributed training system, the split expert model is deployed to each computing node; the floating point precision of each stage is dynamically adjusted during the training process, and the calculation process of the deep learning model is divided into multiple stages, each of which may include forward propagation, back propagation, and parameter update; the appropriate precision mode is determined based on the computing requirements and data characteristics of each stage;

[0022] During training, the expert model on each computing node generates its own output; based on the model's structure and training objectives, the outputs are combined to form the final classification result.

[0023] Optionally, S3 calculates the parameters of the deep learning model of each computing node, and sorts the parameters in descending order from large to small, and updates the corresponding model parameters in order from large to small according to the gradient priority principle, specifically including:

[0024] On each computing node, the parameter gradients of the deep learning model are calculated by the back propagation algorithm using the input training data and the corresponding labels; the gradient data calculated on all computing nodes are collected, and these gradient values ​​are sorted in descending order from large to small; according to the gradient priority principle, the parameters with larger gradients are updated first, and other parameters are updated in order of gradient size;

[0025] During the parameter update process, the distributed communication mechanism is used to ensure data synchronization between the computing nodes. After a set number of iterations, the convergence of the model is checked. If the convergence conditions are met, the training is stopped; otherwise, the training is repeated for the next round of training and parameter update.

[0026] In a second aspect, a deep learning model optimization device for large-scale distributed training is provided, the device comprising:

[0027] An adaptive data parallel processing module is used to input training sample data, calculate the resource difference value of each computing node in the current distributed training system, and automatically select a data partitioning mode according to the difference value; wherein the data partitioning mode at least includes data partitioning based on the number of samples and data partitioning based on the sample feature dimension;

[0028] The sparse model mixed precision training module divides the model structure into multiple expert models according to the selected data partitioning mode for a certain deep learning model, and then deploys the corresponding expert model on each computing node, and dynamically adjusts the floating point precision of each training stage in combination with the precision control and conversion modules;

[0029] The gradient-priority-based parameter update module is used to calculate the parameters of the deep learning model of each computing node, and sort the parameters in descending order from large to small. According to the gradient-priority principle, the corresponding model parameters are updated in sequence from large to small.

[0030] In a third aspect, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the deep learning model optimization method for large-scale distributed training described in any one of the first aspects above is implemented.

[0031] In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the deep learning model optimization method for large-scale distributed training described in any one of the first aspects above is implemented.

[0032] In a fifth aspect, a computer program product is provided, including a computer program / instruction, which, when executed by a processor, implements the deep learning model optimization method for large-scale distributed training described in any one of the first aspects above.

[0033] The technical solution provided by the embodiment of the present application includes three parts: an adaptive data parallel processing module, a sparse model mixed precision training module, and a gradient-priority-based parameter update module. Among them, the adaptive data parallel processing module is used to split the training data of the input model to achieve data parallelism. The sparse model mixed precision training module optimizes the model structure through a hybrid expert model to complete the sparsification and parallelization of the model structure, and combines mixed precision training to further accelerate the training speed of the deep neural network and reduce memory usage. The gradient-priority-based parameter update module mixes gradient communication and back propagation calculations in parallel, which greatly improves the efficiency of calculation and network communication in model training. This technology effectively reduces the demand for computing resources and storage space for large-scale distributed training, and can be widely used in the field of deep learning model optimization for large-scale distributed training, such as image recognition, natural language processing, etc. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the implementation methods of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for the implementation methods or the description of the prior art. Obviously, the drawings in the following description are only exemplary, and for ordinary technicians in this field, other implementation drawings can be derived from the provided drawings without creative work.

[0035] Figure 1 This is a schematic diagram showing the overall solution in this application;

[0036] Figure 2 Schematic diagram of the adaptive data parallel processing module in this application.

[0037] Figure 3 Schematic diagram of the mixed precision training module of the sparse model in this application.

[0038] Figure 4 Schematic diagram of the gradient-priority-based parameter update module in this application. DETAILED DESCRIPTION

[0039] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0040] In the description of the present invention, the terms "comprises", "has" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or apparatus comprising a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may also include other steps or units that are not explicitly listed but are inherent to these processes, methods, products or apparatuses, or steps or units added based on further optimization schemes conceived by the present invention.

[0041] The present invention proposes a deep learning model optimization method for large-scale distributed training, which can significantly improve the speed of large-scale distributed training of existing deep learning models and reduce the cost of computing resources while maintaining the accuracy of the model. First, the adaptive data parallel processing module aims to realize data parallelism by processing input data and ensure that the input samples are uniformly sampled. The module mainly selects the data partitioning strategy autonomously according to the resource situation of the computing node. Then, the sparse model mixed precision training module splits the deep learning network model into multiple sub-modules. During training, the sub-models of specific parts are activated according to the input samples for calculation, and a trainable gating mechanism is introduced to optimize and save computing resources. In order to further improve the training efficiency and performance of the model, the deep learning model is further optimized based on mixed precision training. The gradient-priority-based parameter update module is based on the gradient priority principle and dynamically adjusts the update step size according to the gradient size of each parameter, thereby effectively improving the training speed and efficiency.

[0042] Please refer to Figure 1 , which shows a schematic diagram of the overall solution of the embodiment of the present application, specifically including an adaptive data parallel processing module, a sparse model mixed precision training module and a gradient-priority-based parameter update module, which correspond to the following steps respectively:

[0043] S1, input training sample data, calculate the resource difference value of each computing node in the current distributed training system, and automatically select the data partitioning mode according to the size of the difference value.

[0044] This step is applied to the adaptive data parallel processing module, such as Figure 2 A schematic diagram of the adaptive data parallel processing module is given. Among them, the data partitioning mode includes at least data partitioning based on the number of samples and data partitioning based on the sample feature dimension. The training sample data is input, and the significant difference of resources of each computing node in the current distributed training system is calculated. According to the size of the difference value, the data partitioning based on the number of samples or the data partitioning based on the sample feature dimension is automatically selected.

[0045] Specifically, the adaptive data parallel processing module of the present invention automatically selects data parallel partitioning based on the number of samples and data parallel partitioning based on the sample feature dimension based on the resource occupancy of each computing node. When the idle resources of each computing node are the same, the data partitioning strategy based on the number of samples is selected first. If the idle resources of each computing node are quite different, the data parallel partitioning based on the sample feature dimension is preferred. Specifically, for data partitioning based on the number of samples, it is assumed that the distributed training system contains a total of m data samples and n computing nodes. All input sample data are globally reset in disorder, and each computing node performs m / n random sampling without replacement. For data parallel partitioning based on sample feature dimension, it is assumed that the data set contains n computing nodes, m samples and each sample has D-dimensional features, and the m samples are split according to different feature dimensions, and the split samples are assigned to corresponding computing nodes. In an embodiment of the present application, m is the number of training data samples; n is the number of computing nodes in the distributed training system; and D is the feature dimension of the training data sample.

[0046] In an optional embodiment of the present application, the implementation process of S1 specifically includes:

[0047] Read training sample data from an external data source or storage system, including feature values ​​and corresponding labels, and load this data into the master node or data preprocessing module of the distributed training system.

[0048] Monitor and collect the resource usage of each computing node, including CPU utilization, GPU utilization, memory usage, disk IO, etc. Calculate the resource usage or idle resource amount of each computing node based on the collected data. Analyze the resource differences of each node and calculate the difference value. You can use standard deviation, variance, or maximum and minimum value difference to measure.

[0049] Determine whether the resource differences of each computing node are significant. If the idle resources of each node are roughly the same or the difference is small, choose a data partitioning strategy based on the number of samples. Perform a global shuffle reset to shuffle the order of all input sample data. According to the number of computing nodes n, divide the sample data into n parts on average, each containing m / n samples (assuming that m is divisible by n, otherwise it can be adjusted appropriately or other allocation strategies can be adopted). Each computing node performs random sampling without replacement to ensure that each node is allocated a roughly equal number of samples. If the idle resources of each node are significantly different, choose data parallel partitioning based on the sample feature dimension. Analyze the feature dimension D of the data set to determine which dimensions are suitable for splitting. Split the sample data according to the feature dimension. The splitting method can be to assign different sample subsets to each computing node according to the feature dimension, or each node processes a different feature subset of all samples. Allocate the split sample data to the corresponding computing nodes.

[0050] In the process of data partitioning, the balance and consistency of the data must also be considered to ensure that the data assigned to each computing node is as balanced as possible in terms of category distribution, feature distribution, etc., in order to reduce the deviation during model training. After the data partitioning is completed, the subsequent steps can continue to train the deep learning model and update the parameters on each computing node based on the partitioned data.

[0051] This segmentation implementation process covers the entire process from input data to data partitioning mode selection, ensuring that the distributed training system can automatically adjust the data partitioning strategy according to the resource conditions of the computing nodes to improve training efficiency and resource utilization.

[0052] S2: For a determined deep learning model, the model structure is divided into multiple expert models according to the selected data partitioning mode, and then the corresponding expert model is deployed on each computing node. The floating-point precision of each training stage is dynamically adjusted in combination with the precision control and conversion modules.

[0053] This step is applied to the mixed precision training module of the sparse model, such as Figure 3 A schematic diagram of the mixed precision training module for sparse models is given. Specifically, the mixed precision training module for sparse models first divides the large-scale deep learning model into multiple expert models, and then deploys the corresponding expert models on each computing node for training. The final output of the model is a combination of the outputs of the expert models. At the same time, the precision control and precision conversion modules divide the calculation process of the deep learning model into multiple stages. Each stage selects the appropriate precision mode according to the model's calculation requirements and data characteristics, and dynamically adjusts the floating-point precision of each stage through necessary precision conversion during the training process, further reducing storage and computing overhead and improving hardware utilization.

[0054] In an optional embodiment of the present application, the implementation process of S2 specifically includes:

[0055] According to the data partitioning mode selected in step S1, the large-scale deep learning model is split. According to the architecture of the distributed training system, the split expert model is deployed to each computing node. Ensure that each computing node has sufficient computing resources (such as CPU, GPU) and storage space to run the expert model on it. Configure network communication and data transmission mechanisms to achieve data synchronization and model parameter update between nodes during training.

[0056] Design a precision control and conversion module, which is responsible for dynamically adjusting the floating-point precision of each stage during the training process. Divide the calculation process of the deep learning model into multiple stages, each of which may include forward propagation, backpropagation, parameter update, etc. Analyze the computing requirements and data characteristics of each stage, and determine the appropriate precision mode, such as full precision (float32), half precision (float16), or mixed precision. During the training process, dynamically adjust the floating-point precision of each stage through necessary precision conversion operations, such as type conversion, rounding, and truncation. The precision conversion operation needs to ensure that the reduction in precision does not significantly affect the training effect and convergence speed of the model, while effectively reducing storage and computing overhead.

[0057] During the training process, the expert model on each computing node generates its own output. According to the structure of the model and the training objectives, a suitable strategy is designed to combine these outputs to form the final model prediction or classification results. The combination strategy can be a simple average, a weighted average, or a more complex fusion method, depending on the requirements of the task and the characteristics of the model.

[0058] Through the above subdivision implementation process, the S2 step can complete the splitting, deployment, and precision control and conversion of the deep learning model during the training process, thereby achieving high efficiency of distributed training and optimization of resource utilization. At the same time, by dynamically adjusting the floating-point precision, the storage and computing overhead can be further reduced, and the hardware utilization rate can be improved.

[0059] S3, calculate the parameters of the deep learning model of each computing node, and sort the parameters in descending order from large to small, and update the corresponding model parameters in order from large to small according to the gradient priority principle.

[0060] This step is applied to the gradient-first parameter update module, such as Figure 4 A schematic diagram of the gradient-priority-based parameter update module is given. Specifically, the gradient-priority-based parameter update module first calculates the gradient of the deep learning model on the input training data and sorts them in descending order from high to low according to the value. Based on the degree-priority principle, the parameters with larger gradients are updated first, and then other parameters are updated in order according to the gradient size.

[0061] In an optional embodiment of the present application, the implementation process of S3 specifically includes:

[0062] On each computing node, the parameter gradients of the deep learning model are calculated through the back propagation algorithm using the input training data and corresponding labels. These gradients reflect the sensitivity of the model parameters to the loss function and are key information for model optimization.

[0063] Collect the gradient data calculated on all computing nodes and sort the gradient values ​​in descending order from large to small. The purpose of sorting is to determine which parameters have the greatest impact on model training, so as to give priority to updating them.

[0064] According to the gradient priority principle, the parameters with larger gradients are updated first. These parameters have the greatest impact on the training effect of the model, so adjusting them first can accelerate the convergence of the model. Other parameters are updated in the order of gradient size to ensure that in each iteration, the model can be adjusted in a targeted manner according to the importance of the parameters.

[0065] During the parameter update process, it is necessary to ensure data synchronization between the computing nodes to ensure the consistency of the model. This is usually achieved through a distributed communication mechanism. After a certain number of iterations, check the convergence of the model. If the convergence conditions are met, stop training; otherwise, repeat the above steps for the next round of training and parameter update.

[0066] Through the above subdivision implementation process, the S3 step can efficiently update the parameters of the deep learning model. Through the gradient priority principle, the parameters that have the greatest impact on the model are adjusted first, thereby improving training efficiency and model performance.

[0067] The embodiment of the present application provides a deep learning model optimization device for large-scale distributed training, including:

[0068] An adaptive data parallel processing module is used to input training sample data, calculate the resource difference value of each computing node in the current distributed training system, and automatically select a data partitioning mode according to the difference value; wherein the data partitioning mode at least includes data partitioning based on the number of samples and data partitioning based on the sample feature dimension;

[0069] The sparse model mixed precision training module divides the model structure into multiple expert models according to the selected data partitioning mode for a certain deep learning model, and then deploys the corresponding expert model on each computing node, and dynamically adjusts the floating point precision of each training stage in combination with the precision control and conversion modules;

[0070] The gradient-priority-based parameter update module is used to calculate the parameters of the deep learning model of each computing node, and sort the parameters in descending order from large to small. According to the gradient-priority principle, the corresponding model parameters are updated in sequence from large to small.

[0071] For the specific limitations of the deep learning model optimization device for large-scale distributed training, please refer to the limitations of the deep learning model optimization method for large-scale distributed training above, which will not be repeated here. Each module in the above-mentioned deep learning model optimization device for large-scale distributed training can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0072] In one embodiment, an electronic device is provided. The electronic device includes a processor, a memory and a network interface connected through a system bus. The processor of the device is used to provide computing and control capabilities. The memory of the device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to optimize data for a deep learning model for large-scale distributed training. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a deep learning model optimization method for large-scale distributed training is implemented.

[0073] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which involves all or part of the processes in the above-mentioned embodiment method.

[0074] In one embodiment, a computer program product is also provided, including a computer program / instruction, which involves all or part of the process in the above embodiment method.

[0075] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing related hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in M ​​forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (SyMchliMk) DRAM (SLDRAM), memory bus (RaMbus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0076] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0077] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be construed as limiting the scope of the patent application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent application shall be subject to the attached claims.

Claims

1. A deep learning model optimization method for large-scale distributed training, characterized in that: The method comprises: S1, input training sample data, calculate the resource difference value of each computing node in the current distributed training system, and automatically select a data partitioning mode according to the difference value; wherein the data partitioning mode at least includes data partitioning based on sample quantity and data partitioning based on sample feature dimension; S2, for the determined deep learning model, divide the model structure into multiple expert models according to the selected data partitioning mode, then deploy the corresponding expert model on each computing node, and dynamically adjust the floating point precision of each training stage in combination with the precision control and conversion module; S3, calculate the parameters of the deep learning model of each computing node, and sort the parameters in descending order from large to small, and update the corresponding model parameters in order from large to small according to the gradient priority principle.

2. The deep learning model optimization method according to claim 1, characterized in that: In S1, training sample data is input, resource difference values ​​of each computing node in the current distributed training system are calculated, and the data partitioning mode is automatically selected according to the difference value, including: When the idle resources of each computing node in the current distributed training system are the same, a data partitioning strategy based on the number of samples is selected; When the difference in idle resources of each computing node in the current distributed training system exceeds the set threshold, a data parallel partitioning strategy based on the sample feature dimension is selected.

3. The deep learning model optimization method according to claim 2, characterized in that: When data is divided based on sample size, it includes: Perform a global shuffle reset to shuffle the order of all input sample data; According to the number of computing nodes n, the sample data is evenly divided into n parts, each containing m / n samples; Each computing node performs random sampling without replacement to ensure that each node is assigned a roughly equal number of samples.

4. The deep learning model optimization method according to claim 2, characterized in that: When data is divided in parallel based on sample feature dimensions, it specifically includes: Analyze the characteristic dimension D of the data set and split the sample data according to the characteristic dimension; assign different sample subsets to each computing node according to the characteristic dimension, or each node processes different characteristic subsets of all samples; Distribute the split sample data to the corresponding computing nodes.

5. The deep learning model optimization method according to claim 1, characterized in that: S2, for the determined deep learning model, divide the model structure into multiple expert models according to the selected data partitioning mode, and then deploy the corresponding expert model on each computing node, and dynamically adjust the floating point precision of each training stage in combination with the precision control and conversion module, including: According to the selected data partitioning mode, the determined deep learning model structure is split into multiple expert models; According to the architecture of the distributed training system, the split expert model is deployed to each computing node; the floating point precision of each stage is dynamically adjusted during the training process, and the calculation process of the deep learning model is divided into multiple stages, each of which may include forward propagation, back propagation, and parameter update; the appropriate precision mode is determined based on the computing requirements and data characteristics of each stage; During training, the expert model on each computing node generates its own output; based on the model's structure and training objectives, the outputs are combined to form the final classification result.

6. The deep learning model optimization method according to claim 1, characterized in that: S3, calculate the parameters of the deep learning model of each computing node, and sort the parameters in descending order from large to small. According to the gradient priority principle, update the corresponding model parameters from large to small in sequence, including: On each computing node, the parameter gradients of the deep learning model are calculated by the back propagation algorithm using the input training data and the corresponding labels; the gradient data calculated on all computing nodes are collected, and these gradient values ​​are sorted in descending order from large to small; according to the gradient priority principle, the parameters with larger gradients are updated first, and other parameters are updated in order of gradient size; During the parameter update process, the distributed communication mechanism is used to ensure data synchronization between the computing nodes. After a set number of iterations, the convergence of the model is checked. If the convergence conditions are met, the training is stopped; otherwise, the training is repeated for the next round of training and parameter update.

7. A deep learning model optimization device for large-scale distributed training, characterized in that: The device comprises: An adaptive data parallel processing module is used to input training sample data, calculate the resource difference value of each computing node in the current distributed training system, and automatically select a data partitioning mode according to the difference value; wherein the data partitioning mode at least includes data partitioning based on the number of samples and data partitioning based on the sample feature dimension; The sparse model mixed precision training module divides the model structure into multiple expert models according to the selected data partitioning mode for a certain deep learning model, and then deploys the corresponding expert model on each computing node, and dynamically adjusts the floating point precision of each training stage in combination with the precision control and conversion modules; The gradient-priority-based parameter update module is used to calculate the parameters of the deep learning model of each computing node, and sort the parameters in descending order from large to small. According to the gradient-priority principle, the corresponding model parameters are updated in sequence from large to small.

8. An electronic device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Cited By

  • Hybrid expert model reasoning acceleration method, device, equipment, medium and program

    CN118761472A

  • Deep learning large model training method and system for heterogeneous equipment

    CN119557113A

  • Processor system and operation method for large-scale deep learning

    CN120448132A

  • Optimization method of hybrid expert system, computer equipment, readable storage medium and program product

    CN120821942A

  • Large model adjustment method, apparatus and device, and storage medium

    WO2026097204A1