Large model training and data enhancement method and device, equipment and medium

Through active learning and data enhancement methods of pre-trained large models, combined with quality classification models and model fine-tuning technology in the target field, the problem of low quality of large model training and data enhancement results is solved, and high-quality data enhancement results and model performance are achieved. .

CN119336906AActive Publication Date: 2025-01-21BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411266526.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-10
Publication Date
2025-01-21
Estimated Expiration
2044-09-10

AI Technical Summary

Technical Problem

How to improve the quality of large model training and data augmentation results, especially in ensuring data quality.

Method used

Use a pre -training large model for active learning. Based on the seed sentences and initial prompt words, the target reminder words are obtained, and then the data is enhanced by using these prompts to enhance the sequential sentences to obtain the initial data enhancement result. Then, the quality classification model based on the target field actively learns the initial data enhancement results and obtain the results of the target data enhancement results. Finally, the pre -training large model is fine -tuned based on the results of the seed sentences, target prompts and target data enhancement results, and the target model in the target field is obtained.

Benefits of technology

Through the above methods, the quality of data augmentation results can be significantly improved and the performance of the model after training can be ensured to reach the best state.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119336906A_ABST
    Figure CN119336906A_ABST
Patent Text Reader

Abstract

The invention provides a large model training and data enhancement method and device, equipment and a medium, and relates to the technical field of artificial intelligence, in particular to the technical fields of natural language processing, deep learning, large models and the like. The large model training method comprises the steps of adopting a pre-training large model, and performing active learning based on a seed sentence and an initial cue word to obtain a target cue word; performing data enhancement based on the seed sentence and the target prompt word by adopting the pre-trained large model to obtain an initial data enhancement result; based on a quality classification model of a target domain, performing active learning on the initial data enhancement result to obtain a target data enhancement result; and based on the seed sentence, the target cue word and the target data enhancement result, performing fine tuning on the pre-trained large model to obtain a target large model of the target field.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of artificial intelligence technology, specifically to the technical fields of natural language processing, deep learning, large models, etc., and in particular to a large model training and data enhancement method, device, equipment and storage medium. Background Art

[0002] Based on the generative capability of the Large Language Model (LLM), a large amount of synthetic data can be output by expanding and imitating seed sentences, but the data quality cannot be guaranteed. High-quality training data is crucial to the performance of the model after training.

[0003] How to improve the quality of data augmentation results is a problem that needs to be solved. Summary of the invention

[0004] The present invention provides a large model training and data enhancement method, device, equipment and storage medium.

[0005] According to one aspect of the present disclosure, a large model training method is provided, including: using a pre-trained large model, performing active learning based on a seed sentence and an initial prompt word to obtain a target prompt word; using the pre-trained large model, performing data enhancement based on the seed sentence and the target prompt word to obtain an initial data enhancement result; based on a quality classification model of a target domain, performing active learning on the initial data enhancement result to obtain a target data enhancement result; based on the seed sentence, the target prompt word and the target data enhancement result, fine-tuning the pre-trained large model to obtain a target large model of the target domain.

[0006] According to another aspect of the present disclosure, a data enhancement method based on a large model is provided, comprising: obtaining a seed sentence and a prompt word; using a target large model to perform data enhancement on the seed sentence and the prompt word to obtain a data enhancement result; wherein the target large model is trained using any of the methods described in any of the above aspects.

[0007] According to another aspect of the present disclosure, a large model training device is provided, including: a warm-up module, used to adopt a pre-trained large model, and perform active learning based on a seed sentence and an initial prompt word to obtain a target prompt word; an enhancement module, used to adopt the pre-trained large model, and perform data enhancement based on the seed sentence and the target prompt word to obtain an initial data enhancement result; a learning module, used to actively learn the initial data enhancement result based on a quality classification model of a target domain to obtain a target data enhancement result; a fine-tuning module, used to fine-tune the pre-trained large model based on the seed sentence, the target prompt word and the target data enhancement result to obtain a target large model of the target domain.

