A model fine-tuning, scheduling method, system and device

By dividing the model into common sub-models and task sub-models, and transferring intermediate results between the server and execution device, the problem of resource waste after model fine-tuning is solved, and the efficient application of the model in different fields and the improvement of resource utilization are realized.

CN117151241BActive Publication Date: 2026-04-17CHINA TELECOM CORP LTD TECHNOLOGY INNOVATION CENTER +1
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA TELECOM CORP LTD TECHNOLOGY INNOVATION CENTER
Filing Date
2023-08-02
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

In existing technologies, model fine-tuning can only be applied to specific domains, resulting in a waste of computing resources. Furthermore, different models have the same architecture but different parameters, making it impossible to efficiently utilize computing resources.

Method used

By dividing the model to be fine-tuned into a common sub-model and a task sub-model, the parameters of the common sub-model are fixed, and the parameters of the task sub-model are adjusted by obtaining a sample set for each domain to form the target model. Intermediate results are then transferred between the server and the execution device through a scheduling method to improve resource utilization.

Benefits of technology

This enables the efficient application of the same model in different fields, improves the utilization of computing resources, and ensures the application effect in different fields.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117151241B_ABST
    Figure CN117151241B_ABST
Patent Text Reader

Abstract

The embodiment of the application provides a model fine-tuning, scheduling method, system and device. When fine-tuning a model, in order to make the obtained to-be-fine-tuned model applicable to different fields, for each field, a sample set corresponding to the field is obtained, the sample set is input into the to-be-fine-tuned model, and parameters in a task sub-model in the to-be-fine-tuned model are adjusted, so that a target model is obtained, wherein the to-be-fine-tuned model comprises a public sub-model and a task sub-model, parameters in the public sub-model are fixed, so that the public sub-model can process to-be-analyzed information of any field, and the task sub-model can process to-be-analyzed information of a specific field to improve the accuracy of processing to-be-analyzed information, improve resource calculation utilization, and still ensure the application effect of the fine-tuned model corresponding to different fields.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and in particular to a model fine-tuning, scheduling method, system and device. Background Technology

[0002] With the popularization of artificial intelligence, the number of parameters in various models is increasing. Taking the Generative Pre-trained Transformer (GPT) series of models as an example, GPT-1 involves hundreds of millions of parameters and its dataset uses about 2.5 billion words; GPT-2 involves billions of parameters and its dataset uses about 8 million web pages linked on the social news site Reddit; and GPT-3 involves tens of billions of parameters and its dataset uses about 90 billion words. It is evident that as existing models become more powerful, the number of parameters increases, and the resources consumed also increase.

[0003] In related technologies, to make models applicable to different domains, secondary development is often carried out on the basis of a pre-trained model, that is, fine-tuning the pre-trained model. Models obtained through fine-tuning tend to perform better in specific domains. For example, for model A, to make model A suitable for the news domain, it can be fine-tuned to obtain model B. To make model A suitable for the judicial domain, it can be fine-tuned again to obtain model C. Since models B and C are both obtained by fine-tuning model A, their architectures are the same, only their model parameters differ. When applying these models, model B is specifically applied to the news domain, and model C is specifically applied to the judicial domain. In other words, models obtained through fine-tuning can only be applied to specific domains. Deploying multiple models with the same architecture, where different models can only be applied to specific domains, wastes considerable computational resources.

[0004] Therefore, how to improve the utilization rate of computing resources while still ensuring the application effect of models in different fields has become an urgent problem to be solved. Summary of the Invention

[0005] This application provides a model fine-tuning and scheduling method, system, and device to solve the problem of wasted computing resources in the prior art.

[0006] Firstly, this application provides a model fine-tuning method, the method comprising:

[0007] Obtain the model to be fine-tuned, and for each domain, obtain the corresponding sample set. The model to be fine-tuned includes a common sub-model and a task sub-model, and the parameters in the common sub-model are fixed.

[0008] The sample set is input into the model to be fine-tuned, and the parameters in the task sub-model of the model to be fine-tuned are adjusted to obtain the target model.

[0009] Secondly, this application also provides a scheduling method applied to a server, the method comprising:

[0010] Obtain the information to be analyzed and the identifier of the domain to which the information to be analyzed belongs, and send the information to be analyzed to any execution device;

[0011] Receive a first target result fed back by any of the execution devices, wherein the first target result is an intermediate result output by the common sub-model of the finely tuned target model deployed in the execution device;

[0012] Based on the domain identifier and the domain to which the finely tuned target model is applied, the target execution device is determined; the first target result is sent to the target execution device.

[0013] The system receives and outputs a second target result fed back by the target execution device. The second target result is the result output by the task sub-model of the finely tuned target model deployed in the target execution device.

[0014] Thirdly, this application also provides a scheduling system, the system comprising: a server and at least two execution devices;

[0015] The server is configured to acquire information to be analyzed and the identifier of the domain to which the information to be analyzed belongs, send the information to be analyzed to any execution device; receive a first target result fed back by any execution device; determine a target execution device based on the identifier of the domain and the domain to which the fine-tuned target model deployed in each execution device applies; send the first target result to the target execution device; receive a second target result fed back by the target execution device and output it.

[0016] Any execution device is configured to input the received information to be analyzed into a common sub-model of the deployed, finely tuned target model, and send the intermediate result output by the common sub-model as the first target result to the server;

