Distributed training method and training system across data centers

By dividing data center nodes into computing power clusters in cross-data center scenarios and planning transmission paths according to the communication needs of the expert layer, the problems of communication bottlenecks and load imbalance in cross-data center training are solved, thereby improving training efficiency and resource utilization.

CN123164045APending Publication Date: 2026-11-24CHINA TELECOM CORP LTD TECHNOLOGY INNOVATION CENTER +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611299401.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-25
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

In cross-data center scenarios, existing distributed training solutions struggle to effectively adapt to complex network topologies and communication bottlenecks, leading to a surge in expert communication overhead and severe load imbalance, which in turn affects overall training efficiency.

Method used

By acquiring the network status information of data center nodes, they are divided into computing power clusters that meet local communication conditions. Based on the communication needs of the expert layer and the characteristics of locality, the expert layer that requires full connectivity communication is assigned to the same target computing power cluster, and transmission paths are planned for training.

Benefits of technology

It significantly reduces communication latency and network overhead across data centers, greatly improves overall training efficiency and model training throughput, and enhances network resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123164045A_ABST
    Figure CN123164045A_ABST
Patent Text Reader

Abstract

This disclosure provides a distributed training method and system across data centers, relating to the fields of artificial intelligence and large-scale model distributed training technology. The method includes: dividing multiple data center nodes into at least one computing power cluster based on network state information; determining the locality characteristics of communication between expert layers based on expert layer communication needs, whereby the locality characteristics characterize the aggregation and distribution of communication traffic between expert layers; allocating multiple expert layers of a hybrid expert model to data center nodes within a target computing power cluster; within the target computing power cluster, planning transmission paths for fully connected communication between expert layers based on expert layer communication needs and the network topology of the target computing power cluster; and controlling the data center nodes allocated within the target computing power cluster to perform expert-parallel distributed training of the hybrid expert model based on the transmission paths. According to embodiments of this disclosure, the training efficiency of hybrid expert models in cross-data center scenarios can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the fields of artificial intelligence and large-scale distributed training technology, and in particular to a distributed training method and training system across data centers. Background Technology

[0002] In recent years, the parameter size of deep learning models has grown exponentially. Mixture of Experts (MoE) models, by introducing sparse activation mechanisms, can significantly increase model capacity without substantially increasing inference computation, and have become the mainstream architecture for training large models. However, MoE models involve a large amount of expert routing and all-to-all communication during training, placing extremely high demands on underlying computing resources and network bandwidth.

[0003] As model scale expands further, the computing power and power resources of a single data center are gradually reaching physical bottlenecks, making cross-data center collaborative training an inevitable trend. However, in cross-data center scenarios, the network between nodes typically exhibits high latency, limited bandwidth, and volatile physical characteristics. Existing distributed training solutions often struggle to effectively adapt to the complex topology and communication bottlenecks of cross-domain networks when deploying MoE models, easily leading to a surge in expert communication overhead and severe load imbalances among computing nodes, thereby significantly limiting overall training efficiency. Summary of the Invention

[0004] This disclosure provides a distributed training method and system across data centers, which can improve the training efficiency of hybrid expert models in cross-data center scenarios.

[0005] Other features and advantages of this disclosure will become apparent from the following detailed description, or may be learned in part from practice of this disclosure.

[0006] According to one aspect of this disclosure, a distributed training method across data centers is provided, comprising: acquiring network state information among multiple data center nodes, and dividing the multiple data center nodes into at least one computing power cluster based on the network state information, wherein the network transmission performance between data center nodes within a computing power cluster meets preset local communication conditions; acquiring the expert layer communication requirements of a hybrid expert model, and determining the locality characteristics of communication between expert layers based on the expert layer communication requirements, wherein the locality characteristics characterize the aggregation and distribution of communication traffic between expert layers; and determining a target from at least one computing power cluster based on the locality characteristics and the network state information. The system uses a computing power cluster and distributes multiple expert layers of the hybrid expert model to data center nodes within the target computing power cluster, ensuring that expert layers requiring full connectivity communication are assigned to the same target computing power cluster. Within the target computing power cluster, transmission paths are planned for full connectivity communication between expert layers based on their communication needs and the network topology of the target computing power cluster. The data center nodes allocated within the target computing power cluster are controlled to perform expert parallel distributed training of the hybrid expert model based on the transmission paths. During training, expert layers within the target computing power cluster communicate fully via the transmission paths to distribute intermediate hidden states and collect expert outputs.

[0007] According to another aspect of this disclosure, a distributed training system across data centers is provided, including a scheduling control node and multiple data center computing nodes.

[0008] A scheduling and control node is used to acquire network status information between multiple data center nodes and divide the multiple data center nodes into at least one computing power cluster based on the network status information. The network transmission performance between data center nodes within a computing power cluster meets preset local communication conditions. It acquires the communication requirements of the expert layers in the hybrid expert model and determines the locality characteristics of communication between expert layers based on these requirements. These locality characteristics characterize the aggregation and distribution of communication traffic between expert layers. Based on the locality characteristics and network status information, it determines a target computing power cluster from at least one computing power cluster and assigns multiple expert layers of the hybrid expert model to data center nodes within the target computing power cluster, ensuring that expert layers requiring full connectivity communication are assigned to the same target computing power cluster. Within the target computing power cluster, it plans transmission paths for full connectivity communication between expert layers based on the expert layer communication requirements and the network topology of the target computing power cluster. Multiple data center nodes are used to respond to the control of the scheduling control node and perform expert parallel distributed training of the hybrid expert model based on the transmission path. During the training process, the expert layer in the target computing power cluster communicates fully connectedly through the transmission path to complete the distribution of intermediate hidden states and the collection of expert outputs.

[0009] According to another aspect of this disclosure, a computer program product is provided, the computer program product including program instructions for implementing the above-described distributed training method across data centers.

[0010] The technical solutions provided in this disclosure can include the following beneficial effects: This embodiment of the disclosure divides cross-data center nodes into computing power clusters that meet local communication conditions according to network status, and accurately matches the locality characteristics of expert layer communication in Hybrid Expert Model (MoE). Expert layers that need to frequently conduct full-connection communication with each other are centrally allocated to the same target computing power cluster, thereby cleverly transforming the high-latency, low-bandwidth communication that originally spanned a wide area network into high-performance local communication within the cluster. At the same time, by combining the network topology within the cluster to plan a dedicated transmission path for full-connection communication, it effectively overcomes the serious communication bottleneck caused by all-to-all communication in traditional MoE expert parallelism in cross-data center scenarios, significantly reduces communication latency and network overhead, and greatly improves the overall efficiency, model training throughput and network resource utilization of cross-data center distributed training, making cross-data center MoE expert parallel training truly feasible.

[0011] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0012] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.

[0013] Obviously, the accompanying drawings described below are merely some embodiments of this disclosure. Those skilled in the art can obtain other drawings based on these drawings without any creative effort.