[0008] According to another aspect of the present disclosure, a data enhancement device based on a large model is provided, including: an acquisition module for acquiring seed sentences and prompt words; an enhancement module for using a target large model to perform data enhancement on the seed sentences and the prompt words to obtain data enhancement results; wherein the target large model is trained using any of the methods described in any of the above aspects.

[0009] According to another aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute any method as described in any of the above aspects.

[0010] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute any one of the methods according to any one of the above aspects.

[0011] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the computer program implements any one of the methods described in any one of the above aspects.

[0012] The disclosed embodiments can improve the quality of data enhancement results.

[0013] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.

[0015] Figure 1is a schematic diagram according to a first embodiment of the present disclosure;

[0016] Figure 2 is a schematic diagram of an application scenario for implementing an embodiment of the present disclosure;

[0017] Figure 3 is a schematic diagram according to a second embodiment of the present disclosure;

[0018] Figure 4 is a schematic diagram according to a third embodiment of the present disclosure;

[0019] Figure 5 is a schematic diagram according to a fourth embodiment of the present disclosure;

[0020] Figure 6 is a schematic diagram according to a fifth embodiment of the present disclosure;

[0021] Figure 7 It is a schematic diagram of an electronic device used to implement the large model training method or the large model-based data enhancement method of the embodiment of the present disclosure. DETAILED DESCRIPTION

[0022] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0023] In order to better understand the embodiments of the present disclosure, the terms involved in the embodiments of the present disclosure are explained as follows:

[0024] Data augmentation: It is the process of generating new data from existing data, mainly used to train new machine learning (ML) models. ML models require a large and diverse data set during training, and data augmentation techniques generate new training samples by modifying existing data, thereby improving the generalization ability and robustness of the model.

[0025] Synthetic data: data constructed through model generation rather than real-world data.

[0026] Active learning: A machine learning method that allows the model to select the most valuable data to learn during the training process, thereby optimizing the performance of the model. During the learning process, the learner selects unlabeled samples and requests labeling information from the outside world, with the goal of using as few queries as possible to achieve good learning performance.

[0027] In order to improve the quality of data enhancement results, the present disclosure provides the following embodiments.

[0028] Figure 1 is a schematic diagram according to the first embodiment of the present disclosure. This embodiment provides a large model training method, the method comprising:

[0029] 101. Use a pre-trained large model to perform active learning based on seed sentences and initial prompt words to obtain the target prompt words.

[0030] 102. Using the pre-trained large model, perform data enhancement based on the seed sentence and the target prompt word to obtain an initial data enhancement result.

[0031] 103. Based on the classification model of the target domain, actively learn the initial data enhancement result to obtain the target data enhancement result.

[0032] 104. Based on the seed sentence, the target prompt word and the target data enhancement result, fine-tune the pre-trained large model to obtain a target large model of the target domain.

[0033] Among them, the large model (LLM) is a deep learning model with a larger parameter scale, which can generate natural language text or understand the meaning of language text. The large model can handle a variety of natural language tasks, such as text classification, question and answer, dialogue, etc., and is an important path to artificial intelligence.

[0034] Deep learning models can be divided into pre-training models and fine-tuning models. Pre-training models are pre-trained on a large dataset containing a large amount of data to learn common features, and fine-tuning models are fine-tuned on a small dataset for a specific task to optimize performance.

[0035] In the disclosed embodiment, for the big model, the general model in each field is called the pre-trained big model, and the model fine-tuned for the target field is called the target big model.

[0036] In addition, the embodiments of the present disclosure mainly utilize the generation capability of the large model to perform data enhancement through the large model to obtain data enhancement results, that is, the large model is used to perform data enhancement processing on existing data to obtain synthetic data as the data enhancement result.

[0037] Seed sentences are a type of text data that serves as the basic data for data enhancement and is existing data.

[0038] Prompt, which is used to guide the big model to perform data enhancement processing, is also text, for example, instructing the big model to add details, transform emotions, and convert context to the seed sentence.

[0039] In the disclosed embodiment, the prompt words are divided into initial prompt words and target prompt words.

[0040] The initial prompt word is an initially set prompt word, for example, manually designed.