[0017] The target execution device is used to input the received first target result into the task sub-model of the deployed and fine-tuned target model, and send the result output by the task sub-model as the second target result to the server.

[0018] Fourthly, this application also provides a model fine-tuning device, the device comprising:

[0019] The acquisition module is used to acquire the model to be fine-tuned and, for each domain, acquire the corresponding sample set. The model to be fine-tuned includes a common sub-model and a task sub-model, and the parameters in the common sub-model are fixed.

[0020] The fine-tuning module is used to input the sample set into the model to be fine-tuned, and adjust the parameters in the task sub-model of the model to be fine-tuned to obtain the target model.

[0021] Fifthly, this application also provides a scheduling device, the device comprising:

[0022] The acquisition module is used to acquire the information to be analyzed and the identifier of the domain to which the information to be analyzed belongs;

[0023] The sending module is used to send the information to be analyzed to any execution device;

[0024] The receiving module is used to receive a first target result fed back by any of the execution devices, wherein the first target result is an intermediate result output by the common sub-model of the finely tuned target model deployed in the execution device;

[0025] The determination module is used to determine the target execution device based on the identifier of the domain and the domain of the fine-tuned target model application deployed in each execution device;

[0026] The sending module is further configured to send the first target result to the target execution device;

[0027] The receiving module is further configured to receive and output a second target result fed back by the target execution device, wherein the second target result is the result output by the task sub-model of the fine-tuned target model deployed in the target execution device.

[0028] In a sixth aspect, embodiments of this application also provide an electronic device, which includes at least a processor and a memory, wherein the processor is configured to execute a computer program stored in the memory to implement the steps of the model fine-tuning method described above, or the steps of the scheduling method described above.

[0029] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the model fine-tuning method described above, or the steps of the scheduling method described above.

[0030] In this embodiment, to make the obtained model to be fine-tuned applicable to different domains, a sample set corresponding to each domain is obtained and input into the model to be fine-tuned. The parameters in the task sub-model of the model to be fine-tuned are adjusted to obtain the target model. The model to be fine-tuned includes a common sub-model and a task sub-model. The parameters in the common sub-model are fixed so that the common sub-model can process the information to be analyzed in any domain, while the task sub-model can process the information to be analyzed in a specific domain to improve the accuracy of the information to be analyzed, improve the utilization of resource computing, and still ensure the application effect of the model after fine-tuning for different domains. Attached Figure Description

[0031] To more clearly illustrate the technical solutions of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0032] Figure 1 This is a schematic diagram of a model fine-tuning process provided in an embodiment of this application;

[0033] Figure 2 This is a schematic diagram of a model provided for an embodiment of this application;

[0034] Figure 3 A schematic diagram of a scheduling process provided in an embodiment of this application;

[0035] Figure 4 A schematic diagram of a scheduling system provided in an embodiment of this application;

[0036] Figure 5 This is a schematic diagram of the scheduling system disclosed in an embodiment of this application;

[0037] Figure 6 A schematic diagram of the target model provided in the embodiments of this application;

[0038] Figure 7 This is a scheduling diagram provided for an embodiment of this application;

[0039] Figure 8 This is a scheduling diagram provided for an embodiment of this application;

[0040] Figure 9 This is a scheduling diagram provided for an embodiment of this application;

[0041] Figure 10 This is a scheduling diagram provided for an embodiment of this application;

[0042] Figure 11This is a scheduling diagram provided for an embodiment of this application;

[0043] Figure 12 This is a schematic diagram of a model fine-tuning device provided in an embodiment of this application;

[0044] Figure 13 A schematic diagram of a scheduling device structure provided in an embodiment of this application;

[0045] Figure 14 This is a schematic diagram of an electronic device structure provided in an embodiment of this application. Detailed Implementation

[0046] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art are within the scope of protection of this application.

[0047] This application provides a model fine-tuning and scheduling method, system, and device. When fine-tuning a model, a model to be fine-tuned is obtained, and for each domain, a sample set corresponding to that domain is obtained. The model to be fine-tuned includes a common sub-model and a task sub-model, and the parameters in the common sub-model are fixed. The sample set is input into the model to be fine-tuned, and the parameters in the task sub-model of the model to be fine-tuned are adjusted to obtain the target model.

[0048] Example 1:

[0049] Figure 1 This application provides a schematic diagram of a model fine-tuning process, which includes the following steps:

[0050] S101: Obtain the model to be fine-tuned, and for each domain, obtain the corresponding sample set for that domain. The model to be fine-tuned includes a common sub-model and a task sub-model, and the parameters in the common sub-model are fixed.

[0051] The model fine-tuning method provided in this application is applied to electronic devices, such as servers and PCs.

[0052] In order to make the pre-trained model applicable to different fields, related techniques generally involve fine-tuning the pre-trained model so that the fine-tuned model can be applied to different fields. Figure 2 This is a schematic diagram of a model provided for an embodiment of this application, such as... Figure 2As shown, there is an existing large model A, which is well-suited for domain A. However, with business development, it is necessary to add business in domain B. Large model A does not perform well in processing information from domain B, therefore, it needs to be fine-tuned to obtain large model B. Since large model B is obtained by fine-tuning large model A, the architecture of large model B and large model A is the same, only the parameters are different. Therefore, a significant amount of computing resources are wasted. Furthermore, assuming there are currently N pieces of information to be analyzed in domain A, but no information to be analyzed in domain B, then electronic devices deployed with large model A are currently executing tasks, while electronic devices deployed with large model B are idle because there is no information to be analyzed in domain B. This undoubtedly wastes computing resources.

