Large language model processing method, system, device, medium and program product

By generating pseudo-label data, the large language model is fine-tuned instructions, which solves the problem of large language models forgetting old knowledge when training on new data, and realizes efficient model updates, avoiding computational complexity and structural adjustments.

CN118297107BActive Publication Date: 2024-12-10HUA DATA TECH (SHANGHAI) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410390211.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-02
Publication Date
2024-12-10
Estimated Expiration
2044-04-02

AI Technical Summary

Technical Problem

The methods of mitigating catastrophic forgetting of large language models in the prior art violate the paradigm of continuous learning, with problems of computational complexity and inefficiency.

Method used

By obtaining the data set to generate pseudo-label data and using these pseudo-label data to fine-tune the original large language model, a new large language model is obtained, and instruction fine-tune based on pseudo-label data is realized, strictly abide by the form of continuous learning, and the Computational complexity and improved efficiency.

Benefits of technology

It effectively alleviates the catastrophic forgetting problem of large language models, improves the efficiency and accuracy of computing, and does not require storing large amounts of old task data or changing the model structure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118297107B_ABST
    Figure CN118297107B_ABST
Patent Text Reader

Abstract

The present disclosure provides a processing method, system, device, medium and program product for a large language model, wherein the processing method includes: obtaining a data set; generating pseudo-label data according to the data set; obtaining instruction fine-tuning data according to the pseudo-label data; and fine-tuning the original large language model using the instruction fine-tuning data to obtain a new large language model. The present disclosure generates pseudo-label data according to the obtained data set; then obtains instruction fine-tuning data according to the pseudo-label data; and fine-tunes the original large language model using the instruction fine-tuning data to obtain a new large language model, thereby realizing instruction fine-tuning of the large language model based on pseudo-label data, effectively alleviating the problem of catastrophic forgetting of the large language model, strictly abiding by the form of continuous learning, reducing the complexity of calculation, and improving the efficiency and accuracy of calculation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a large language model processing method, system, device, medium and program product. Background Art

[0002] Current large language models (LLMs) are usually trained using fixed, non-updated data, but in real-world scenarios, data from various sources may continue to grow. If we want LLM to master knowledge from both old and new data, we need to enable it to continuously integrate knowledge from various sources. Although this goal can be achieved on a large scale by retraining all new and old data, this process is too inefficient and expensive. If we only train the model on new data, it will easily forget the knowledge in old data, a phenomenon known as catastrophic forgetting.

[0003] Continuous learning, also known as incremental learning, is a machine learning method that can alleviate catastrophic forgetting in deep learning models. It aims to continuously expand the adaptability of the model so that the model can learn knowledge of different tasks at different times. In a continuous learning scenario, the model will continuously learn data from different distributions, which represent different tasks. At each learning stage, the model must adapt to the data distribution to meet the expected behavior. In the process of continuous learning of multiple tasks, the process of learning new knowledge will quickly destroy the previously acquired information, which is the phenomenon of catastrophic forgetting. That is, after the neural network is trained on new data, the weights change, causing the neural network to forget the rules learned on the old data, and learn new things and forget the old. This will cause the model performance to drop sharply in old tasks. How to overcome the problem of catastrophic forgetting has also become a research hotspot. In response to the problem of catastrophic forgetting in neural networks, a large number of scholars have proposed their own methods, including sample-based methods, model parameter-based methods, and knowledge distillation-based methods.

[0004] All of the above methods violate the paradigm of continuous learning because they either need to save the data of old tasks or require significant modifications to the structure of the model. First, in real application scenarios, due to data privacy and storage restrictions, we may not be able to obtain a certain part of the data, or store too much data of old tasks. Secondly, many open source large language models now only open source weights, but not the data they are trained on, so we don’t know the distribution of the training data of the open source large language models, making this method difficult to implement. Thirdly, frequently changing the structure of the model will increase the complexity of the calculation and increase additional reasoning time. Summary of the invention

[0005] The technical problem to be solved by the present disclosure is to overcome the fact that the way to alleviate the catastrophic forgetting problem of the model in the prior art violates the paradigm of continuous learning and has the defects of complex calculation and low efficiency, and to provide a processing method, system, device, medium and program product for a large language model.

[0006] The present invention solves the above technical problems through the following technical solutions:

[0007] A first aspect of the present disclosure provides a method for processing a large language model, the method comprising:

[0008] Get the dataset;

[0009] Generate pseudo-label data according to the data set;

[0010] Obtain instructions to fine-tune data according to the pseudo-label data;

[0011] The instruction fine-tuning data is used to perform instruction fine-tuning on the original large language model to obtain a new large language model.

[0012] Preferably, the data set includes labeled data and unlabeled data, and the step of generating pseudo-labeled data according to the data set includes:

[0013] The unlabeled data is input into the original large language model to obtain the pseudo-labeled data.

[0014] Preferably, the data set includes labeled data and unlabeled data, and the step of obtaining instructions for fine-tuning data according to the pseudo-labeled data includes:

[0015] The labeled data and the pseudo-label data are combined to obtain the instruction fine-tuning data.

[0016] Preferably, the data set includes labeled data and unlabeled data, and the step of generating pseudo-labeled data according to the data set further includes:

[0017] Splitting the labeled data into at least two parts of labeled data according to a preset ratio;

[0018] Any part of the labeled data is input into the original large language model to obtain the pseudo-labeled data.

[0019] Preferably, the step of fine-tuning data according to the pseudo-label data acquisition instruction further comprises:

[0020] The remaining labeled data is combined with the pseudo-label data to obtain the instruction fine-tuning data.

[0021] Preferably, the data set includes labeled data and unlabeled data, and the processing method further includes:

[0022] Determine whether the amount of the unlabeled data is greater than the amount of the labeled data, and if so, select part of the data from the unlabeled data as target data;

[0023] The step of inputting the unlabeled data into the original large language model to obtain pseudo-labeled data comprises:

[0024] The target data is input into the original large language model to obtain pseudo-label data.

[0025] A second aspect of the present disclosure provides a large language model processing system, the processing system comprising:

[0026] A first acquisition module, used to acquire a data set;

[0027] A generating module, used for generating pseudo-label data according to the data set;

[0028] A second acquisition module, used for fine-tuning data according to the pseudo-label data acquisition instruction;

[0029] The instruction fine-tuning module is used to use the instruction fine-tuning data to perform instruction fine-tuning on the original large language model to obtain a new large language model.

[0030] Preferably, the data set includes labeled data and unlabeled data, and the generation module is used to input the unlabeled data into the original large language model to obtain the pseudo-labeled data.

[0031] Preferably, the data set includes labeled data and unlabeled data, and the second acquisition module is used to merge the labeled data with the pseudo-label data to obtain the instruction fine-tuning data.

[0032] Preferably, the data set includes labeled data and unlabeled data, and the generation module includes:

[0033] A splitting unit, used for splitting the labeled data into at least two parts of labeled data according to a preset ratio;

[0034] The input unit is used to input any part of the labeled data into the original large language model to obtain the pseudo-labeled data.

[0035] Preferably, the second acquisition module is used to merge the remaining labeled data with the pseudo-label data to obtain the instruction fine-tuning data.

[0036] Preferably, the data set includes labeled data and unlabeled data, and the processing system further includes:

[0037] A judging module, used for judging whether the amount of the unlabeled data is greater than the amount of the labeled data, and if so, calling a screening module;

[0038] The screening module is used to screen out some data from the unlabeled data as target data;

[0039] The generation module is used to input the target data into the original large language model to obtain pseudo-label data.

[0040] A third aspect of the present disclosure provides an electronic device, including a memory, a processor, and a computer program stored in the memory and used to run on the processor, wherein the processor implements the large language model processing method described in the first aspect when executing the computer program.

[0041] A fourth aspect of the present disclosure provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for processing a large language model described in the first aspect is implemented.

[0042] A fifth aspect of the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements the large language model processing method as described in the first aspect.

[0043] On the basis of being in accordance with the common sense in the art, the above-mentioned preferred conditions can be arbitrarily combined to obtain the preferred embodiments of the present disclosure.

[0044] The positive and progressive effects of this disclosure are:

[0045] The present invention generates pseudo-label data according to an acquired data set; then obtains instruction fine-tuning data according to the pseudo-label data; uses the instruction fine-tuning data to perform instruction fine-tuning on an original large language model to obtain a new large language model, thereby realizing instruction fine-tuning of the large language model based on pseudo-label data, effectively alleviating the problem of catastrophic forgetting of the large language model, strictly abiding by the form of continuous learning, reducing the complexity of calculation, and improving the efficiency and accuracy of calculation. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 A flowchart of a method for processing a large language model provided in Embodiment 1 of the present disclosure.