[0041] The target prompt words are obtained by adjusting the initial prompt words, such as modifying the language style, adding contextual information, adjusting the question statement, etc., to improve the quality of the synthetic data obtained by the large model.

[0042] The seed sentence, the initial prompt word and the target prompt word may be one or more. In the case of multiple numbers, they may constitute a seed sentence set, an initial prompt word set and a target prompt word set respectively.

[0043] In the disclosed embodiment, the target prompt word is obtained based on the active learning method. Specifically, a pre-trained large model can be used to perform data enhancement on the input seed sentence and the initial prompt word to obtain a small amount (such as hundreds to thousands) of synthetic data, and the synthetic data is manually annotated. The pre-trained large model then adjusts the initial prompt word according to the manual annotation result to obtain the target prompt word.

[0044] After obtaining the seed sentences and target prompt words, they are input into the pre-trained large model, and the pre-trained large model is used to perform batch data enhancement on the seed sentences and target prompt words to obtain the initial data enhancement results. Batch processing means that each seed sentence is processed using each target prompt word separately. In this way, assuming that there are M seed sentences and N target prompt words, M*N synthetic data (initial data enhancement results) can be obtained, where M and N are both positive integers.

[0045] After obtaining the initial data enhancement results, the quality classification model of the target domain is used to actively learn the initial data enhancement results to obtain the target data enhancement results.

[0046] The quality classification model is used to determine the quality category of the initial data enhancement results. Specifically, the quality classification can be divided into high, medium, and low. For high-quality initial data enhancement results, they can be directly used as target data enhancement results. For low-quality initial data enhancement results, they can be directly discarded. For medium-quality initial data enhancement results, the initial data enhancement results can be manually annotated to mark whether they are usable. If they are usable, they will be used as target data enhancement results, otherwise they will be discarded.

[0047] The quality classification model is pre-trained. The quality classification models in different fields are trained using training samples in the corresponding fields to evaluate the quality of synthetic data (data enhancement results) in the corresponding fields.

[0048] After obtaining the target data enhancement results, the pre-trained large model is fine-tuned using the seed sentences, target prompt words, and target data enhancement results to obtain the target large model for the target domain.

[0049] After obtaining the target large model, in the application stage, the target large model can be used to perform data enhancement to obtain data enhancement results.

[0050] In this embodiment, the target prompt word is obtained by actively learning the seed sentence and the initial prompt word, the initial data enhancement result is obtained based on the seed sentence and the target prompt word, the initial data enhancement result is actively learned to obtain the target data enhancement result, and the pre-trained large model is fine-tuned based on the seed sentence, the target prompt word and the target data enhancement result to obtain the target large model, which can improve the effect of the target large model, and then when the target large model is used for data enhancement, the quality of the data enhancement result is improved.

[0051] In order to better understand the embodiments of the present disclosure, application scenarios to which the embodiments of the present disclosure can be applied are described.

[0052] Figure 2 It is a schematic diagram of an application scenario for implementing the embodiment of the present disclosure.

[0053] like Figure 2 As shown in the figure, the training phase mainly includes: warm-up phase, data enhancement phase, active learning phase and enhanced data application phase.

[0054] In this embodiment, it is taken as an example that seed sentences constitute a seed sentence set, initial prompt words constitute an initial prompt word set, and target prompt words constitute a target prompt word set.

[0055] Initially, obtain the existing pre-trained large model M, seed sentence set Q and initial prompt word set p. The pre-trained large model is obtained after pre-training with a large amount of data; the seed sentence set is the existing data; the initial prompt word set can be manually set to indicate the data enhancement operation.

[0056] For the warm-up stage: the main thing is to obtain the target prompt word set P.

[0057] Specifically, at least part of the seed sentences in the seed sentence set and at least part of the initial prompt words in the initial prompt word set are input into the pre-trained large model, and the output is synthetic data obtained after data enhancement of the seed sentences according to the initial prompt words.