[0014] Figure 1 A flowchart illustrating a distributed training method across data centers is shown in an embodiment of this disclosure. Figure 2 This diagram illustrates the flowchart of computing power cluster partitioning in an embodiment of this disclosure; Figure 3 This diagram illustrates a flowchart of determining the target computing power cluster in an embodiment of this disclosure; Figure 4 This diagram illustrates a flowchart of the planned transmission path in an embodiment of the present disclosure; Figure 5 This diagram illustrates the flowchart of the online learning expert activation mode in an embodiment of this disclosure. Figure 6 This diagram illustrates a distributed training flowchart in an embodiment of the present disclosure. Figure 7This illustration shows a schematic diagram of a distributed training system architecture across data centers according to an embodiment of the present disclosure; Figure 8 This diagram illustrates the architecture of a cross-datacenter distributed expert parallel training system according to an embodiment of this disclosure. Figure 9 A flowchart illustrating the cross-datacenter distributed expert parallel training process in an embodiment of this disclosure is shown. Detailed Implementation

[0015] To facilitate understanding of the technical solutions of this disclosure, the disclosure will be further described below with reference to the accompanying drawings.

[0016] The terms "first" and "second," etc., used in this disclosure are only used to distinguish different objects and not to describe a specific order. The terms "comprising" and "having," and any variations thereof, in the embodiments of this disclosure are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may also include steps or units not listed.

[0017] Throughout this disclosure, the references to "embodiments" do not necessarily refer to the same embodiments, nor are they independent or alternative embodiments mutually exclusive with other embodiments. Those skilled in the art will explicitly and implicitly understand that the embodiments described in this disclosure can be combined with other embodiments.

[0018] In the embodiments of this disclosure, "at least one" refers to one or more, "more" refers to two or more, "at least two" refers to two or three or more, and "and / or" is used to describe the relationship between associated objects. The character " / " generally indicates that the associated objects before and after are in an "or" relationship.

[0019] To facilitate understanding, the relevant concepts involved in this disclosure are explained below: Cross-data center distributed training refers to distributing the training tasks of artificial intelligence models across multiple data centers that are geographically distant and have network links spanning tens or even hundreds of kilometers, and completing the training collaboratively through high-speed networks. This approach overcomes the bottlenecks of single data centers in terms of computing power, power, and space, and has become a key path for training large-scale models (such as trillion-parameter LLMs).

[0020] Hybrid expert (MoE) models are used in machine learning to improve the performance of large language models. Traditional methods extend LLMs by stacking dense layers, and the computational cost increases linearly with model size. In contrast, MoE models employ multiple parallel expert layers, activating only a subset of experts based on the input token in each training iteration. This dynamic approach allows the model to scale to larger scales without a proportional increase in computational cost.

[0021] The MoE model architecture consists of multiple cascaded MoE blocks. Each MoE block contains an attention layer, a gating unit, and multiple parallel feedforward networks (FFNs), which are referred to as "experts." Input token First, the data is fed into the attention layer, and then the gating unit selects the most relevant expert based on the attention layer's output. This process, known as "computation-based routing," is the core of the MoE sparse architecture: it allows model parameters to scale without a linear increase in computational cost. Output token. It is the weighted sum of the outputs of all activated experts.

[0022] In the MoE model, Expert Parallelism (EP) assigns different experts within a single MoE block to different GPUs. Since each GPU needs to send its local state to other experts and receive remote states from other GPUs, the distribution of intermediate hidden states and the collection of expert outputs require two all-to-all communications. The all-to-all communication in EP exhibits non-uniformity and non-determinism across different training iterations.

[0023] A key characteristic of EP communication is that the total communication volume received by each expert in the all-to-all communication of the MoE layer represents the expert's activation strength. Studies show that the activation strength of each expert changes significantly with iteration, reflecting the nondeterminism of EP traffic. Meanwhile, as training progresses, the variability of communication volume among experts decreases, attributed to the use of load balancing loss; however, even when the communication volume tends to converge, the sparsity of the all-to-all traffic matrix remains. Furthermore, recent advances in machine learning indicate that some MoE training techniques intentionally place some experts in a low-utilization state during specific training phases to improve model performance, further highlighting the communication dynamics of distributed MoE training.

[0024] However, this dynamic expert activation requires all-to-all communication between the input and output of the expert layer in each training iteration. Among various parallel strategies, Expert Parallelism (EP) distributes the expert layer across different GPUs, generating a throughput comparable to Tensor Parallelism (TP) and significantly larger than other parallel strategies. Furthermore, the token-based expert activation in EP leads to temporal uncertainty, spatial non-uniformity, and variations in communication patterns with training iterations, posing a challenge to existing GPU interconnect technologies.

[0025] Current GPU interconnect technologies include intra-server extended networks (such as NVSwitch or NVLink) and inter-server extended networks (such as Ethernet or InfiniBand), both of which currently employ uniform and static network topologies (e.g., intra-server extended networks use fully connected cross-switch topologies, and inter-server extended networks use Clos-style fat-tree topologies). When adapting to temporal and spatial variations in MoE communication patterns, these architectures require over-provisioning of full binary bandwidth, while most of the bandwidth remains idle. Recent research has proposed using optical circuit switching (OCS) for topology reconstruction in spatially non-uniform traffic distributions, but these schemes assume that traffic patterns are temporally stable and that no reconstruction is needed during the entire training process. Therefore, these interconnect architectures face bottlenecks, leading to inefficient resource utilization and slower distributed MoE training.

[0026] A comprehensive measurement study conducted in a production-level GPU cluster revealed specific communication patterns in distributed MoE training. The results show that although EP (Expert Parallel) communication exhibits significant variations during training, its dynamic range is strictly confined to a single MoE block; from a global perspective, all-to-all traffic exhibits strong locality. Fully connected communication also exhibits strong locality, as does expert parallel traffic. This is because only expert layers within the same Hybrid Expert (MoE) module require fully connected communication, while expert layers between different MoE modules at different pipeline parallel (PP) stages do not communicate directly.

[0027] In hybrid expert models, only expert layers within the same MoE module require fully connected communication for data distribution and aggregation. Expert layers in different MoE modules at different PP stages, being relatively independent in their model architecture and computational flow, do not communicate directly, thus limiting the scope of fully connected communication and resulting in strong locality of communication traffic. This locality is significant for optimizing communication efficiency during model training and for network architecture design. For example, it allows for the design of more efficient communication strategies and network topologies to reduce unnecessary communication overhead.

[0028] In cross-data center (Cross-DC) distributed training scenarios, Expert Parallelism (EP) faces a series of unique and severe challenges, mainly in the following aspects: Communication bottlenecks in high-latency networks: Expert parallelism relies on an all-to-all communication model, where each GPU needs to send tokens to experts on other GPUs and receive computation results. This model is acceptable within a single data center via high-speed interconnects (such as NVLink and InfiniBand), but in cross-data center scenarios, the high latency and low bandwidth of wide area networks make communication a bottleneck for training, severely slowing down overall training efficiency. In cross-data center links, EP's all-to-all communication is frequent and involves large amounts of data, making it highly susceptible to RTT (round-trip time) and bandwidth fluctuations, causing a sharp drop in training throughput.

[0029] Dynamic load and expert scheduling difficulties: In the MoE model, expert activations are sparse and dynamic, with different samples routed to different experts, leading to uneven computational loads across devices. In cross-DC environments, it is impossible to schedule experts in real time to balance the load, further exacerbating the problem of low resource utilization. Because each DC resource is scheduled independently, global coordination is difficult to achieve, easily resulting in some DCs being overloaded while others are idle, forming "resource islands".