[0047] Figure 2 A schematic diagram of the modules of the large language model processing system provided in Embodiment 2 of the present disclosure.

[0048] Figure 3 This is a schematic diagram of the structure of an electronic device for implementing a processing method for a large language model according to Embodiment 3 of the present disclosure. DETAILED DESCRIPTION

[0049] The present disclosure is further described below by way of examples, but the present disclosure is not limited to the scope of the examples.

[0050] The prefixes such as "first" and "second" used in the embodiments of the present disclosure are only used to distinguish different description objects, and have no limiting effect on the position, order, priority, quantity or content of the objects being described. The use of prefixes such as ordinal numbers used to distinguish description objects in the embodiments of the present disclosure does not limit the objects being described. For the description of the objects being described, please refer to the context of the claims or embodiments.

[0051] The description of the present embodiment should not constitute an unnecessary restriction due to the use of such prefixes. In addition, in the description of the present embodiment, unless otherwise specified, the meaning of "multiple" is two or more.

[0052] In the embodiments 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.

[0053] Example 1

[0054] Figure 1 A flowchart of a method for processing a large language model provided in Embodiment 1 of the present disclosure is shown in FIG. Figure 1 As shown, the processing method includes:

[0055] Step 101: Obtain a data set;

[0056] Step 102: Generate pseudo-label data according to the data set;

[0057] Step 103, fine-tuning the data according to the pseudo-label data acquisition instruction;

[0058] In this embodiment, data collection is performed, and the collected data can be used to generate pseudo-label data.

[0059] Step 104: Use the instruction fine-tuning data to perform instruction fine-tuning on the original large language model to obtain a new large language model.

[0060] This embodiment generates pseudo-label data based on the acquired data set; then obtains instruction fine-tuning data based on the pseudo-label data; uses the instruction fine-tuning data to perform instruction fine-tuning on the original large language model to obtain a new large language model, thereby realizing instruction fine-tuning of the large language model based on pseudo-label data, effectively alleviating the problem of catastrophic forgetting of the large language model, strictly abiding by the form of continuous learning, reducing the complexity of calculation, and improving the efficiency and accuracy of calculation.

[0061] In an optional embodiment, the data set includes labeled data and unlabeled data, and step 102 includes:

[0062] Step 102-1: Input the unlabeled data into the original large language model to obtain pseudo-labeled data.

[0063] In this embodiment, the source of the data set can be divided into two aspects: one is the labeled data of the new task, and the other is the external unlabeled data. Here we mainly explain the collection of external data. One method is to collect external data similar to the new task. For example, if the new task is a named entity recognition task, then collect relevant data on the Internet; another method is to collect general network data, which is irrelevant to the specific natural language processing task.

[0064] In an optional embodiment, the data set includes labeled data and unlabeled data, and step 103 includes:

[0065] Step 103 - 1 : Merge the labeled data and the pseudo-label data to obtain instruction fine-tuning data.

[0066] In this embodiment, the generated pseudo-label data is combined with the labeled data of the new task to obtain new self-supervised instruction fine-tuning data.

[0067] In an optional embodiment, the data set includes labeled data and unlabeled data, and step 102 further includes:

[0068] Step 10211: Split the labeled data into at least two parts of labeled data according to a preset ratio;

[0069] In this embodiment, the preset ratio is set according to actual conditions and is not specifically limited here.

[0070] Step 10212: Input any part of the labeled data into the original large language model to obtain pseudo-labeled data.

[0071] In an optional embodiment, step 103 further includes:

[0072] Step 10311: merge the remaining labeled data with the pseudo-label data to obtain instruction fine-tuning data.

[0073] In the specific implementation process, for the labeled data of the new task, part of its data can be used to generate pseudo labels, and then the generated pseudo-label data and the labeled data of the new task are used together to fine-tune the instructions of the large language model. t Split according to a preset ratio, for example, into two parts p%D t and (1-p%)D t ; Then, p%D t This part of data is input into the original large language model M t-1 Generate pseudo-labeled data in Finally, the supervised data with labels (1-p%) D t This part of data is different from pseudo-label data Merge the original large language model M t-1 Fine-tune the instructions in the code to get a new large language model M t ; The optional merging strategy here can be to merge all the new tasks with labeled data D t With pseudo-labeled data Merge, and then the original large language model M t-1 Fine-tune the instructions in the code to get a new large language model M t .