[0053] Therefore, in this embodiment, a model to be fine-tuned can be obtained. This model is a pre-trained model, and it includes a common sub-model and a task sub-model. The parameters in the common sub-model are fixed, meaning that the parameters in the common sub-model remain unchanged during model fine-tuning. For example, a certain layer of the model to be fine-tuned can be used as a boundary layer, the boundary layer and each layer before it can be used as the common sub-model, and each layer after it can be used as the task sub-model. How to determine the boundary layer can be configured as needed by those skilled in the art, and this embodiment does not impose any limitations.

[0054] To make the model to be fine-tuned applicable to different domains, in this embodiment, a sample set corresponding to each domain can be obtained to facilitate training the model to be fine-tuned based on the sample set. It should be noted that the sample set corresponding to each domain is not limited in this embodiment, and those skilled in the art can configure it according to the input of the model to be fine-tuned.

[0055] S102: Input the sample set into the model to be fine-tuned, and adjust the parameters in the task sub-model of the model to be fine-tuned to obtain the target model.

[0056] After obtaining the sample set corresponding to each domain, the corresponding sample set is input into the model to be fine-tuned for each domain. The parameters in the task sub-model of the model to be fine-tuned are adjusted according to the output of the model to be fine-tuned to obtain the target model. This allows the task sub-model of the fine-tuned target model to be applicable to different domains. However, the parameters in the common sub-model of the model to be fine-tuned are not adjusted during model fine-tuning, so that the common sub-model of the fine-tuned target model can be applied to any domain.

[0057] In this embodiment, to make the obtained model to be fine-tuned applicable to different domains, a sample set corresponding to each domain is obtained and input into the model to be fine-tuned. The parameters in the task sub-model of the model to be fine-tuned are adjusted to obtain the target model. The model to be fine-tuned includes a common sub-model and a task sub-model. The parameters in the common sub-model are fixed so that the common sub-model can process the information to be analyzed in any domain, while the task sub-model can process the information to be analyzed in a specific domain to improve the accuracy of the information to be analyzed, improve the utilization of resource computing, and still ensure the application effect of the model after fine-tuning for different domains.

[0058] Example 2:

[0059] Figure 3 A schematic diagram of a scheduling process provided in this application embodiment includes the following steps:

[0060] S301: Obtain the information to be analyzed and the identifier of the domain to which the information to be analyzed belongs, and send the information to be analyzed to any execution device.

[0061] The scheduling method provided in this application is applied to a server.

[0062] To improve the utilization of computing resources, this application provides a scheduling method that can be used during model application. After obtaining the information to be analyzed and the identifier of the domain to which the information belongs, the server sends the information to any execution device. The execution device deploys a fine-tuned target model, which includes a common sub-model and a task sub-model. It should be noted that the information to be analyzed can be text, an image, or other information; this application does not impose any restrictions. Those skilled in the art can configure the system based on the input of the target models deployed in each execution device.

[0063] If multiple pieces of information to be analyzed are obtained, in this embodiment of the application, an information identifier can be added to each received piece of information to be analyzed. This information identifier is used to uniquely identify the piece of information to be analyzed. In order to distinguish the piece of information to be analyzed corresponding to each result returned by the execution device, in this embodiment of the application, the corresponding information identifier can be sent to any execution device when sending the piece of information to be analyzed.

[0064] S302: Receive the first target result fed back by any of the execution devices, wherein the first target result is the intermediate result output by the common sub-model of the finely tuned target model deployed in the execution device.

[0065] Upon receiving the information to be analyzed, any execution device inputs the information into the common sub-model of the finely tuned target model. The execution device then feeds back the intermediate results output by the common sub-model as the first target result to the server.

[0066] If any execution device receives not only the information to be analyzed but also the information identifier corresponding to the information to be analyzed, it can also carry the information identifier corresponding to the information to be analyzed in the intermediate result in the first target result and send it to the server together with the intermediate result.

[0067] The server can receive the first target result from any of the execution devices and perform subsequent processing based on the first target result.

[0068] S303: Based on the identifier of the domain and the domain of the fine-tuned target model applied in each execution device, determine the target execution device; send the first target result to the target execution device.

[0069] After obtaining the first target result, based on the domain identifier of the information to be analyzed and the domain of the finely tuned target model deployed in each execution device, the target execution device corresponding to the domain identifier of the information to be analyzed is determined.

[0070] Since the server may process multiple pieces of information to be analyzed at once and serve multiple execution devices, in this embodiment, after obtaining the information to be analyzed, the information to be analyzed and the identifier of its respective domain are saved accordingly. Alternatively, if an information identifier has been added to the information to be analyzed, the information to be analyzed, the identifier of its respective domain, and the information identifier can also be saved accordingly. After receiving the first target result, the identifier of the corresponding domain can be found in the saved correspondence based on the information identifier carried in the first target result. Furthermore, based on the domain applied to the finely tuned target model deployed in each execution device and pre-saved, the target execution device corresponding to the obtained domain identifier is determined. If no information identifier has been added to the information to be analyzed, it indicates that the server has only obtained one piece of information to be analyzed, and the target execution device corresponding to the domain identifier of that information can be directly determined.