[0030] Synchronization mechanisms are complex and have poor fault tolerance: Expert parallelism typically needs to be combined with strategies such as data parallelism and tensor parallelism to form a hybrid parallel architecture. In cross-DC scenarios, higher requirements are placed on synchronization mechanisms such as gradient synchronization and parameter consistency, while EP's All-to-All communication mode is difficult to be compatible with existing optimization strategies such as hierarchical AllReduce and HAR. Synchronous training is sensitive to latency; the RTT across DCs can reach tens of milliseconds, far exceeding the tolerance range of inter-GPU synchronization, resulting in a significant increase in the length of training steps, and even failure to converge.

[0031] Model splitting and network topology mismatch: Expert parallelism assumes that experts can be evenly distributed across different devices. However, in cross-DC environments, the network topology is complex and the bandwidth is asymmetrical, making it difficult to design efficient expert distribution strategies. If the expert distribution is unreasonable, it may lead to frequent cross-DC communication, further amplifying the impact of latency.

[0032] Therefore, the industry traditionally believes that expert parallelism is not applicable to current distributed training across data centers.

[0033] To address the challenges and lack of mature training frameworks faced by large-scale MOE expert parallel training in cross-datacenter scenarios, this publication proposes a unified scheduling scheme for computing power and network for distributed training of expert parallel models across data centers. Based on recent important observations in academia, this scheme leverages the locality of communication in MOE's all-to-all communication. It clusters data centers, adapting computing power clustering to the local communication patterns of MOE expert parallel training, thus enabling low-latency expert parallel training across data centers. To uncover the characteristics of expert activation patterns during training, static test analysis combined with runtime online learning is employed to perform integrated collaborative optimization of computing power allocation from experts within clusters to data center nodes and all-to-all communication path planning. The lightweight and efficient optimization algorithm, simple monitoring of expert parallel activation patterns, and flexible and efficient runtime rescheduling mechanism contribute to making this system a truly usable solution for cross-datacenter expert parallel training.

[0034] The deficiencies of the above solutions and the proposed solutions are the result of the inventor's practice and careful research. Therefore, the discovery process of the above problems and the solutions proposed in this disclosure below should be considered as the inventor's contribution to this disclosure.

[0035] It is understood that the data involved in this disclosure, including but not limited to the data itself, its acquisition, and its use, shall comply with the requirements of relevant laws, regulations, and provisions. Before using the technical solutions disclosed in the embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and their authorization should be obtained.

[0036] The following detailed description of this exemplary implementation method is provided in conjunction with the accompanying drawings and embodiments.

[0037] Figure 1 The diagram illustrates a flowchart of a cross-datacenter distributed training method according to an embodiment of this disclosure. This cross-datacenter distributed training method can be executed by a cross-datacenter distributed training system, or by a scheduling and control node within that system. Figure 1 As shown, the distributed training method across data centers includes S101 to S105.

[0038] In S101, network status information between multiple data center nodes is obtained, and the multiple data center nodes are divided into at least one computing power cluster based on the network status information. The network transmission performance between data center nodes within a computing power cluster meets preset local communication conditions.

[0039] In S102, the communication requirements of the expert layer of the hybrid expert model are obtained, and the locality characteristics of communication between expert layers are determined based on the communication requirements of the expert layer. The locality characteristics characterize the aggregation and distribution of communication traffic between each expert layer.

[0040] In S103, based on locality features and network state information, a target computing power cluster is determined from at least one computing power cluster, and multiple expert layers of the hybrid expert model are assigned to data center nodes within the target computing power cluster, so that expert layers that need to communicate fully with each other are assigned to the same target computing power cluster.

[0041] By leveraging the locality characteristics of communication traffic to match the network locality advantages of computing power clusters, expert layers belonging to the same fully connected communication domain (i.e., the same MoE module) are centrally deployed within the same target computing power cluster with excellent network performance, thereby avoiding the dispersion of expert layers that require frequent interaction across different data center nodes across wide area networks.

[0042] In S104, within the target computing power cluster, transmission paths are planned for full-connectivity communication between expert layers based on the communication requirements of the expert layers and the network topology of the target computing power cluster.

[0043] The planning process takes into account the link bandwidth bottlenecks and propagation delays between nodes within the cluster. It uses routing optimization algorithms to allocate the optimal physical or logical links for data interaction between expert layers, in order to avoid potential network congestion points and minimize the overall communication time.

[0044] In S105, the data center nodes allocated within the target computing power cluster are controlled to perform expert-parallel distributed training of the hybrid expert model based on the transmission path. During training, the expert layers within the target computing power cluster communicate fully connectedly through the transmission path to complete the distribution of intermediate hidden states and the collection of expert outputs. The process of distributing intermediate hidden states and collecting expert outputs constitutes the core All-to-All communication operation in the Expert Parallelism (EP) architecture. Through the aforementioned optimized transmission path, the efficient flow of token data between expert nodes is ensured.

[0045] This disclosed embodiment breaks through the traditional misconception that expert parallel training is unsuitable for cross-data center deployment due to the large amount of all-to-all communication involved. This solution precisely extracts the locality features of MoE model communication and cleverly matches them with the local clustering characteristics of cross-data center networks. It reduces the fully connected communication that originally required traversing high-latency wide area networks to a smaller, confined environment within the target computing cluster with high-performance interconnectivity. This not only completely eliminates the severe latency bottleneck caused by long-distance cross-data center communication and significantly reduces network overhead, but also significantly improves the throughput and convergence speed of expert parallel training. This makes it possible to efficiently conduct MoE model training on large-scale cross-data center clusters, greatly improving the utilization of global computing resources and network bandwidth.

[0046] In some embodiments, dividing multiple data center nodes into at least one computing power cluster based on network status information may include... Figure 2 S201 to S205 are shown.

[0047] In S201, each data center node is initialized as an independent initial cluster.

[0048] In S202, the weighted distance between any two data center nodes is calculated based on the bandwidth matrix and delay matrix between multiple data center nodes.

[0049] In some embodiments, the weighted distance takes into account both the propagation delay and the link bandwidth between nodes (e.g., by weighted summation of the inverse of the delay and the bandwidth). The smaller the weighted distance, the better the network transmission performance between the two nodes and the lower the communication cost of data interaction.

[0050] In S203, based on the preset connection criteria, the inter-cluster distance between each cluster is calculated according to the weighted distance.

[0051] Linkage criteria (such as single link, full link, or average link criteria) are used to aggregate the distances of nodes within a cluster into the overall distance between clusters, thereby objectively reflecting the comprehensive network communication cost of two clusters after merging.

[0052] In S204, the two clusters with the closest inter-cluster distance are iteratively merged, and the inter-cluster distance is updated after each merge until all data center nodes are merged into a single root node, generating a binary tree-like cluster topology.

[0053] In S205, at least one computing power cluster is determined from the cluster topology based on the network transmission performance of each level of the cluster.

[0054] This embodiment employs a cohesive hierarchical clustering algorithm based on network state (bandwidth and latency) to construct a binary tree-like cluster topology reflecting the global network affinity hierarchy from the bottom up. This partitioning mechanism scientifically and objectively quantifies the network performance differences between nodes across data centers and accurately reveals the hierarchical aggregation pattern of large-scale cluster network performance. By "cutting" computing power clusters that meet local communication conditions from this cluster topology as needed, it not only ensures that the final partitioned computing power clusters have a high-bandwidth, low-latency, high-quality interconnection environment, providing a reliable physical network boundary guarantee for subsequently confining the expert layer of high-frequency communication within the cluster; but also, this hierarchical topology allows the system to flexibly adapt to training tasks of different scales and communication needs, effectively avoiding cross-domain communication bottlenecks caused by inaccurate network state assessment or unreasonable partitioning, and significantly improving the rationality of global cluster resource scheduling and the overall efficiency of distributed training.