[0074] In an optional embodiment, the data set includes labeled data and unlabeled data, and the processing method further includes:

[0075] Step 201, determine whether the amount of unlabeled data is greater than the amount of labeled data, if so, execute step 202;

[0076] Step 202: Filter out some data from the unlabeled data as target data;

[0077] Step 102-1 includes:

[0078] Step 102-11: Input the target data into the original large language model to obtain pseudo-label data.

[0079] In this embodiment, because the amount of collected external data is relatively large, it is necessary to select valuable data from it through an algorithm. Specifically, for a large amount of external unlabeled data (for example, Chinese Wikipedia, Baidu Encyclopedia, etc.), that is, when the amount of unlabeled data is greater than the amount of labeled data, the K-Center-Greedy data screening algorithm is used to screen out some valuable data and input it into the original large language model M. t-1 Then, the generated pseudo-label data and the new task labeled data are used together to calibrate the original large language model to the model M. t-1 Fine-tune the instructions to get a new large language model M t .

[0080] It should be noted that the K-Center-Greedy data screening algorithm is an unsupervised clustering algorithm that uses a greedy approximation algorithm to solve the K-center problem. It can automatically identify and select data samples that are valuable for model training. By intelligently screening the data, it can ensure that the model always focuses on the most valuable data during the continuous learning process, thereby improving its learning efficiency and effectiveness.

[0081] In addition, for the instruction fine-tuning of the large language model LLM, instead of full parameter learning, lightweight parameter fine-tuning is selected. The lightweight parameter fine-tuning method can alleviate the catastrophic forgetting problem of the large language model, because the lightweight parameter fine-tuning method freezes the original large language model parameters and adds a small number of parameters to adapt to new tasks while retaining the knowledge in the old tasks as much as possible. The parameter fine-tuning method here can choose LoRA, which is compatible with most large language models built on Transformer.

[0082] This embodiment filters externally collected data and new task data; then, generates pseudo-label data for part of the filtered data; then, combines the generated pseudo-label data with the new task labeled data to obtain new self-supervised instruction fine-tuning data; finally, uses the instruction fine-tuning data to fine-tune the original large language model to obtain a new large language model. This method combines the ideas of unsupervised learning and pseudo-label data generation, and provides a new solution to the problem of catastrophic forgetting in continuous learning. At the same time, this method uses a data selection algorithm model to filter out valuable unsupervised samples, which can enable the model to improve performance more effectively in a shorter period of time.

[0083] This embodiment proposes a method that is more in line with the continuous learning paradigm to solve the problem of catastrophic forgetting of large language models, that is, to develop a learning paradigm that strictly adheres to the form of continuous learning, and does not use the original sample data playback during training and inference, nor introduce additional models or convolutional and linear layer sets during training. Instead, pseudo sample playback is used to alleviate the catastrophic forgetting of large language models. A method for generating pseudo samples of data is designed, which provides a new perspective on the problem of catastrophic forgetting in continuous learning. In an unsupervised way, the model's own knowledge is used to guide learning to alleviate the forgetting of old task knowledge. At the same time, the dependence on original labeled data is reduced, which has great research and application value; further, this method has a natural advantage when facing privacy-sensitive or difficult-to-obtain data. Since it no longer relies on the original labeled data, it can also work in scenarios without complete label information, providing greater flexibility for model deployment. Furthermore, this method has the characteristics of unsupervised knowledge retention. It uses an unsupervised method to input unlabeled data into the model and then learn the model's output as a label, which saves a lot of labeling time and makes data collection and preparation easier. Therefore, it can effectively maintain and strengthen the model's memory of old tasks using a large amount of data, thereby reducing the impact of catastrophic forgetting. Furthermore, this method improves storage and computing efficiency. Since it does not need to store a large amount of old task data and does not require complex structural adjustments to the model, this method is more efficient in both computing and storage resources.

[0084] Example 2

[0085] Corresponding to the aforementioned large language model processing method embodiment, the present disclosure also provides an embodiment of a large language model processing system.

[0086] Figure 2 A module diagram of a large language model processing system provided in Embodiment 2 of the present disclosure, such as Figure 2 As shown, the processing system includes: a first acquisition module 21, a generation module 22, a second acquisition module 23, and an instruction fine-tuning module 24;

