Data processing methods, data processing models, and training methods thereof.
The mixed expert network architecture addresses computational inefficiencies in Transformer models by decoupling resources and using optimal transport for uniform assignment, enhancing data processing efficiency and capacity for long sequences.
Patent Information
- Application Number
- JP2024153219
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2023-12-20
- Filing Date
- 2024-09-05
- Publication Date
- 2026-12-03
- Estimated Expiration
- 2044-09-05
AI Technical Summary
Transformer-based models face challenges with high computational complexity, resource consumption, and limited processing capacity for long sequences due to complex structures and large matrix multiplications, which are bottlenecks for real-time applications and resource-limited environments.
A mixed expert network (MoE) architecture is employed, where input data participles are selectively assigned to different expert networks for computation, decoupling computational and memory resources, and using an optimal transport algorithm for uniform assignment to enhance participles, thereby optimizing resource use.
The MoE architecture improves computational efficiency and expressiveness by allowing flexible resource allocation, effectively handling large datasets and long sequences while reducing computational complexity and resource consumption.
Smart Images

Figure 0007960673000009 
Figure 0007960673000010 
Figure 0007960673000011
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence, in particular to natural language processing, deep learning technology, and large language model technology, in particular to a data processing method, a data processing model and a training method thereof, a data processing device, a training device, an electronic device, a computer-readable storage medium, and a computer program product.
Background Art
[0002] Artificial intelligence is a subject that studies how to make computers simulate some human thinking processes and intelligent behaviors (e.g., learning, reasoning, thinking, planning, etc.), and it has both hardware-level technologies and software-level technologies. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, and big data processing; artificial intelligence software technologies mainly include several major directions such as computer vision technology, speech recognition technology, natural language processing technology, machine learning / deep learning, big data processing technology, and knowledge graph technology.
[0003] Pre-trained language models are technologies that have developed relatively rapidly in the field of natural language processing in recent years. In large language model technologies, increasing the scale of a pre-trained model can generally bring good effects to the model.
[0004] The methods described in this section are not necessarily those that have been previously conceived or adopted. Unless otherwise specified, any method described in this section should not be considered as prior art merely by virtue of being included in this section. Similarly, unless otherwise specified, the problems mentioned in this section should not be considered as having been recognized in the prior art.
Summary of the Invention
[0005] This disclosure provides data processing methods, data processing models and training methods thereof, data processing devices, training devices, electronic devices, computer-readable storage media, and computer program products.
[0006] According to one aspect of the present disclosure, a data processing method is provided which determines input data, wherein the input data includes a plurality of participles; determines the correlation between each of the plurality of participles and each of a plurality of expert networks based on a gate matrix, wherein the plurality of expert networks are used to enhance the plurality of participles; uniformly assigns the plurality of participles to the plurality of expert networks based on the correlation and the preset capacity of each expert network to enhance the plurality of participles; and determines the data processing result based on the enhanced plurality of participles.
[0007] According to another aspect of the present disclosure, a data processing model is provided, comprising a routing layer configured to determine the correlation between each participle of a plurality of participles in input data and each expert network of a plurality of expert networks based on a gate matrix, wherein the correlation is used to uniformly assign the plurality of participles to the plurality of expert networks in accordance with the preset capacity of each expert network; an expert network layer comprising a plurality of expert networks configured to enhance the assigned participles; and an output layer configured to determine the data processing result based on the enhanced plurality of participles.
[0008] Another aspect of the present disclosure provides a method for training a data processing model, comprising: determining a sample input, wherein the sample input comprises a plurality of participles; determining the correlation between each of the plurality of participles and each of a plurality of expert networks for strengthening the plurality of participles, based on the gate matrix, wherein the correlation is used to uniformly allocate the plurality of participles to the plurality of expert networks in accordance with the preset capacity of each expert network; determining a loss value based on the gate matrix, wherein the closer the gate matrix is to an orthogonal matrix, the smaller the loss value; and adjusting the parameters of the gate matrix based on the loss value to obtain a trained data processing model.
[0009] According to another aspect of the present disclosure, a data processing device is provided, configured to determine input data, the input data comprising an input unit comprising a plurality of participles, the correlation between each of the plurality of participles and each of a plurality of expert networks based on a gate matrix, the plurality of expert networks comprising a correlation determination unit used to enhance the plurality of participles, an assignment unit configured to uniformly assign the plurality of participles to the plurality of expert networks and enhance the plurality of participles based on the correlation and the preset capacity of each expert network, and an output unit configured to determine a data processing result based on the enhanced plurality of participles.
[0010] According to another aspect of the present disclosure, an apparatus for training a data processing model is provided, configured to determine a sample input, the sample input comprising: an input unit comprising a plurality of participles; a correlation determination unit configured to determine the correlation between each of the plurality of participles and each of a plurality of expert networks for augmenting the plurality of participles, based on the gate matrix, the correlation being used to uniformly allocate the plurality of participles to the plurality of expert networks to match the preset capacity of each expert network; a loss determination unit configured to determine a loss value based on the gate matrix, the closer the gate matrix is to an orthogonal matrix, the smaller the loss value; and a parameter tuning unit configured to adjust the parameters of the gate matrix based on the loss value to obtain a trained data processing model.
[0011] According to another aspect of the present disclosure, an electronic device is provided, the electronic device comprising at least one processor and a memory communicated to the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to cause the at least one processor to perform a method provided for the present disclosure.
[0012] According to another aspect of the present disclosure, a non-temporary computer-readable storage medium is provided which stores computer instructions, the computer instructions are used to cause the computer to perform the methods provided by the present disclosure.
[0013] According to another aspect of this disclosure, a computer program product is provided, which, when executed by a processor, implements a method provided by this disclosure.
[0014] According to one or more embodiments of the present disclosure, when assigning data processing tasks to multiple expert networks, it is possible to satisfy the constraint of uniform assignment while considering the optimal assignment, thereby enabling each expert network to function in the data processing process and improving data processing efficiency.
[0015] It should be understood that the content described in this section is not intended to identify the essential or important features of the embodiments of this disclosure, nor is it intended to limit the scope of protection of this disclosure. Other features of this disclosure will be readily apparent from the following specification. [Brief explanation of the drawing]
[0016] The drawings illustrate embodiments and constitute part of the specification, and are used to illustrate exemplary embodiments of the embodiments together with the textual description of the specification. The illustrated embodiments are for illustrative purposes only and do not limit the scope of the claims. In all drawings, the same reference numerals refer to elements that are similar but not necessarily identical.
[0017] [Figure 1] A schematic diagram of an exemplary system capable of carrying out the various methods described herein, according to the embodiments of this disclosure, is shown. [Figure 2] The present disclosure illustrates an exemplary process of a data processing method according to the embodiments described herein. [Figure 3] An exemplary block diagram of a data processing model according to an embodiment of the present disclosure is shown. [Figure 4] This disclosure provides an exemplary flow chat of a method for training a data processing model according to the embodiments of this disclosure. [Figure 5A] An example of a data processing process using related technologies is shown. [Figure 5B] An example of a data processing process according to the embodiments of this disclosure is shown. [Figure 6] An exemplary block diagram of a data processing device according to an embodiment of the present disclosure is shown. [Figure 7] Fig. 3 is an exemplary block diagram of an apparatus for training a data processing model according to an embodiment of the present disclosure is shown. [Figure 8] Fig. 4 is a block diagram of an exemplary electronic device that may be used to implement an embodiment of the present disclosure is shown. DETAILED DESCRIPTION OF EMBODIMENTS
[0018] Hereinafter, exemplary embodiments of the present disclosure will be described with reference to the accompanying drawings, in which various details of the embodiments of the present disclosure included therein are to aid understanding, and should be considered as merely exemplary. Accordingly, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and brevity, descriptions of well-known functions and constructions are omitted in the following description.
[0019] In this disclosure, unless otherwise specified, terms such as "first" and "second" for describing various elements are intended to limit the positional, timing, or importance relationship of these elements. Such terms are only used to distinguish one element from another. In some examples, the first element and the second element may refer to the same example of the element, and in some cases, based on the context description, may refer to different examples.
[0020] The terminology used in the description of the various examples of the present disclosure is for the purpose of describing particular examples only and is not intended to be limiting. Unless the context clearly indicates otherwise, the number of elements is not particularly limited, and the element may be singular or plural. It should be noted that the term "and / or" as used in this disclosure covers any and all possible combinations of the listed items.
[0021] Hereinafter, embodiments of the present disclosure will be described in detail with reference to the accompanying drawings. FIG. 1 shows a schematic diagram of an example system 100 in which various methods and apparatuses described herein may be implemented in accordance with embodiments of the present disclosure. Referring to FIG. 1, the system 100 includes one or more client devices 101, 102, 103, 104, 105 and 106, a server 120, and one or more communication networks 110 coupling the one or more client devices to the server 120. The client devices 101, 102, 103, 104, 105 and 106 may be configured to execute one or more applications.
[0022] In embodiments of the present disclosure, the server 120 is operable to execute one or more services or software applications of the methods according to embodiments of the present disclosure.
[0023] In some embodiments, the server 120 may also provide other services or software applications that may include non-virtual and virtual environments. In some embodiments, these services may be provided as web-based services or cloud services, for example, provided to users of client devices 101, 102, 103, 104, 105 and / or 106 in a software as a service (SaaS) model.
[0024] In the configuration shown in FIG. 1, the server 120 may include one or more components that implement the functions performed by the server 120. These components may include software components, hardware components, or a combination thereof that are executable by one or more processors. A user operating the client devices 101, 102, 103, 104, 105 and / or 106 may then interact with the server 120 to utilize the services provided by these components. It should be understood that various different system configurations are possible and may differ from the system 100. Thus, FIG. 1 is an example of a system for implementing the various methods described herein and is not intended to be limiting.
[0025] A user can use client devices 101, 102, 103, 104, 105, and / or 106 to obtain data processed by the methods according to the embodiments of this disclosure. A client device can provide an interface through which a user of the client device interacts with the client device. A client device can also output information to the user through the interface. Although only six client devices are shown in Figure 1, as those skilled in the art will understand, this disclosure can support any number of client devices.
[0026] Client devices 101, 102, 103, 104, 105 and / or 106 may include various types of computer devices such as portable handheld devices, general-purpose computers (e.g., personal computers and laptops), workstation computers, wearable devices, smartscreen devices, self-service terminal devices, service robots, game systems, thin clients, various messaging devices, sensors, or other sensing devices. These computer devices may run various types and versions of software applications and operating systems such as MICROSOFT Windows, APPLE iOS, UNIX-like operating systems, Linux, or Linux-like operating systems (e.g., GOOGLE Chrome OS), or include various mobile operating systems such as MICROSOFT Windows Mobile OS, iOS, Windows Phone, and Android. Portable handheld devices may include mobile phones, intelligent phones, tablets, and personal digital assistants (PDAs). Wearable devices may include head-mounted displays (e.g., smart glasses) and other devices. Game systems may include various handheld game devices, internet-enabled game devices, and so on. The client device can run various applications, such as Internet-related applications, communication applications (e.g., email applications), and short message service (SMS) applications, and can use various communication protocols.
[0027] Network 110 may be any type of network known to those skilled in the art, and it may use any one of several available protocols (including but not limited to TCP / IP, SNA, IPX, etc.) to support data communication. For example, one or more networks 110 may be a local area network (LAN), an Ethernet-based network, a token loop, a wide area network (WAN), the internet, a virtual network, a virtual private network (VPN), an intranet, an extranet, a blockchain network, a public switched telephone network (PSTN), an infrared network, a wireless network (e.g., Bluetooth, Wi-Fi), and / or any combination of these and / or other networks.
[0028] Server 120 may include one or more general-purpose computers, dedicated server computers (e.g., PC (personal computer) servers, UNIX servers, midrange servers), blade servers, large computers, server clusters, or any other suitable configuration and / or combination. Server 120 may include one or more virtual machines running a virtual operating system, or other computing architectures related to virtualization (e.g., one or more flexible pools of virtualized logical memory devices to maintain the server's virtual memory devices). In various embodiments, Server 120 may run one or more services or software applications that provide the functions described below.
[0029] The computing units in server 120 can run one or more operating systems, including any of the above-mentioned operating systems and any commercial server operating systems. Server 120 can also run any one of various additional server applications and / or middle-tier applications, such as an HTTP server, FTP server, CGI server, Java server, or database server.
[0030] In some embodiments, the server 120 may include one or more applications for analyzing and integrating data feeds and / or event updates received from users of client devices 101, 102, 103, 104, 105 and / or 106. The server 120 may also include one or more applications for displaying data feeds and / or real-time events via one or more display devices of client devices 101, 102, 103, 104, 105 and / or 106.
[0031] In some embodiments, server 120 may be a server in a distributed system or a server incorporating blockchain. Server 120 may be a cloud server, or an intelligent cloud computing server or intelligent cloud host equipped with artificial intelligence technology. A cloud server is a host product in a cloud computing service system and solves the problems of high management difficulty and low business scalability that exist in conventional physical hosts and virtual private server (VPS) services.
[0032] System 100 may also include one or more databases 130. In some embodiments, these databases can be used to store data and other information. For example, one or more of the databases 130 can be used to store information such as audio files and video files. The databases 130 can be located in various locations. For example, a database used by server 120 may be located locally with server 120, or it may be located away from server 120 and communicate with server 120 via a network or a dedicated connection. The databases 130 may be of various types. In some embodiments, the database used by server 120 may be a relational database. One or more of these databases can store, update, and retrieve data from the databases in response to commands.
[0033] In some embodiments, one or more of the databases 130 may be used by an application to store application data. The database used by the application may be of various types, such as a key-value repository, an object repository, or a general-purpose repository supported by the file system.
[0034] The system 100 in Figure 1 can be configured and operated in various ways so as to allow the application of the various methods and apparatus described in this disclosure. Figure 2 shows an exemplary process of a data processing method according to an embodiment of the present disclosure.
[0035] As shown in Figure 2, in step S202, the input data can be finalized, and the input data includes multiple participles. In step S204, the correlation between each participle of the multiple participles and each expert network of the multiple expert networks can be determined based on the gate matrix. Here, the multiple expert networks are used to reinforce the multiple participles.
[0036] In step S206, multiple participles can be uniformly assigned to multiple expert networks based on their correlation and the preset capacity of each expert network, thereby strengthening multiple participles.
[0037] In step S208, the data processing result can be determined based on the strengthened participles. The embodiments of this disclosure make it possible to satisfy the constraint of uniform allocation while considering the optimal allocation when assigning data processing tasks to multiple expert networks, thereby enabling each expert network to function in the data processing process and improving data processing efficiency.
[0038] The principles of this disclosure are explained in detail below. The Transformer model is a neural network model based on attention mechanisms and is primarily used for natural language processing (NLP) tasks such as language translation and text classification. The Transformer architecture is widely used in the field of natural language processing. The Transformer model mainly consists of two parts: an encoder and a decoder. The encoder converts the input sequence into a fixed-length vector representation, and the decoder converts this vector into an output sequence. Between the encoder and decoder is one or more attention mechanism layers that capture the correlation between the input sequence and the output sequence. Specifically, the Transformer model is primarily composed of multiple TransformerLayers, each containing two main components: a Self-Attention layer and a Feed-Forward Network (FFN). The Self-Attention mechanism is a method for calculating and integrating the correlation between each word and other words. This method captures the relationships between each element in the input sequence, regardless of distance within the sequence. In the Transformer model, the Self-Attention mechanism is used to calculate the influence each element has on other elements in either the input or output sequence. The Feed-Forward Neural Network is used for nonlinear transformations of the input sequence and is a neural network based on fully connected layers. In the Transformer model, the FFN can consist of two fully connected layers.
[0039] In current Transformer network structures, a large number of matrix multiplications are universally performed, and the magnitude of the network parameters is directly proportional to the number of matrix operations. This leads to a series of problems in actual operation, such as the following:
[0040] 1. High computational complexity. Transformer-based models have complex structures and involve a large amount of matrix multiplication and attention mechanism computation, resulting in long computation and training times. This is a significant bottleneck for large datasets and real-time applications.
[0041] 2. High resource consumption. Transformer-based models are computationally complex, requiring significant computing resources, including GPUs and TPUs, for their training and inference processes. This poses a challenge for resource-limited environments.
[0042] 3. Limited processing capacity for long sequences. Transformer-based models excel at processing short sequences of data, but performance degradation can be a problem when processing long sequences. This is mainly because the model's self-attention mechanism needs to compute a large number of attention points when processing long sequences, reducing computational efficiency.
[0043] Therefore, a Transformer network structure requires a large number of parameters to obtain optimal results. Doubling the number of model parameters would mean doubling the computational resources required in a conventional structure.
[0044] The data processing model described in this disclosure relates to a Mix of Experts (MoE) in large-scale pretraining models (e.g., large-scale language models, big language models). Simply put, the MoE model increases the number of feed-forward network (FFN) modules in a Transformer architecture, with each feed-forward network being an expert. In the data processing process, different participles (also called tokens or symbols) input to the model are selectively assigned to different experts for computation, thereby enhancing the participles (e.g., the feature vectors that characterize the participles). In this way, the number of model parameters can be amplified (e.g., if Z experts are set, the parameters of the FFN modules can be amplified by Z times), while the computational complexity remains the same.
[0045] The advantage of a mixed expert network is that it enables decoupling of computation and memory, meaning that computational resources and memory capacity can be scaled and optimized independently. This characteristic allows the mixed expert network provided in the embodiments of this disclosure to accommodate more model parameters within limited computational resources, thereby improving the expressiveness and performance of the model. Furthermore, this decoupling design allows for flexible adjustment of the allocation of computational and memory resources according to actual needs in order to achieve optimal performance and efficiency. Therefore, the mixed expert network provided in the embodiments of this disclosure provides an effective solution for the efficient use of computational resources and can exert a greater advantage, especially in resource-constrained environments.
[0046] In step S202, the input data can be finalized, and the input data includes multiple participles. In the text processing example, a text participle algorithm can be used to process natural language input and obtain multiple corresponding participles. The participles of the input data may include tokens corresponding to single characters or words in the input text, or tokens corresponding to special characters. Special characters may include, for example, a sentence-beginning marker [CLS] used to split sentences different from those that are sentence-ending markers [SEP].
[0047] When using Transformer-based network structures in other data processing fields, participles can correspondingly represent data segments that have been divided in other data (e.g., images).
[0048] In step S204, the correlation between each participle of the multiple participles and each expert network of the multiple expert networks can be determined based on the gate matrix. Here, the multiple expert networks are used to reinforce the multiple participles.
[0049] In the MoE model, a routing module is used to assign the input participles to the corresponding expert networks. Here, the routing module corresponds to a primary projection, projecting the vector representation of the input participles onto each expert network. The routing module can be expressed as shown in equation (1).
[0050]
number
[0051] Here, X represents the input data, Linear represents the linear mapping function, and softmax represents normalizing the result of the linear mapping. The results output by the routing module can be used to represent the correlation between each participle and each of the multiple expert networks.
[0052] TIFF0007960673000002.tif87170
[0053]
number
[0054] Here, X represents the input data and W represents the gate matrix. In step S206, multiple participles can be uniformly assigned to multiple expert networks based on their correlation and the preset capacity of each expert network, thereby strengthening multiple participles.
[0055] In conventional techniques, during the forward process of each network, the participle is processed by the expert network with the greatest correlation to the participle, determined in the routing module. However, this assignment method leads to a phenomenon called "model collapse," where, in the case of newly introduced multiple experts, the model tends to utilize only one or two of them, and the remaining expert networks are not effectively trained and used, thereby failing to effectively enhance the predictive effect of the network. In related techniques, inducing the use of an auxiliary loss function makes it possible to train each expert network. The auxiliary loss function generally takes the form of equation (3) below.
[0056]
number
[0057] By increasing the entropy of the gate portion for prediction, the prediction results from the routing module are guided toward the average. However, even when guidance is performed using an auxiliary loss function, in actual network operation, multiple tokens need to perform scoring predictions in parallel to guarantee high computational performance. On the other hand, when multiple tokens are "routed" in parallel, they "collect in one place," resulting in inconsistent numbers of tokens acquired by individual "experts." In modern computing hardware, this inconsistency leads to a decrease in computational efficiency.
[0058] To address the above issues, this disclosure uniformly assigns multiple parts to different expert networks, ensuring that all expert networks use computing resources in a uniform manner and improving computational efficiency.
[0059] Based on the number of participles in the input data and the number of expert networks, the predetermined capacity of each expert network, i.e., the number of participles that each expert network can process, can be determined. For example, the predetermined capacity of each expert network may be determined as M / e, where M is the number of participles in the input data and e is the number of expert networks. In some examples, the result of M / e may be rounded up or truncated to determine the predetermined capacity of each expert network. Each participle assigned to an expert network occupies a portion of that expert network's capacity.
[0060] In some embodiments, for each participle, the expert network with the highest correlation to that participle can be determined using the correlation determined based on the gate matrix. If the remaining capacity of the expert network with the highest correlation is not zero, the participle can still be assigned to an expert network that still has remaining capacity. Correlations can be calculated for multiple participles sequentially and assigned to expert networks.
[0061] In other embodiments, multiple assignments can be made to multiple participles. Each assignment causes the expert network to enhance the input participles at once. The computational load on the network for the input participles can be adjusted by setting the number of assignments. Clearly, the computational resources that need to be occupied by the data processing model according to the embodiments of this disclosure are determined based on the number of input participles and the number of times the participles are processed by the expert network, while the amount of parameters that the data processing model stores is determined based on the number of expert networks. There is no correlation between the two. Thus, a decoupling of computational load and storage load can be achieved.
[0062] In the case of multiple allocations, in some of the allocation proposals, each participle can be assigned to the expert network with the highest correlation to that participle, while constraints can be added to the other allocation proposals to ensure that the final distribution result is uniform.
[0063] For example, multiple participles can be assigned twice. In the first assignment, each participle can be assigned to the expert network with the highest correlation to it. In the second assignment, each participle is assigned to the most relevant expert network possible, under the constraint of uniform assignment. As a result of the two assignments, each expert network processes approximately the same number of participles, enabling a uniform allocation of computational resources. In some examples, uniform allocation can be achieved based on an optimal transport algorithm.
[0064] An optimal transport algorithm is an algorithm used in the fields of mathematics and optimization to solve transport problems. In its most basic form, it concerns how to move goods from one set of locations to another set of locations at the minimum cost. This problem has many variations, including in fields such as logistics, image processing, and machine learning. An optimal transport algorithm generally has a "cost matrix" in which each element represents the cost of moving from one location to another. The goal of the algorithm is to find a transport plan that minimizes the total transport cost while satisfying all supply and demand constraints. To solve this problem, an optimal transport algorithm generally combines mathematical tools such as linear programming and graph theory. For large-scale problems, more efficient computational skills and optimization techniques are also required. In the context of machine learning and deep learning, optimal transport algorithms are used as a tool to improve the performance of models, especially when it comes to alignment, mapping, or migration learning between data distributions. This helps to establish better correspondences between different datasets, thereby improving the generalization ability of the model. By utilizing optimal transport algorithms, highly efficient, low-cost resource allocation and transport plans can be achieved in a variety of application scenarios.
[0065] The problem of assigning participles in the embodiments of this disclosure can be transformed into a transport problem, thereby enabling the uniform assignment of participles to each expert network using an optimal transport algorithm.
[0066] In some examples, step S206 may include determining a first assignment based on correlation, assigning each participle to the expert network with the highest correlation to that participle, determining the remaining capacity of each expert network based on the first assignment and the preset capacity of each expert network, and determining a second assignment based on correlation and the remaining capacity of each expert network, where the second assignment is a combination of the first assignment so that multiple participles are uniformly assigned to multiple expert networks. For example, the second assignment can be determined based on correlation and the remaining capacity of each expert network, using an optimal transport algorithm. In the example, the optimal transport algorithm may be the sinkhorn algorithm or any other suitable optimal transport algorithm. The sinkhorn algorithm can satisfy the constraint of uniform allocation while considering the cost (correlation between participles and expert networks). The sinkhorn algorithm can be efficiently implemented on accelerated hardware such as a GPU. By transforming the process of assigning participles to a network of experts into an optimal transport problem, an optimal transport algorithm is used to ensure uniformity of the transport results while selecting the expert with the highest possible correlation to itself for each participle. This allows each expert to process the same (or nearly the same) number of participles, achieving optimal computational efficiency.
[0067] In some examples, the preset capacity of each expert network may be the same. When multiple assignments are made, the preset capacity of each expert network can be determined based on (N × M) / e, where N is the number of assignments, M is the number of participles in the input data, and e is the number of expert networks.
[0068] In step S208, the data processing result can be determined based on the enhanced participles. For example, the expert network implements the functionality of FFN in a Transformer network architecture. After the assigned participles are enhanced via the expert network, the enhanced participles can be input to the next layer in the network, such as a self-attention layer. In some examples, step S208 may include processing the enhanced participles based on a self-attention mechanism to obtain the data processing result.
[0069] Figure 3 shows an exemplary block diagram of a data processing model according to an embodiment of the present disclosure. The data processing method shown in Figure 2 can be implemented using the data processing model shown in Figure 3. The data processing model described in relation to Figure 3 may be a deep neural network or any other mathematical model consistent with the principles of the present disclosure. The structure of the data processing model shown in Figure 3 can be used for large-scale language models such as big language models.
[0070] As shown in Figure 3, the data processing model may include a routing layer 310, an expert network layer 320 containing multiple expert networks, and an output layer 330.
[0071] The routing layer 310 is configured to determine the correlation between each participle in the input data and each expert network based on a gate matrix, where the correlation is used to uniformly assign the participles to the expert networks according to the preset capacity of each expert network.
[0072] The expert network in the expert network layer 320 can be configured to reinforce the assigned participle. The output layer 330 can be configured to determine the data processing result based on the enhanced multiple participles.
[0073] In some embodiments, determining the correlation between each participle of a plurality of participles and each expert network of a plurality of expert networks based on a gate matrix may include determining the correlation between each expert network of a plurality of expert networks and each participle of a plurality of participles based on the product of the input data and the gate matrix.
[0074] In some embodiments, uniformly assigning multiple participles to multiple expert networks may include determining a first assignment based on correlation, in which each participle is assigned to the expert network with the highest correlation to that participle; determining the remaining capacity of each expert network based on the first assignment and the preset capacity of each expert network; and determining a second assignment based on correlation and the remaining capacity of each expert network, where the second assignment is combined with the first assignment so that the multiple participles are uniformly assigned to multiple expert networks.
[0075] In some embodiments, the preset capacity of each expert network may be the same. In some embodiments, determining a second allocation proposal based on correlation and the remaining capacity of each expert network may include determining a second allocation proposal based on correlation and the remaining capacity of each expert network, based on an optimal input algorithm.
[0076] In some embodiments, the optimal transport algorithm may be the sinkhorn algorithm. In some embodiments, the output layer can be configured to process multiple participles enhanced based on a self-attention mechanism to obtain data processing results.
[0077] Figure 4 shows an exemplary flowchart of a method for training a data processing model according to an embodiment of the present disclosure. The data processing model described in relation to Figure 3 can be trained using the method shown in Figure 4.
[0078] In step S402, the sample input can be finalized, and here the sample input may contain multiple participles. The content of the sample input can be selected from a pre-defined training dataset.
[0079] In step S404, the correlation between each of the multiple input participles and each of the multiple expert networks can be determined based on the gate matrix. Here, the multiple expert networks are used to reinforce the multiple participles. The correlation determined in step S204 can be used to uniformly allocate the multiple participles to the multiple expert networks according to the preset capacity of each expert network. Here, the preset capacity of each expert network is the same, and the preset capacity of each expert network can be determined using the method described in reference to Figure 2 in this disclosure.
[0080] In step S406, the loss value can be determined based on the gate matrix. Here, the closer the gate matrix is to an orthogonal matrix, the smaller the loss value. In some embodiments, the loss value can be designed based on the properties of an orthogonal matrix. One of the properties of an orthogonal matrix is that the product of the orthogonal matrix and its transpose is the identity matrix. Therefore, the product of the gate matrix and its transpose can be determined, and the loss value can be determined based on the error with the identity matrix. The loss value can be determined, for example, based on the following equation (4).
[0081]
number
[0082] TIFF0007960673000006.tif36170
[0083] In step S408, the parameters of the gate matrix are adjusted based on the loss value determined in step S406 to obtain the trained data processing model.
[0084] The model training method provided by the embodiments of this disclosure allows each expert network to enhance participles in different ways by setting the loss values such that the vectors corresponding to each expert network in the gate matrix representing the trainable parameters of each expert network in the trained data processing model are orthogonal to each other. When the gate matrix is close to orthogonal, each expert network correlates with each participle in different ways, thereby causing each expert network to tend to select different participles, and when assigning an expert network to each participle, the expert networks tend to select the same participle, thus avoiding situations where partial participles are missing.
[0085] Figure 5A shows an example of a data processing process using related technologies. In the example shown in Figure 5A, there is a phenomenon in which the parameters of the routing module become homogenized. Specifically, the point-raising angles of the vectors for each expert network in the gate matrix are close, as shown in equation (5).
[0086]
number
[0087] TIFF0007960673000008.tif28170
[0088] In the example shown in Figure 5A, due to the homogenization phenomenon, different expert networks 510 and 520 tend to select the same participles (e.g., C, D, E, F, G) for processing, thereby overlooking and failing to process partial participles (A, B).
[0089] Figure 5B shows an example of a data processing process according to an embodiment of the present disclosure. Since the vectors for each expert network in the gate matrix of a data processing model trained by the training method described with reference to Figure 4 tend to be orthogonal, different expert networks can select and process different parts, thus avoiding the homogenization problem seen in Figure 5A.
[0090] Figure 6 shows an exemplary block diagram of a data processing device according to an embodiment of the present disclosure. As shown in Figure 6, the data processing device 600 may include an input unit 610, a correlation determination unit 620, an assignment unit 630, and an output unit 640. The data processing method described in relation to Figure 2 can be performed using the data processing device described in Figure 6.
[0091] The input unit 610 is configured to confirm the input data, which includes multiple participles. The correlation determination unit 620 is configured to determine the correlation between each participle of a group of participles and each expert network of a group of expert networks based on a gate matrix, where the group of expert networks is used to reinforce the group of participles.
[0092] The assignment unit 630 is configured to uniformly assign multiple participles to multiple expert networks and enhance multiple participles based on correlation and the preset capacity of each expert network.
[0093] The output unit 640 is configured to determine the data processing result based on multiple emphasized participles. In some embodiments, the correlation determination unit is configured to determine the correlation between each expert network of a plurality of expert networks and each participle of a plurality of participles, based on the product of the input data and the gate matrix.
[0094] In some embodiments, uniformly allocating multiple participles to multiple expert networks based on correlation and the preset capacity of each expert network may include determining a first assignment based on correlation, in which each participle is assigned to the expert network with the highest correlation to that participle; determining the remaining capacity of each expert network based on the first assignment and the preset capacity of each expert network; and determining a second assignment based on correlation and the remaining capacity of each expert network, where the second assignment is combined with the first assignment so that the multiple participles are uniformly allocated to the multiple expert networks.
[0095] In some embodiments, the preset capacity of each expert network may be the same. In some embodiments, determining a second allocation proposal based on correlation and the remaining capacity of each expert network may include determining a second allocation proposal based on correlation and the remaining capacity of each expert network, based on an optimal input algorithm.
[0096] In some embodiments, the optimal transport algorithm may be the sinkhorn algorithm. In some embodiments, determining data processing results based on enhanced participles may include processing enhanced participles based on self-attention mechanisms to obtain data processing results.
[0097] It should be understood that each module or unit of the apparatus 600 shown in Figure 6 can correspond to each step of method 200 as described with reference to Figure 2. Therefore, the operation, features, and advantages described above for method 200 are similarly applicable to apparatus 600 and the modules and units contained therein. For the sake of brevity, some operations, features, and advantages are omitted here.
[0098] Figure 7 shows an exemplary block diagram of an apparatus for training a data processing model according to an embodiment of the present disclosure. As shown in Figure 7, the apparatus 700 may include an input unit 710, a correlation determination unit 720, a loss determination unit 730, and a parameter adjustment unit 740. The method for training a data processing model described in relation to Figure 4 can be performed using the data processing apparatus shown in Figure 7.
[0099] The input unit 710 can be configured to confirm a sample input, which may contain multiple participles. The correlation determination unit 720 can be configured to determine the correlation between each participle of a plurality of participles and each expert network of a plurality of expert networks based on a gate matrix. Here, the plurality of expert networks are used to reinforce the plurality of participles, and the correlation is used to uniformly allocate the plurality of participles to the plurality of expert networks according to the preset capacity of each expert network.
[0100] The loss determination unit 730 can be configured to determine the loss value based on the gate matrix, where the closer the gate matrix is to an orthogonal matrix, the smaller the loss value.
[0101] The parameter tuning unit 740 can be configured to adjust the parameters of the gate matrix based on the loss value to obtain a trained data processing model.
[0102] In some embodiments, the loss determination unit may be configured to determine the product of the gate matrix and the transpose of the gate matrix, and to determine the loss value based on the error between the product and the identity matrix.
[0103] In some examples, the error is the least mean squared error. It should be understood that each module or unit of the apparatus 700 shown in Figure 7 can correspond to each step of method 400 as described with reference to Figure 4. Therefore, the operation, features, and advantages described above for method 400 are equally applicable to apparatus 700 and the modules and units contained therein. For the sake of brevity, some operations, features, and advantages are omitted here.
[0104] While the above discussion referred to specific modules and examined specific functions, please note that the functions of each unit described herein can be divided into multiple units, and / or at least some of the functions of multiple units can be combined into a single unit.
[0105] It should also be understood that various technologies can be described in this specification within the general context of software hardware elements or program modules. Each unit described with respect to Figures 6 and 7 can be implemented in hardware or in hardware combined with software and / or firmware. For example, these units can be implemented as computer program code / instructions configured to run on one or more processors and be stored in a computer-readable storage medium. Optionally, these units can be implemented as hardware logic / circuits. For example, in some embodiments, one or more of units 610-640 and 710-740 may be implemented together in a System on Chip (SoC). The SoC may include an integrated circuit chip (e.g., a processor (e.g., a Central Processing Unit, CPU), a microcontroller, a microprocessor, a Digital Signal Processor, DSP, etc.), memory, one or more communication interfaces, and / or one or more components in other circuits) and can perform functions by optionally including the execution of received program code and / or embedded firmware.
[0106] Another aspect of the present disclosure provides an electronic device comprising at least one processor and a memory communicated to the at least one processor, the memory storing instructions executable by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor enables the at least one processor to perform the method according to an embodiment of the present disclosure.
[0107] Another aspect of the present disclosure also provides a non-temporary computer-readable storage medium storing computer instructions, which are used to cause the computer to perform the methods according to embodiments of the present disclosure.
[0108] Another aspect of the present disclosure also provides a computer program product, which, when executed by a processor, implements the method according to the embodiments of the present disclosure.
[0109] In the proposed technology described herein, all processing of relevant user personal information, including collection, storage, use, processing, transmission, provision, and disclosure, complies with the provisions of relevant laws and regulations and does not violate public order and morals.
[0110] Embodiments of this disclosure further provide electronic devices, readable storage media, and computer program products. Next, with reference to Figure 8, a block diagram of an electronic device 800 that can function as a server or client of the present disclosure will be described, which may be an example of hardware equipment applicable to each aspect of the present disclosure. The electronic device represents various forms of digital electronic computers, e.g., laptop computers, desktop computers, stages, personal digital assistants, servers, blade servers, large computers, and other suitable computers. The electronic device may further represent various forms of mobile devices, e.g., personal digital processing devices, mobile phones, intelligent phones, wearable devices, and other similar computing devices. The components, their connections, and their functions shown herein are illustrative and do not limit the implementation of the present disclosure as described and / or claimed herein.
[0111] As shown in Figure 8, the electronic device 800 includes a computing unit 801 that can perform various appropriate operations and processes based on a program stored in read-only memory (ROM) 802 or a program loaded from storage unit 808 into random access memory (RAM) 803. RAM 803 further stores various programs and data necessary for operating the electronic device 800. The computing unit 801, ROM 802, and RAM 803 are connected to each other via bus 804. An input / output (I / O) interface 805 is also connected to bus 804.
[0112] Multiple components in the electronic device 800 are connected to an I / O interface 805, and these components include an input unit 806, an output unit 807, a storage unit 808, and a communication unit 809. The input unit 806 may be any type of device that can input information into the electronic device 800, and the input unit 806 can receive input numeric or character information and generate key signal inputs related to user settings and / or function control of the electronic device, and may include, but is not limited to, a mouse, keyboard, touchscreen, trackpad, trackball, joystick, microphone, and / or remote control. The output unit 807 may be any type of device that can present information, and may include, but is not limited to, a display, speaker, video / audio output terminal, vibrator, or printer. The storage unit 808 may include, but is not limited to, a magnetic disk or an optical disk. The communication unit 809 enables the electronic device 800 to exchange information / data with other devices via computer networks such as the Internet and / or various telecommunications networks, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers and / or chipsets. For example, Bluetooth TM Examples include devices, 802.11 devices, WiFi devices, WiMAX devices, cellular communication devices, and / or similar devices.
[0113] The computing unit 801 may be a variety of general-purpose and / or dedicated processing components having processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units that execute machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 801 performs various methods and processes such as methods 200, 400 described above. For example, in some embodiments, methods 200, 400 can be implemented as computer software programs that are tangibly embodied in a machine-readable medium. For example, a storage unit 808 may be mentioned. In some embodiments, part or all of the computer program can be loaded and / or installed into the electronic device 800 via ROM 802 and / or communication unit 809. Once the computer program is loaded into RAM 803 and executed by the computing unit 801, one or more steps of methods 200, 400 described above can be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to perform methods 200, 400 by any other suitable method (e.g., using firmware).
[0114] Various embodiments of the systems and technologies described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may be implemented in one or more computer programs, which may be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, which may receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0115] Program code for implementing the methods of this disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the program code is executed by the processor or controller, it performs the functions / operations specified in the flowcharts and / or block diagrams. The program code may be executed entirely by machine, partially by machine, partially by machine and partially by remote machine as a standalone software package, or entirely by remote machine or server.
[0116] In the context of this disclosure, a machine-readable medium may be a tangible medium that contains or stores a program used in or used in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any appropriate combination thereof. More specific examples of machine-readable storage media include an electrical connection by one or more leads, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage equipment, magnetic storage equipment, or any appropriate combination thereof.
[0117] To provide user interaction, the computer may implement the systems and technologies described herein, the computer comprising a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitoring monitor), and a keyboard and pointing device (e.g., a mouse or trackball), the user may input to the computer via the keyboard and pointing device. Other types of devices may further provide user interaction, for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback), and the computer may receive input from the user in any form (including sound input, voice input, or tactile input).
[0118] The systems and technologies described herein may be implemented in computing systems including backstage components (e.g., as data servers), computing systems including middleware components (e.g., application servers), computing systems including front-end components (e.g., user computers having a graphical user interface or web browser, through which users can interact with embodiments of those systems and technologies), or computing systems consisting of any combination of these backstage components, middleware components, or front-end components. The components of the system may be interconnected by digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local networks (LANs), wide area networks (WANs), the internet, and blockchain networks.
[0119] A computer system may include a client and a server. The client and server are generally geographically distant from each other and typically interact via a communication network. The client-server relationship is created by running computer programs on corresponding computers that have a client-server relationship with each other. The server may be a cloud server, a server in a distributed system, or a server combined with a blockchain.
[0120] It should be understood that the steps may be reordered, added, or deleted using the various forms of flows described above. For example, each step described in this disclosure may be performed in parallel, sequentially, or in a different order, as long as the technical proposal disclosed herein achieves the desired result.
[0121] While embodiments or examples of this disclosure are described with reference to the drawings, it should be understood that the above-described methods, systems, and apparatus are merely illustrative embodiments or examples, and the scope of this disclosure is not limited by these embodiments or examples, but is limited only by the authorized claims and their uniform scope. Various elements of the embodiments or examples may be omitted or replaced by their uniform elements. Furthermore, each step may be performed in an order different from the order described herein. In addition, various elements of the embodiments or examples may be combined in various ways. Importantly, as technology advances, many of the elements described herein can be replaced by equivalent elements appearing later in this disclosure.
Claims
1. A data processing method performed by a computer, Confirm the input data, and confirm that the input data contains multiple participles. Based on the gate matrix, the correlation between each participle of the plurality of participles and each expert network of the plurality of expert networks is determined, and the plurality of expert networks are used to reinforce the plurality of participles. Based on the correlation and the preset capacity of each expert network, the multiple participles are uniformly assigned to the multiple expert networks, and the multiple participles are strengthened. This includes determining the data processing result based on the enhanced participles, Distributing the multiple parts uniformly to the multiple expert networks based on the correlation and the preset capacity of each expert network is: Based on the aforementioned correlation, a first assignment plan is determined, and in the first assignment plan, each participle is assigned to the expert network having the highest correlation with that participle. The remaining capacity of each expert network is determined based on the first allocation proposal and the preset capacity of each expert network, A data processing method comprising determining a second allocation plan based on the correlation and the remaining capacity of each expert network, and combining the second allocation plan with the first allocation plan so that the plurality of participles are uniformly allocated to the plurality of expert networks.
2. Determining the correlation between each participle of the plurality of participles and each expert network of the plurality of expert networks based on the gate matrix is: The data processing method according to claim 1, comprising determining the correlation between each of the plurality of expert networks and each of the plurality of participles based on the product of the input data and the gate matrix.
3. The data processing method according to claim 1, wherein the preset capacity of each of the expert networks is the same.
4. Determining the second allocation proposal based on the aforementioned correlation and the remaining capacity of each expert network is: The data processing method according to claim 1, comprising determining a second allocation plan based on the correlation and the remaining capacity of each expert network, based on the optimal transport algorithm.
5. The data processing method according to claim 4, wherein the optimal transport algorithm is the sinkhorn algorithm.
6. Determining the data processing result based on the enhanced multiple participles is A data processing method according to claim 1, comprising processing the enhanced plurality of participles based on a self-attention mechanism to obtain the data processing result.
7. A data processing method implemented in a data processing model, which is executed by a computer, wherein the data processing model includes a routing layer, an expert network layer including a plurality of expert networks, and an output layer, and the data processing method is Based on the gate matrix, the routing layer determines the correlation between each participle in the input data and each expert network, and this correlation is used to uniformly allocate the participles to each expert network according to the preset capacity of each expert network. The assigned participle is reinforced by the expert network in the expert network layer, This includes determining the data processing result by the output layer based on the enhanced multiple participles, The aforementioned participles are, Based on the aforementioned correlation, a first assignment plan is determined, and in the first assignment plan, each participle is assigned to the expert network having the highest correlation with that participle. The remaining capacity of each expert network is determined based on the first allocation proposal and the preset capacity of each expert network, A second allocation plan is determined based on the correlation and the remaining capacity of each expert network, and the second allocation plan is combined with the first allocation plan so that the multiple parts are uniformly allocated to the multiple expert networks. A data processing method that uniformly assigns data to the aforementioned multiple expert networks.
8. Determining the correlation between each participle of the plurality of participles and each expert network of the plurality of expert networks based on the gate matrix is: The data processing method according to claim 7, comprising determining the correlation between each of the plurality of expert networks and each of the plurality of participles based on the product of the input data and the gate matrix.
9. The data processing method according to claim 7, wherein the preset capacity of each of the expert networks is the same.
10. Determining the second allocation proposal based on the aforementioned correlation and the remaining capacity of each expert network is: The data processing method according to claim 7, comprising determining a second allocation plan based on the correlation and the remaining capacity of each expert network, based on the optimal transport algorithm.
11. The data processing method according to claim 10, wherein the optimal transport algorithm is the sinkhorn algorithm.
12. The output layer is, The data processing method according to claim 7, configured to process the enhanced plurality of participles based on a self-attention mechanism to obtain the data processing result.
13. A method for training a data processing model, which is performed by a computer. Confirm the sample input, and confirm that the sample input contains multiple participles. Based on the gate matrix, the correlation between each of the multiple participles and each of the multiple expert networks for reinforcing the multiple participles is determined, and the correlation is used to uniformly allocate the multiple participles to the multiple expert networks in accordance with the preset capacity of each expert network. The loss value is determined based on the gate matrix, and the closer the gate matrix is to an orthogonal matrix, the smaller the loss value. This includes adjusting the parameters of the gate matrix based on the loss value to obtain a trained data processing model, The aforementioned participles are, Based on the aforementioned correlation, a first assignment plan is determined, and in the first assignment plan, each participle is assigned to the expert network having the highest correlation with that participle. The remaining capacity of each expert network is determined based on the first allocation proposal and the preset capacity of each expert network, A second allocation plan is determined based on the correlation and the remaining capacity of each expert network, and the second allocation plan is combined with the first allocation plan so that the multiple parts are uniformly allocated to the multiple expert networks. A method by which the multiple expert networks are uniformly assigned.
14. Determining the loss value based on the aforementioned gate matrix means that Determining the product of the gate matrix and the transpose of the gate matrix, The method according to claim 13, further comprising determining the loss value based on the error between the product and the identity matrix.
15. The method according to claim 14, wherein the error is the least mean squares error.
16. A data processing device, It is configured to confirm the input data, and the input data consists of an input unit containing multiple participles, The system is configured to determine the correlation between each participle of the plurality of participles and each expert network of the plurality of expert networks based on a gate matrix, and the plurality of expert networks include correlation determination units used to strengthen the plurality of participles, An assignment unit configured to uniformly assign the multiple participles to the multiple expert networks and enhance the multiple participles based on the correlation and the preset capacity of each expert network, Includes an output unit configured to determine the data processing result based on the enhanced plurality of participles, Distributing the multiple parts uniformly to the multiple expert networks based on the correlation and the preset capacity of each expert network is: Based on the aforementioned correlation, a first assignment plan is determined, and in the first assignment plan, each participle is assigned to the expert network having the highest correlation with that participle. The remaining capacity of each expert network is determined based on the first allocation proposal and the preset capacity of each expert network, A data processing device comprising determining a second allocation plan based on the correlation and the remaining capacity of each expert network, and combining the second allocation plan with the first allocation plan so that the plurality of parts are uniformly allocated to the plurality of expert networks.
17. The aforementioned correlation determination unit is, The data processing apparatus according to claim 16, configured to include determining the correlation between each of the plurality of expert networks and each of the plurality of participles based on the product of the input data and the gate matrix.
18. The data processing device according to claim 16, wherein the preset capacity of each of the aforementioned expert networks is the same.
19. Determining the second allocation proposal based on the aforementioned correlation and the remaining capacity of each expert network is: The data processing device according to claim 16, comprising determining a second allocation proposal based on the correlation and the remaining capacity of each expert network, based on the optimal transport algorithm.
20. The data processing device according to claim 19, wherein the optimal transport algorithm is the Sinkhorn algorithm.
21. Determining the data processing result based on the enhanced multiple participles is The data processing apparatus according to claim 16, configured to process the enhanced plurality of participles based on a self-attention mechanism to obtain the data processing result.
22. An apparatus for training a data processing model, It is configured to confirm the sample input, and the sample input is an input unit containing multiple participles, A correlation determination unit is configured to determine the correlation between each of the multiple participles and each of the multiple expert networks for reinforcing the multiple participles, based on a gate matrix, and the correlation is used to uniformly allocate the multiple participles to the multiple expert networks in accordance with the preset capacity of each expert network. A loss determination unit configured to determine the loss value based on the gate matrix, wherein the closer the gate matrix is to an orthogonal matrix, the smaller the loss value. Includes a parameter tuning unit configured to adjust the parameters of the gate matrix based on the loss value to obtain a trained data processing model, Distributing the multiple parts uniformly to the multiple expert networks based on the correlation and the preset capacity of each expert network is: Based on the aforementioned correlation, a first assignment plan is determined, and in the first assignment plan, each participle is assigned to the expert network having the highest correlation with that participle. The remaining capacity of each expert network is determined based on the first allocation proposal and the preset capacity of each expert network, An apparatus comprising determining a second allocation plan based on the correlation and the remaining capacity of each expert network, and combining the second allocation plan with the first allocation plan so that the plurality of participles are uniformly allocated to the plurality of expert networks.
23. The loss determination unit is Determine the product of the gate matrix and the transpose of the gate matrix, The apparatus according to claim 22, configured to determine the loss value based on the error between the product and the identity matrix.
24. The apparatus according to claim 23, wherein the error is the least mean squares error.
25. It is an electronic device, At least one processor, Includes memory that is communicated to at least one of the processors, An electronic device wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to cause the at least one processor to perform the method according to any one of claims 1 to 15.
26. A non-temporary computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 15.
27. A computer program that causes a computer processor to perform the method described in any one of claims 1 to 15.
Citation Information
Patent Citations
Image Processing Using Mixture of Experts
JP2024518232A
Routing to expert subnetworks in mixed-expert neural networks.
JP2025505418A
Systems and methods for routing within multitask mixture-of-experts models
US20220237435A1
Training conditional computation neural networks using reinforcement learning
US20230177309A1
Neural networks with switch layers
US20230351188A1