[0055] In some embodiments, determining the target computing power cluster from at least one computing power cluster may include... Figure 3 S301 to S303 are shown.

[0056] In S301, based on the memory requirements of the hybrid expert model, at least one computing power cluster is filtered for memory, and computing power clusters with available memory less than memory requirements are eliminated. In S302, latency filtering is performed on the remaining computing power clusters after the video memory filtering, and computing power clusters whose round-trip latency between internal data center nodes exceeds the preset latency threshold are removed. In S303, the remaining computing power clusters after delay filtering are sorted by network affinity, and the target computing power cluster is determined based on the sorting results.

[0057] In some embodiments, memory filtering is performed on at least one computing cluster based on the memory requirements of the hybrid expert model, including: judging the data center nodes that are leaf nodes in the cluster topology, marking the data center nodes of leaf nodes whose available memory is less than the memory requirements as unavailable and pruning them; updating the available memory of the data center nodes that are parent nodes to the sum of the available memory of the data center nodes corresponding to their child nodes that have not been pruned; if the updated available memory of the data center nodes that are parent nodes is less than the memory requirements, then pruning the data center nodes that are parent nodes, until the data center nodes of the remaining leaf nodes in the cluster topology all meet the memory requirements.

[0058] This embodiment of the disclosure, based on a progressive filtering approach considering memory, latency, and network affinity, ensures that the selected target computing power clusters achieve optimal matching in terms of hardware capacity and network communication performance. This effectively avoids resource mismatch or communication bottlenecks caused by considering only a single metric. Furthermore, the bottom-up dynamic pruning strategy employed in memory filtering not only accurately calculates and updates the actual available memory of nodes at each level, ensuring that the final retained bottom-level physical nodes strictly meet the model's memory requirements, but also performs overall pruning when subtree resources are insufficient. This significantly reduces the search space for subsequent calculations, substantially improving filtering efficiency and the utilization rate of global computing resources. Therefore, it provides a solid and high-quality physical computing power and network boundary guarantee for the efficient distributed training of hybrid expert models.

[0059] In some embodiments, multiple expert layers of the hybrid expert model are assigned to data center nodes within the target computing power cluster, and transmission paths are planned for fully connected communication between the expert layers, which may include... Figure 4 S401 to S403 are shown.

[0060] In S401, with the distribution of the expert layer frozen, the communication scheduling scheme is optimized and the resulting communication hotspots are recorded.

[0061] While maintaining the current physical deployment locations of the expert layer on each data center node, optimize data routing strategies, link bandwidth allocation, or transmission timing. Communication hotspots can be physical nodes or network link areas that experience link congestion, latency spikes, or overload due to excessive communication traffic.

[0062] In S402, the load balancing of each data center node within the target computing power cluster is reassessed based on the communication hotspot migration expert layer. In S403, the steps of optimizing the communication scheduling scheme and migrating the expert layer are executed alternately until the preset convergence condition is met, and the allocation result and transmission path of the expert layer are obtained.

[0063] In some embodiments, migrating the expert layer based on the communication hotspot includes: calculating the communication cost of the candidate data center node, where the communication cost is equal to the sum of the ratios of the amount of data to be transmitted on each communication link to the minimum bandwidth of the path, plus the product of the number of communication hops and the single-hop delay; and selecting the candidate data center node that reduces the load on the communication hotspot and ensures that the new node does not become a new communication hotspot after the expert layer is placed, as the target node for the expert layer migration.

[0064] This embodiment effectively breaks the strong coupling problem between expert layer deployment and communication path planning by alternating between "freezing distribution optimization scheduling" and "distribution migration based on hotspots", avoiding falling into the trap of local optima. At the same time, a comprehensive communication cost evaluation model including "bandwidth bottleneck delay" and "multi-hop propagation delay" is introduced during the migration process, and the target node is strictly constrained not to generate new communication hotspots. This not only accurately alleviates the congestion problem of local links, but also ensures the smoothness and balance of the global network load after the expert layer migration.

[0065] In some embodiments, the process of performing expert-parallel distributed training of the hybrid expert model further includes online learning of expert activation modes. Online learning of expert activation modes may include... Figure 5 S501 to S503 are shown.

[0066] In S501, historical expert load data for the most recent preset number of iteration cycles (such as the past N training steps or batches) is obtained; In S502, a state transition model is trained based on historical expert load data. The state transition model represents the conditional probability of other experts activating under specific expert activation conditions. In S503, the expert load distribution for the next iteration period is predicted by using the state transition model and the expert load distribution for the current iteration period, so as to update the expert layer communication requirements.

[0067] In some embodiments, after predicting the expert load distribution for the next iteration period, the method may further include: constructing a stage communication graph based on the predicted expert load distribution for the next iteration period; calculating the optimal transmission path in the stage communication graph and allocating time windows for communication data blocks using a greedy scheduling strategy; and performing cross-stage overlap optimization on the scheduling plans for different communication stages to obtain the updated transmission path.

[0068] This embodiment of the disclosure trains a state transition model by mining historical expert load data, accurately capturing the temporal correlation patterns of expert activation, and realizing the advance prediction of communication needs in the next cycle. This transforms the system from passive response to proactive planning, significantly reducing communication waiting time. At the same time, by combining stage communication graphs, greedy scheduling, and cross-stage overlap optimization strategies, it not only ensures the efficient flow of communication data blocks in the time dimension, but also hides network transmission latency to the greatest extent through deep overlap between computation and communication, and between different communication stages. This significantly improves the utilization rate of cluster network bandwidth and the throughput and system stability of the overall distributed training of the hybrid expert model.

[0069] In some embodiments, the process of performing expert-parallel distributed training of the hybrid expert model may further include... Figure 6 S601 to S603 are shown.

[0070] In S601, after training a preset number of training rounds and writing the model parameters to the checkpoint, the computing power cluster reassignment is triggered. In S602, the computing power cluster partitioning and selection are re-executed for the current hybrid expert model layer to determine the new target computing power cluster, and the expert layer is reallocated and the transmission path is planned within the new target computing power cluster; In S603, the latest model parameters are obtained from the checkpoint and synchronized to the data center node in the new target computing cluster to replace the original target computing cluster and continue training.

[0071] In this embodiment, by periodically triggering reallocation after each training round, the system can dynamically re-divide and select the optimal target computing power cluster based on the latest expert activation mode, data distribution characteristics, and network status, and re-plan the expert layer deployment and transmission path, thereby continuously maintaining efficient matching and utilization of global computing power and network resources. At the same time, by using a checkpoint mechanism to save and synchronize the latest model parameters, the continuity of state during the switching process of physical computing power clusters is ensured, achieving smooth migration and seamless connection of training tasks. This avoids training interruptions or computing power waste caused by adjustments to underlying resources, and significantly improves the overall training efficiency, resource utilization, and system robustness of hybrid expert models in large-scale, long-cycle distributed training scenarios.