[0087] A first acquisition module 21, used to acquire a data set;

[0088] A generating module 22, used to generate pseudo-label data according to the data set;

[0089] A second acquisition module 23, used for obtaining instructions for fine-tuning data according to pseudo-label data;

[0090] In this embodiment, data collection is performed, and the collected data can be used to generate pseudo-label data.

[0091] The instruction fine-tuning module 24 is used to perform instruction fine-tuning on the original large language model using the instruction fine-tuning data to obtain a new large language model.

[0092] This embodiment generates pseudo-label data based on the acquired data set; then obtains instruction fine-tuning data based on the pseudo-label data; uses the instruction fine-tuning data to perform instruction fine-tuning on the original large language model to obtain a new large language model, thereby realizing instruction fine-tuning of the large language model based on pseudo-label data, effectively alleviating the problem of catastrophic forgetting of the large language model, strictly abiding by the form of continuous learning, reducing the complexity of calculation, and improving the efficiency and accuracy of calculation.

[0093] In an optional embodiment, the data set includes labeled data and unlabeled data, and the generation module 22 is used to input the unlabeled data into the original large language model to obtain pseudo-labeled data.

[0094] In this embodiment, the source of the data set can be divided into two aspects: one is the labeled data of the new task, and the other is the external unlabeled data. Here we mainly explain the collection of external data. One method is to collect external data similar to the new task. For example, if the new task is a named entity recognition task, then collect relevant data on the Internet; another method is to collect general network data, which is irrelevant to the specific natural language processing task.

[0095] In an optional embodiment, the data set includes labeled data and unlabeled data, and the second acquisition module 23 is used to merge the labeled data with the pseudo-label data to obtain instruction fine-tuning data.

[0096] In this embodiment, the generated pseudo-label data is combined with the labeled data of the new task to obtain new self-supervised instruction fine-tuning data.

[0097] In an optional embodiment, the data set includes labeled data and unlabeled data, such as Figure 2 As shown, the generating module 22 includes: a splitting unit 221, an input unit 222;

[0098] A splitting unit 221, configured to split the labeled data into at least two parts of labeled data according to a preset ratio;

[0099] In this embodiment, the preset ratio is set according to actual conditions and is not specifically limited here.

[0100] The input unit 222 is used to input any part of the labeled data into the original large language model to obtain pseudo-labeled data.

[0101] In an optional embodiment, the second acquisition module 23 is used to merge the remaining labeled data with the pseudo-label data to obtain instruction fine-tuning data.

[0102] In the specific implementation process, for the labeled data of the new task, part of its data can be used to generate pseudo labels, and then the generated pseudo-label data and the labeled data of the new task are used together to fine-tune the instructions of the large language model. t Split according to a preset ratio, for example, into two parts p%D t and (1-p%)D t ; Then, p%D t This part of data is input into the original large language model M t-1 Generate pseudo-labeled data in Finally, the supervised data with labels (1-p%) D t This part of data is different from pseudo-label data Merge the original large language model M t-1 Fine-tune the instructions in the code to get a new large language model M t ; The optional merging strategy here can be to merge all the new tasks with labeled data D t With pseudo-labeled data Merge, and then the original large language model M t-1 Fine-tune the instructions in the code to get a new large language model M t .

[0103] In an optional embodiment, the data set includes labeled data and unlabeled data, such as Figure 2 As shown, the processing system further includes: a judgment module 25 and a screening module 26;

[0104] A judging module 25 is used to judge whether the amount of unlabeled data is greater than the amount of labeled data, and if so, to call a screening module 26;

[0105] A screening module 26, used to screen out some data from the unlabeled data as target data;

[0106] The generation module 22 is used to input the target data into the original large language model to obtain pseudo-label data.

[0107] In this embodiment, because the amount of collected external data is relatively large, it is necessary to select valuable data from it through an algorithm. Specifically, for a large amount of external unlabeled data (for example, Chinese Wikipedia, Baidu Encyclopedia, etc.), that is, when the amount of unlabeled data is greater than the amount of labeled data, the K-Center-Greedy data screening algorithm is used to screen out some valuable data and input it into the original large language model M. t-1 Then, the generated pseudo-label data and the new task labeled data are used together to calibrate the original large language model to the model M. t-1 Fine-tune the instructions to get a new large language model M t .

