Cross-task collaborative thinking chain distillation method, device and system, and storage medium
Through the cross-task collaborative thinking chain distillation method that implicitly isolates unrelated task parameters, the problem of negative migration in cross-task collaboration is solved, and the reasoning ability of small models is improved.
Patent Information
- Application Number
- CN202411676515.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2044-11-22
AI Technical Summary
The existing technology is prone to negative migration problems when collaborating across tasks, resulting in a decline in the inference ability of small models.
By implicitly isolating parameters between irrelevant tasks, a cross-task collaborative thinking chain distillation method is adopted, including generation of thinking chains, difficulty sorting, orthogonal grouping training and LoRA expert combinations to prevent negative migration.
It effectively improves the inference ability of small models, avoids negative migration problems, and enhances the effect of cross-task collaboration.
Smart Images

Figure CN119623654A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of natural language processing technology, and in particular, relates to a cross-task collaborative thought chain distillation method and device, system, and storage medium. Background Art
[0002] At present, with the rise of large models, their powerful reasoning ability is widely used and studied for various tasks. In order to use LLM to handle complex reasoning tasks, contextual learning is extended by introducing a step-by-step reasoning process, namely a chain of thoughts. The concept of chain of thoughts (CoT) prompts is first introduced. It is found that in the CoT prompt, the large model learns to generate an intermediate reasoning process to solve the problem after getting examples of step-by-step reasoning. This enables very good performance in a wide range of tasks. However, it is found that by simply adding a phrase "Let's think step by step" to the prompt, LLM can perform zero-shot chain of thoughts reasoning without any manual annotations. However, this method is only effective for sufficiently large models (more than 50B parameters). Using chain of thoughts prompts in models with smaller parameters does not improve the reasoning ability of the model and may even bring negative effects.
[0003] Currently, a large language model is used to teach a small language model to think in chains, which is called thought chain distillation. However, the thought chain distillation method lacks in-depth research on the cross-task collaboration mechanism, and a common problem that arises during multi-task collaboration is the negative transfer problem. Negative transfer refers to the phenomenon that the knowledge or skills learned on one task have an adverse effect on the learning of another related task during multi-task learning or multi-task distillation. This phenomenon usually occurs when there is a conflict or incompatibility between tasks, resulting in a decrease in the performance of the model on some tasks. Summary of the invention
[0004] The technical problem to be solved by the present invention is to provide a cross-task collaborative thought chain distillation method and device, system, and storage medium, which prevent negative migration by implicitly isolating parameters between unrelated tasks, thereby further increasing the reasoning ability of the small model.
[0005] To achieve the above object, the present invention adopts the following technical solution:
[0006] A cross-task collaborative thought chain distillation method, including:
[0007] Step S1, generating a thinking chain of a reasoning task data set;
[0008] Step S2, sorting the difficulty of the tasks to be trained according to the thinking chain;
[0009] Step S3, conducting orthogonal group training on student models according to thinking chains and task difficulty;
[0010] Step S4: Perform cross-task collaborative thinking chain distillation based on the LoRA expert combination.
[0011] Preferably, each reasoning task consists of complex reasoning questions and the correct answer Use Zero-shot-CoT, that is, add Let's think step by step after the reasoning problem. Guide LLM with CoT capability to solve the problem Generate multi-step reasoning explanations And predict the results According to the correct answer and predict the answer Choosing the right multi-stage explanation use Form a sample
[0012] Preferably, the training method of step S3 is LoRA fine-tuning, and the LoRA fine-tuning strategy includes similarity detection and group orthogonal regularization.
[0013] The present invention also provides a cross-task collaborative thinking chain distillation device, comprising:
[0014] The first processing module is used to generate a thought chain of the reasoning task data set;
[0015] The second processing module uses the difficulty ranking of the tasks to be trained according to the thought chain;
[0016] The third processing module uses orthogonal grouping training for student models based on thinking chains and task difficulty;
[0017] The fourth processing module uses cross-task collaborative thought chain distillation based on LoRA expert combination.
[0018] Preferably, each reasoning task consists of complex reasoning questions and the correct answer Use Zero-shot-CoT, that is, add Let's think step by step after the reasoning problem. Guide LLM with CoT capability to solve the problem Generate multi-step reasoning explanations And predict the results According to the correct answer and predict the answer Choosing the right multi-stage explanation use Form a sample
[0019] Preferably, the third processing module is trained in a LoRA fine-tuning manner, and the LoRA fine-tuning strategy includes similarity detection and group orthogonal regularization.
[0020] An embodiment of the present invention also provides a cross-task collaborative thinking chain distillation system, including: a memory and a processor, wherein the memory stores a computer program run by the processor, and the computer program executes a cross-task collaborative thinking chain distillation method when run by the processor.
[0021] An embodiment of the present invention also provides a storage medium, on which a computer program is stored, and the computer program executes a cross-task collaborative thinking chain distillation method when running.
[0022] The present invention isolates the learning space of different reasoning capabilities through gradient orthogonality, and uses a grouping mechanism to achieve knowledge sharing between similar reasoning capabilities. Before each task starts training, it is grouped according to the similarity between tasks, and the current task is grouped with similar tasks. During the training process, an orthogonal regularization constraint model is used to keep it orthogonal to the gradient update direction of different groups of tasks when learning new tasks, so as to avoid negative interference between different reasoning capabilities. Next, in the reasoning stage, a small number of examples are used for the target reasoning task to achieve effective cross-task reasoning combination. Importantly, compared with calculating gradient projections, the advantage of orthogonal regularization is that there is no need to frequently calculate the gradient angle between tasks during training. In addition, orthogonal regularization does not require the calculation of the task gradient to be transformed into an orthogonal plane with different task gradient gradients, thereby improving the practicality and efficiency of the method. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0024] Figure 1 This is a flow chart of a cross-task collaborative thinking chain distillation method according to an embodiment of the present invention;
[0025] Figure 2 The accuracy of the method of the embodiment of the present invention and the baseline method under different parameter sizes of the student model of 10 tasks; the method used by the teacher model is Zero-shot-CoT. "Random" is determined according to the number of choices in the multiple-choice question;
[0026] Figure 3 To combine all lora experts to show the accuracy of the student models of the embodiment method of the present invention and the baseline method on four unseen tasks with different parameter sizes;
[0027] Figure 4 The results of the ablation experiment;
[0028] Figure 5 When faced with data understanding tasks, LoRA experts give reasoning coefficients for two methods, the top one is the Mode-COTD method, and the bottom one is the invention implementation method. DETAILED DESCRIPTION
[0029] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0030] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0031] Embodiment 1:
[0032] like Figure 1 As shown, an embodiment of the present invention provides a cross-task collaborative thinking chain distillation method, including:
[0033] Step S1: Generate a chain of thought for the reasoning task dataset
[0034] Thinking chain refers to the multi-stage explanation from reasoning questions to answers. A teacher model, i.e. a large model with large parameters that has the ability of thinking chain, is used to generate multi-stage explanations based on reasoning questions and combine them with the original answers to form a new sample. Specifically, consider a set of complex reasoning tasks (denoted as T 1 ... m ) Such as arithmetic reasoning task datasets, common sense reasoning task datasets, etc. Each task contains complex reasoning problems and the correct answer First, use Zero-shot-CoT, that is, add Let's think step by step after the reasoning problem. Guide the LLM with CoT capability to solve the problem Generate multi-step reasoning explanations And predict the results Then, based on the correct answer and predict the answer Choosing the right multi-stage explanation Last Use Form a sample
[0035] Step S2: Sort the difficulty of the tasks to be trained according to the thought chain
[0036] After having the reasoning task data set of the thought chain, it is necessary to sort the tasks to be trained. Learning simple tasks first and then difficult tasks is in line with the idea of course learning. This learning paradigm believes that the model's learning from simple data to difficult data will prompt the model's final performance ability. In the embodiment of the present invention, the specific implementation strategy is to sort the tasks in each task T t DataS t 32 samples (2 batches) are randomly selected from (t≤m). Then, the student model, which is a generative model with fewer parameters and no thinking chain ability, is subjected to LoRA tuning for 10 iterations. LoRA tuning refers to fixing the parameters of the model itself, and adding an additional low-rank adapter (LoRA) to the parameters of the multi-head attention of the model, and only updating the parameters of LoRA. Finally, the cross-entropy loss after 10 iterations is calculated as a representation of the difficulty of the task. The embodiment of the present invention draws on the self-paced learning strategy in course learning to determine the difficulty of the task. Tasks with lower loss values are considered relatively simple, while tasks with higher loss values are classified as more complex tasks.
[0037] Step S3: Orthogonal group training of student models based on thinking chain and task difficulty
[0038] After having the thought chain data and the task difficulty, the student model is trained in orthogonal groups, and the training method is LoRA fine-tuning. The training of tasks is carried out in the order from simple to difficult according to the difficulty determined in the previous step. LoRA fine-tuning is performed task by task, and a LoRA is trained for each reasoning task, called LoRA expert. The group orthogonal training strategy has two important components: similarity detection (SD) and group orthogonal regularization (GoR). Similarity detection is to investigate whether there are tasks similar to the current task in the trained tasks before training the current task. If such tasks exist, the LoRA expert of the task with the highest similarity is selected as the starting point of the current task LoRA, i.e., initialization. Initializing the parameters of the current task with similar and simple task parameters has been shown to bring positive knowledge transfer. In the training stage, adding group orthogonal regularization between the LoRA experts of dissimilar tasks constrains the current task to update parameters in a direction orthogonal to the gradient of the dissimilar tasks to alleviate negative transfer.
[0039] The purpose of similarity detection is to find tasks with similar update directions. The LoRA experts e{1…m} for each task contain matrix A{1…m} and matrix B{1…m}. The A matrix of the LoRA expert is considered the direction of task gradient update. The B matrix of the LoRA expert is regarded as the coefficient of gradient update.
[0040] Inspired by cross-task generalization methods, the embodiments of the present invention are equivalent to adding an additional coefficient (ω 1 ... m ) to the already fixed gradient update direction and updating the coefficient. To update the coefficient, 3-5 samples will be drawn from the data of the current task (S t ) and the coefficient ω i (i < t) will be adjusted using the gradient-free optimization algorithm Shiwu. The aim is to minimize the cross-entropy loss of ω i e i on the samples. The objective function is similar to the LoRA expert combination stage. If the update direction of past tasks is close to the current task, then in order to better adapt to the data T i (i < t) of the current task, ω i will be greater than 0 and close to 1. Otherwise, it will be less than 0. Therefore, ω 1 ... t-1 can be used to quantify the similarity between T 1 ... t-1 and T t .
[0041] The basic insight of orthogonal regularization is rooted in LoRA. Each e t decomposes the attention weight update W pre ∈ R d×k through the sum of two low-rank matrices. This indicates that fine-tuning for a new task usually only requires adjustment in the low-dimensional subspaces A t ∈ R d×r and B t ∈ R r×k . Due to the reduction in the number of parameters, this update in the low-dimensional subspace tends to update the parameter magnitudes along the directions in which the most important parameters change. This means that A t B t not only represents the change in the model parameter representation but also has a subspace representing the update direction of the model parameters. Therefore, the orthogonality of the update directions between different tasks is constrained by restricting the subspace, and the formula is as follows:
[0042]
[0043] represents a task group different from the current task. Aj The A matrix of LoRA representing tasks that are not similar to the current task. orthogonal (A j ,A t ) is the regularization between the current and different tasks’ LoRA. The reason for only restricting the orthogonality of the LoRA A matrix between different tasks is that the parameter update subspace U of the t-th task t It can be approximated by the column vector A t Stretched subspace. B t is considered as a column vector A in the representation t The linear weighting coefficient of . Therefore, when the orthogonality between the subspace of and the subspace of is restricted, it is necessary to satisfy O j,t =A jT A t = 0. Therefore, the orthogonal regularization between the subspaces of task j and task t can be expressed as:
[0044]
[0045] Where [u, v] represents A jT A t The overall goal of the current task is to:
[0046]
[0047] λ1 is the weight of orthogonal regularization. Q and C represent the question and CoT in .
[0048] Step S4: Distill cross-task collaborative thinking chains based on LoRA expert combination
[0049] After the above stages, each task has its own LoRA expert, represented by e 1 ... m In the inference phase, the coefficient ω is used 1 ,ω 2 ,...,ω m to integrate the LoRA expert parameters of all tasks, where is a scalar weight ω i , which can be positive or negative. And the gradient-free optimization algorithm Shiwa is used to adjust ω 1 ,ω 2 ,...,ω m A finite number of examples (e.g. 5) is needed to optimize the parameters and minimize the loss. The loss expression is as follows:
[0050]
[0051] S expis an example of an optimized parameter. λ2 is used as a hyperparameter. Then, the best weights are finally selected based on their performance in several samples of the inference task and used to combine all experts into an optimal module as follows:
[0052] E=ω 1 e 1 +ω 2 e 2 +..+ω m e m , (5)
[0053] In order to further improve the reasoning ability of the model, the embodiment of the present invention explores the cross-task collaboration of CoT distillation, and verifies that there is indeed interference between multiple reasoning capabilities, which hinders the cross-task collaborative reasoning of small language models. A distillation method based on a group orthogonal strategy is proposed, which implicitly isolates the parameters between unrelated tasks to prevent negative migration. And a group orthogonal constraint is designed to solve the gradient conflict between unrelated tasks. Compared with the gradient projection method, it does not need to frequently calculate the gradient angle between tasks. Improves the practicality and efficiency of the overall strategy. At the same time, a gradient-free update algorithm is used to detect task similarity and construct a grouping mechanism to help LoRA experts realize knowledge sharing between similar reasoning capabilities instead of maintaining orthogonal isolation.
[0054] The embodiment of the present invention evaluates the proposed method on 10 datasets, covering 5 types of complex reasoning challenges. These include arithmetic (SingleEq, AddSub, Multi Arith, GSM8K, Aqua, SVAMP), temporal / spatial reasoning (date understanding, tracking random objects), symbolic (last letter concatenation), and common sense (Common SenseQA) reasoning. The teacher model is text-davinci-002, using GPT-3175B provided by the openai API. For the student model, that is, the model with smaller parameters and no thinking chain ability, the embodiment of the present invention uses the instruction-adjusted version of Flan-T5 (Base, Large, XL).
[0055] To demonstrate the advancedness of the embodiments of the present invention, the experimental results are compared with four competitive baselines:
[0056] Zero-shot-CoT: The small language model uses only standard Zero-shot-CoT cues without fine-tuning.
[0057] Vanilla CoT Distillation: Standard CoT distillation method, using CoT data to fine-tune the small model with all parameters.
[0058] Multi-task CoT Distillation: Merge all tasks and fully parameter-fine-tune the student model to obtain a multi-task model.
[0059] MoDE-CoTD: This method integrates the reasoning capabilities of multiple fields learned by a small language model, enabling it to collaborate across tasks.
[0060] The embodiment of the present invention uses the Hugging face PEFT library to implement LoRA tuning. For the hyperparameters of LoRA tuning, set r = 16, and only decompose the weights of the attention mechanism, Wk, Wv. For the training hyperparameters, we maintain consistency among all LoRA modules, set the learning rate to 5e-3, the batch size to 16, and set λ1 = 0.5 and λ2 = 0.05. Regarding the gradient-free algorithm, it is implemented by the open source nevergrad optimization library. The embodiment of the present invention sets all LoRA experts to zero weights and limits the absolute value of the weights to less than 1.5. The embodiment of the present invention uses four NVIDIA GeForce RTX 4090s to train lora experts.
[0061] The specific process is as follows: First, we generate a thinking chain. We take a reasoning problem such as a reasoning problem in the GSM8k dataset: "James decides to run 3sprints 3times a week. He runs 60meters each sprint. How many total meters does he run a week?" and add the Zero-shot-CoT prompt word after it: "A: Let's think step by step." As the input of the large model, we obtain the thinking chain of the problem: "James run3sprints 3times a week. He runs 9sprints a week. He runs 60meters each sprint. So the runs 540meters a week." and combine them into a sample. The embodiment of the present invention performs this operation on each reasoning problem in all ten datasets to create a new thinking chain dataset.
[0062] The second step is to sort the tasks according to their difficulty. The T5-base model is fine-tuned using the Thinking Chain dataset, and each task will eventually get a cross entropy loss value. For example, the average loss value for the SVAMP task is 1.23, and the average loss for the ShuffledObjects task is 2.8. The present invention therefore considers that the difficulty of the SVAMP task is less than that of the Shuffled Objects task. In the subsequent training phase, the LoRA expert for the SVAMP task will be trained first.
[0063] The third step is group orthogonal training. Training is performed according to the order of sorting in the previous step, and the similarity will be solved before training the current LoRA. For example, the current training is GSM8k, and the SVAMP and Shuffled Objects tasks have been trained. A coefficient will be added to the LoRA expert of SVAMP, and then the coefficient added before the LoRA expert is updated using the GSM8k data using the gradient-free update algorithm to determine the similarity. For example, the coefficient of the SVAMP expert is determined to be 0.9, while the coefficient of ShuffledObjects is -0.1. So when training the LoRA expert of GSM8k, it is necessary to add orthogonal constraints between GSM8k and the dissimilar task Shuffled Objects.
[0064] The fourth step is the combination phase of LoRA experts. For the trained experts, use a small amount of test task data, such as the trained LoRA experts for GSM8k, Shuffled Objects, and SVAMP, to perform inference on GSM8K. Then add a coefficient to the LoRA experts for these three tasks, extract a small amount of GSM8K data sets, and use non-gradient parameter optimization to update the coefficients.
[0065] like Figure 2As shown, the excellent results of the embodiments of the present invention are introduced. The embodiments of the present invention are compared with different baselines and their effectiveness is demonstrated. Some interesting phenomena can be observed from the experimental results. Vanilla CoTDistillation has made overall progress. This shows that smaller models can indeed learn certain reasoning capabilities through Chain of Thoughts (CoT) distillation. In addition, the performance of multi-task CoT distillation and MoDE-CoTD methods is higher than Vanilla CoT distillation. This observation is important because it intuitively demonstrates the effectiveness of cross-task collaboration mechanisms in improving the reasoning capabilities of small language models. It is worth noting that compared with Vanilla CoT Distillation, methods with cross-task collaboration mechanisms perform poorly in some tasks (e.g., Shuffled Objects and SVAMP). This observation provides an important impetus for the embodiments of the present invention and emphasizes the necessity of dealing with negative interference between tasks in the case of cross-task collaboration.
[0066] In order to ensure that the method does not lead to performance degradation on unknown tasks, Figure 3 The method was tested on four unseen tasks in . These four datasets were selected for cross-task generalization evaluation. All 4 datasets are different from the 10 seen tasks: CoinFlip, StrategyQA, Open BookQA, Reclor. The performance of the embodiments of the present invention on unseen tasks is comparable to the performance of the baseline. Although the embodiments of the present invention did not help achieve better results in cross-task generalization, it did not bring any new troubles either.
[0067] Ablation experiments have shown that Figure 4 The effectiveness of each step in the method is shown in Figure 2. First, similar tasks are used during training to observe the method without the initialization step. Our experimental performance is slightly reduced. This finding confirms that knowledge learned from similar and simple tasks can help LoRA experts learn new knowledge better. Next is the removal of SD, which clarifies the importance of grouping. The gradient update direction between similar tasks is also similar. If the gradient update direction is forced to be orthogonal, it is difficult to update to the optimal point. Finally, after removing the group regularization, compared with the method with added group regularization, it can be found that although initialization is also performed, the effect is still significantly reduced. This shows that orthogonality is the final part of solving negative interference.
[0068] An experimental study was conducted on the corresponding weights of LoRA-Experts calculated by the gradient-free algorithm in the embodiment of the invention. Figure 5The weights of 10 LoRA experts in the method of the embodiment of the present invention and the weight graph of the MoDE-CoTD method are shown. These weights are calculated three times using a gradient-free algorithm for the Date understanding task. Compare the corresponding weights of the LoRA experts calculated by the method of the embodiment of the present invention and the baseline method. It can be clearly observed that both can effectively identify and process tasks with positive transfers. However, when dealing with different tasks, the situation is different: the weight values assigned by MoDE-CoTD are relatively stable. The method of the embodiment of the present invention assigns weights closer to 0 to different tasks, and these weight values are different. The reason is that MoDE-CoTD does not use orthogonality to isolate the parameter space of different tasks. Negative interference caused by gradient conflicts between different tasks and the current task. MoDE-CoTD mainly relies on gradient-free optimization in the compose stage to update the weights to minimize this negative interference. This code requires careful selection of parameters when the algorithm is calculated without gradients to avoid exacerbating interference. And there is little room for updating weights.
[0069] In contrast, the embodiment of the present invention effectively isolates the parameter space of different tasks in the training phase through the group orthogonal strategy, reducing the negative interference problem. Therefore, in the compose phase, this parameter isolation relationship will not be interrupted by the change of weights, thereby providing a wider space for updating weights. As shown in Equation 5, the weights of the method of the embodiment of the present invention are more susceptible to regularization, resulting in the weights of different tasks being closer to zero.
[0070] Embodiment 2:
[0071] The embodiment of the present invention also provides a cross-task collaborative thinking chain distillation device, including:
[0072] The first processing module is used to generate a thought chain of the reasoning task data set;
[0073] The second processing module uses the difficulty ranking of the tasks to be trained according to the thought chain;
[0074] The third processing module uses orthogonal grouping training for student models based on thinking chains and task difficulty;
[0075] The fourth processing module uses cross-task collaborative thought chain distillation based on LoRA expert combination.
[0076] As an implementation method of the present invention, each reasoning task includes a complex reasoning problem and the correct answer Use Zero-shot-CoT, that is, add Let's think step by step after the reasoning problem. Guide the LLM with CoT capability to solve the problem Generate multi-step reasoning explanations And predict the results According to the correct answer and predict the answer Choosing the right multi-stage explanation use Form a sample
[0077] As an implementation manner of an embodiment of the present invention, the third processing module is trained in a LoRA fine-tuning manner, and the LoRA fine-tuning strategy includes similarity detection and group orthogonal regularization.
[0078] Embodiment 3:
[0079] An embodiment of the present invention also provides a cross-task collaborative thinking chain distillation system, including: a memory and a processor, wherein the memory stores a computer program run by the processor, and the computer program executes a cross-task collaborative thinking chain distillation method when run by the processor.
[0080] Embodiment 4:
[0081] An embodiment of the present invention also provides a storage medium, on which a computer program is stored, and the computer program executes a cross-task collaborative thinking chain distillation method when running.
[0082] The embodiments described above are only descriptions of the preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Without departing from the design spirit of the present invention, various modifications and improvements made to the technical solutions of the present invention by ordinary technicians in this field should all fall within the protection scope determined by the claims of the present invention.
Claims
1. A cross-task collaborative thought chain distillation method, characterized in that: include: Step S1, generating a thinking chain of a reasoning task data set; Step S2, sorting the difficulty of the tasks to be trained according to the thinking chain; Step S3, conducting orthogonal group training on student models according to thinking chains and task difficulty; Step S4: Perform cross-task collaborative thinking chain distillation based on the LoRA expert combination.
2. The cross-task collaborative thought chain distillation method according to claim 1, characterized in that: Each reasoning task consists of complex reasoning questions and the correct answer Use Zero-shot-CoT, that is, add Let's think step by step after the reasoning problem. Guide the LLM with CoT capability to solve the problem Generate multi-step reasoning explanations And predict the results According to the correct answer and predict the answer Choosing the right multi-stage explanation use Form a sample 3. The cross-task collaborative thinking chain distillation method according to claim 2, characterized in that: The training method of step S3 is LoRA fine-tuning, and the LoRA fine-tuning strategy includes similarity detection and group orthogonal regularization.
4. A cross-task collaborative thinking chain distillation device, characterized in that: include: The first processing module is used to generate a thought chain of the reasoning task data set; The second processing module uses the difficulty ranking of the tasks to be trained according to the thought chain; The third processing module uses orthogonal grouping training for student models based on thinking chains and task difficulty; The fourth processing module uses cross-task collaborative thought chain distillation based on LoRA expert combination.
5. The cross-task collaborative thinking chain distillation device according to claim 4, characterized in that: Each reasoning task consists of complex reasoning questions and the correct answer Use Zero-shot-CoT, that is, add Let's think step by step after the reasoning problem. Guide the LLM with CoT capability to solve the problem Generate multi-step reasoning explanations And predict the results According to the correct answer and predict the answer Choosing the right multi-stage explanation use Form a sample 6. The cross-task collaborative thinking chain distillation device according to claim 5, characterized in that: The third processing module is trained by LoRA fine-tuning, and the LoRA fine-tuning strategy includes similarity detection and group orthogonal regularization.
7. A cross-task collaborative thought chain distillation system, characterized in that: include: A memory and a processor, wherein the memory stores a computer program executed by the processor, and when the computer program is executed by the processor, the cross-task collaborative thinking chain distillation method as described in any one of claims 1 to 3 is executed.
8. A storage medium, characterized in that: The storage medium stores a computer program, which, when running, executes the cross-task collaborative thinking chain distillation method as described in any one of claims 1 to 3.
Citation Information
Patent Citations
Image classification pre-training model continuous learning method based on low-rank adaptive combination
CN117611913A
Depth fine tuning method for generating Chinese text logical reasoning thinking chain
CN117669536A
Language model training method and device and computer readable storage medium
CN117669767A
Pre-training language model parameter fine tuning method and device, equipment and medium
CN117829240A
Cited By
Vehicle defense diagnosis system and method based on knowledge distillation and long thinking chain
CN120744379A