[0072] Based on the same inventive concept, this disclosure also provides a distributed training system across data centers, such as... Figure 7 As shown, this distributed training system spanning multiple data centers includes a scheduling control node and multiple data center nodes.

[0073] A scheduling and control node is used to acquire network status information between multiple data center nodes and divide the multiple data center nodes into at least one computing power cluster based on the network status information. The network transmission performance between data center nodes within a computing power cluster meets preset local communication conditions. It acquires the communication requirements of the expert layers in the hybrid expert model and determines the locality characteristics of communication between expert layers based on these requirements. These locality characteristics characterize the aggregation and distribution of communication traffic between expert layers. Based on the locality characteristics and network status information, it determines a target computing power cluster from at least one computing power cluster and assigns multiple expert layers of the hybrid expert model to data center nodes within the target computing power cluster, ensuring that expert layers requiring full connectivity communication are assigned to the same target computing power cluster. Within the target computing power cluster, it plans transmission paths for full connectivity communication between expert layers based on the expert layer communication requirements and the network topology of the target computing power cluster. Multiple data center nodes are used to respond to the control of the scheduling control node and perform expert parallel distributed training of the hybrid expert model based on the transmission path. During the training process, the expert layer in the target computing power cluster communicates fully connectedly through the transmission path to complete the distribution of intermediate hidden states and the collection of expert outputs.

[0074] This disclosed embodiment of the system divides computing power clusters based on network state and mines the locality characteristics of expert layer communication, accurately allocating expert layers requiring high-frequency full-connectivity communication to the same high-performance computing power cluster. This mechanism achieves joint optimization of network topology and communication requirements, effectively avoiding long-distance, high-latency transmission across data centers and significantly reducing the network overhead of full-connectivity communication. Combined with customized transmission path planning, it significantly improves the cluster network bandwidth utilization, thereby greatly improving the overall throughput and execution efficiency of distributed training of hybrid expert models across data centers.

[0075] The embodiments of this disclosure utilize the partial predictability of all-to-all communication to predict and track regional traffic demand. Based on the acquired demand, a suitable set of data center regions is identified, and the MOE expert layer is distributed within this region. This confines the all-to-all communication to this region and maps different expert layers to appropriate data centers. Based on the relatively good network interconnection infrastructure within the region, the transmission paths of the all-to-all communication are rationally arranged to minimize the overall communication time and ultimately improve the training speed of the MOE layer.

[0076] In cross-datacenter scenarios, a task partitioning and communication scheduling system framework for distributed training of the MOE layer of a large language model can be implemented as follows: Figure 8 As shown, the system framework consists of a multi-level data center, including a user data center, a global control data center, and a cluster agent data center.

[0077] The network state between data centers exhibits an extremely complex and unique clustering pattern. This clustering phenomenon is particularly pronounced in terms of the two key performance indicators: bandwidth and latency. In reality, some data centers, due to their geographical proximity and relatively uniform and advanced network infrastructure, possess abundant bandwidth resources, enabling data transmission at extremely high speeds while keeping latency at very low levels. For example, in the core areas of some large cities, multiple data centers are closely distributed and directly connected via high-performance fiber optic networks, easily achieving bandwidth transmission of several terabits per second with latency as low as milliseconds. It is not difficult to see that this characteristic of local clustering of data centers is similar to the locality of MOE expert communication mode. Restricting the expert layer of MOE that requires all-to-all communication to such clustered areas is very meaningful for performance optimization; therefore, the design of the solution must take this distributed characteristic into account.

[0078] However, these data center nodes serve different functions within the system and can be categorized into cluster-level computing power nodes, cluster-level proxy nodes, global controller nodes, and client nodes. Client nodes are the user nodes that initiate training tasks. They send task requests to the controller nodes, which are a group of nodes specifically responsible for maintaining the state of the entire distributed cluster. The controller nodes accept new training requests from clients, select appropriate computing power clusters for training based on existing algorithms and the current cluster state, and divide tasks and plan communication paths.

[0079] like Figure 9 As shown, the overall process of this disclosed solution includes two main stages: pre-training scheduling preparation and runtime rescheduling.

[0080] Pre-training scheduling preparation includes request-independent cluster initialization, and analysis testing and computing cluster allocation based on user requests.

[0081] In some embodiments, during the cluster initialization phase of the distributed training system, information on multiple available data center nodes is first obtained. Then, the data center nodes are clustered based on network transmission performance (such as network bandwidth and transmission latency) between them, thereby providing a foundation for subsequent expert layer scheduling. Specifically, the clustering of data center nodes can be achieved using an Agglomerative Nesting (AGNES) algorithm.

[0082] In practical implementation, the above-mentioned data center clustering process based on the AGNES algorithm may include the following steps: First, obtain the set of data center nodes V = {v1, v2, ..., vn}, where each vi represents a data center node; obtain the bandwidth matrix BW ∈ Where BW(u,v) represents the data transmission bandwidth between node u and node v; obtain the delay matrix DL∈ , where DL(u,v) represents the network latency between node u and node v; and an adjustment parameter α≥0 is obtained, which is used to balance the impact of bandwidth and latency on the clustering results.

[0083] Secondly, the distances between nodes and between clusters are calculated based on the acquired data. When calculating the distances between nodes, the distance d(u,v) between node u and node v is defined as satisfying the following formula:

[0084] Here, α is used to adjust the weights of network latency and data transmission bandwidth.

[0085] When calculating the inter-cluster distance, the distance dist(Ci,Cj) between cluster Ci and cluster Cj is defined based on a preset connectivity criterion.

[0086] Connection criteria may include at least one of the following: Single-link principle: ; Full Link Guidelines: ; Average Link Criterion: .

[0087] Finally, the iterative merging process of the AGNES algorithm is executed, specifically including: Initialize the cluster set by initializing each node vi as a separate cluster, resulting in the initial cluster set C0={{v1},{v2},…,{vn}}; and calculate the initial distance matrix D, where the element Dij=d(vi,vj).

[0088] Entering the iterative merging phase, the following operations are performed repeatedly until all nodes are merged into a single cluster or a preset stopping condition is met: In the current cluster set Ck, find the two closest clusters Ca and Cb, that is, those that satisfy... ; Merge clusters Ca and Cb to generate a new cluster Cnew = Ca∪Cb; Update the cluster set to obtain a new cluster set. ; Update the distance matrix D by removing the rows and columns corresponding to clusters Ca and Cb, and calculating the distance between the new cluster Cnew and the other remaining clusters according to the above connection criteria.

[0089] After iteration, a tree diagram T is generated and output. This tree diagram T is a binary tree-like data center cluster topology, where leaf nodes represent individual data center nodes and parent nodes represent cluster sets formed by merging two sub-clusters. By extracting specific levels of this tree diagram, the final data center clustering result can be obtained for subsequent expert-level scheduling.

[0090] In some embodiments, during the request processing phase of the distributed training system, the client node first sends a training task request to the global controller node. This request includes information about the model to be trained, the amount of training data, and several training samples. In response to the request, the global controller node analyzes the model's hybrid expert (MoE) layer to obtain the model's memory requirements, thereby selecting a suitable data center for test training. It also further collects data flow requirements between expert layers, providing input parameters for subsequent expert layer scheduling.