[0108] It should be noted that the K-Center-Greedy data screening algorithm is an unsupervised clustering algorithm that uses a greedy approximation algorithm to solve the K-center problem. It can automatically identify and select data samples that are valuable for model training. By intelligently screening the data, it can ensure that the model always focuses on the most valuable data during the continuous learning process, thereby improving its learning efficiency and effectiveness.

[0109] In addition, for the instruction fine-tuning of the large language model LLM, instead of full parameter learning, lightweight parameter fine-tuning is selected. The lightweight parameter fine-tuning method can alleviate the catastrophic forgetting problem of the large language model, because the lightweight parameter fine-tuning method freezes the original large language model parameters and adds a small number of parameters to adapt to new tasks while retaining the knowledge in the old tasks as much as possible. The parameter fine-tuning method here can choose LoRA, which is compatible with most large language models built on Transformer.

[0110] This embodiment filters externally collected data and new task data; then, generates pseudo-label data for part of the filtered data; then, combines the generated pseudo-label data with the new task labeled data to obtain new self-supervised instruction fine-tuning data; finally, uses the instruction fine-tuning data to fine-tune the original large language model to obtain a new large language model. This method combines the ideas of unsupervised learning and pseudo-label data generation, and provides a new solution to the problem of catastrophic forgetting in continuous learning. At the same time, this method uses a data selection algorithm model to filter out valuable unsupervised samples, which can enable the model to improve performance more effectively in a shorter period of time.

[0111] This embodiment proposes a method that is more in line with the continuous learning paradigm to solve the problem of catastrophic forgetting of large language models, that is, to develop a learning paradigm that strictly adheres to the form of continuous learning, and does not use the original sample data playback during training and inference, nor introduce additional models or convolutional and linear layer sets during training. Instead, pseudo sample playback is used to alleviate the catastrophic forgetting of large language models. A method for generating pseudo samples of data is designed, which provides a new perspective on the problem of catastrophic forgetting in continuous learning. In an unsupervised way, the model's own knowledge is used to guide learning to alleviate the forgetting of old task knowledge. At the same time, the dependence on original labeled data is reduced, which has great research and application value; further, this method has a natural advantage when facing privacy-sensitive or difficult-to-obtain data. Since it no longer relies on the original labeled data, it can also work in scenarios without complete label information, providing greater flexibility for model deployment. Furthermore, this method has the characteristics of unsupervised knowledge retention. It uses an unsupervised method to input unlabeled data into the model and then learn the model's output as a label, which saves a lot of labeling time and makes data collection and preparation easier. Therefore, it can effectively maintain and strengthen the model's memory of old tasks using a large amount of data, thereby reducing the impact of catastrophic forgetting. Furthermore, this method improves storage and computing efficiency. Since it does not need to store a large amount of old task data and does not require complex structural adjustments to the model, this method is more efficient in both computing and storage resources.

[0112] As for the system embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The system embodiment described above is only illustrative, wherein the units described as separate components may or may not be physically separated, and the components as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the disclosed solution.

[0113] Example 3

[0114] Figure 3 This is a schematic diagram of the structure of an electronic device shown in Embodiment 3 of the present disclosure, wherein the electronic device includes a memory, a processor, and a computer program stored in the memory and used to run on the processor, and when the processor executes the computer program, the method for processing the large language model described in any of the above embodiments is implemented. Figure 3 The electronic device 90 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0115] like Figure 3 As shown, the electronic device 90 may be in the form of a general-purpose computing device, for example, it may be a server device. The components of the electronic device 90 may include, but are not limited to: at least one processor 91, at least one memory 92, and a bus 93 connecting different system components (including the memory 92 and the processor 91).

[0116] The bus 93 includes a data bus, an address bus, and a control bus.

[0117] The memory 92 may include a volatile memory, such as a random access memory (RAM) 921 and / or a cache memory 922 , and may further include a read-only memory (ROM) 923 .

[0118] The memory 92 may also include a program tool 925 (or utility) having a set (at least one) of program modules 924, such program modules 924 including but not limited to: an operating system, one or more application programs, other program modules and program data, each of which or some combination may include an implementation of a network environment.

[0119] The processor 91 executes various functional applications and data processing by running the computer program stored in the memory 92, such as the processing method of the large language model provided in any of the above embodiments.