[0071] The first target result received from any execution device is sent to the target execution device so that the task sub-model in the finely tuned target model deployed in the target execution device can process the first target result again.

[0072] S304: Receive and output the second target result fed back by the target execution device, wherein the second target result is the result output by the task sub-model of the fine-tuned target model deployed in the target execution device.

[0073] After receiving the first target result, the target execution device will input the first target result into the task sub-model of the deployed and fine-tuned target model, and feed back the result of the task sub-model as the second target result to the server.

[0074] If the received first target result also carries an information identifier, the intermediate result can be input into the task sub-model only. After obtaining the output result of the task sub-model, the output result of the task sub-model and the information identifier carried in the first target result can be sent to the server as the second target result.

[0075] After receiving the second target result, the server can directly output the second target result. If the second target result also carries information identifiers, it can search for the information to be analyzed corresponding to the information identifiers carried in the second target result in the relationship between the saved information identifiers and the information to be analyzed. Then, it outputs the information to be analyzed and the results of the task sub-model of the target execution device carried in the second target result.

[0076] In this embodiment, after obtaining the information to be analyzed and the identifier of the domain to which the information to be analyzed belongs, the server sends the information to be analyzed to any execution device and receives the first target result fed back by the execution device. The first target result is the intermediate result output by the common sub-model of the fine-tuned target model deployed in the execution device. Based on the obtained domain identifier and the domain to which the fine-tuned target model deployed in each execution device applies, the server determines the target execution device, sends the first target result to the target execution device, and receives and outputs the second target result fed back by the target execution device. The second target result is the result output by the task sub-model of the fine-tuned target model deployed in the target execution device. This enables the common sub-model of the target model deployed on each execution device to process the information to be analyzed in any domain, thereby improving the utilization of computing resources.

[0077] Example 3:

[0078] To improve the efficiency of model application, based on the above embodiments, in this embodiment, sending the information to be analyzed to any execution device includes:

[0079] Obtain the current resource usage information for each execution device;

[0080] The first execution device with the lowest resource consumption is determined, and the information to be analyzed is sent to the first execution device.

[0081] To improve the application efficiency of the model, in this embodiment of the application, when the information to be analyzed is sent to any execution device, the current resource usage information of each execution device can be obtained, for example, the current utilization rate of the central processing unit (CPU) / processor / graphics processing unit (GPU) of each execution device can be obtained.

[0082] After obtaining the current resource usage information of each execution device, the first execution device with the lowest resource usage is determined based on the resource usage information of each execution device, and the information to be analyzed is sent to the first execution device.

[0083] Specifically, after obtaining the information to be analyzed and the identifier of the domain to which the information to be analyzed belongs, an instruction to obtain resource information can be sent to each execution device. After receiving the instruction to obtain resource information, each execution device sends its current CPU utilization or GPU utilization to the server. The server determines the execution device with the lowest utilization as the first execution device and sends the information to be analyzed to the first execution device.

[0084] Example 4:

[0085] To improve the accuracy of execution device scheduling, based on the above embodiments, in this embodiment, if a prompt message corresponding to the information to be analyzed is obtained, sending the information to be analyzed to any execution device includes:

[0086] Send the prompt message and the text to be analyzed to any execution device;

[0087] Sending the first target result to the target execution device includes:

[0088] The prompt information and the first target result are sent to the target execution device.

[0089] In related technologies, to improve the processing effect of large models on the information to be analyzed, prompt information is usually input into the large model along with the prompt information. Therefore, in this embodiment, if the server obtains the prompt information corresponding to the information to be analyzed, it can send the prompt information and the text to be analyzed together to any execution device. If the server obtains the prompt information corresponding to the information to be analyzed, it can send the prompt information and the first target result to the target execution device. The prompt information can be "compare the differences between two facial images," or "summarize the text," etc. Of course, the prompt information can be not only text but also a prompt box or other information. Those skilled in the art can configure the corresponding prompt information as needed, and this embodiment does not impose any restrictions on this.

[0090] Specifically, if the text to be analyzed, A, and its corresponding prompt information, A, are obtained, then prompt information A and text to be analyzed, A, can be sent together to any execution device. Furthermore, when sending the first target result to the target execution device, prompt information A and the first target result are also sent together to the target execution device.

[0091] Example 5:

[0092] To further improve the accuracy of execution device scheduling, based on the above embodiments, in this embodiment, sending the first target result to the target execution device includes:

[0093] Send the identifier of the domain and the first result to the target execution device;

[0094] After sending the first target result to the target execution device and before receiving and outputting the second target result fed back by the target execution device, the method further includes:

[0095] If no exception message is received from the target execution device, the subsequent steps of receiving and outputting the second target result fed back by the target execution device continue. The exception message is sent by the target execution device when the identifier of the received field is inconsistent with the target identifier stored in its own memory.

[0096] To further improve the accuracy of execution device scheduling, in this embodiment, the domain identifier and the first result can be sent together to the target execution device. After sending the first target result to the target execution device, before receiving and outputting the second target result from the target execution device, it can be determined whether an exception prompt message sent by the target execution device has been received. If no exception prompt message is received, the subsequent steps of receiving and outputting the second target result from the target execution device can continue. The exception prompt message is sent by the target execution device after receiving the domain identifier and determining that the domain identifier is inconsistent with its stored target identifier. In other words, the target execution device sends the exception prompt message because the server mistakenly sent the information to be analyzed to an execution device that cannot execute the domain described in the information to be analyzed.

