Search

CN-122019166-A - Data processing method, device, electronic equipment, storage medium and program product

CN122019166ACN 122019166 ACN122019166 ACN 122019166ACN-122019166-A

Abstract

The disclosure provides a data processing method, a data processing device, electronic equipment, a storage medium and a program product, and particularly relates to the technical field of computers, in particular to the technical fields of artificial intelligence, deep learning models, hardware cooperation and the like. The method comprises the steps of receiving first data from a first processor, determining the first data from the data to be processed under the condition that the first processor determines overload based on the data to be processed, wherein the data to be processed is used for processing a target expert module in a hybrid expert model, operating the target expert module to process the first data based on module parameters of the target expert module to obtain a first processing result, and sending the first processing result to the first processor.

Inventors

  • LIU YUEJI
  • LIU JINGLIANG
  • LIU XINGXING
  • LI YU

Assignees

  • 北京百度网讯科技有限公司

Dates

Publication Date
20260512
Application Date
20260129

Claims (15)

  1. 1. A data processing method, comprising: receiving first data from a first processor, wherein the first data is determined from the data to be processed, and the data to be processed is used for processing a target expert module in a mixed expert model under the condition that the first processor determines overload based on the data to be processed; operating the target expert module to process the first data based on the module parameters of the target expert module to obtain a first processing result, and And sending the first processing result to the first processor, so that the first processor determines a target processing result of the data to be processed based on the first processing result and a second processing result, the second processing result is determined by the first processor by running the target expert module to process second data based on the module parameters, and the second data is determined based on the data to be processed and the first data.
  2. 2. The method of claim 1, further comprising: Identifying a storage space for storing module parameters of the target expert module based on target module parameters stored in a computing device to which the first processor belongs, to obtain an identification result, wherein the target module parameters comprise module parameters of the expert module belonging to the same network level as the target expert module of the hybrid expert model, and And acquiring the module parameters of the target expert module according to the acquisition time matched with the identification result.
  3. 3. The method according to claim 2, wherein the acquiring the module parameters of the target expert module according to the acquisition opportunity matched with the identification result includes: and under the condition that the identification result indicates that the storage space is larger than or equal to the space occupied by the target module parameter, responding to the first processor to acquire the data to be processed, and acquiring the target module parameter.
  4. 4. The method according to claim 2, wherein the acquiring the module parameters of the target expert module according to the acquisition opportunity matched with the identification result includes: And under the condition that the identification result indicates that the storage space is smaller than the space occupied by the target module parameter, acquiring the module parameter of the target expert module in response to determining that the first processor is overloaded.
  5. 5. The method of any of claims 1-4, wherein the module parameters comprise a matrix, the obtaining the module parameters comprising: and calling a reading program to sequentially read the row vector elements of the module parameters from a memory, wherein the reading program comprises an identification field, and the identification field indicates the compiling mode of the row vector elements.
  6. 6. A data processing method, comprising: acquiring data to be processed for processing by a target expert module in a mixed expert model; determining first data and second data from the data to be processed under the condition of determining overload based on the data to be processed, wherein the first data is used for being sent to a second processor, and the second processor stores module parameters of the target expert module; receiving a first processing result from the second processor, the first processing result being obtained by the second processor operating the target expert module to process the first data based on the module parameters, and And determining a target processing result of the data to be processed based on the first processing result and a second processing result, wherein the second processing result is determined by operating the target expert module to process the second data based on the module parameters.
  7. 7. The method of claim 6, further comprising: and determining whether overload exists or not based on the data amount of the data to be processed and a reference data amount, wherein the reference data amount indicates the average processing amount of expert modules belonging to the same network level as the target expert module in the mixed expert model.
  8. 8. The method of claim 6, further comprising: and determining whether overload exists or not based on the data quantity of the data to be processed and the hardware configuration information.
  9. 9. The method according to any one of claims 6 to 8, wherein said determining first data from said data to be processed comprises: The first data is determined from the data to be processed based on the processable data amount and the overload data amount of the second processor, wherein the overload data amount is a data amount exceeding a predetermined threshold.
  10. 10. The method according to any one of claims 1 to 9, wherein the data to be processed for the target expert module processing is determined by: The auxiliary computing equipment in the server cluster calls a gate selector to process output data output by a target network layer in the mixed expert model to obtain an expert routing result, wherein the server cluster comprises the computing equipment and the auxiliary computing equipment, the target network layer is at a network layer above the network layer where the target expert module in the mixed expert model is located, and And determining the data to be processed based on the output data in the case that the expert routing result indicates that the output data is routed to the target expert module.
  11. 11. A data processing apparatus comprising: The first receiving module is used for receiving first data from a first processor, wherein the first data is determined from the data to be processed, and the data to be processed is used for processing by a target expert module in the mixed expert model under the condition that the first processor determines overload based on the data to be processed; An operation module for operating the target expert module to process the first data based on the module parameters of the target expert module to obtain a first processing result, and And the sending module is used for sending the first processing result to the first processor so that the first processor can determine a target processing result of the data to be processed based on the first processing result and a second processing result, the second processing result is determined by the first processor by running the target expert module to process second data based on the module parameters, and the second data is determined based on the data to be processed and the first data.
  12. 12. A data processing apparatus comprising: The acquisition module is used for acquiring data to be processed, which are processed by the target expert module in the mixed expert model; The splitting module is used for determining first data and second data from the data to be processed under the condition of determining overload based on the data to be processed, wherein the first data is used for being sent to a second processor, and the second processor stores module parameters of the target expert module; a second receiving module for receiving a first processing result from the second processor, the first processing result being obtained by the second processor operating the target expert module to process the first data based on the module parameters, and And the result summarizing module is used for determining a target processing result of the data to be processed based on the first processing result and a second processing result, and the second processing result is determined by operating the target expert module to process the second data based on the module parameters.
  13. 13. An electronic device, comprising: at least one processor, and A memory communicatively coupled to the at least one processor, wherein, The memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1 to 10.
  14. 14. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1 to 10.
  15. 15. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 10.