[0120] The electronic device 90 may also communicate with one or more external devices 94 (e.g., keyboards, pointing devices, etc.). Such communication may be performed via an input / output (I / O) interface 95. Furthermore, the electronic device 90 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 96. Figure 3As shown, the network adapter 96 communicates with other modules of the electronic device 90 via the bus 93. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with the electronic device 90, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (disk array) systems, tape drives, and data backup storage systems, etc.

[0121] It should be noted that although several units / modules or sub-units / modules of the electronic device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided into multiple units / modules to be embodied.

[0122] Example 4

[0123] Embodiment 4 of the present disclosure further provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the method for processing a large language model provided in any of the above embodiments is implemented.

[0124] The readable storage medium may include but is not limited to: a portable disk, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory, an optical storage device, a magnetic storage device or any suitable combination of the above.

[0125] Example 5

[0126] Embodiment 5 of the present disclosure further provides a computer program product, including a computer program, which, when executed by a processor, implements any of the above-mentioned methods for processing a large language model.

[0127] Among them, the program code for executing the computer program product of the present disclosure can be written in any combination of one or more programming languages, and the program code can be executed completely on the user device, partially on the user device, as an independent software package, partially on the user device and partially on a remote device, or completely on the remote device.

[0128] Although the specific embodiments of the present disclosure are described above, those skilled in the art should understand that this is only an example, and the protection scope of the present disclosure is defined by the appended claims. Those skilled in the art may make various changes or modifications to these embodiments without departing from the principles and essence of the present disclosure, but these changes and modifications all fall within the protection scope of the present disclosure.

Claims

1. A method for processing a large language model, characterized in that: The processing method comprises: Get the dataset; Generate pseudo-label data according to the data set; Obtain instructions to fine-tune data according to the pseudo-label data; Using the instruction fine-tuning data, the original large language model is fine-tuned to obtain a new large language model; The data set includes labeled data and unlabeled data, and the step of generating pseudo-labeled data according to the data set includes: inputting the unlabeled data into an original large language model to obtain the pseudo-labeled data; The step of generating pseudo-label data according to the data set also includes: splitting the labeled data into at least two parts of labeled data according to a preset ratio; and inputting any part of the labeled data into the original large language model to obtain the pseudo-label data.

2. The method for processing a large language model according to claim 1, characterized in that: The data set includes labeled data and unlabeled data, and the step of obtaining instruction fine-tuning data according to the pseudo-label data includes: The labeled data and the pseudo-label data are combined to obtain the instruction fine-tuning data.

3. The method for processing a large language model according to claim 1, wherein: The step of obtaining instructions for fine-tuning data according to the pseudo-label data further comprises: The remaining labeled data is combined with the pseudo-label data to obtain the instruction fine-tuning data.

4. The method for processing a large language model according to claim 1, wherein: The data set includes labeled data and unlabeled data, and the processing method further includes: Determine whether the amount of the unlabeled data is greater than the amount of the labeled data, and if so, select part of the data from the unlabeled data as target data; The step of inputting the unlabeled data into the original large language model to obtain pseudo-labeled data comprises: The target data is input into the original large language model to obtain pseudo-label data.

5. A large language model processing system, characterized in that: The processing system comprises: A first acquisition module, used to acquire a data set; A generating module, used for generating pseudo-label data according to the data set; A second acquisition module, used for fine-tuning data according to the pseudo-label data acquisition instruction; An instruction fine-tuning module, used to perform instruction fine-tuning on the original large language model using the instruction fine-tuning data to obtain a new large language model; The data set includes labeled data and unlabeled data, and the generation module is specifically used to input the unlabeled data into the original large language model to obtain the pseudo-labeled data; The generation module is further specifically used to split the labeled data into at least two parts of labeled data according to a preset ratio; and input any part of the labeled data into the original large language model to obtain the pseudo-label data.

6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and used to run on the processor, characterized in that: When the processor executes the computer program, the method for processing a large language model according to any one of claims 1 to 4 is implemented.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for processing a large language model according to any one of claims 1 to 4 is implemented.

8. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method for processing a large language model according to any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Short text classification method based on uncertainty perception heterogeneous graph attention network

    CN115292483A

  • Semi-supervised speech recognition method based on pre-training model and reinforcement learning fine tuning

    CN116564287A