[0097] Specifically, a time threshold can be pre-configured. If no abnormal prompt information is received within the time threshold, it can be determined that no abnormal prompt information sent by the target execution device has been received. Alternatively, after sending the first target result to the target execution device, the system can start receiving feedback information from the target execution device. If the second target result is received directly from the target execution device, it can be determined that no abnormal prompt information sent by the target execution device has been received.

[0098] Based on the above embodiments, in this embodiment of the application, the method further includes:

[0099] If an error message is received from the target execution device, the error message is output and the processing of the information to be analyzed is terminated.

[0100] If an error message is received from the target execution device, it indicates that there is a problem with the server's scheduling. The server has incorrectly assigned the information to be analyzed in a certain area to an execution device that is not capable of executing the information to be analyzed in that area. The error message can be output and the processing of the information to be analyzed can be terminated. The user of the electronic device can then determine how to proceed with the subsequent processing.

[0101] Example 6:

[0102] Figure 4 A schematic diagram of a scheduling system provided in this application embodiment, such as... Figure 4 As shown, the system includes a server 401 and at least two execution devices 402:

[0103] The server 401 is configured to: acquire information to be analyzed and the identifier of the domain to which the information to be analyzed belongs; send the information to be analyzed to any execution device 402; receive a first target result from any execution device 402; determine a target execution device 402 based on the domain identifier and the domain to which the fine-tuned target model deployed in each execution device 402 applies; send the first target result to the target execution device 402; and receive and output a second target result from the target execution device.

[0104] Any execution device 402 is used to input the received information to be analyzed into the common sub-model of the deployed and finely tuned target model, and send the intermediate result output by the common sub-model as the first target result to the server 401;

[0105] The target execution device 402 is used to input the received first target result into the task sub-model of the deployed and finely tuned target model, and send the result output by the task sub-model as the second target result to the server 401.

[0106] After obtaining the information to be analyzed and the identifier of the domain to which the information belongs, server 401 sends the information to any execution device 402 and receives the first target result from the execution device 402. Based on the obtained domain identifier and the domain to which the fine-tuned target model deployed in each execution device 402 applies, server 401 determines the target execution device 402, sends the first target result to the target execution device 402, receives the second target result from the target execution device 402, and outputs it. It should be noted that how server 401 performs scheduling after obtaining the information to be analyzed has been described in detail in the above embodiments and will not be repeated in this embodiment.

[0107] After receiving the information to be analyzed, any execution device 402 inputs the information into the common sub-model of the finely tuned target model that has been deployed, and sends the intermediate result output by the common sub-model as the first target result to the server 401.

[0108] After receiving the first target result, the target execution device 402 inputs the first target result into the task sub-model of the deployed and finely tuned target model. The task sub-model processes the intermediate results output by the common sub-model and sends the results output by the task sub-model as the second target result to the server 401.

[0109] In one possible implementation, the server 401 is specifically configured to, if it obtains a prompt message corresponding to the information to be analyzed, send the prompt message and the text to be analyzed to any execution device; and send the prompt message and the first target result to the target execution device;

[0110] The execution device 402 is specifically used to input the received prompt information and the text to be analyzed into the common sub-model of the deployed and finely tuned target model, and send the intermediate result output by the common sub-model as the first target result to the server 401;

[0111] The target execution device 402 is specifically used to input the received prompt information and the first target result into the task sub-model of the deployed and finely tuned target model, and send the result output by the task sub-model as the second target result to the server 401.

[0112] If a prompt message corresponding to the information to be analyzed is obtained, the prompt message and the text to be analyzed are sent to any execution device 402; the prompt message and the first target result are sent to the target execution device 402.

[0113] After receiving the prompt message and the text to be analyzed, any execution device 402 inputs the prompt message and the text to be analyzed into the common sub-model of the finely tuned target model that has been deployed, and sends the intermediate result output by the common sub-model as the first target result to the server 401.

[0114] After receiving the prompt information and the first target result, the target execution device 402 inputs the prompt information and the first target result into the task sub-model of the deployed and finely tuned target model, and sends the result output by the task sub-model as the second target result to the server 401.

[0115] In one possible implementation, the server 401 is further configured to send the identifier of the domain and the first target result to the target execution device 402; if it receives an exception prompt message from the target execution device 402, it outputs the exception prompt message and terminates the processing of the information to be analyzed.

[0116] The target execution device 402 is also used to receive the identifier of the field and the first target result. If the received identifier of the field is inconsistent with the target identifier stored in itself, it sends the abnormal prompt information to the server 401.

[0117] The methods by which the target execution device 402 determines the abnormal prompt information and how the server 401 processes the abnormal prompt information have been described in detail in the above embodiments, and will not be repeated in the embodiments of this application.

[0118] Example 7:

[0119] The scheduling system will now be described using a specific embodiment. Figure 5 This is a schematic diagram of the scheduling system disclosed in the embodiments of this application, such as... Figure 5 As shown, the scheduling system includes a server and three execution devices. The server houses a large model task prompt aggregator, a large model task distributor, and a large model task result distributor. Of the three execution devices, one is used for face comparison, one for pedestrian recognition, and one for flame detection.