[0058] In order to reduce the amount of subsequent manual labeling, a small amount of synthetic data can be generated in the warm-up phase, such as dozens of synthetic data, but in order to improve generalization, all fields should be covered as much as possible.

[0059] After obtaining the synthetic data, the annotation team will manually annotate the synthetic data. Specifically, the professional annotation team can conduct a detailed review of the generated synthetic data, including the evaluation of the subject relevance, content accuracy, logical coherence, etc., and annotate whether the synthetic data meets expectations based on the evaluation results.

[0060] If it meets expectations, the initial prompt word set p is used as the target prompt word set P.

[0061] If it does not meet expectations, the initial prompt word set p is updated, for example, the language style is modified, context information is added, the question statement is adjusted, etc. Afterwards, the above data enhancement process is repeated using the updated prompt word set until the target prompt word set that meets expectations is obtained.

[0062] For the data enhancement stage: use the pre-trained large model M, perform data enhancement based on the seed sentence set Q and the target prompt word set P, and obtain the initial data enhancement result D.

[0063] Specifically, the pre-trained large model M will traverse each sentence in the seed sentence set Q and operate in combination with different prompt words in the target prompt word set P. For each sentence in Q, M will generate a series of variants or related sentences based on the prompt words in P. These variants may include but are not limited to:

[0064] Adding details: adding descriptive details to the sentence to make it richer;

[0065] Sentiment transformation: adjust the sentiment of a sentence, such as changing it from a positive evaluation to a negative evaluation;

[0066] Context transfer: Put sentences into different contexts to test the performance of the model in different scenarios.

[0067] Finally, the pre-trained large model M generates the initial data enhancement result D based on the seed sentence set Q and the prompt word set P for subsequent data fine screening.

[0068] For the active learning stage: mainly screen the initial data enhancement result D to obtain the target data enhancement result D'.

[0069] Among them, data filtering can be performed first, and then the filtered results can be further screened based on the active learning method.

[0070] Specifically, with respect to filtering: low-quality data and duplicate data in the initial data enhancement results can be removed based on predefined rules.

[0071] This may include: Defining low-quality data standards: Based on business requirements and data characteristics, define the standards for low-quality data, such as missing key fields, extreme data distribution, etc.;

[0072] Filter out low-quality data based on strategies: Use sentence attribute features (such as word repetition in sentences, sentence length that is too long or too short, and repetition between generated sentences and seed sentences) to filter out low-quality data;

[0073] Detect and delete duplicate data: Use K-Nearest Neighbor (KNN) algorithm, similarity calculation and other methods to identify and delete semantically duplicate data to ensure the semantic uniqueness of the data.

[0074] For active learning: the filtered and retained data from the initial data augmentation results are input into the quality classification model, and the output is the quality classification result.

[0075] The quality classification model is used to classify the quality of data. It is a pre-trained classification model. Different fields can train their own quality classification models.

[0076] In this embodiment, the quality classification model is a three-classification model, based on which the quality classification results include: high, medium, and low. High-quality data is directly used for subsequent applications, that is, as the target data data addition result; medium-quality data is sent for labeling; and low-quality data is removed.

[0077] The labeling team manually labels the medium-quality data to mark whether it is usable. If it is usable, it is retained as the target data enhancement result, otherwise it is removed.

[0078] In addition, the quality classification model can be iteratively trained based on the manual annotation results to update the quality classification model, and then the updated quality classification model can be used to re-classify the data for quality. This can improve the accuracy of the quality classification model, improve the accuracy of the data classification results, and improve the quality of the enhanced results of the selected target data.

[0079] For the application stage: mainly use the target prompt word set P, seed sentence set Q and target data enhancement result D' to fine-tune the pre-trained large model M to obtain the target large model M'.

[0080] Specifically, the target prompt word set P, the seed sentence set Q and the target data enhancement result D' are used as the Supervised Fine-Tuning (SFT) dataset, and the pre-trained large model M is fine-tuned using the SFT dataset to obtain the target large model M' of the target domain.

[0081] The target large model M' not only inherits the broad knowledge base and powerful generation capabilities of the pre-trained large model M, but also acquires the ability to accurately respond to special task prompts through SFT training, and can generate high-quality data that better meets task requirements.