Description

Data processing method, device, electronic equipment, storage medium and program product Technical Field The present disclosure relates to the field of computer technologies, and in particular, to the technical fields of artificial intelligence, deep learning models, hardware collaboration, and the like, and in particular, to a data processing method, apparatus, electronic device, storage medium, and program product. Background With the advent of the artificial intelligence era, the continued expansion of model scale has become a key driving force for improving performance. To achieve high processing efficiency of a single task and to achieve processing of multiple tasks, a hybrid expert model (MoE) has been developed. How to perform the adaptive operation of the hybrid expert model and the hardware equipment becomes a research key point. Disclosure of Invention The present disclosure provides a data processing method, apparatus, electronic device, storage medium, and program product. According to one aspect of the disclosure, a data processing method is provided, which includes receiving first data from a first processor, determining, in a case where the first processor determines overload based on data to be processed, from the data to be processed, the data to be processed being used for target expert module processing in a hybrid expert model, operating the target expert module based on module parameters of the target expert module to process the first data to obtain a first processing result, and transmitting the first processing result to the first processor, so that the first processor determines a target processing result of the data to be processed based on the first processing result and a second processing result, operating the target expert module based on the module parameters by the first processor to process second data, and determining the second data based on the data to be processed and the first data. According to another aspect of the present disclosure, there is provided a data processing method including acquiring data to be processed for processing by a target expert module in a hybrid expert model, determining, in a case where overload is determined based on the data to be processed, first data and second data from the data to be processed, the first data being for transmission to a second processor, the second processor storing module parameters of the target expert module, receiving a first processing result from the second processor, the first processing result being obtained by the second processor executing the target expert module to process the first data based on the module parameters, and determining, based on the first processing result and the second processing result, a target processing result of the data to be processed, the second processing result being determined by executing the target expert module to process the second data based on the module parameters. According to another aspect of the present disclosure, there is provided a data processing apparatus including a first receiving module configured to receive first data from a first processor, the first data being determined from the data to be processed, the data to be processed being used for a target expert module process in a hybrid expert model, in a case where the first processor determines overload based on the data to be processed, an operating module configured to operate the target expert module to process the first data based on a module parameter of the target expert module to obtain a first processing result, and a transmitting module configured to transmit the first processing result to the first processor, so that the first processor determines a target processing result of the data to be processed based on the first processing result and a second processing result, the second processing result being determined by the first processor to operate the target expert module to process second data based on the module parameter, the second data being determined based on the data to be processed and the first data. According to another aspect of the present disclosure, there is provided a data processing apparatus including an acquisition module configured to acquire data to be processed by a target expert module in a hybrid expert model, a splitting module configured to determine, in a case where overload is determined based on the data to be processed, first data and second data from the data to be processed, the first data being configured to be sent to a second processor, the second processor storing module parameters of the target expert module, a second receiving module configured to receive a first processing result from the second processor, the first processing result being obtained by the second processor executing the target expert module to process the first data based on the module parameters, and a result summarizing module configured to determine a target processing result of the data to be