[0120] A target model, which is a Big Transfer (Bit) visual big model, is deployed in each execution device. Figure 6 This is a schematic diagram of the target model provided in the embodiments of this application, such as... Figure 6 As shown, the target model is a Siamese network model, which can be roughly divided into three modules: a convolutional neural network (CNN) backbone module, a temporal image transformer, and a prediction head. The developers pre-defined that the CNN backbone module and the temporal image transformer are common sub-models, while the prediction head is a task-specific sub-model. This means that during fine-tuning, the parameters of the CNN backbone module and the temporal image transformer are not updated; only the parameters in the prediction head are updated.

[0121] like Figure 5 As shown, the server obtains three pieces of information to be analyzed: information to be analyzed in the field of face comparison, information to be analyzed in the field of pedestrian recognition, and information to be analyzed in the field of flame detection. Among them, the information to be analyzed in the field of face comparison consists of two face images, the information to be analyzed in the field of pedestrian recognition consists of two images that include pedestrians enclosed in rectangles, which serve as prompts, and the information to be analyzed in the field of flame detection consists of two frames of images from a video.

[0122] The large model task prompt aggregator in the server sends the above-mentioned information to be analyzed to any execution device. The execution device inputs the information to be analyzed into the common sub-model CNN Backbone module and TemporalImage Transformer to obtain the first target result, and then sends it to the server.

[0123] After receiving the first target result, the large model task distributor sends each received first target result to the corresponding target execution device according to the identifier of the domain to which each first target result belongs.

[0124] After receiving the first target result, any target execution device inputs the first target result into the task sub-model Prediction Head, and sends the obtained second target result to the server.

[0125] After receiving the second target result, the server outputs the face comparison result, pedestrian recognition result, and flame detection result respectively through the large model task result distributor.

[0126] The scheduling system described above will be explained in detail below with reference to a specific embodiment. Assume the server receives two tasks, task A and task B. Figure 7 This is a scheduling diagram provided for an embodiment of this application, such as... Figure 7 As shown, after receiving the information to be analyzed for tasks A and B, the server uses a large model task prompt aggregator deployed on the server to send the information to be analyzed for tasks A and B, along with the domain identifier (task_id) and information identifier (job_id) of each piece of information, and the task prompt information corresponding to each piece of information, to any of the N execution devices. Upon receiving the corresponding information, any execution device inputs the acquired information into a common sub-model and sends the intermediate result output by the common sub-model as the first target result to the server.

[0127] Figure 8 This is a scheduling diagram provided for an embodiment of this application, such as... Figure 8 As shown, after receiving scheduling prompts, task prompts, and information to be analyzed, where the scheduling prompts include task_id and job_id, any execution device inputs the task prompts and information to be analyzed into the common sub-model, and sends the intermediate results output by the common sub-model, together with the scheduling prompts and task prompts, as the first target result to the server.

[0128] Figure 9 This is a scheduling diagram provided for an embodiment of this application, such as... Figure 9As shown, after receiving the first target result, the server uses the large model task distributor to determine the target execution device based on the corresponding domain identifier and the domain of the fine-tuned target model application deployed in each execution device, and then sends the first target result to the target execution device. The first target result includes intermediate results, scheduling hints, and task hint information.

[0129] Figure 10 This is a scheduling diagram provided for an embodiment of this application, such as... Figure 10 As shown, after receiving the first target result, the target execution device inputs the task prompt information and intermediate results into the task sub-model, and sends the output of the task sub-model and the scheduling prompt together as the second target result to the server.

[0130] Figure 11 This is a scheduling diagram provided for an embodiment of this application, such as... Figure 11 As shown, after receiving the second target result, the server uses a large model task result aggregator deployed on the server to determine the information to be analyzed corresponding to the second target result, and outputs the results included in the second target result according to the information to be analyzed.

[0131] The scheduling system provided in this application improves resource utilization through distributed collaboration. Furthermore, in existing technologies, upgrading a model requires version management based on the MD5 Message-Digest Algorithm, which necessitates adjusting every parameter in the model. This application, however, only requires adjusting parameters in the common sub-model or adjusting parameters in each task sub-model individually. Although version management in this application also requires adjustments to each task sub-model, the scheduling method in this application involves significantly fewer parameters compared to existing technologies, thereby improving the efficiency of model updates.

[0132] Example 8:

[0133] Figure 12 This is a schematic diagram of a model fine-tuning device provided in an embodiment of this application, as shown below. Figure 12 As shown, the device includes:

[0134] The acquisition module 1201 is used to acquire the model to be fine-tuned and, for each domain, acquire the corresponding sample set. The model to be fine-tuned includes a common sub-model and a task sub-model, and the parameters in the common sub-model are fixed.

[0135] The fine-tuning module 1202 is used to input the sample set into the model to be fine-tuned, and adjust the parameters in the task sub-model in the model to be fine-tuned to obtain the target model.

[0136] Figure 13 This application provides a schematic diagram of a scheduling device structure, as shown in the embodiment of the present application. Figure 13 As shown, the device includes:

[0137] The acquisition module 1301 is used to acquire the information to be analyzed and the identifier of the domain to which the information to be analyzed belongs;

[0138] The sending module 1302 is used to send the information to be analyzed to any execution device;

[0139] The receiving module 1303 is used to receive a first target result fed back by any of the execution devices, wherein the first target result is an intermediate result output by the common sub-model of the finely tuned target model deployed in the execution device;