[0082] In combination with the above application scenarios, the present disclosure also provides the following embodiments.

[0083] Figure 3 is a schematic diagram according to the second embodiment of the present disclosure. This embodiment provides a large model training method, the method comprising:

[0084] 301. Use a pre-trained large model to perform data augmentation on the input seed sentences and initial prompt words to obtain synthetic data.

[0085] 302. Obtain manual annotation results of the synthetic data.

[0086] 303. Obtain a target prompt word based on the manual labeling result.

[0087] Among them, the seed sentence and the initial prompt word are existing data. The initial prompt word is used to indicate the data enhancement operation on the seed sentence. The seed sentence and the initial prompt word are input into the pre-trained large model. The pre-trained large model performs data enhancement on the seed sentence according to the instruction of the initial prompt word, and the output is synthetic data.

[0088] After obtaining the synthetic data, it is manually annotated to obtain the manual annotation results.

[0089] If the manual labeling results show that the synthesized data meets expectations, the initial prompt word is used as the target prompt word; otherwise, if it does not meet expectations, the initial prompt word is updated, the updated prompt word is used to re-enhance the data, and the newly generated synthetic data is manually labeled until the synthetic data meets expectations, and the corresponding prompt word is used as the target prompt word.

[0090] In this embodiment, by manually labeling the synthetic data and obtaining the target prompt words based on the manual labeling results, the target prompt words can be obtained by active learning, which can improve the accuracy of the target prompt words, and then when the target prompt words are used for data enhancement, the quality of the data enhancement results can be improved.

[0091] 304. Using the pre-trained large model, perform data enhancement based on the seed sentence and the target prompt word to obtain an initial data enhancement result.

[0092] Among them, the seed sentence and the target prompt word can be input into the pre-trained large model. The pre-trained large model performs data enhancement on the seed sentence according to the prompt of the target prompt word, and the output is the initial data enhancement result.

[0093] 305. Filter the initial data enhancement result to obtain a filtering result.

[0094] Among them, filtering rules can be pre-defined, such as removing results with missing key fields, removing results that are too long or too short, etc., and low-quality initial data enhancement results can be removed based on the filtering rules; the similarity between different initial data enhancement results can also be calculated, and the results with similarity greater than the preset value can be deduplicated.

[0095] In this embodiment, by filtering the initial data enhancement results, data with potential risks can be removed to improve data quality.

[0096] 306. Use a quality classification model of the target domain to perform quality classification on the filtering results to determine a quality classification result of the filtering results.

[0097] The filtering result can be input into the quality classification model, and the output is the quality classification result.

[0098] Different fields can pre-train quality classification models corresponding to their respective fields.

[0099] In this embodiment, quality classification is performed through a quality classification model instead of using a pre-trained large model to perform quality classification on the data generated by itself, which can reduce the resource overhead of the pre-trained large model and ensure its reasoning ability.

[0100] 307. Based on the quality classification result, actively learn the filtering result to obtain the target data enhancement result.

[0101] Among them, it can include: if the quality classification result is the first category, using the initial data enhancement result as the target data enhancement result; if the quality classification result is the second category, obtaining the manual annotation result of the initial data enhancement result, and obtaining the target data enhancement result based on the manual annotation result; if the quality classification result is the third category, removing the initial data enhancement result; the quality of the first category is higher than that of the second category, and the quality of the second category is higher than that of the third category.

[0102] Specifically, the quality classification model is a three-category model, which is the first category, the second category, and the third category in order of data quality from high to low, which can also be called high, medium, and low.

[0103] For the first category (high), the initial data result can be used as the target data enhancement result;

[0104] For the second category (middle), it is provided to the labeling team for manual labeling, and the target data enhancement result is obtained based on the manual labeling result. For example, the initial data enhancement result marked as available is used as the target data enhancement result, and the initial data enhancement result marked as unavailable is removed.

[0105] For the third category (low), remove the corresponding initial data enhancement results.