[0091] After determining the number of MoE layers, memory requirements, and communication requirements in the training task, the global controller node selects a suitable training cluster (i.e., the target computing power cluster) for each MoE layer on the pre-constructed binary tree-like data center cluster topology (i.e., the aforementioned clustered tree diagram T). Specifically, the selection process for the target computing power cluster may include the following steps: First, obtain the parameters required for cluster selection, including: the binary tree-structured data center cluster topology T; and the video memory requirement needMem, which is calculated using the following formula: needMem=E×(MemNonExpert+fixedMemPerExpert) Where E is the number of expert layers, MemNonExpert is the non-expert memory overhead, and fixedMemPerExpert is the expert fixed overhead; the 95th percentile round-trip time (RTT)95(C) between any two data center nodes within cluster C and the preset latency threshold θRTT (e.g., 0.5ms); the bidirectional bandwidth DBW(u,v) between node u and node v (the minimum of the total bandwidth from node u to node v and the total bandwidth from node v to node u) and the bidirectional latency DDL(u,v) (the maximum of the latency from node u to node v and the latency from node v to node u); and the weighted distance d(u,v) between nodes, calculated as follows:

[0092] Where α is an adjustment parameter (e.g., 1ms·Tb / s).

[0093] Secondly, a bottom-up memory pruning operation is performed. Specifically, this includes: for each leaf node (i.e., a single data center node) in the cluster topology, if its available memory is less than the aforementioned memory requirement needMem, it is marked as unavailable and pruned; the available memory of the parent node is updated upwards to be equal to the sum of the available memory of all its child nodes; if the available memory of the parent node is less than the memory requirement needMem, it is also pruned, until all remaining leaf nodes satisfy the condition that their available memory is greater than or equal to the memory requirement; if the root node is pruned, the algorithm terminates and outputs a message indicating that there are no available clusters.

[0094] Next, perform intra-cluster diameter filtering. For each remaining leaf node, calculate the RTT95 of its single-point cluster to be 0; for composite clusters formed by parent nodes, calculate the RTT between all pairs of data center nodes in the composite cluster, and take the 95th percentile value as the RTT95(C) of the composite cluster; remove clusters and all leaf nodes whose RTT95(C) is greater than the preset latency threshold θRTT.

[0095] Then, a set of candidate nodes is generated. Among the remaining leaf nodes after the above pruning and filtering operations, a preset number (e.g., 5, or a smaller value among the remaining clusters) of data center nodes with the smallest average distance to the previous scheduling cluster (prev cluster) are selected to form the candidate node list L.

[0096] Furthermore, a bidirectional bottleneck affinity sorting is performed. For each data center node u in the candidate node list L, its affinity score score(u) = d(u,prev) + d(u,next) is calculated, where prev is the previous scheduling cluster and next is the next scheduling cluster; the nodes in the candidate node list L are sorted in ascending order according to the affinity score score(u) to obtain the final node priority allocation order.

[0097] Finally, the node allocation and rollback mechanism is executed. Nodes are attempted to be allocated sequentially according to the above priority allocation order: if the remaining available video memory of the current data center node u is greater than or equal to the video memory requirement needMem, the node is immediately allocated to the current MoE layer, and the remaining available video memory of the node is reduced by needMem, and the allocation result is returned; if no node meets the conditions after traversing the candidate node list, the process rolls back to the parent node (i.e., the composite cluster), and the above steps of intra-cluster diameter filtering, generating a candidate node set, and bidirectional bottleneck affinity sorting are re-executed (at this time, the available video memory of the parent node has been updated, and the RTT95 of the composite cluster adopts the maximum value within the cluster).

[0098] In some embodiments, after selecting the target computing power cluster, it is also necessary to allocate computing power to experts in each hybrid expert (MoE) layer, that is, to assign the expert layer to a suitable data center node within the target computing power cluster, and further plan the path for all-to-all communication between expert layers. To ensure optimization efficiency, this embodiment adopts an integrated computing power communication scheduling method based on a greedy strategy. The core idea of ​​this joint optimization is that the expert's location determines the communication mode (including data flow direction and traffic), while communication hotspot feedback guides the dynamic migration of experts. This dual feedback mechanism guides expert distribution and communication scheduling to form an efficient closed-loop optimization. Specifically, the intra-cluster computing power allocation and communication planning include the following steps: First, system modeling is performed. This includes: physical network topology construction, which involves recording the connection relationships of all computing nodes, labeling the bandwidth and propagation delay of each link, and identifying high-bandwidth backbone paths and potential bottleneck links in the network; expert-task dependency graph establishment, which involves analyzing the set of experts required to analyze the input data, marking the current deployment location of each expert, and establishing the potential communication requirements from the data input node to the expert's node; and spatiotemporal constraint identification, which involves labeling the pre-computation communication requirements of the computing task (e.g., the requirement to receive parameters before computation can begin), and labeling the data dependencies between experts (e.g., the output of some experts serves as the input of other experts).

[0099] Secondly, perform expert load balancing. This includes: communication hotspot detection, which involves calculating the expected communication volume of each node, including inbound traffic (the sum of all data sent to the experts at that node) and outbound traffic (the amount of data sent by the experts at that node to other nodes), and marking nodes exceeding a preset bandwidth ratio threshold (e.g., 80% of the link bandwidth) as communication hotspots; expert dynamic migration, which prioritizes communication-intensive experts (such as experts with large parameter volumes or frequent calls), while excluding system-critical experts in fixed locations, and then calculates the communication cost of each candidate node (the communication cost is equal to the sum of the quotient of the amount of data to be transmitted and the minimum bandwidth of the path, plus the product of the number of hops and the single-hop delay), and selects a location that can reduce the load of the original communication hotspot and prevent the new node from becoming a new hotspot; and load balancing verification, which involves recalculating the communication load of all nodes and checking whether the maximum load deviation is within the allowable range (e.g., not exceeding a preset ratio of the average load, such as 20%).

[0100] Finally, joint iterative optimization is performed. A fixed-adjustment loop mechanism is adopted, alternating between communication-dominated and expert-dominated rounds. In the communication-dominated round, the expert distribution is frozen, the communication scheduling scheme is optimized, and the generated communication hotspots are recorded. In the expert-dominated round, experts are migrated based on the hotspots, and load balancing is reassessed. The above alternating iterations continue until a termination condition is met, which includes: the total time reduction after a preset number of consecutive iterations (e.g., 3 times) is less than a preset percentage (e.g., 2%), and the load deviation of all nodes is less than a preset percentage (e.g., 15%).

[0101] Since the pre-initialization phase scheduling is based on model analysis and test runs, it inevitably lacks a grasp of the actual training features, especially in scenarios where token-based computation and communication in hybrid expert models may dynamically change. Therefore, runtime scheduling is needed to assist in this process. The runtime scheduling mainly includes three steps: online learning of activation modes, iterative route rescheduling, and epoch-level cluster rescheduling.