[0140] The determination module 1304 is used to determine the target execution device based on the identifier of the domain and the domain of the fine-tuned target model application deployed in each execution device;

[0141] The sending module 1302 is further configured to send the first target result to the target execution device;

[0142] The receiving module 1303 is further configured to receive and output a second target result fed back by the target execution device, wherein the second target result is the result output by the task sub-model of the fine-tuned target model deployed in the target execution device.

[0143] In one possible implementation, the acquisition module 1301 is specifically used to acquire the current resource occupancy information of each execution device;

[0144] The determining module 1304 is specifically used to determine the first execution device with the least resource consumption and send the information to be analyzed to the first execution device.

[0145] In one possible implementation, if a prompt message corresponding to the information to be analyzed is obtained, the sending module 1302 is specifically used to send the prompt message and the text to be analyzed to any execution device; and to send the prompt message and the first target result to the target execution device.

[0146] In one possible implementation, the sending module 1302 is specifically used to send the identifier of the field and the first result to the target execution device;

[0147] The receiving module 1303 is specifically used to continue executing the subsequent steps of receiving and outputting the second target result fed back by the target execution device if no abnormal prompt information is received from the target execution device. The abnormal prompt information is sent by the target execution device when the identifier of the received field is inconsistent with the target identifier stored in its own memory.

[0148] In one possible implementation, the receiving module 1303 is further configured to output the abnormal prompt information and terminate the processing of the information to be analyzed if it receives the abnormal prompt information sent by the target execution device.

[0149] Example 9:

[0150] Based on the above embodiments, this application also provides an electronic device. Figure 14 This application provides a schematic diagram of an electronic device structure, such as... Figure 14 As shown, it includes: processor 1401, communication interface 1402, memory 1403 and communication bus 1404, wherein processor 1401, communication interface 1402 and memory 1403 communicate with each other through communication bus 1404.

[0151] The memory 1403 stores a computer program, which, when executed by the processor 1401, causes the processor 1401 to perform the following steps:

[0152] Obtain the model to be fine-tuned, and for each domain, obtain the corresponding sample set. The model to be fine-tuned includes a common sub-model and a task sub-model, and the parameters in the common sub-model are fixed.

[0153] The sample set is input into the model to be fine-tuned, and the parameters in the task sub-model of the model to be fine-tuned are adjusted to obtain the target model.

[0154] The processor 1401 may also perform the following steps:

[0155] Obtain the information to be analyzed and the identifier of the domain to which the information to be analyzed belongs, and send the information to be analyzed to any execution device;

[0156] Receive a first target result fed back by any of the execution devices, wherein the first target result is an intermediate result output by the common sub-model of the finely tuned target model deployed in the execution device;

[0157] Based on the domain identifier and the domain to which the finely tuned target model is applied, the target execution device is determined; the first target result is sent to the target execution device.

[0158] The system receives and outputs a second target result fed back by the target execution device. The second target result is the result output by the task sub-model of the finely tuned target model deployed in the target execution device.

[0159] In one possible implementation, the processor 1401 is further configured to acquire current resource usage information for each execution device;

[0160] The first execution device with the lowest resource consumption is determined, and the information to be analyzed is sent to the first execution device.

[0161] In one possible implementation, the processor 1401 sends the prompt message and the text to be analyzed to any execution device;

[0162] The prompt information and the first target result are sent to the target execution device.

[0163] In one possible implementation, the processor 1401 sends the identifier of the field and the first result to the target execution device;

[0164] If no exception message is received from the target execution device, the subsequent steps of receiving and outputting the second target result fed back by the target execution device continue. The exception message is sent by the target execution device when the identifier of the received field is inconsistent with the target identifier stored in its own memory.

[0165] In one possible implementation, if the processor 1401 receives an exception notification from the target execution device, it outputs the exception notification and terminates the processing of the information to be analyzed.

[0166] The communication bus mentioned in the above electronic devices can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.

[0167] The communication interface 1402 is used for communication between the aforementioned electronic device and other devices. The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.

[0168] The processors mentioned above can be general-purpose processors, including central processing units, network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits, field-programmable gate arrays or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0169] Example 10:

[0170] Based on the above embodiments, this invention also provides a computer-readable storage medium storing a computer program executable by a processor. When the program runs on the processor, it causes the processor to perform the following steps:

[0171] Obtain the model to be fine-tuned, and for each domain, obtain the corresponding sample set. The model to be fine-tuned includes a common sub-model and a task sub-model, and the parameters in the common sub-model are fixed.

[0172] The sample set is input into the model to be fine-tuned, and the parameters in the task sub-model of the model to be fine-tuned are adjusted to obtain the target model.

[0173] The processor can also perform the following steps during execution:

[0174] Obtain the information to be analyzed and the identifier of the domain to which the information to be analyzed belongs, and send the information to be analyzed to any execution device;

[0175] Receive a first target result fed back by any of the execution devices, wherein the first target result is an intermediate result output by the common sub-model of the finely tuned target model deployed in the execution device;

[0176] Based on the domain identifier and the domain to which the finely tuned target model is applied, the target execution device is determined; the first target result is sent to the target execution device.

[0177] The system receives and outputs a second target result fed back by the target execution device. The second target result is the result output by the task sub-model of the finely tuned target model deployed in the target execution device.