[0106] In this embodiment, the target data enhancement result is obtained based on the quality classification result, which can improve the accuracy of the data enhancement result, thereby improving the effect of the target large model. In addition, manual labeling of the initial data enhancement results of medium quality can introduce human factors, avoid the limitations caused by model scoring, obtain data that is more in line with human habits, and improve data quality.

[0107] 308. Based on the seed sentence, the target prompt word and the target data enhancement result, fine-tune the pre-trained large model to obtain a target large model of the target domain.

[0108] Specifically, the seed sentence and the target prompt word can be input into the pre-trained large model to obtain the prediction result, the target data enhancement result can be used as the true value, and the loss function can be constructed through the prediction result and the target data enhancement result. The parameters of the pre-trained large model are adjusted based on the loss function until the preset end condition is reached to obtain the final target large model.

[0109] The target large model can be used for data augmentation during the inference phase.

[0110] Figure 4 is a schematic diagram according to the third embodiment of the present disclosure. This embodiment provides a data enhancement method based on a large model, and the method includes:

[0111] 401. Obtain seed sentences and prompt words.

[0112] 402. Using the target large model, perform data enhancement on the seed sentence and the prompt word to obtain a data enhancement result.

[0113] Wherein, the target large model is trained using the method described in any of the above embodiments.

[0114] Among them, the seed sentence is the existing data, and the prompt word is used to indicate the data enhancement operation, which can be set by the user. Afterwards, the seed sentence and the prompt word can be input into the target large model, and the output is the data enhancement result for the seed sentence, that is, the synthetic data corresponding to the seed sentence.

[0115] In this embodiment, a data enhancement result is obtained based on the above-mentioned target large model. Since the target large model has a better effect, a data enhancement result of higher quality can be obtained.

[0116] Figure 5 It is a schematic diagram according to the fourth embodiment of the present disclosure. This embodiment provides a large model training device, and the device 500 includes: a preheating module 501, an enhancement module 502, a learning module 503 and a fine-tuning module 504.

[0117] The warm-up module 501 is used to adopt the pre-trained large model to perform active learning based on the seed sentence and the initial prompt word to obtain the target prompt word; the enhancement module 502 is used to adopt the pre-trained large model to perform data enhancement based on the seed sentence and the target prompt word to obtain the initial data enhancement result; the learning module 503 is used to actively learn the initial data enhancement result based on the quality classification model of the target domain to obtain the target data enhancement result; the fine-tuning module 504 is used to fine-tune the pre-trained large model based on the seed sentence, the target prompt word and the target data enhancement result to obtain the target large model of the target domain.

[0118] In this embodiment, the target prompt word is obtained by actively learning the seed sentence and the initial prompt word, the initial data enhancement result is obtained based on the seed sentence and the target prompt word, the initial data enhancement result is actively learned to obtain the target data enhancement result, and the pre-trained large model is fine-tuned based on the seed sentence, the target prompt word and the target data enhancement result to obtain the target large model, which can improve the effect of the target large model, and then when the target large model is used for data enhancement, the quality of the data enhancement result is improved.

[0119] In some embodiments, the preheating module 501 is further used to:

[0120] Use a pre-trained large model to perform data augmentation on the input seed sentences and initial prompt words to obtain synthetic data;

[0121] Obtaining manual annotation results of the synthetic data;

[0122] A target prompt word is obtained based on the manual annotation result.

[0123] In this embodiment, by manually labeling the synthetic data and obtaining the target prompt words based on the manual labeling results, the target prompt words can be obtained by active learning, which can improve the accuracy of the target prompt words, and then when the target prompt words are used for data enhancement, the quality of the data enhancement results can be improved.

[0124] In some embodiments, the learning module 503 is further configured to:

[0125] Filtering the initial data enhancement result to obtain a filtering result;

[0126] Using the quality classification model, quality classification is performed on the filtering results to determine the quality classification results of the filtering results;

[0127] Based on the quality classification result, the filtering result is actively learned to obtain the target data enhancement result.

