Zero sample cross-model fusion utilization method and system based on data synthesis
Through multiple pre -training large -language models, the zero -sample span -model fusion and utilization data generated by multiple pre -training large language models solves the problem of low synthetic data quality and data distribution bias, and significantly improves the training performance of small models.
Patent Information
- Application Number
- CN202411236690.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-04
- Publication Date
- 2025-01-24
AI Technical Summary
In the prior art, when using large language models to generate synthetic data to train small models, the training performance of small models is affected due to the low quality of synthetic data and the low data distribution deviation.
The zero -sample span -model fusion and utilization data generated by multiple pre -trained large -language models is iterated to alleviate the deviation of data distribution and improve the quality of synthetic data. Specific methods include the tips of learning and below, and generate multiple synthetic datasets based on multiple pre -training large -language models to train multiple downstream task models, and determine cross -model fusion data sets through the preset data set quality assessment algorithm, update large languages The context learning prompt of the model until it reaches the number of preset iterations.
Through this method, it can significantly improve the quality of synthetic data, reduce data distribution deviation, and improve the training performance of small models.
Smart Images

Figure CN119358696A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a zero-sample cross-model fusion utilization method and system based on data synthesis. Background Art
[0002] With the rapid evolution and widespread application of large language model technology, its influence has penetrated into every corner of social and economic activities. Whether it is industry experts or the general public, large language models are frequently discussed as a focus. The reason is that large language models, with their unprecedented scale and complex architectural design, have a powerful ability to handle many complex real-world problems. Especially in dealing with the various challenges encountered in current life and production, large language models have shown extensive and in-depth application potential and can effectively cope with most tasks that traditionally rely on manpower. Large language models have attracted much attention because they have a huge number of parameters and can achieve highly intelligent functional execution in many fields after being trained with massive data. However, although large language models have achieved significant breakthroughs in functionality and intelligence, they cannot bypass a core constraint, that is, the high dependence on huge computing resources. Therefore, how to effectively balance the relationship between computing power requirements and efficiency while maintaining the powerful functions of large language models has become an important topic for future development in this field.
[0003] On the contrary, the "small model" (downstream task model) that processes downstream tasks is relatively lightweight, has a small number of parameters, a simple structure, is easy to deploy and operate in real time, and is more suitable for resource-constrained environments and scenarios. Although they may not perform as well as large language models in certain specific tasks, they are also indispensable in practical applications due to their high efficiency and convenience. While large language models continue to lead the wave of artificial intelligence, small models are also adapting to market demand and the pace of technological innovation, constantly improving their performance and scope of application. These two model forms have their own advantages and disadvantages, complement each other, and play an irreplaceable role in different application scenarios. Therefore, while paying attention to the development of large language models, we cannot ignore the iterative upgrade of small model technology and its important value in inclusive AI and edge computing. When the existing technology uses large language models to generate synthetic data to train small models, the quality of synthetic data is low and there is a problem of data distribution bias, which affects the training performance of small models. Summary of the invention
[0004] The present invention provides a zero-sample cross-model fusion utilization method and system based on data synthesis, which is used to solve the defects of low quality of synthetic data and data distribution bias when a large language model is used to generate synthetic data for training a small model in the prior art. The present invention uses zero-sample cross-model fusion utilization data generated by iteratively updating multiple pre-trained large language models, which can alleviate data distribution bias and improve the quality of synthetic data.
[0005] The present invention provides a zero-shot cross-model fusion utilization method based on data synthesis, comprising: generating multiple synthetic data sets in parallel based on multiple pre-trained large language models according to context learning prompts; training multiple downstream task models correspondingly based on the multiple synthetic data sets, and determining a cross-model fusion data set by using a preset data set quality assessment algorithm; the cross-model fusion data set is a data set selected from multiple initial synthetic data sets whose training quality for multiple downstream task models meets preset quality requirements; updating the context learning prompts of the multiple pre-trained large language models according to the cross-model fusion data set; and repeatedly iterating the steps of generating multiple synthetic data sets in parallel, determining the cross-model fusion data set, and updating the context learning prompt according to the context learning prompt until a preset number of iterations is reached to generate zero-shot cross-model fusion utilization data.
[0006] According to a zero-sample cross-model fusion and utilization method based on data synthesis provided by the present invention, after generating the zero-sample cross-model fusion and utilization data, it also includes: dynamically adjusting the training weight of the zero-sample cross-model fusion and utilization data in the training of multiple downstream task models through a preset bootstrap algorithm.
[0007] According to a zero-sample cross-model fusion utilization method based on data synthesis provided by the present invention, when the step of generating multiple synthetic data sets in parallel is executed for the first time, the context learning prompt is a zero-sample prompt; when the step of generating multiple synthetic data sets in parallel is executed in other rounds, the context learning prompt is a few-sample prompt; the context learning prompt word is a prompt with a description of task and classification category information.
[0008] According to a zero-sample cross-model fusion utilization method based on data synthesis provided by the present invention, multiple downstream task models are trained based on multiple synthetic data sets, and a preset data set quality assessment algorithm is used to determine a cross-model fusion data set, including: training multiple downstream task models based on multiple synthetic data sets, selecting inter-model uncertainty samples from the synthetic data sets; determining the cross-model fusion data set according to the inter-model uncertainty samples; the formula of the inter-model uncertainty samples is:
[0009] in, is an uncertainty indicator, STD is the standard deviation calculation function, Model for downstream tasks For synthetic datasets A sample of Belongs to the corresponding label The predicted value of the likelihood of the indicated class Model for downstream tasks For synthetic datasets A sample of Belongs to the corresponding label The predicted value of the likelihood of the indicated class, Model for downstream tasks For synthetic datasets A sample of Belongs to the corresponding label The predicted value of the likelihood of the indicated class, k For the k A large language model, i Subscript the sample. For the A large language model, K is the total number of large language models.
[0010] According to a zero-sample cross-model fusion utilization method based on data synthesis provided by the present invention, the context learning prompts of multiple pre-trained large language models are updated according to the cross-model fusion dataset, including: determining a newly generated sample set according to the cross-model fusion dataset; the newly generated sample set is different from the semantic description of the cross-model fusion dataset; and using the cross-model fusion dataset and the newly generated sample set as update prompt words to update the context learning prompts of multiple pre-trained large language models.
[0011] According to a zero-sample cross-model fusion utilization method based on data synthesis provided by the present invention, the formula of the preset bootstrap algorithm is:
[0012] in, is the weight adjustment coefficient, N The total number of samples generated for the large language model, Adjust the number of rounds for weights; For downstream task models, for samples The prediction error of Indicates that the downstream task model is for the sample The classification is correct, otherwise Indicates that the downstream task model is for the sample Misclassification, For the The sample weight of the round, For the The sample weight of the round, Update the round for the current sample weight, For downstream task models, for synthetic datasets A sample of Belongs to the corresponding label The predicted value of the likelihood of the indicated class.
[0013] The present invention also provides a zero-sample cross-model fusion and utilization system based on data synthesis, comprising: a synthetic data set generation module, which is used to generate multiple synthetic data sets in parallel based on multiple pre-trained large language models according to context learning prompts; a data set quality assessment module, which is used to train multiple downstream task models corresponding to the multiple synthetic data sets, and determine the cross-model fusion data set using a preset data set quality assessment algorithm; the cross-model fusion data set is a data set selected from multiple initial synthetic data sets whose training quality for the multiple downstream task models meets preset quality requirements; a context prompt update module, which is used to update the context learning prompts of the multiple pre-trained large language models according to the cross-model fusion data set; an iteration module, which is used to iteratively execute the steps of generating multiple synthetic data sets in parallel, determining the cross-model fusion data set and updating the context learning prompt according to the context learning prompts until a preset number of iterations is reached to generate zero-sample cross-model fusion and utilization data.
[0014] A zero-sample cross-model fusion utilization system based on data synthesis provided by the present invention also includes: a weight adjustment module, which is used to dynamically adjust the training weight of the zero-sample cross-model fusion utilization data in the training of multiple downstream task models through a preset bootstrap algorithm.
[0015] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, it implements any of the zero-sample cross-model fusion utilization methods based on data synthesis as described above.
[0016] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the zero-sample cross-model fusion utilization methods based on data synthesis as described above.
[0017] The present invention provides a method and system for zero-sample cross-model fusion utilization based on data synthesis, the method comprising: generating multiple synthetic data sets in parallel based on multiple pre-trained large language models according to context learning prompts; training multiple downstream task models correspondingly based on the multiple synthetic data sets, and determining the cross-model fusion data set using a preset data set quality assessment algorithm; updating the context learning prompts of multiple pre-trained large language models according to the cross-model fusion data set; repeating and iterating the steps of generating multiple synthetic data sets in parallel, determining the cross-model fusion data set, and updating the context learning prompts according to the context learning prompts until a preset number of iterations is reached, generating zero-sample cross-model fusion utilization data. The zero-sample cross-model fusion utilization data generated by iteratively updating multiple pre-trained large language models can alleviate data distribution bias and the quality of the synthesized data is higher. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0019] Figure 1 This is one of the flow charts of a zero-sample cross-model fusion utilization method based on data synthesis provided by the present invention.
[0020] Figure 2 This is the second flow chart of a zero-sample cross-model fusion utilization method based on data synthesis provided by the present invention.
[0021] Figure 3 It is a schematic diagram of the principle of a zero-sample cross-model fusion utilization method based on data synthesis provided by the present invention.
[0022] Figure 4 This is one of the structural schematic diagrams of a zero-sample cross-model fusion utilization system based on data synthesis provided by the present invention.
[0023] Figure 5 This is the second structural schematic diagram of a zero-sample cross-model fusion utilization system based on data synthesis provided by the present invention.
[0024] Figure 6 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0025] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0026] At present, large language models have demonstrated their strong versatility and problem-solving capabilities in many fields. Whether it is natural language processing, computer vision or other complex task challenges, large language models are promoting productivity progress and social change in an unprecedented way. Their powerful performance in simulation, optimization and creation makes them a key technical support for contemporary and future digital transformation. The reason why large language models are called "large" is that the scale of their internal parameters is huge. The number of parameters in the hundreds of millions or even trillions enables them to capture deeper data features and patterns. Typical representatives of such models include OpenAI's GPT series and Google's Gemimi series. However, it is precisely this huge parameter scale that directly leads to an exponential growth in the demand for computing power. That is, although the capability boundary is constantly expanding to the limit, it faces severe challenges in terms of operating efficiency and energy consumption. On the contrary, small models refer to model structures with a relatively limited number of parameters, generally ranging from millions to tens of millions of elements, or even hundreds of millions of elements. Due to their simplicity and efficiency, such models are more popular in environments with limited computing resources, such as mobile devices and embedded applications on IoT devices. Although the small model may not be as good as the large language model in absolute performance, it can achieve faster response speed, lower energy consumption and more convenient deployment while meeting specific task requirements.
[0027] Model training requires a large amount of high-quality data, but it is not easy to collect such data. Because many business problem scenarios solved by AI models involve the need to access sensitive customer data, such as personal identity information and health information. First, the collection and use of sensitive data will cause privacy issues and will be vulnerable to information leakage. Secondly, some types of data collection are expensive or very rare. Compared with collecting large data sets, generating synthetic data is cheap and can support AI models without compromising customer privacy. Synthetic data is artificially created data rather than data generated by actual events. It is usually created with the help of algorithms. It can be widely used in various scenarios. Synthetic data is also a kind of data enhancement. When the existing technology uses a large language model to generate synthetic data to train a small model, the quality of the synthetic data is low and there is a problem of data distribution bias, which affects the training performance of the small model.
[0028] Please refer to Figure 1 , Figure 1 One of the flow charts of a zero-sample cross-model fusion utilization method based on data synthesis provided by the present invention.
[0029] Please refer to Figure 2 , Figure 2 The second flowchart of a zero-sample cross-model fusion utilization method based on data synthesis provided by the present invention.
[0030] Please refer to Figure 3 , Figure 3 A schematic diagram of the principle of a zero-sample cross-model fusion utilization method based on data synthesis provided by the present invention.
[0031] In order to solve the technical problems existing in the prior art, the present invention provides a zero-sample cross-model fusion utilization method based on data synthesis, comprising: 101: Generate multiple synthetic datasets in parallel based on multiple pre-trained large language models according to contextual learning prompts.
[0032] As a preferred embodiment, when executing the step of generating multiple synthetic data sets in parallel for the first time, the context learning prompt is a zero-sample prompt; when executing the step of generating multiple synthetic data sets in parallel in other rounds, the context learning prompt is a few-sample prompt; the context learning prompt word is a prompt with a description of the task and classification category information.
[0033] In this embodiment, Pre-trained large language model Learn hints based on given context The corresponding size generated is Synthetic dataset ,in, Target synthetic dataset size generated for each pre-trained large language model given in advance; contextual learning hints For prompts with descriptions of tasks and classification category information, Generate rounds for the sample. When this step is performed for the first time, is a zero-shot prompt; in other rounds, contextual learning prompts are used to generate multiple synthetic datasets in parallel. This is a few-shot prompt. The samples are from Overall feedback on synthetic data generation. Each synthetic dataset Further train a small model on its own In this step, the knowledge of multiple pre-trained large language models is transferred from the pre-trained large language model to the synthetic dataset in a secure way (on the model side, the parameters of the large model itself do not go out of domain; on the user side, the user's own private data does not go out of domain), and further transferred to the small model of the downstream task (downstream task model).
[0034] 102: Based on multiple synthetic data sets, multiple downstream task models are trained accordingly, and a preset data set quality assessment algorithm is used to determine a cross-model fusion data set; the cross-model fusion data set is a data set selected from multiple initial synthetic data sets to evaluate the training quality of multiple downstream task models and meet preset quality requirements.
[0035] As a preferred embodiment, multiple downstream task models are trained based on multiple synthetic data sets, and a preset data set quality assessment algorithm is used to determine a cross-model fusion data set, including: training multiple downstream task models based on multiple synthetic data sets, selecting model uncertainty samples from the synthetic data sets; determining a cross-model fusion data set according to the model uncertainty samples; the formula for the model uncertainty samples is:
[0036] in, is an uncertainty indicator, STD is the standard deviation calculation function, Model for downstream tasks For synthetic datasets A sample of Belongs to the corresponding label The predicted value of the likelihood of the indicated class Model for downstream tasks For synthetic datasets A sample of Belongs to the corresponding label The predicted value of the likelihood of the indicated class, Model for downstream tasks For synthetic datasets A sample of Belongs to the corresponding label The predicted value of the likelihood of the indicated class, k For the k A large language model, i Subscript the sample. For the A large language model, K is the total number of large language models.
[0037] The samples that are most effective for downstream task model training (the samples that have the greatest influence on local small model training) are the most worthy samples to be synthesized. To screen out these samples, in this embodiment, Training a small model , and calculate Medium Sample The influence function The larger the influence function value, the greater the influence of the sample on the training. For calculation Medium Sample The influence function of For the k The pre-trained model generates i samples, for The corresponding generated tags are: is the preset validation set, For θ The derivation of For the loss function L The derivation of are the new optimal model parameters, are the current model parameters, For The Hessian matrix of the second derivative of .
[0038] However, the influence function calculation is complex and time-consuming. To solve this problem and ensure the diversity of synthetic samples, this embodiment trains multiple downstream task models based on multiple synthetic data sets, calculates the "inter-model uncertainty index" of the samples, and then selects the synthetic data set. The most uncertain of all samples and the one with the least uncertainty , among which , is an adjustable hyperparameter. samples (uncertain samples between models) enter the subsequent influence function calculation step, and finally select The largest samples, which are used as samples for context learning in subsequent steps and fed back to Pre-trained language models In the embodiment, the most effective synthetic samples (cross-model fusion datasets) for downstream task model training are selected, and the most useful knowledge for downstream tasks from multiple large language models in the library are integrated together.
[0039] 103: Updating contextual learning hints for multiple pre-trained large language models based on a cross-model fusion dataset.
[0040] As a preferred embodiment, the context learning prompts of multiple pre-trained large language models are updated according to a cross-model fusion dataset, including: determining a newly generated sample set according to the cross-model fusion dataset; the semantic description of the newly generated sample set is different from that of the cross-model fusion dataset; and using the cross-model fusion dataset and the newly generated sample set as update prompt words to update the context learning prompts of multiple pre-trained large language models.
[0041] In this embodiment, the screened context learning samples (cross-model fusion datasets) are used to construct few-shot context learning hints , and further passed to A pre-trained large language model. The sample context learning samples come from different pre-trained large language models. This step transfers the capabilities of different large language models to other large language models, completes zero-sample cross-model fusion and uses data generation guidance to improve the distribution quality of synthetic data of each large language model.
[0042] Tips on designing few-shot context learning When constructing the method, it is considered that when the pre-trained large language model is prompted with context learning samples, the newly generated samples tend to be very similar to the context learning samples. In this embodiment, in the context learning prompt The restriction "different from the previous sample description" is added to require that the newly generated synthetic samples (newly generated sample set) and the context learning samples (cross-model fusion dataset) are different in semantic description, further increasing the diversity of synthetic samples. Then, the cross-model fusion dataset and the newly generated sample set are used as update prompts to update the context learning prompts of multiple pre-trained large language models.
[0043] 104: Repeat the steps of generating multiple synthetic data sets in parallel, determining the cross-model fusion data sets, and updating the contextual learning prompts according to the contextual learning prompts until a preset number of iterations is reached to generate zero-sample cross-model fusion utilization data.
[0044] As a preferred embodiment, after generating zero-sample cross-model fusion utilization data, the method further includes: 105: Dynamically adjust the training weights of zero-shot cross-model fusion data in multiple downstream task model training through a preset bootstrap algorithm.
[0045] As a preferred embodiment, the formula of the preset bootstrap algorithm is:
[0046] in, is the weight adjustment coefficient,N The total number of samples generated for the large language model, Adjust the number of rounds for weights For downstream task models, for samples The prediction error of Indicates that the downstream task model is for the sample The classification is correct, otherwise Indicates that the downstream task model is for the sample Misclassification, For the The sample weight of the round, For the The sample weight of the round, Update the round for the current sample weight, For downstream task models, for synthetic datasets A sample of Belongs to the corresponding label The predicted value of the likelihood of the indicated class.
[0047] In this embodiment, each large language model generates After synthesizing data samples, we use Training small models for downstream tasks To further enhance The sample quality is improved by using a preset bootstrap algorithm to dynamically adjust the training weights of zero-shot cross-model fusion utilization data in the training of multiple downstream task models. First, a unified sample weight is initialized for each sample of the zero-shot cross-model fusion utilization data. In each subsequent round of training of the downstream task model, the weights of samples that are misclassified by the downstream task model are reduced. That is, in the first After one round of training, the weight of each sample is adjusted to After adjustment, all sample weights are normalized to ensure This step reduces the impact of low-quality data on downstream task models by reducing the sample weights of synthetic samples that are not easy to learn for large language models.
[0048] The zero-sample cross-model fusion and utilization system based on data synthesis provided by the present invention is described below. The zero-sample cross-model fusion and utilization system based on data synthesis described below and the zero-sample cross-model fusion and utilization method based on data synthesis described above can be referenced to each other.
[0049] Please refer to Figure 4 , Figure 4 This is one of the structural schematic diagrams of a zero-sample cross-model fusion utilization system based on data synthesis provided by the present invention.
[0050] The present invention also provides a zero-sample cross-model fusion and utilization system based on data synthesis, comprising: a synthetic data set generation module 1, which is used to generate multiple synthetic data sets in parallel based on multiple pre-trained large language models according to context learning prompts; a data set quality assessment module 2, which is used to train multiple downstream task models correspondingly based on the multiple synthetic data sets, and determine the cross-model fusion data set by using a preset data set quality assessment algorithm; the cross-model fusion data set is a data set selected from multiple initial synthetic data sets whose training quality for multiple downstream task models meets preset quality requirements; a context prompt update module 3, which is used to update the context learning prompts of multiple pre-trained large language models according to the cross-model fusion data set; an iteration module 4, which is used to iteratively execute the steps of generating multiple synthetic data sets in parallel, determining the cross-model fusion data set and updating the context learning prompt according to the context learning prompts until the preset number of iterations is reached to generate zero-sample cross-model fusion and utilization data.
[0051] Please refer to Figure 5 , Figure 5 The second structural schematic diagram of a zero-sample cross-model fusion utilization system based on data synthesis provided by the present invention.
[0052] As a preferred embodiment, it also includes: a weight adjustment module 5, which is used to dynamically adjust the training weights of zero-sample cross-model fusion utilization data in the training of multiple downstream task models through a preset bootstrap algorithm.
[0053] Figure 6 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 6As shown, the electronic device may include: a processor 610, a communication interface 620, a memory 630 and a communication bus 640, wherein the processor 610, the communication interface 620 and the memory 630 communicate with each other through the communication bus 640. The processor 610 may call the logic instructions in the memory 630 to execute a zero-sample cross-model fusion utilization method based on data synthesis, the method comprising: generating multiple synthetic data sets in parallel based on multiple pre-trained large language models according to context learning prompts; training multiple downstream task models correspondingly based on the multiple synthetic data sets, and determining a cross-model fusion data set using a preset data set quality assessment algorithm; the cross-model fusion data set is a data set selected from multiple initial synthetic data sets whose training quality for multiple downstream task models meets preset quality requirements; updating the context learning prompts of multiple pre-trained large language models according to the cross-model fusion data set; and repeatedly iterating the steps of generating multiple synthetic data sets in parallel, determining the cross-model fusion data set and updating the context learning prompt according to the context learning prompt until the preset number of iterations is reached to generate zero-sample cross-model fusion utilization data.
[0054] In addition, the logic instructions in the above-mentioned memory 630 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0055] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the zero-sample cross-model fusion and utilization method based on data synthesis provided by the above methods, the method including: generating multiple synthetic data sets in parallel based on multiple pre-trained large language models according to context learning prompts; training multiple downstream task models based on the multiple synthetic data sets, and determining a cross-model fusion data set using a preset data set quality assessment algorithm; the cross-model fusion data set is a data set selected from multiple initial synthetic data sets whose training quality for multiple downstream task models meets preset quality requirements; updating the context learning prompts of multiple pre-trained large language models according to the cross-model fusion data set; repeatedly iteratively executing the steps of generating multiple synthetic data sets in parallel, determining the cross-model fusion data set, and updating the context learning prompts according to the context learning prompts until a preset number of iterations is reached to generate zero-sample cross-model fusion and utilization data.
[0056] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the zero-sample cross-model fusion and utilization method based on data synthesis provided by the above-mentioned methods, the method comprising: generating multiple synthetic data sets in parallel based on multiple pre-trained large language models according to context learning prompts; training multiple downstream task models correspondingly based on the multiple synthetic data sets, and determining a cross-model fusion data set using a preset data set quality assessment algorithm; the cross-model fusion data set is a data set selected from multiple initial synthetic data sets whose training quality for multiple downstream task models meets preset quality requirements; updating the context learning prompts of multiple pre-trained large language models according to the cross-model fusion data set; repeatedly and iteratively executing the steps of generating multiple synthetic data sets in parallel, determining the cross-model fusion data set, and updating the context learning prompts according to the context learning prompts until a preset number of iterations is reached to generate zero-sample cross-model fusion and utilization data.
[0057] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0058] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0059] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A zero-shot cross-model fusion utilization method based on data synthesis, characterized in that: include: Based on contextual learning prompts, multiple synthetic datasets are generated in parallel based on multiple pre-trained large language models; Based on the multiple synthetic data sets, multiple downstream task models are trained accordingly, and a preset data set quality assessment algorithm is used to determine a cross-model fusion data set; The cross-model fusion dataset is a dataset selected from multiple initial synthetic datasets to evaluate the training quality of multiple downstream task models and meet preset quality requirements; Updating contextual learning prompts of a plurality of the pre-trained large language models according to the cross-model fusion dataset; The steps of generating multiple synthetic data sets in parallel, determining a cross-model fusion data set, and updating the contextual learning prompts are repeatedly and iteratively executed according to the contextual learning prompts until a preset number of iterations is reached to generate zero-sample cross-model fusion utilization data.
2. The zero-sample cross-model fusion utilization method based on data synthesis according to claim 1 is characterized in that: After generating zero-sample cross-model fusion utilization data, the method further includes: The training weights of the zero-sample cross-model fusion utilization data in the training of multiple downstream task models are dynamically adjusted through a preset bootstrap algorithm.
3. The zero-sample cross-model fusion utilization method based on data synthesis according to claim 1 is characterized in that: When the step of generating multiple synthetic data sets in parallel is executed for the first time, the context learning prompt is a zero-sample prompt; when the step of generating multiple synthetic data sets in parallel is executed in other rounds, the context learning prompt is a few-sample prompt; the context learning prompt word is a prompt with a description of the task and classification category information.
4. The zero-sample cross-model fusion utilization method based on data synthesis according to claim 1 is characterized in that: The method of training a plurality of downstream task models based on the plurality of synthetic data sets and determining a cross-model fusion data set using a preset data set quality assessment algorithm includes: Training a plurality of downstream task models based on the plurality of synthetic data sets, and selecting uncertainty samples between models from the synthetic data sets; Determine the cross-model fusion data set according to the uncertainty samples between the models; The formula for the uncertainty sample between the models is: in, is an uncertainty indicator, STD is the standard deviation calculation function, Model for downstream tasks For synthetic datasets A sample of Belongs to the corresponding label The predicted value of the likelihood of the indicated class, Model for downstream tasks For synthetic datasets A sample of Belongs to the corresponding label The predicted value of the likelihood of the indicated class, Model for downstream tasks For synthetic datasets A sample of Belongs to the corresponding label The predicted value of the likelihood of the indicated class, k For the k A large language model, i Subscript the sample. For the A large language model, K is the total number of large language models.
5. The zero-sample cross-model fusion utilization method based on data synthesis according to claim 1 is characterized in that: The updating of the contextual learning prompts of the plurality of pre-trained large language models according to the cross-model fusion dataset comprises: Determine a newly generated sample set according to the cross-model fusion dataset; the newly generated sample set has a different semantic description from the cross-model fusion dataset; The cross-model fusion dataset and the newly generated sample set are used as update prompt words to update the context learning prompts of the multiple pre-trained large language models.
6. The zero-sample cross-model fusion utilization method based on data synthesis according to claim 2 is characterized in that: The formula of the preset bootstrap algorithm is: in, is the weight adjustment coefficient, N The total number of samples generated for the large language model, Adjust the number of rounds for weights; For downstream task models, for samples The prediction error of Indicates that the downstream task model is for the sample The classification is correct, otherwise Indicates that the downstream task model is for the sample Misclassification, For the The sample weight of the round, For the The sample weight of the round, Update the round for the current sample weight, For downstream task models, for synthetic datasets A sample of Belongs to the corresponding label The predicted value of the likelihood of the indicated class.
7. A zero-shot cross-model fusion utilization system based on data synthesis, characterized in that: include: A synthetic dataset generation module, which is used to generate multiple synthetic datasets in parallel based on multiple pre-trained large language models according to contextual learning prompts; A data set quality assessment module, used to train multiple downstream task models based on the multiple synthetic data sets, and determine a cross-model fusion data set using a preset data set quality assessment algorithm; The cross-model fusion dataset is a dataset selected from multiple initial synthetic datasets to evaluate the training quality of multiple downstream task models and meet preset quality requirements; A contextual prompt updating module, used for updating the contextual learning prompts of the plurality of pre-trained large language models according to the cross-model fusion dataset; An iteration module is used to repeatedly iterate the steps of generating multiple synthetic data sets in parallel, determining a cross-model fusion data set, and updating the context learning prompts according to the context learning prompts until a preset number of iterations is reached to generate zero-sample cross-model fusion utilization data.
8. The zero-sample cross-model fusion utilization system based on data synthesis according to claim 7 is characterized in that: Also includes: A weight adjustment module is used to dynamically adjust the training weights of the zero-sample cross-model fusion utilization data in the training of multiple downstream task models through a preset bootstrap algorithm.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, it implements the zero-sample cross-model fusion utilization method based on data synthesis as described in any one of claims 1 to 6.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, it implements the zero-sample cross-model fusion utilization method based on data synthesis as described in any one of claims 1 to 6.
Citation Information
Cited By
Task processing method, system and device for multi-model fusion and electronic equipment
CN121478456A