[0102] In some embodiments, the online learning of activation patterns (i.e., online learning of expert activation patterns) specifically includes: different inputs to the hybrid expert model will result in different expert activation patterns, thereby affecting the communication patterns between expert layers. This embodiment uses a conditional probability-based prediction algorithm at runtime to predict the traffic demand of the next layer by analyzing historical expert activation patterns, providing a basis for advance replanning of fully connected communication routes. Specifically, it acquires historical load data from the most recent preset sliding window size (e.g., K iterations); if the amount of historical data meets a preset sample threshold (e.g., greater than or equal to 2 samples), it trains the prediction model to obtain an optimized transition matrix, and multiplies this transition matrix with the current layer's expert load distribution vector to obtain the predicted expert load distribution for the next layer; if the amount of historical data is insufficient, a cold start strategy is adopted to set the predicted expert load distribution for the next layer to a uniform distribution. When training the prediction model, the transition matrix is ​​initialized as an identity matrix; the objective function is defined as minimizing the sum of squared errors between the actual load and the predicted load in the historical data; the constraint is defined as all elements of the transition matrix being between 0 and 1, and the sum of the elements in each column being 1 (satisfying probabilistic integrity); the sequential least squares programming (SLSQP) algorithm is used to solve this optimization problem to obtain the optimized transition matrix. Furthermore, a dynamic update mechanism is established: in each training iteration, the actual load distribution of the current layer and the next layer is recorded, and new data points are added to the sliding window; if the window is full, the oldest data point is removed; if the amount of data reaches a preset training threshold, the prediction model is retrained.

[0103] In some embodiments, the iterative route rescheduling (i.e., iterative communication replanning) specifically includes: planning a path for the next iteration of fully connected communication based on expert distribution predicted by online learning. The specific process is as follows: Initialize the number of nodes and communication stages (e.g., 4 stages); for each communication stage, construct a stage communication graph, traverse all node pairs, calculate the total communication volume, and if the total communication volume is greater than zero, add weighted directed edges to the communication graph; calculate the optimal transmission path, find the maximum bandwidth path for each edge in the communication graph, and record the minimum bandwidth and hop count of that path; perform greedy scheduling, select the most urgent communication data block, allocate it to the earliest available time window (duration equal to the data block size divided by the maximum bandwidth), and update the scheduling state; finally, perform cross-stage optimization, attempting to overlap the communication scheduling plans of different stages in time to output the final staged communication scheduling plan.

[0104] In some embodiments, the training epoch-level cluster rescheduling (i.e., EPOCH-level computing power cluster reassignment) specifically includes: changes in expert activation modes, in addition to causing changes in communication modes, may also render the static optimal computing power cluster selection no longer applicable. Since the overhead of computing power cluster reassignment is greater than communication replanning, this embodiment uses epoch-level granularity for reassignment, i.e., it is triggered after training for several epochs and writing the latest model to a checkpoint. Specifically, whenever the latest parameters of a hybrid expert layer are written to a checkpoint, the following reassignment process is triggered: First, the aforementioned cluster allocation steps are re-executed for the current hybrid expert layer to select a new target computing power cluster; second, the aforementioned intra-cluster computing power allocation and communication planning steps are executed again on the new target computing power cluster; next, the new target computing power cluster obtains the latest hybrid expert layer parameters from the checkpoint and connects the nodes where the predecessor and successor model layers of the current layer are located; finally, the original computing power cluster is taken offline and added to the available computing power cluster hierarchy tree, and the new target computing power cluster begins the training process.

[0105] This disclosure's embodiments are based on computing power clustering to adapt MOE expert parallel local communication modes, thereby enabling low-latency expert parallelism across data centers; static test analysis plus runtime online learning to mine the dynamic changes in expert activation modes during the adaptation training process; and integrated collaborative optimization of computing power allocation from in-cluster experts to data center nodes and all-to-all communication path planning.

[0106] Traditionally, large-scale model training using MOE expert parallelism is considered unsuitable for cross-datacenter scenarios due to the large amount of all-to-all communication involved. This disclosure proposes a computing power clustering mechanism that jointly models the local communication patterns of experts with the network topology, transforming communication constraints into low-latency intra-cluster transmission. This significantly reduces cross-datacenter latency and represents a truly usable MOE expert parallel training solution for cross-datacenter scenarios.

[0107] The expert activation pattern in MoE is determined by the input token, and its dynamic change characteristics pose a significant challenge to optimization. This application constructs a dual-drive framework combining static profiling and online reinforcement learning: the offline stage performs initial modeling of the expert distribution, while the online stage continuously updates the routing strategy and computing power allocation scheme with iterative and EPOCH-level granular feedback loops, enabling the communication-computation graph to dynamically evolve and become optimal in real time as training progresses.

[0108] Joint optimization of "expert placement and traffic scheduling": The integrated MILP solves the data center computing node allocation and all-to-all path planning together, reducing the iterative overhead of the traditional two-stage optimization method, thereby supporting runtime optimization.

[0109] The optimization algorithm employed in this solution is lightweight and efficient, with a computational complexity of O(K²) (where K is the number of experts). It can respond quickly in real-world scenarios without relying on high computing resources and output high-precision optimization results. This characteristic allows it to flexibly adapt to the frequently changing expert parallel modes in MoE (Mixture of Experts) models, ensuring the system's real-time performance and stability. The monitoring overhead for expert parallel activation modes during algorithm execution is extremely low and will not interfere with model training tasks. Furthermore, this solution is simple to implement and can fully utilize the built-in information collection mechanisms of current mainstream MoE training frameworks, lowering the deployment threshold.

[0110] In cross-datacenter scenarios, data migration is time-consuming, posing a significant challenge to runtime rescheduling. To address this, this solution employs different granularities based on the "heavyness" of the scheduling operation: lightweight scheduling (such as communication path replanning) is executed frequently in iterations, while heavyweight scheduling (such as cluster-level resource reallocation) is triggered in EPOCH units, balancing response speed and system overhead. Furthermore, the solution fully leverages the checkpoint mechanism of large models, efficiently synchronizing model states between old and new computing nodes through distributed storage, achieving a good balance between performance optimization and cost control.

[0111] The expert parallel mechanism in this solution is inherently "plug and play," and can be seamlessly embedded into existing hybrid parallel architectures. The MoE layer and dense layer are segmented according to pipeline parallelism (PP), without the need for additional communication primitives; expert clusters within each data center can freely choose model parallelism (MP), data parallelism (DP), or a mixture of both, and the granularity can be dynamically adjusted across racks, servers, and even GPUs; the cross-DC Expert-All-to-All communication domain is orthogonal to the PP / MP / DP communication domains, with zero protocol layer conflicts.

[0112] It should be noted that although several modules or units for action execution have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0113] Furthermore, some of the block diagrams shown in the attached figures are functional entities and do not necessarily correspond to physically or logically independent entities.

[0114] Based on the same inventive concept, this disclosure also provides a computer-readable storage medium storing program instructions. When the program instructions are executed by a computer, they implement the distributed training method across data centers described in the above method embodiments, achieving the corresponding technical effects.

[0115] In some embodiments, the computer-readable storage medium can be any available medium capable of storing program instructions or a data storage device such as a data center containing one or more available media. In some embodiments, the available medium can be a magnetic medium, an optical medium, or a semiconductor medium, etc. As an example, a magnetic medium can be a floppy disk, a hard disk, a magnetic tape, etc. As an example, an optical medium can be a high-density digital video optical disc. As an example, a semiconductor medium can be a solid-state drive.

[0116] Based on the same inventive concept, this disclosure also provides a computer program product, which includes program instructions for implementing the cross-datacenter distributed training method described in the above-described method embodiments. When executed by a computer, the program instructions cause the computer to implement the cross-datacenter distributed training method described in the above-described method embodiments, achieving the corresponding technical effects. In specific implementations, the program instructions can be written using any combination of one or more programming languages. The program instructions can be executed entirely on the user device, partially on the user device, as a standalone software package, partially on the user device and partially on a remote device, or entirely on a remote device or server.