[0128] In this embodiment, by filtering the initial data enhancement results, data with potential risks can be removed and data quality can be improved; by performing quality classification through a quality classification model instead of using a pre-trained large model to perform quality classification on the data generated by itself, the resource overhead of the pre-trained large model can be reduced and its reasoning ability can be guaranteed.

[0129] In some embodiments, the learning module 503 is further configured to:

[0130] If the quality classification result is the first category, using the initial data enhancement result as the target data enhancement result;

[0131] If the quality classification result is the second category, obtaining a manual annotation result of the initial data enhancement result, and obtaining the target data enhancement result based on the manual annotation result;

[0132] If the quality classification result is the third category, removing the initial data enhancement result;

[0133] The quality of the first category is higher than that of the second category, and the quality of the second category is higher than that of the third category.

[0134] In this embodiment, the target data enhancement result is obtained based on the quality classification result, which can improve the accuracy of the data enhancement result, thereby improving the effect of the target large model. In addition, manual labeling of the initial data enhancement results of medium quality can introduce human factors, avoid the limitations caused by model scoring, obtain data that is more in line with human habits, and improve data quality.

[0135] Figure 6 It is a schematic diagram according to the fifth embodiment of the present disclosure. This embodiment provides a data enhancement device based on a large model. The device 600 includes: an acquisition module 601 and an enhancement module 602.

[0136] The acquisition module 601 is used to acquire seed sentences and prompt words; the enhancement module 602 is used to use the target large model to perform data enhancement on the seed sentences and the prompt words to obtain data enhancement results.

[0137] Wherein, the target large model is trained using the method described in any of the above embodiments.

[0138] Among them, the seed sentence is the existing data, and the prompt word is used to indicate the data enhancement operation, which can be set by the user. Afterwards, the seed sentence and the prompt word can be input into the target large model, and the output is the data enhancement result for the seed sentence, that is, the synthetic data corresponding to the seed sentence.

[0139] In this embodiment, a data enhancement result is obtained based on the above-mentioned target large model. Since the target large model has a better effect, a data enhancement result of higher quality can be obtained.

[0140] It can be understood that in the embodiments of the present disclosure, the same or similar contents in different embodiments can be referenced to each other.

[0141] It can be understood that the “first”, “second”, etc. in the embodiments of the present disclosure are only used for distinction and do not indicate the degree of importance, time sequence, etc.

[0142] It is understandable that, unless otherwise specified, the sequence of steps in the process indicates that the timing relationship between these steps is not limited.

[0143] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0144] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.

[0145] Figure 7 A schematic block diagram of an example electronic device 700 that can be used to implement an embodiment of the present disclosure is shown. The electronic device 700 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0146] like Figure 7 As shown, the electronic device 700 includes a computing unit 701, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 702 or a computer program loaded from a storage unit 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the electronic device 700 can also be stored. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0147] Multiple components in the electronic device 700 are connected to the I / O interface 705, including: an input unit 706, such as a keyboard, a mouse, etc.; an output unit 707, such as various types of displays, speakers, etc.; a storage unit 708, such as a disk, an optical disk, etc.; and a communication unit 709, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 709 allows the electronic device 700 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0148] The computing unit 701 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 701 performs the various methods and processes described above, such as a large model training method or a data enhancement method based on a large model. For example, in some embodiments, a large model training method or a data enhancement method based on a large model may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 708. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 700 via the ROM 702 and / or the communication unit 709. When the computer program is loaded into the RAM 703 and executed by the computing unit 701, one or more steps of the large model training method or the data enhancement method based on the large model described above may be performed. Alternatively, in other embodiments, the computing unit 701 may be configured to execute a large model training method or a large model-based data enhancement method in any other appropriate manner (e.g., by means of firmware).

[0149] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0150] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0151] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0152] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0153] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0154] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services ("Virtual Private Server", or "VPS" for short). The server may also be a server of a distributed system, or a server combined with a blockchain.