[0178] In one possible implementation, sending the information to be analyzed to any execution device includes:

[0179] Obtain the current resource usage information for each execution device;

[0180] The first execution device with the lowest resource consumption is determined, and the information to be analyzed is sent to the first execution device.

[0181] In one possible implementation, if a prompt message corresponding to the information to be analyzed is obtained, sending the information to be analyzed to any execution device includes:

[0182] Send the prompt message and the text to be analyzed to any execution device;

[0183] Sending the first target result to the target execution device includes:

[0184] The prompt information and the first target result are sent to the target execution device.

[0185] In one possible implementation, sending the first target result to the target execution device includes:

[0186] Send the identifier of the domain and the first result to the target execution device;

[0187] After sending the first target result to the target execution device and before receiving and outputting the second target result fed back by the target execution device, the method further includes:

[0188] If no exception message is received from the target execution device, the subsequent steps of receiving and outputting the second target result fed back by the target execution device continue. The exception message is sent by the target execution device when the identifier of the received field is inconsistent with the target identifier stored in its own memory.

[0189] In one possible implementation, the method further includes:

[0190] If an error message is received from the target execution device, the error message is output and the processing of the information to be analyzed is terminated.

[0191] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0192] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0193] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0194] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0195] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A scheduling method, characterized in that, Applied to a server, the method includes: Obtain the information to be analyzed and the identifier of the domain to which the information to be analyzed belongs, and send the information to be analyzed to any execution device; Receive a first target result fed back by any of the execution devices, wherein the first target result is an intermediate result output by the common sub-model of the finely tuned target model deployed in the execution device; Based on the domain identifier and the domain to which the finely tuned target model is applied, the target execution device is determined; the first target result is sent to the target execution device. The system receives and outputs a second target result fed back by the target execution device. The second target result is the result output by the task sub-model of the finely tuned target model deployed in the target execution device.

2. The method of claim 1, wherein, The step of sending the information to be analyzed to any execution device includes: Obtain the current resource usage information for each execution device; The first execution device with the lowest resource consumption is determined, and the information to be analyzed is sent to the first execution device.

3. The method of claim 1, wherein, If a prompt message corresponding to the information to be analyzed is obtained, sending the information to be analyzed to any execution device includes: Send the prompt message and the information to be analyzed to any execution device; Sending the first target result to the target execution device includes: The prompt information and the first target result are sent to the target execution device.

4. The method of claim 1, wherein, Sending the first target result to the target execution device includes: Send the identifier of the domain and the first target result to the target execution device; After sending the first target result to the target execution device and before receiving and outputting the second target result fed back by the target execution device, the method further includes: If no exception message is received from the target execution device, the subsequent steps of receiving and outputting the second target result fed back by the target execution device continue. The exception message is sent by the target execution device when the identifier of the received field is inconsistent with the target identifier stored in its own memory.

5. The method of claim 4, wherein, The method further includes: If an error message is received from the target execution device, the error message is output and the processing of the information to be analyzed is terminated.

6. The method of claim 1, wherein, The fine-tuning training process for any target model includes: Obtain the model to be fine-tuned, and for each domain, obtain the corresponding sample set. The model to be fine-tuned includes a common sub-model and a task sub-model, and the parameters in the common sub-model are fixed. The sample set is input into the model to be fine-tuned, and the parameters in the task sub-model of the model to be fine-tuned are adjusted to obtain the target model.

7. A dispatch system characterized by, The system includes: a server and at least two execution devices; The server is configured to acquire information to be analyzed and the identifier of the domain to which the information to be analyzed belongs, send the information to be analyzed to any execution device; receive a first target result fed back by any execution device; determine a target execution device based on the identifier of the domain and the domain to which the fine-tuned target model deployed in each execution device applies; send the first target result to the target execution device; receive a second target result fed back by the target execution device and output it. Any execution device is configured to input the received information to be analyzed into a common sub-model of the deployed, finely tuned target model, and send the intermediate result output by the common sub-model as the first target result to the server; The target execution device is used to input the received first target result into the task sub-model of the deployed and finely tuned target model, and send the result output by the task sub-model as the second target result to the server.

8. The system of claim 7, wherein, The server is specifically configured to, if it obtains a prompt message corresponding to the information to be analyzed, send the prompt message and the information to be analyzed to any execution device; and send the prompt message and the first target result to the target execution device. The execution device is specifically used to input the received prompt information and the information to be analyzed into the common sub-model of the deployed and finely tuned target model, and send the intermediate result output by the common sub-model as the first target result to the server; The target execution device is specifically used to input the received prompt information and the first target result into the task sub-model of the deployed and finely tuned target model, and send the result output by the task sub-model as the second target result to the server.

9. The system of claim 7, wherein, The server is further configured to send the identifier of the domain and the first target result to the target execution device; if it receives an exception prompt message from the target execution device, it outputs the exception prompt message and ends the processing of the information to be analyzed; The target execution device is further configured to receive the identifier of the domain and the first target result, and if the received identifier of the domain is inconsistent with the target identifier stored therein, then send the abnormal prompt information to the server.

10. An electronic device, comprising: The electronic device includes at least a processor and a memory, wherein the processor is used to implement the steps of the scheduling method as described in any one of claims 1-6 when executing a computer program stored in the memory.

Citation Information

Patent Citations

  • Model training methods and device, electronic equipment and memory medium

    CN110782883A