[0117] Those skilled in the art will understand that all or part of the steps of the above embodiments can be specifically implemented in the following forms: a completely hardware implementation, a completely software implementation, or an implementation combining hardware and software aspects.

[0118] The above description is merely a specific embodiment of this disclosure, but the scope of protection of this disclosure is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this disclosure should be included within the scope of protection of this disclosure.

Claims

1. A distributed training method across data centers, characterized in that, include: The network status information between multiple data center nodes is obtained, and the multiple data center nodes are divided into at least one computing power cluster according to the network status information, wherein the network transmission performance between data center nodes within the computing power cluster meets the preset local communication conditions. The communication requirements of the expert layers in the hybrid expert model are obtained, and the locality characteristics of the communication between the expert layers are determined based on the communication requirements of the expert layers. The locality characteristics characterize the aggregation and distribution of communication traffic between the expert layers. Based on the locality features and the network state information, a target computing power cluster is determined from the at least one computing power cluster, and multiple expert layers of the hybrid expert model are assigned to data center nodes within the target computing power cluster, so that expert layers that need to communicate fully with each other are assigned to the same target computing power cluster. Within the target computing power cluster, based on the communication requirements of the expert layers and the network topology of the target computing power cluster, a transmission path is planned for the full-connectivity communication between the expert layers; The data center nodes allocated within the target computing power cluster are controlled to perform expert parallel distributed training of the hybrid expert model based on the transmission path; wherein, during the training process, the expert layer within the target computing power cluster communicates fully connectedly through the transmission path to complete the distribution of intermediate hidden states and the collection of expert outputs.

2. The method according to claim 1, characterized in that, The step of dividing the plurality of data center nodes into at least one computing power cluster based on the network status information includes: Each of the data center nodes is initialized as an independent initial cluster; Calculate the weighted distance between any two data center nodes based on the bandwidth matrix and delay matrix among the multiple data center nodes; Based on the preset connection criteria, the inter-cluster distance between each cluster is calculated according to the weighted distance. Iteratively merge the two clusters with the closest inter-cluster distance, and update the inter-cluster distance after each merge, until all data center nodes are merged into a single root node, generating a binary tree-like cluster topology; Based on the network transmission performance of each level of the cluster in the cluster topology, at least one computing power cluster is determined from the cluster topology.

3. The method according to claim 1, characterized in that, Determining the target computing power cluster from the at least one computing power cluster includes: Based on the memory requirements of the hybrid expert model, memory filtering is performed on the at least one computing power cluster to eliminate computing power clusters with available memory less than the memory requirements. Delay filtering is performed on the remaining computing power clusters after memory filtering to remove computing power clusters whose round-trip latency between internal data center nodes exceeds a preset latency threshold. The remaining computing power clusters after delay filtering are sorted by network affinity, and the target computing power cluster is determined based on the sorting results.

4. The method according to claim 3, characterized in that, The step of performing memory filtering on the at least one computing power cluster based on the memory requirements of the hybrid expert model includes: The data center nodes that are leaf nodes in the cluster topology are judged, and the data center nodes whose available video memory is less than the video memory requirement are marked as unavailable and pruned. The available video memory of the data center node that is the parent node is updated upwards to be the sum of the available video memory of the data center nodes corresponding to its child nodes that have not been pruned. If the available video memory of the updated data center node acting as the parent node is less than the video memory requirement, then the data center node acting as the parent node is pruned until the data center nodes of the remaining leaf nodes in the cluster topology all meet the video memory requirement.

5. The method according to claim 1, characterized in that, The step of allocating multiple expert layers of the hybrid expert model to data center nodes within the target computing power cluster, and planning transmission paths for fully connected communication between the expert layers, includes: With the distribution of experts frozen, optimize the communication scheduling scheme and record the resulting communication hotspots; The expert layer is migrated based on the communication hotspot to reassess the load balancing of each data center node within the target computing power cluster; The optimized communication scheduling scheme and the migration of the expert layer are executed alternately until the preset convergence condition is met, thereby obtaining the allocation result of the expert layer and the transmission path.

6. The method according to claim 5, characterized in that, The migration of the expert layer based on the communication hotspot includes: Calculate the communication cost of the candidate data center node, whereby the communication cost is equal to the sum of the ratios of the amount of data to be transmitted on each communication link to the minimum bandwidth of the path, plus the product of the number of communication hops and the single-hop delay. Candidate data center nodes that reduce the load of the communication hotspot and prevent new nodes from becoming new communication hotspots after the expert layer is placed are selected as the target nodes for the expert layer migration.

7. The method according to claim 1, characterized in that, The process of performing expert parallel distributed training of the hybrid expert model also includes online learning expert activation modes, which include: Retrieve historical expert load data for the most recent preset number of iterations; A state transition model is trained based on the historical expert load data, and the state transition model represents the conditional probability of other experts activating under specific expert activation conditions; Using the state transition model and the expert load distribution of the current iteration cycle, the expert load distribution of the next iteration cycle is predicted to update the expert layer communication requirements.

8. The method according to claim 7, characterized in that, After predicting the expert load distribution for the next iteration cycle, the method further includes: Based on the predicted expert load distribution for the next iteration cycle, a phase communication graph is constructed. The optimal transmission path is calculated in the communication graph of the stage, and a greedy scheduling strategy is used to allocate time windows for communication data blocks; The scheduling plan for different communication stages is optimized by cross-stage overlap to obtain the updated transmission path.

9. The method according to claim 1, characterized in that, During the expert parallel distributed training of the hybrid expert model, the method further includes: After training a preset number of rounds and writing the model parameters to the checkpoint, the computing power cluster redistribution is triggered; The computing power cluster partitioning and selection are re-executed for the current hybrid expert model layer to determine a new target computing power cluster, and expert layers are reallocated and transmission paths are planned within the new target computing power cluster; The latest model parameters are obtained from the checkpoint and synchronized to the data center node within the new target computing power cluster to replace the original target computing power cluster and continue training.

10. A distributed training system spanning multiple data centers, characterized in that, include: A scheduling and control node is used to acquire network status information between multiple data center nodes and divide the multiple data center nodes into at least one computing power cluster based on the network status information. The network transmission performance between data center nodes within the computing power cluster meets preset local communication conditions. The node acquires the communication requirements of the expert layers in a hybrid expert model and determines the locality characteristics of communication between expert layers based on these requirements. These locality characteristics characterize the aggregation and distribution of communication traffic between expert layers. Based on the locality characteristics and the network status information, a target computing power cluster is determined from the at least one computing power cluster. Multiple expert layers of the hybrid expert model are assigned to data center nodes within the target computing power cluster, so that expert layers requiring full connectivity communication are assigned to the same target computing power cluster. Within the target computing power cluster, transmission paths are planned for full connectivity communication between the expert layers based on the expert layer communication requirements and the network topology of the target computing power cluster. The plurality of data center nodes are used to respond to the control of the scheduling control node and perform expert parallel distributed training of the hybrid expert model based on the transmission path; wherein, during the training process, the expert layer within the target computing power cluster communicates fully connectedly through the transmission path to complete the distribution of intermediate hidden states and the collection of expert outputs.