[0155] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0156] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A large model training method, comprising: Using a pre-trained large model, active learning is performed based on seed sentences and initial prompt words to obtain the target prompt words; Using the pre-trained large model, data enhancement is performed based on the seed sentence and the target prompt word to obtain an initial data enhancement result; Based on a quality classification model of a target domain, actively learning the initial data enhancement result to obtain a target data enhancement result; Based on the seed sentence, the target prompt word and the target data enhancement result, the pre-trained large model is fine-tuned to obtain a target large model for the target domain.

2. The method according to claim 1, wherein: The pre-trained large model is used to perform active learning based on seed sentences and initial prompt words to obtain target prompt words, including: Use a pre-trained large model to perform data augmentation on the input seed sentences and initial prompt words to obtain synthetic data; Obtaining manual annotation results of the synthetic data; A target prompt word is obtained based on the manual annotation result.

3. The method according to claim 1, wherein: The quality classification model based on the target domain actively learns the initial data enhancement result to obtain the target data enhancement result, including: Filtering the initial data enhancement result to obtain a filtering result; Using the quality classification model, quality classification is performed on the filtering results to determine the quality classification results of the filtering results; Based on the quality classification result, the filtering result is actively learned to obtain the target data enhancement result.

4. The method according to claim 3, wherein: The actively learning the filtering result based on the quality classification result to obtain the target data enhancement result includes: If the quality classification result is the first category, using the initial data enhancement result as the target data enhancement result; If the quality classification result is the second category, obtaining a manual annotation result of the initial data enhancement result, and obtaining the target data enhancement result based on the manual annotation result; If the quality classification result is the third category, removing the initial data enhancement result; The quality of the first category is higher than that of the second category, and the quality of the second category is higher than that of the third category.

5. A data enhancement method based on a large model, comprising: Get seed sentences and prompt words; Using the target large model, data enhancement is performed on the seed sentence and the prompt word to obtain a data enhancement result; Wherein, the target large model is trained using the method described in any one of claims 1-4.

6. A large model training device, comprising: A warm-up module is used to use a pre-trained large model to perform active learning based on seed sentences and initial prompt words to obtain target prompt words; An enhancement module, used to use the pre-trained large model to perform data enhancement based on the seed sentence and the target prompt word to obtain an initial data enhancement result; A learning module, used for actively learning the initial data enhancement result based on a quality classification model of a target domain to obtain a target data enhancement result; A fine-tuning module is used to fine-tune the pre-trained large model based on the seed sentence, the target prompt word and the target data enhancement result to obtain a target large model of the target domain.

7. The device according to claim 6, wherein: The preheating module is further used for: Use a pre-trained large model to perform data augmentation on the input seed sentences and initial prompt words to obtain synthetic data; Obtaining manual annotation results of the synthetic data; A target prompt word is obtained based on the manual annotation result.

8. The device according to claim 6, wherein: The learning module is further used to: Filtering the initial data enhancement result to obtain a filtering result; Using the quality classification model, quality classification is performed on the filtering results to determine the quality classification results of the filtering results; Based on the quality classification result, the filtering result is actively learned to obtain the target data enhancement result.

9. The device according to claim 8, wherein: The learning module is further used to: If the quality classification result is the first category, using the initial data enhancement result as the target data enhancement result; If the quality classification result is the second category, obtaining a manual annotation result of the initial data enhancement result, and obtaining the target data enhancement result based on the manual annotation result; If the quality classification result is the third category, removing the initial data enhancement result; The quality of the first category is higher than that of the second category, and the quality of the second category is higher than that of the third category.

10. A data enhancement method based on a large model, comprising: An acquisition module is used to obtain seed sentences and prompt words; An enhancement module, used to perform data enhancement on the seed sentence and the prompt word using a target large model to obtain a data enhancement result; Wherein, the target large model is trained using the method described in any one of claims 1-4.

11. An electronic device, comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 5.

12. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-5.

13. A computer program product, comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Prompt word optimization method for processing multi-label classification task for large language model

    CN118350361A

  • Training data enhancement method, large model training method and device, and computing equipment

    CN118378090A

  • Large model fine tuning method and device based on supervised fine tuning, equipment and medium

    CN118445397A

  • System and method for data storage, transfer, synchronization, and security

    US20190129640A1