Bypass directional fine-tuning method and system based on neural network pre-training large model
By eliminating data with emotional confidence in the pre-training large model of neural network and fine-tuning it with the emotional tendency loss function, the problem of lack of emotional tendency in large model training is solved, and the guidance of emotional tendency and the maintenance of engineering performance is achieved. , improves the user experience.
Patent Information
- Application Number
- CN202411498001.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-25
- Publication Date
- 2024-12-24
- Estimated Expiration
- 2044-10-25
AI Technical Summary
The existing neural network-based large models lack consideration for the emotional tendency of output text during training, resulting in poor user experience, and efficient fine-tuning methods only focus on engineering performance and fail to effectively guide emotional tendencies.
A bypass directional fine-tuning method and system based on neural network pre-trained large model is proposed. By eliminating data whose emotional confidence does not meet the threshold, combining engineering performance and emotional tendency loss functions to constrain the emotional tendency output of the model. Achieve efficient fine-tuning of pre-trained large models.
On the basis of meeting engineering performance, the model output can tend toward specified emotions, improve user experience, and obtain multiple models suitable for different task requirements through different emotional threshold training.
Smart Images

Figure CN119026606B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of natural language processing technology, and in particular to a bypass-directed fine-tuning method and system based on a neural network pre-trained large model. Background Art
[0002] With the widespread application of neural network technology in the field of artificial intelligence, large models based on neural networks have also ushered in a series of major breakthroughs, representing the forefront of natural language processing (NLP) technology. Through the training of massive data, such models have learned rich language knowledge and complex semantic understanding capabilities, enabling them to perform various tasks, such as text generation, question-answering systems, machine translation, text summarization, etc.
[0003] When people interact with a big model, in addition to paying attention to the specific answers given by the big model, they will also be more or less affected by the tone and emotion of the output text. Currently, the training of big models mainly focuses on their engineering performance, such as accuracy, reliability, and robustness, but lacks consideration of the emotional tendency of the output text of the big model.
[0004] In addition, due to the huge number of parameters, a large model requires a lot of computing resources to be fully trained, which makes it extremely difficult to fully train a large model in practical applications. The current mainstream approach is to perform efficient fine-tuning based on existing pre-trained large models such as ChatGPT and LlaMA. This method can train part of the model's parameters, greatly reducing the amount of training calculations. However, the current efficient fine-tuning only focuses on its engineering performance, and does not provide directional guidance on the tone and emotion of the output text. For example, for the intelligent customer service of an online shopping platform, it is hoped that when communicating with customers, the tone is cheerful and optimistic, which can improve the customer's communication experience; for the intelligent consultation platform, it is hoped that when communicating with patients, the tone is positive and optimistic, which can give patients some comfort and encouragement; the existing model does not consider emotional tendencies, and the emotions it outputs are random, which will produce complaints about the customer's reply, or negative emotions about the patient's reply, reducing the user experience. Summary of the invention
[0005] In order to understand the problem that the current large model training process lacks consideration for the emotional tendency of the output text, resulting in a poor user experience when interacting with the large language model, the present application proposes a bypass directional fine-tuning method and system based on a neural network pre-trained large model. The present application performs efficient fine-tuning in the bypass of the pre-trained large model, while constraining the engineering performance and emotional tendency of the model, so that the output of the large model can tend to the specified emotion on the basis of meeting general engineering performance, thereby improving the user experience of the large model in actual application.
[0006] On the one hand, the present application is implemented through the following technical solutions:
[0007] A bypass directional fine-tuning method based on a neural network pre-trained large model, the method comprising:
[0008] Eliminate data whose emotion confidence does not meet the emotion threshold from the original question-and-answer data set to obtain a new question-and-answer data set, and divide the new question-and-answer data set into a training set and a test set;
[0009] The training set is used to perform fine-tuning in the bypass of the pre-trained large model, while constraining the engineering performance and emotional tendency of the model; the model weight parameters are iteratively updated, and when the engineering performance index and the emotional tendency index simultaneously reach the set threshold, the training is terminated to obtain the final model; and the engineering performance index and the emotional tendency index of the final model on the test set are calculated;
[0010] Select different emotion thresholds and repeat the above steps to obtain multiple final models under different emotion thresholds, which are suitable for different task requirements.
[0011] In some embodiments, removing data whose emotion confidence does not meet the emotion threshold from the original question and answer data set to obtain a new question and answer data set after the removal specifically includes:
[0012] Using a sentiment analysis system to perform sentiment analysis on each reply in the original question-answer data set to obtain a confidence level that the sentiment tendency of each reply is positive;
[0013] The original question-and-answer data set is traversed, and data with emotion confidence less than or equal to the emotion threshold are removed to obtain a new question-and-answer data set.
[0014] In some embodiments, the use of the training set to perform fine-tuning in bypass of the pre-trained large model, while constraining the engineering performance and emotional tendency of the model, specifically includes:
[0015] A low-rank matrix is introduced in the bypass of the pre-trained large model to modify the weight matrix of the pre-trained model, which is specifically expressed as:
[0016]
[0017] in, Indicates The weight matrix at the iteration, Indicates The weight matrix at the iteration, and Represent two low-rank bypass matrices, Initialize with all zeros. Using Gaussian initialization, represents the parameter controlling the update intensity;
[0018] The optimization algorithm is used to iteratively update the large model network, and the loss function used is:
[0019]
[0020] in, is the loss function, represents the loss of engineering performance of the model, represents the emotional penalty loss, Penalize loss to control emotions Strength parameter.
[0021] In some embodiments, The negative log-likelihood loss function is used, which is specifically expressed as:
[0022]
[0023] in, represents the batch size, represents the user's A question, Indicates the new question-answering dataset for The answer to a question.
[0024] In some embodiments, Specifically expressed as:
[0025]
[0026] in, Indicates that for Question The calculated emotion penalty loss, Indicates that it corresponds to The actual output of the large model.
[0027] In some embodiments, the pre-trained large model uses ChatGPT or LlaMA.
[0028] On the other hand, the present application also proposes a bypass directional fine-tuning system based on a neural network pre-trained large model, the system comprising:
[0029] A data processing module, wherein the data processing module removes data whose emotion confidence does not meet the emotion threshold from the original question-and-answer data set to obtain a new question-and-answer data set, and divides the new question-and-answer data set into a training set and a test set;
[0030] An iterative training module, wherein the iterative training module uses the training set to perform fine-tuning on the bypass of the pre-trained large model, while constraining the engineering performance and emotional tendency of the model; iteratively updates the model weight parameters, and when the engineering performance index and the emotional tendency index simultaneously reach the set threshold, the training is terminated to obtain the final model; and the engineering performance index and emotional tendency index of the final model on the test set are calculated;
[0031] And, an output module, which drives the data processing module and multiple final models under different emotion thresholds of the iterative training model by adjusting the emotion threshold and outputs them.
[0032] In some embodiments, the data processing module further includes:
[0033] A data collection unit, wherein the data collection unit is used to obtain an original question-answering data set;
[0034] A sentiment analysis unit, wherein the sentiment analysis unit uses a sentiment analysis system to perform sentiment analysis on each reply in the original question-answer data set to obtain a confidence level that the sentiment tendency is positive;
[0035] A screening unit, wherein the screening unit traverses the original question-answer data set, removes data with a sentiment confidence less than or equal to the sentiment threshold, and obtains a new question-answer data set;
[0036] And, a division unit, wherein the division unit divides the new question-answering dataset into a training set and a test set.
[0037] In some implementations, the iterative training module introduces a low-rank matrix in the bypass of the pre-trained large model to modify the weight matrix of the pre-trained model, which is specifically expressed as:
[0038]
[0039] in, Indicates The weight matrix at the iteration, Indicates The weight matrix at the iteration, and Represent two low-rank bypass matrices, Initialize with all zeros. Using Gaussian initialization, represents the parameter controlling the update intensity;
[0040] The iterative training module uses an optimization algorithm to iteratively update the large model network, and the loss function used is:
[0041]
[0042] in, is the loss function, represents the loss of engineering performance of the model, represents the emotional penalty loss, Penalize loss to control emotions Strength parameter.
[0043] In some embodiments, The negative log-likelihood loss function is used, which is specifically expressed as:
[0044]
[0045] in, represents the batch size, represents the user's A question, Indicates the new question-answering dataset for Responses to questions;
[0046] Specifically expressed as:
[0047]
[0048] in, Indicates that for Question The calculated emotion penalty loss, Indicates that it corresponds to The actual output of the large model.
[0049] The present application proposes a bypass-oriented fine-tuning method and system based on a neural network pre-trained large model. On the basis of efficient fine-tuning of the bypass of the pre-trained large model, the engineering performance and emotional tendency of the model are constrained at the same time, that is, by integrating the loss of engineering performance and the loss of emotional tendency as the total loss, the model is iteratively trained, so that the output of the large model can tend to the specified emotion on the basis of satisfying the general engineering performance, thereby improving the user experience;
[0050] The present application proposes a bypass-directed fine-tuning method and system based on a neural network pre-trained large model. By setting different thresholds, multiple large models can be trained to meet the requirements of different tasks. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] The drawings described herein are used to provide a further understanding of the embodiments of the present application, constitute a part of the present application, and do not constitute a limitation on the embodiments of the present application. In the drawings:
[0052] Figure 1A flow chart of a method according to an embodiment of the present application;
[0053] Figure 2 This is a system principle block diagram of an embodiment of the present application. DETAILED DESCRIPTION
[0054] In order to make the objectives, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with examples and drawings. The illustrative implementation scheme of the present application and its description are only used to explain the present application and are not intended to limit the present application.
[0055] Example 1: In view of the problem that the current large model training process lacks consideration of the emotional tendency of the output text, resulting in a poor user experience, this example proposes a bypass directional fine-tuning method based on a large model pre-trained by a neural network. Based on the efficient fine-tuning of the bypass of the pre-trained large model, this example constrains the engineering performance and emotional tendency of the model at the same time, so that the output of the large model can tend to the specified emotion on the basis of meeting general engineering performance, thereby improving the user experience.
[0056] like Figure 1 As shown, the method proposed in this embodiment specifically includes the following steps:
[0057] Step 100, remove data whose emotion confidence does not meet the emotion threshold from the original question and answer data set to obtain a new question and answer data set, and divide the new question and answer data set into a training set and a test set.
[0058] Furthermore, step 100 also includes the following sub-steps:
[0059] Step 101: Obtain the original question-answering dataset. Specifically, obtain the original question-answering dataset ,in, represents the user's A question, Indicates the original question-answering dataset for Answer to the question, Represents the length of the original question-answering dataset.
[0060] Step 102: Use a sentiment analysis system to perform sentiment analysis on each reply in the original question-answer dataset, and obtain the confidence level of each reply that its sentiment tendency is positive. Every reply in Perform sentiment analysis and obtain the confidence level of each reply that its sentiment tendency is positive. The confidence level is defined as It should be noted that this embodiment may also use other sentiment analysis systems to perform sentiment analysis, such as NLTK sentiment analysis library, TextBlob sentiment analysis library, etc.
[0061] Step 103, traverse the original question-answer data set, remove the data whose confidence does not meet the emotion threshold, and obtain a new question-answer data set. Since this embodiment requires directional training of the output emotion of the large model, only the question-answer data whose emotion confidence meets the threshold is selected as the data set. The specific selection process is: set the emotion threshold to , traverse the original question-answering dataset, if , then it means The sentiment value of the data does not meet the requirements, so the data should be removed. After traversing and removing the data that does not meet the sentiment threshold, the threshold-based The new question-answering dataset after elimination is expressed as:
[0062] ,in, Indicates threshold-based The user's first A question, Indicates threshold-based After the removal, the new question-answering dataset is Answer to the question, Indicates threshold-based The length of the new question-answering dataset after elimination.
[0063] Step 104: divide the new question-answering dataset into a training set and a test set. The new question-answering dataset can be divided into a training set and a test set according to a preset ratio (e.g., 8:2, 7:3, etc.). Other ways of partitioning can also be used to divide the training set and the test set.
[0064] Step 200, use the training set to perform efficient fine-tuning in the bypass of the pre-trained large model, while constraining the engineering performance and emotional tendency of the model; iteratively update the model weight parameters, and when the engineering performance index and the emotional tendency index reach the set threshold at the same time, end the training and obtain the final model; and calculate the engineering performance index and emotional tendency index of the final model on the test set. The pre-trained large model described in this embodiment refers to an existing pre-trained large model, such as ChatGPT, LlaMA, etc., which will not be described in detail here.
[0065] Furthermore, step 200 specifically includes the following sub-steps:
[0066] Step 201, input the training set into the pre-trained large model and perform efficient fine-tuning in the bypass of the pre-trained large model. The weight matrix of the pre-trained large model is In the The iterations are expressed as ,in, and Respectively represent the dimensions of the weight matrix, Represents a real number matrix. Introducing a low-rank matrix in the bypass of the large model to modify the weight matrix of the pre-trained model can achieve better results while using less computing resources. Specifically, iterative update The weight matrix after this time is ,in, and Represent two low-rank bypass matrices, Initialize with all zeros. Using Gaussian initialization, Indicates that the matrix dimension parameters can be set. Represents the parameter that controls the update strength. The AdamW optimization algorithm is used to iteratively update the network. In particular, the loss function used is It consists of two parts, namely ,in, represents the loss of engineering performance of the model, represents the emotional penalty loss, Penalize loss to control emotions Strength parameter. The negative log-likelihood loss function is adopted, which is ,in, Indicates the batch size (i.e. the amount of data used in one training process). Specifically ,in,
[0067] ,in Indicates that for Question The calculated emotion penalty loss, Indicates that it corresponds to The actual output of the large model. This calculation method makes it possible to give a corresponding penalty when the sentiment value of the model's output text is lower than a certain threshold, and give no penalty when the sentiment value of the model's output text is higher than a certain threshold, so that the sentiment of the model's final output text tends to be higher than the sentiment threshold. .
[0068] Step 202: continuously iterate and update the weight matrix to set the engineering performance adjustable threshold and adjustable thresholds for sentiment orientation ,when and When , stop updating and get the final value at the threshold The large model weight parameters under .
[0069] Step 203, input the test set into the final model after training, and calculate the engineering performance index and emotional tendency index of the model on the test set. It should be noted that the calculation process on the test set is the same as that on the training set, that is, the calculation of the test set As an engineering metric, calculate the test set As sentiment indicators, the indicators of the test set reflect the superiority of this embodiment in terms of engineering performance and sentiment performance, which will not be described in detail here.
[0070] Step 300, select different emotion thresholds and repeat the above steps to obtain multiple final models under different emotion thresholds, which are suitable for different task requirements.
[0071] Furthermore, this step selects different emotion thresholds , represents the number of different emotion thresholds selected, repeating the above steps 100 to 200 to obtain the final , the user can select the model trained with different emotion thresholds as the model for his own use. In this embodiment, multiple large models can be trained for different emotion thresholds, which are suitable for the requirements of different tasks.
[0072] Based on the same technical concept as above, this embodiment also proposes a bypass directional fine-tuning system based on a neural network pre-trained large model, such as Figure 2 As shown, the system proposed in this embodiment specifically includes:
[0073] A data processing module removes data whose emotion confidence does not meet the emotion threshold from the original question-and-answer data set to obtain a new question-and-answer data set, and divides the new question-and-answer data set into a training set and a test set.
[0074] Iterative training module, which uses the training set to bypass the pre-trained large model for efficient fine-tuning, while constraining the model's engineering performance and emotional tendency. Iteratively update the model weight parameters, and when the engineering performance index and emotional tendency index reach the set threshold at the same time, end the training and obtain the final model. And calculate the engineering performance index and emotional tendency index of the final model on the test set. The specific process is described in the above steps 201-203, and will not be repeated here.
[0075] And, an output module, which drives the data processing module and the iterative training model to obtain the final model under different emotion thresholds and output it by adjusting the emotion threshold.
[0076] Furthermore, the data processing module also includes:
[0077] The data collection unit is used to obtain the original question-answering data set, as described in step 101 above, and will not be described in detail here.
[0078] The sentiment analysis unit uses the Senta sentiment analysis system to perform sentiment analysis on each reply in the original question-answering data set, and obtains the confidence level of each reply that its sentiment tendency is positive. The details are as described in the above step 102, and will not be described in detail here.
[0079] The screening unit traverses the original question-answer data set, removes the data whose emotional confidence does not meet the emotional threshold, and obtains a new question-answer data set. The details are as described in the above step 103, and will not be repeated here.
[0080] And, a division unit, which divides the new question-answering data set into a training set and a test set. The details are as described in the above step 104, and will not be described in detail here.
[0081] Example 2: This example uses the Stanford Question Answering Dataset (SQUAD), which includes 127,000 question answering data, to verify the method and system proposed in Example 1 above. The specific process is as follows:
[0082] S1, get the original question-answering dataset ; Use the Senta sentiment analysis system to perform sentiment analysis on each reply in the original question-and-answer dataset to obtain the confidence that its sentiment tendency is positive. After removing the data in the original question-and-answer dataset whose sentiment confidence does not meet the sentiment threshold, a new question-and-answer dataset is obtained. In this embodiment, the sentiment threshold is set to , the new question-answering dataset after removing the emotion threshold is obtained as . Divide the new question-answering dataset into a training set and a test set.
[0083] S2, input the training set obtained in S1 into the pre-trained large model ChatGLM-6B and perform efficient fine-tuning on the large model. Among them, set the parameters: , , , , . Iteratively update the large model weight matrix until and When , stop updating and get the final large model weight parameter under the current emotion threshold .
[0084] S3, choose two different emotion thresholds Repeat S1 and S2 above to obtain the weight parameters of the large model under the corresponding emotion threshold. Finally, we get the weight parameters of the large model under three different emotion thresholds , users can choose the corresponding model according to the actual situation.
[0085] In addition, this embodiment also uses the pre-trained large model ChatGLM-6B and the method proposed in the above embodiment but without the emotional penalty term as a comparative example of the method proposed in the above embodiment to perform performance comparison and obtain the performance comparison results shown in Table 1.
[0086] Table 1
[0087]
[0088] It can be seen from Table 1 that, compared with other methods, the method proposed in this embodiment can significantly improve the sentiment confidence of the model output text, and can also maintain the overall engineering performance of the original model.
[0089] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0090] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0091] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0092] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0093] The specific implementation methods described above further illustrate the purpose, technical solutions and beneficial effects of the present application in detail. It should be understood that the above description is only the specific implementation method of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application.
Claims
1. A bypass directional fine-tuning method based on a neural network pre-trained large model, characterized in that: The method comprises: Eliminate data whose emotion confidence does not meet the emotion threshold from the original question-and-answer data set to obtain a new question-and-answer data set, and divide the new question-and-answer data set into a training set and a test set; The training set is used to perform fine-tuning in the bypass of the pre-trained large model, while constraining the engineering performance and emotional tendency of the model; the model weight parameters are iteratively updated, and when the engineering performance index and the emotional tendency index simultaneously reach the set threshold, the training is terminated to obtain the final model; and the engineering performance index and the emotional tendency index of the final model on the test set are calculated; Select different emotion thresholds and repeat the above steps to obtain multiple final models under different emotion thresholds, which are suitable for different task requirements; The method of using the training set to fine-tune the pre-trained large model while constraining the engineering performance and emotional tendency of the model specifically includes: A low-rank matrix is introduced in the bypass of the pre-trained large model to modify the weight matrix of the pre-trained large model, which is specifically expressed as: W t+1 =W t +αBA, where W t represents the weight matrix at the tth iteration, W t+1 represents the weight matrix at the t+1th iteration, B and A represent two low-rank bypass matrices, B is initialized with all zeros, A is initialized with Gaussian, and α represents the parameter that controls the update strength; The optimization algorithm is used to iteratively update the large model network, and the loss function used is: Among them, J is the loss function, J r Represents the loss of model engineering performance, J m represents the emotional penalty loss, To control the emotion penalty loss J m Intensity parameters; J r The negative log-likelihood loss function is used, which is specifically expressed as: Among them, batch represents the batch size, q i,eli,thre represents the i-th question of the user in the new question-answering dataset, r i,eli,thre Represents the response to the i-th question in the new question-answering dataset; J m Specifically expressed as: in, For the i-th question q i,eli,thre The calculated sentiment penalty loss is Indicates that it corresponds to q i,eli,thre The actual output of the large model, express The sentiment tendency is the confidence level of positive, and thre represents the sentiment threshold.
2. According to claim 1, a bypass directional fine-tuning method based on a neural network pre-trained large model is characterized in that: The step of removing data whose emotion confidence does not meet the emotion threshold from the original question-and-answer data set to obtain a new question-and-answer data set after the removal specifically includes: Using a sentiment analysis system to perform sentiment analysis on each reply in the original question-answer data set to obtain a confidence level that the sentiment tendency of each reply is positive; The original question-and-answer data set is traversed, and data with emotion confidence less than or equal to the emotion threshold are removed to obtain a new question-and-answer data set.
3. A bypass directional fine-tuning method based on a neural network pre-trained large model according to any one of claims 1-2, characterized in that: The pre-trained large model uses ChatGPT or LlaMA.
4. A bypass directional fine-tuning system based on a neural network pre-trained large model, characterized in that: The system comprises: A data processing module, wherein the data processing module removes data whose emotion confidence does not meet the emotion threshold from the original question-and-answer data set to obtain a new question-and-answer data set, and divides the new question-and-answer data set into a training set and a test set; An iterative training module, wherein the iterative training module uses the training set to perform fine-tuning on the bypass of the pre-trained large model, while constraining the engineering performance and emotional tendency of the model; iteratively updates the model weight parameters, and when the engineering performance index and the emotional tendency index simultaneously reach the set threshold, the training is terminated to obtain the final model; and the engineering performance index and emotional tendency index of the final model on the test set are calculated; and, an output module, which drives the data processing module and multiple final models under different emotion thresholds of the iterative training model and outputs them by adjusting the emotion threshold; The iterative training module introduces a low-rank matrix in the bypass of the pre-trained large model to modify the weight matrix of the pre-trained large model, which is specifically expressed as: W t+1 =W t +αBA, where W t represents the weight matrix at the tth iteration, W t+1 represents the weight matrix at the t+1th iteration, B and A represent two low-rank bypass matrices, B is initialized with all zeros, A is initialized with Gaussian, and α represents the parameter that controls the update strength; The iterative training module uses an optimization algorithm to iteratively update the large model network, and the loss function used is: Among them, J is the loss function, J r Represents the loss of model engineering performance, J m represents the emotional penalty loss, To control the emotion penalty loss J m Intensity parameters; J r The negative log-likelihood loss function is used, which is specifically expressed as: Among them, batch represents the batch size, q i,eli,thre represents the i-th question of the user in the new question-answering dataset, r i,eli,thre Represents the response to the i-th question in the new question-answering dataset; J m Specifically expressed as: in, For the i-th question q i,eli,thre The calculated sentiment penalty loss is Indicates that it corresponds to q i,eli,thre The actual output of the large model, express The sentiment tendency is the confidence level of positive, and thre represents the sentiment threshold.
5. According to claim 4, a bypass directional fine-tuning system based on a neural network pre-trained large model is characterized in that: The data processing module also includes: A data collection unit, wherein the data collection unit is used to obtain an original question-answering data set; A sentiment analysis unit, wherein the sentiment analysis unit uses a sentiment analysis system to perform sentiment analysis on each reply in the original question-answer data set to obtain a confidence level that the sentiment tendency is positive; A screening unit, wherein the screening unit traverses the original question-answer data set, removes data with a sentiment confidence less than or equal to the sentiment threshold, and obtains a new question-answer data set; And, a division unit, wherein the division unit divides the new question-answering dataset into a training set and a test set.
