Large model training method, model, system and equipment based on scoring mechanism
Through the obtaining and classification target fields in the vertical field applications, the use of self -supervision learning and general LLAMA model generation and screening training data can be used to solve the problem of insufficient data quality and quantity, and improve the application capabilities of large models of natural language in the vertical field.
Patent Information
- Application Number
- CN202411908272.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-01-24
AI Technical Summary
In the application of general natural language large models in vertical fields, they face the problems of poor data quality and fewer data sources, resulting in insufficient model capabilities.
By obtaining the relevant data of the target field, the classification and fine -tuning instruction format of different task themes are used to adjust the format of different task themes, using self -supervision and learning to generate new fine -tuning instruction data, and obtain data sets in the target field through the general LLAMA model. Natural language models related to the target field.
It effectively expands the training data set, improves data quality, and enhances the model's application capabilities in vertical fields.
Smart Images

Figure CN119357675A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a large model training method, model, system and device based on a scoring mechanism. Background Art
[0002] With the development and maturity of deep learning technology, natural language big models have become a rising star in artificial intelligence due to their excellent language processing capabilities and creativity. Although the development of general natural language big model technology in general language logic capabilities is relatively mature and outstanding, its application in professional vertical fields (such as multi-task social governance) has exposed a lot of problems.
[0003] At present, there are two main problems in the application of general natural language large models in vertical fields. The first problem is that the data quality is poor. Compared with the data sets in the general field, the data in the vertical field needs to be reviewed by experts in the business field, which will consume huge manpower and financial resources. Moreover, ordinary data analysis and processing technology cannot meet the requirements of high data quality, which will make the model's capabilities worse or even fail to reach the original logical capabilities of the general model. The second problem is that there are fewer data sources in professional fields and data collection is difficult. If only business experts are allowed to manually comb the data, not only will there be huge limitations in speed, but the data will lack task creativity and the data dimensions will be relatively single, which will also lead to deterioration of data quality. Summary of the invention
[0004] In order to overcome the shortcomings of the prior art, the present invention provides a large model training method, model, system and equipment based on a scoring mechanism, which uses a third-party model to perform data expansion task data sets and scores and screens the data to obtain high-quality model training data.
[0005] In order to achieve the above object, the present invention provides a large model training method based on a scoring mechanism, which comprises:
[0006] Obtain relevant data in the target field, and classify each relevant data into different task topics to construct a preliminary task set;
[0007] Each data in the preliminary task set is adjusted according to a preset fine-tuning instruction format to construct initial fine-tuning instruction data, where the fine-tuning instruction format includes a task topic type, text data to be processed, and manually annotated labels;
[0008] The preliminary task set after constructing the initial fine-tuning instruction data is input into the self-supervised learning model, and a new task set Task that conforms to the fine-tuning instruction format is generated based on self-supervised learning. Each task in the new task set Task contains n new fine-tuning instruction data. A dataset of new fine-tuning instructions for each task, Represents the i-th new fine-tuning instruction data, where Corresponding to the text data to be processed in the fine-tuning instruction format, The manually annotated labels in the corresponding fine-tuning instruction format;
[0009] Input the new task set Task into the general Llama model, and obtain the target domain dataset of the corresponding task theme based on the new fine-tuning instruction dataset under each task;
[0010] Calculate the similarity score between each new fine-tuning instruction data and the target domain data set of the corresponding task theme obtained, and screen out the new fine-tuning instruction data with a score exceeding the set similarity score to form a fine-tuning instruction data set under each task;
[0011] The fine-tuning instruction dataset is input into the general Llama model, which is fine-tuned and trained to form a Llama-based target domain-related data model.
[0012] According to one embodiment of the present invention, the large model training method based on the scoring mechanism further includes:
[0013] After obtaining the fine-tuning instruction data set, the fine-tuning instruction data set is input into the self-supervised learning model, and an extended fine-tuning instruction data set is generated based on the self-supervised learning;
[0014] The Llama model is trained based on the extended fine-tuning instruction dataset to obtain a Llama-based target domain-related data model.
[0015] According to an embodiment of the present invention, the preliminary task set includes a series of target domain tasks, and each target domain task includes at least one fine-tuning instruction data.
[0016] According to an embodiment of the present invention, after obtaining the preliminary task set: classifying the preliminary task set into classified task sets and non-classified task sets according to task types;
[0017] Afterwards, the classified task set and the non-classified task set are input into the self-supervised learning model, and two new task sets that conform to the fine-tuning instruction format are generated based on self-supervised learning.
[0018] The two types of new task sets are respectively input into the general Llama model to obtain the target domain datasets of the same task subject corresponding to the new fine-tuning instruction datasets for each task in each new task set.
[0019] According to an embodiment of the present invention, when calculating each new fine-tuning instruction data and the acquired target domain data set The steps for calculating the similarity score SCORE include:
[0020] Based on the N-gram model, calculate each new fine-tuning instruction data and the acquired target domain dataset The coincidence indexes ROUGE-N and ROUGE-L are:
[0021] ;
[0022] ;
[0023] in: and They are the character counting function of the sentence and the character matching number counting function, is the character sequence of the fine-tuning instruction data after character segmentation according to the N-gram model, and d is the target domain dataset A single data in Hyperparameters should be determined according to specific circumstances. is the recall rate, is the accuracy rate;
[0024] Calculate the geometric mean of N-gram precision And find the corresponding weight ;
[0025] make is the length of the candidate translation and For the effective reference corpus length, to calculate the concise penalty BP and BLEU indicators:
[0026] ;
[0027] BLEU= ;
[0028] Calculate the similarity score SCORE between each new fine-tuning instruction data and the acquired target domain dataset: SCORE=100 (0.4 ROUGE-N+0.4 ROUGE-L+0.2 BLEU).
[0029] According to an embodiment of the present invention, the acquired target field related data includes solution data, evaluation articles and related interpretation data.
[0030] On the other hand, the present invention also provides a target domain related data model based on Llama, which is obtained after training using the above-mentioned large model training method based on the scoring mechanism.
[0031] On the other hand, the present invention also provides a data model training system based on a scoring mechanism, which comprises:
[0032] The data acquisition module acquires the target domain-related data and classifies each acquired relevant data into different task topics to construct a preliminary task set;
[0033] A fine-tuning module adjusts each data in the preliminary task set according to a preset fine-tuning instruction format to construct initial fine-tuning instruction data. The fine-tuning instruction format includes the task topic type, the text data to be processed, and the manually annotated labels;
[0034] The instruction expansion module inputs the preliminary task set after constructing the initial fine-tuning instruction data into the self-supervised learning model, and generates a new task set Task that conforms to the fine-tuning instruction format based on self-supervised learning. Each task in the new task set Task contains n new fine-tuning instruction data. A dataset of new fine-tuning instructions for each task, Represents the i-th new fine-tuning instruction data, where Corresponding to the text data to be processed in the fine-tuning instruction format, The manually annotated labels in the corresponding fine-tuning instruction format;
[0035] The model calling module inputs the new task set Task into the general Llama model, and obtains the target domain dataset of the corresponding task theme based on the new fine-tuning instruction dataset under each task;
[0036] The fine-tuning instruction screening module calculates the similarity score between each new fine-tuning instruction data and the target domain data set of the corresponding task theme obtained, and screens out the new fine-tuning instruction data with a score exceeding the set similarity score to form a fine-tuning instruction data set under each task.
[0037] The training module inputs the fine-tuning instruction dataset into the general Llama model and fine-tunes it to form a Llama-based target domain-related data model.
[0038] According to one embodiment of the present invention, after the fine-tuning instruction screening module obtains the fine-tuning instruction data set, the instruction expansion module inputs the fine-tuning instruction data set into the self-supervised learning model, and generates an extended fine-tuning instruction data set based on self-supervised learning; thereafter, the model calling module inputs the extended fine-tuning instruction data set into the training Llama model to obtain a target domain-related data model based on Llama.
[0039] On the other hand, the present invention further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps in the above-mentioned training method when executing the computer program.
[0040] In summary, the large model training method based on the scoring mechanism provided by the present invention adjusts each data in the preliminary task set through the fine-tuning instruction format to serve as a self-supervised learning model. The self-supervised learning model generates corresponding new fine-tuning instruction data under each task in the format of the fine-tuning instruction data to form a new task set Task to expand the training data and solve the problem of the current small number of vertical field training data sets. Afterwards, the new task set Task is input into the general Llama model to obtain the target field data set corresponding to each task topic. The fine-tuning instruction data under each task is improved and screened out by calculating the similarity score between each new fine-tuning instruction data and the target field data set of the corresponding task topic obtained. The general Llama model is trained with the fine-tuning instruction data to obtain a large natural language model that is highly relevant to the target field task.
[0041] In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 The figure is a flow chart of a large model training method based on a scoring mechanism provided in one embodiment of the present invention.
[0043] Figure 2 Shown is a flow chart of a large model training method based on a scoring mechanism provided in another embodiment of the present invention.
[0044] Figure 3 Shown is a schematic diagram of the structure of a large model training system based on a scoring mechanism provided in one embodiment of the present invention.
[0045] Figure 4 A schematic diagram of the principles of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0046] like Figure 1 As shown, this embodiment provides a large model training method based on a scoring mechanism, which includes: obtaining relevant data of the target field, and classifying each relevant data obtained into different task themes to construct a preliminary task set (step S10). Each data in the preliminary task set is adjusted according to a preset fine-tuning instruction format to construct initial fine-tuning instruction data (step S20); the fine-tuning instruction format includes the task theme type, the text data to be processed, and the manually annotated labels. The preliminary task set after constructing the initial fine-tuning instruction data is input into the self-supervised learning model, and a new task set Task that conforms to the fine-tuning instruction format is generated based on self-supervised learning (step S30). Each task in the new task set Task contains n new fine-tuning instruction data, A dataset of new fine-tuning instructions for each task, Represents the i-th new fine-tuning instruction data, where Corresponding to the text data to be processed in the fine-tuning instruction format, The manually annotated labels in the corresponding fine-tuning instruction format. Input the new task set Task into the general Llama model, and obtain the target domain dataset of the corresponding task theme based on the new fine-tuning instruction dataset under each task (step S40). Calculate the similarity score between each new fine-tuning instruction data and the acquired target domain dataset of the corresponding task theme, and filter out the new fine-tuning instruction data with a score exceeding the set similarity score to form a fine-tuning instruction dataset under each task (step S50). Input the fine-tuning instruction dataset into the general Llama model, and fine-tune it to form a target domain-related data model based on Llama (step S60).
[0047] The large model training method based on the scoring mechanism provided in this embodiment uses a self-supervised learning model to generate more new fine-tuning instruction data that conforms to the fine-tuning instruction format based on a small amount of manually annotated initial fine-tuning instruction data, and expands the training data set under the target domain to be more conducive to model training. Further, after obtaining the new fine-tuning instruction data, it is input into the general Llama model to obtain the target domain data set; and the new fine-tuning instruction data is screened by calculating the similarity score between each new fine-tuning instruction data and the target domain data set of the corresponding task theme, thereby improving the quality of training data, so as to better perform fine-tuning training of the general model to form a data model related to the target domain.
[0048] In step S10, the large model training system based on the scoring mechanism will regularly crawl various types of target field related data based on the API interface on the hardware device (computer device). The target field related data obtained include solution data, evaluation articles and related interpretations. Afterwards, the obtained target field related data is cleaned, and the data is classified into different task topics using the BERT model to construct a preliminary task set. However, the present invention does not make any limitation to this. In other embodiments, other classification models may also be used to identify and classify task topics.
[0049] Afterwards, step S20 is executed to adjust the data related to each target domain in the preliminary task set according to the fine-tuning instruction format of {"prompt":"input":,"output":} to construct the initial fine-tuning instruction data, where prompt is the task topic type, input is the text data to be processed, and output is the manually annotated label. For example, the adjusted initial fine-tuning instruction data is: {"prompt": "Classify the user's dining reviews into good, bad, and average", "input": "This restaurant is simply delicious, recommended!", "output": "good reviews"}; or, {"prompt": "Analyze the tone of the characters in the current conversation. The options are: angry, happy, and others", "input": "Why did you throw my toys!!!", "output": "angry"}; or {"prompt": "Answer the following multiple-choice questions. Choose A, B, C, or D as the answer", "input": "Which of the following is a vegetable? A celery, B cucumber, C banana, D persimmon", "output": "A"}.
[0050] In this embodiment, the preliminary task set includes a series of target domain tasks and each task includes one or more target domain related data. Therefore, after the fine-tuning instruction conversion in step S20, each target domain task also includes at least one fine-tuning instruction data.
[0051] As shown by the "prompt" in the above-mentioned adjusted initial fine-tuning instruction data, the task themes in the target field are not only diverse but also usually not simple classification tasks. Therefore, the large model training method based on the scoring mechanism provided in this embodiment also includes step S201: classifying the preliminary task set after constructing the initial fine-tuning instruction data, and dividing it into classified task sets and non-classified task sets according to the task type. Specifically, the preliminary task set is input into the third-party large model ChatGPT in batches, and the given tasks are classified using the few-shot mode based on the "prompt" in the fine-tuning instruction data, thereby forming a classified task set and a non-classified task set; non-classified tasks include regression tasks and other non-classified tasks. However, the present invention is not limited to this. In other embodiments, such as Figure 2 As shown, the task types may also be classified after the preliminary task set is constructed in step S10.
[0052] After forming the classified task set and the non-classified task set, step S30 inputs the two task sets into the self-supervised learning model in batches, and generates two new task sets that conform to the fine-tuning instruction format based on self-supervised learning, namely, the new classified task set Task1 and the new non-classified task set Task2. As described in step S20, the target domain usually has a variety of subject tasks and each subject task is associated with multiple target domain related data. Therefore, when using the self-supervised learning model to generate a new task set, each subject task in the new classified task set Task1 includes n fine-tuning instruction data, It is the new fine-tuning instruction dataset contained in each task. Represents the i-th new fine-tuning instruction data, Corresponding to the input in the fine-tuning instruction format (i.e. the text data to be processed), The corresponding output (i.e., the manually labeled label) in the fine-tuning instruction format. For example, the new classification task set Task1 has a topic name (i.e., "prompt" in the fine-tuning instruction) of "user dining reviews" and the new fine-tuning instruction data is: :"It's just so-so." :"medium"}; or, :"It tastes terrible!!", :"bad review"}. For example, in the new non-classification task set Task2, the regression task with the theme name "housing price prediction" has the new fine-tuning instruction data: :"New subway entrance added in XX area", : "House price rises"}. However, the present invention does not make any limitation to this.
[0053] After obtaining the new classification task set Task1 and the new non-classification task set Task2, step S40 is executed to input the two new task sets into the general Llama model in batches, and obtain the target domain dataset of the corresponding task theme based on the new fine-tuning instruction dataset under each task. For example, based on the new fine-tuning instruction data under the task of "user dining evaluation", the review data of third-party websites (such as Dianping.com, Meituan, etc.) is obtained to obtain the target domain dataset corresponding to the task theme of "user dining evaluation". .
[0054] Then, step S50 is performed to calculate the similarity score between each new fine-tuning instruction data and the target domain data set of the corresponding task theme obtained based on the scoring system. Specifically, this embodiment uses a scoring system including ROUGE score index and BLEU score index to calculate the similarity score. Specifically, this step includes:
[0055] Based on the N-gram model, calculate each new fine-tuning instruction data and the acquired target domain dataset The coincidence indexes ROUGE-N and ROUGE-L are:
[0056] ;
[0057] ;
[0058] in: and They are the character counting function of the sentence and the character matching number counting function, is the character sequence of the fine-tuning instruction data after character segmentation according to the N-gram model, and d is the target domain dataset A single data in Hyperparameters should be determined according to specific circumstances. is the recall rate, For accuracy.
[0059] Calculate the geometric mean of N-gram precision And find the corresponding weight . General weight ; while the geometric mean The commonly used calculation formula in N-gram can be used for calculation.
[0060] make is the length of the candidate translation and For the effective reference corpus length, to calculate the concise penalty BP and BLEU indicators:
[0061] ;
[0062] BLEU= ;
[0063] Calculate the similarity score SCORE between each new fine-tuning instruction data and the acquired target domain dataset: SCORE=100 (0.4 ROUGE-N+0.4 ROUGE-L+0.2 BLEU).
[0064] After obtaining the similarity score SCORE, step S50 will filter out new fine-tuning instruction data with scores exceeding the set similarity score to form a fine-tuning instruction data set for each task. Afterwards, step S60 is executed to input the fine-tuning instruction data set into the general Llama model, and fine-tune it to form a target domain-related data model based on Llama.
[0065] As mentioned above, there are relatively few training data sets in professional vertical fields. To further expand the training data, the large model training method based on the scoring mechanism provided in this embodiment further includes step S501: after obtaining the fine-tuning instruction data set, the fine-tuning instruction data set is input into the self-supervised learning model, and an extended fine-tuning instruction data set is generated based on self-supervised learning. After that, step S60 is executed to train the Llama model based on the extended fine-tuning instruction data set to obtain a target field-related data model based on Llama.
[0066] On the other hand, this embodiment also provides a target domain related data model based on Llama obtained after training using the above steps S10 to S60.
[0067] Furthermore, the present embodiment also provides a data model training system based on a scoring mechanism, which includes a data acquisition module 10, a fine-tuning module 20, an instruction expansion module 30, a model calling module 40, a fine-tuning instruction screening module 50 and a training module 60. The data acquisition module 10 acquires data related to the target field, and classifies each acquired relevant data into different task themes to construct a preliminary task set. The fine-tuning module 20 adjusts each data in the preliminary task set according to a preset fine-tuning instruction format to construct initial fine-tuning instruction data. The fine-tuning instruction format includes the task theme type, the text data to be processed and the manually annotated labels. Specifically, the fine-tuning instruction format is {"prompt":"input":,"output":}; wherein prompt is the task theme type, input is the text data to be processed, and output is the manually annotated label. The instruction expansion module 30 inputs the preliminary task set after constructing the initial fine-tuning instruction data into the self-supervised learning model, and generates a new task set Task that conforms to the fine-tuning instruction format based on self-supervised learning. Each task in the new task set Task contains n new fine-tuning instruction data. A dataset of new fine-tuning instructions for each task, Represents the i-th new fine-tuning instruction data, where Corresponding to the text data to be processed in the fine-tuning instruction format, The manually annotated labels in the corresponding fine-tuning instruction format. The model calling module 40 inputs the new task set Task into the general Llama model, and obtains the target domain data set of the corresponding task theme based on the new fine-tuning instruction data set under each task. The fine-tuning instruction screening module 50 calculates the similarity score between each new fine-tuning instruction data and the acquired target domain data set of the corresponding task theme, and screens out the new fine-tuning instruction data with a score exceeding the set similarity score to form a fine-tuning instruction data set under each task. Afterwards, the training module 60 inputs the fine-tuning instruction data set into the general Llama model, and fine-tunes it to form a target domain-related data model based on Llama.
[0068] Further, after the fine-tuning instruction screening module 50 obtains the fine-tuning instruction data set, the instruction expansion module 30 also inputs the fine-tuning instruction data set into the self-supervised learning model, and generates an extended fine-tuning instruction data set based on the self-supervised learning. The continuous flow module 60 trains the Llama model based on the extended fine-tuning instruction data set to obtain a target domain-related data model based on Llama.
[0069] Further, the data model training system based on the scoring mechanism also includes a task classification module 201. After the data acquisition module 10 obtains the preliminary task set and the fine-tuning module 20 performs fine-tuning instructions on each data, the task classification module 201 inputs the preliminary task set after the fine-tuning instructions into the third-party large model ChatGPT in batches, and uses the few-shot mode based on the "prompt" in the fine-tuning instruction data to classify the given tasks, thereby forming a classified task set and a non-classified task set, and the non-classified tasks include other non-classified tasks such as regression tasks. The instruction expansion module 30 inputs the two types of new task sets into the general Llama model respectively to obtain the target domain data set of the same task theme corresponding to the new fine-tuning instruction data set for each task in each new task set. However, the present invention does not make any limitation to this. In other embodiments, the task classification module 201 can also be used to obtain the preliminary task set in the data acquisition module 10, that is, to classify the task type, and then the fine-tuning module 20 performs the fine-tuning instructions.
[0070] Figure 4 FIG. 1 shows an internal structure diagram of a computer device in an embodiment, and the computer device may specifically be a server. Figure 4As shown, the computer device includes a processor, a memory and a network interface connected via a system bus. Among them, the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program, which, when executed by the processor, enables the processor to implement a large model training method based on a scoring mechanism. The memory may also store a computer program, which, when executed by the processor, enables the processor to execute a large model training method based on a scoring mechanism.
[0071] Those skilled in the art will understand that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0072] In summary, the large model training method based on the scoring mechanism provided by the present invention adjusts each data in the preliminary task set through the fine-tuning instruction format to serve as a self-supervised learning model. The self-supervised learning model generates corresponding new fine-tuning instruction data under each task in the format of the fine-tuning instruction data to form a new task set Task to expand the training data and solve the problem of the current small number of vertical field training data sets. Afterwards, the new task set Task is input into the general Llama model to obtain the target field data set corresponding to each task topic. The fine-tuning instruction data under each task is improved and screened out by calculating the similarity score between each new fine-tuning instruction data and the target field data set of the corresponding task topic obtained. The general Llama model is trained with the fine-tuning instruction data to obtain a large natural language model that is highly relevant to the target field task.
[0073] Although the present invention has been disclosed as above by the preferred embodiment, it is not intended to limit the present invention. Anyone familiar with this technology can make slight changes and modifications without departing from the spirit and scope of the present invention. Therefore, the scope of protection of the present invention shall be based on the scope of protection required by the claims.
Claims
1. A large model training method based on a scoring mechanism, characterized in that: include: Obtain relevant data in the target field, and classify each relevant data into different task topics to construct a preliminary task set; Each data in the preliminary task set is adjusted according to a preset fine-tuning instruction format to construct initial fine-tuning instruction data, wherein the fine-tuning instruction format includes a task topic type, text data to be processed, and manually annotated labels; The preliminary task set after constructing the initial fine-tuning instruction data is input into the self-supervised learning model, and a new task set Task that conforms to the fine-tuning instruction format is generated based on self-supervised learning. Each task in the new task set Task contains n new fine-tuning instruction data. A dataset of new fine-tuning instructions for each task, Represents the i-th new fine-tuning instruction data, where Corresponding to the text data to be processed in the fine-tuning instruction format, The manually annotated labels in the corresponding fine-tuning instruction format; Input the new task set Task into the general Llama model, and obtain the target domain dataset of the corresponding task theme based on the new fine-tuning instruction dataset under each task; Calculate the similarity score between each new fine-tuning instruction data and the target domain dataset of the corresponding task theme, and filter out the new fine-tuning instruction data with a score exceeding the set similarity score to form a fine-tuning instruction dataset for each task; input the fine-tuning instruction dataset into the general Llama model, and fine-tune it to form a target domain-related data model based on Llama.
2. The large model training method based on the scoring mechanism according to claim 1 is characterized in that: The method also includes: after obtaining the fine-tuning instruction data set, inputting the fine-tuning instruction data set into a self-supervised learning model, and generating an extended fine-tuning instruction data set based on self-supervised learning; training a Llama model based on the extended fine-tuning instruction data set to obtain a target domain-related data model based on Llama.
3. The large model training method based on the scoring mechanism according to claim 1 is characterized in that: The preliminary task set includes a series of target domain tasks, and each target domain task includes at least one fine-tuning instruction data.
4. The large model training method based on the scoring mechanism according to claim 1 is characterized in that: After obtaining the preliminary task set: classify the preliminary task set and divide it into classified task set and non-classified task set according to the task type; then, input the classified task set and non-classified task set into the self-supervised learning model, and generate two types of new task sets that conform to the fine-tuning instruction format based on self-supervised learning; input the two types of new task sets into the general Llama model respectively to obtain the target domain data set of the same task theme corresponding to the new fine-tuning instruction data set for each task in each new task set.
5. The large model training method based on the scoring mechanism according to claim 1 is characterized in that: In calculating each new fine-tuning instruction data and the acquired target domain dataset The steps of similarity score SCORE include: calculating each new fine-tuning instruction data and the acquired target domain data set based on N-gram model The coincidence indexes ROUGE-N and ROUGE-L are: ; ; in: and They are the character counting function of the sentence and the character matching number counting function, is the character sequence of the fine-tuning instruction data after character segmentation according to the N-gram model, and d is the target domain dataset A single data in Hyperparameters should be determined according to specific circumstances. is the recall rate, is the precision; calculate the geometric mean of N-gram precision And find the corresponding weight ;make is the length of the candidate translation and For the effective reference corpus length, to calculate the concise penalty BP and BLEU indicators: ; BLEU= ; Calculate the similarity score SCORE between each new fine-tuning instruction data and the acquired target domain dataset: SCORE=100×(0.4×ROUGE-N+0.4×ROUGE-L+0.2×BLEU).
6. The large model training method based on the scoring mechanism according to claim 1 is characterized in that: The target field-related data obtained include program data, evaluation articles, and related interpretation data.
7. A target domain related data model based on Llama, characterized in that: Obtained after training using the large model training method based on the scoring mechanism described in any one of claims 1 to 6.
8. A large model training system based on a scoring mechanism, characterized in that: include: The data acquisition module acquires the target domain-related data and classifies each acquired relevant data into different task topics to construct a preliminary task set; A fine-tuning module adjusts each data in the preliminary task set according to a preset fine-tuning instruction format to construct initial fine-tuning instruction data, wherein the fine-tuning instruction format includes the task subject type, the text data to be processed, and the manually annotated labels; The instruction expansion module inputs the preliminary task set after constructing the initial fine-tuning instruction data into the self-supervised learning model, and generates a new task set Task that conforms to the fine-tuning instruction format based on self-supervised learning. Each task in the new task set Task contains n new fine-tuning instruction data. A dataset of new fine-tuning instructions for each task, Represents the i-th new fine-tuning instruction data, where Corresponding to the text data to be processed in the fine-tuning instruction format, The manually annotated labels in the corresponding fine-tuning instruction format; The model calling module inputs the new task set Task into the general Llama model, and obtains the target domain dataset of the corresponding task theme based on the new fine-tuning instruction dataset under each task; A fine-tuning instruction screening module calculates the similarity score between each new fine-tuning instruction data and the target domain data set of the corresponding task theme obtained, and screens out the new fine-tuning instruction data with a score exceeding the set similarity score to form a fine-tuning instruction data set under each task; The training module inputs the fine-tuning instruction dataset into the general Llama model and fine-tunes it to form a Llama-based target domain-related data model.
9. The large model training system based on scoring mechanism according to claim 9 is characterized in that: After the fine-tuning instruction screening module obtains the fine-tuning instruction dataset, the instruction extension module inputs the fine-tuning instruction dataset into the self-supervised learning model and generates an extended fine-tuning instruction dataset based on self-supervised learning; thereafter, the model calling module inputs the extended fine-tuning instruction dataset into the training Llama model to obtain a target domain-related data model based on Llama.
10. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and wherein the processor implements the steps in the method according to any one of claims 1 to 6 when executing the computer program.
Citation Information
Patent Citations
Weakly supervised text classification method, system and device based on self-supervised training
CN115080749A
To-be-trained data generation method and device, electronic equipment and storage medium
CN116304834A
Unknown category image classification method and device, computer equipment and storage medium
CN116433977A
Natural language trajectory instruction generation method and device and storage medium
CN116522899A
Industrial equipment fault diagnosis large language model multi-expert LoRA fine tuning method
CN118313417A
Cited By
Pre-training language model fine tuning method, reasoning service system, equipment and medium
CN121352037A