Module fusion-based large model capability expansion method and system
By using module fusion technology, independently fine-tuning the LoRA module and replaying task data sampling, the problems of high computational resources and low efficiency in continuous learning are solved, and the efficient expansion of large models in multi-task learning and catastrophic forgetting mitigation are achieved.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- INSTITUTE OF INFORMATION ENGINEERING CHINESE ACADEMY OF SCIENCES
- Filing Date
- 2025-01-06
- Publication Date
- 2026-07-09
AI Technical Summary
Existing continuous learning methods suffer from high computational resource requirements, unstable performance, or low efficiency in mitigating catastrophic forgetting, making it difficult to efficiently expand capabilities for new tasks without sacrificing existing capabilities.
By employing a module fusion approach, the performance and efficiency of large models in multi-task learning are optimized through independent fine-tuning of LoRA modules and sampling and replaying of task data, combined with parameter isolation and module fusion.
It effectively mitigates catastrophic forgetting with low computational overhead, improves model performance on new tasks, expands the range of capabilities, maintains the performance of the original tasks, adapts to changes in the order of different tasks, and reduces storage overhead.
Smart Images

Figure CN2025070648_09072026_PF_FP_ABST
Abstract
Description
A method and system for expanding the capabilities of large models based on module fusion Technical Field
[0001] This application belongs to the field of artificial intelligence technology, specifically relating to a method and system for expanding the capabilities of large models based on module fusion. Background Technology
[0002] The rapid development of artificial intelligence (AI) technology is profoundly changing production and lifestyles. Deep learning, in particular, represented by pre-trained models, has been widely applied in various fields, including military, communications, industry, and home life. Large-scale pre-trained models, due to their superior performance in various natural language processing tasks, have become one of the core technologies for AI development. However, to further improve the accuracy of these models, enabling them to handle a wider range of tasks and achieve more general AI systems, the design of continuous learning or incremental learning algorithms becomes crucial. By continuously expanding the model's capabilities from new task data, the model will be able to continuously adapt to and handle ever-changing and growing task requirements, thereby better supporting practical applications across multiple domains and scenarios.
[0003] One of the main challenges facing continuous learning is catastrophic forgetting, where a model trained on the original task experiences a significant performance drop when it continues to learn new tasks. To mitigate catastrophic forgetting, three main strategies exist: replay-based methods, regularization-based methods, and parameter isolation-based methods.
[0004] Replay-based methods reduce forgetting of existing abilities by accessing data from previous tasks. The core of these methods lies in determining which samples should be retained and how to utilize these samples to train the model. For example, the iCaRL method proposed by Rebuffi et al. (Rebuffi, Sylvestre-Alvise, et al. iCaRL: Incremental classifier and representation learning. Proceedings of the IEEE conference on Computer Vision and Pattern Recognition. 2017.) allocates a fixed-size storage space for previous classification tasks, selects representative samples close to the feature centers of the data, and mixes stored samples with new task data for training when encountering a new classification task, recalculating representative samples for each class. Similarly, the GEM method proposed by Lopez-Paz D et al. (Lopez-Paz D, Ranzato M A. Gradient episodic memory for continual learning[J]. Advances in neural information processing systems, 2017, 30.) calculates the model's gradient on the old task during training for the new task, ensuring that the model does not significantly impair the performance of the old task while learning the new task.
[0005] Regularization-based methods do not require saving training data from old tasks; instead, they constrain the direction of model parameter optimization through regularization. These methods assume that the effective performance space of the model differs for different tasks, and fine-tuning aims to make the model parameters as close as possible to this effective subspace. The EWC method proposed by Kirkpatrick J et al. (Kirkpatrick J, Pascanu R, Rabinowitz N, et al. Overcoming catastrophic forgetting in neural networks[J]. Proceedings of the national academy of sciences,2017,114(13):3521-3526.) uses the Fisher information matrix to measure which parameters are more important to the original task, and then reduces the impact of training on the old task on the performance of the new task by freezing these parameters. The LwF method proposed by Li Z et al. (Li Z, Hoiem D. Learning without forgetting[J].IEEE transactions on pattern analysis and machine intelligence,2017,40(12):2935-2947.) does not require the use of data from the original task. Instead, it uses the model's prediction results on the new task as pseudo-labels to constrain the model to avoid deviating from the optimization direction of the original task when optimizing the new task.
[0006] Parameter isolation methods avoid catastrophic forgetting by adjusting model parameters independently for each downstream task. The PackNet method proposed by Mallya et al. (Mallya, Arun, and Svetlana Lazebnik. Packnet: Adding multiple tasks to a single network by iterative pruning. Proceedings of the IEEE conference on Computer Vision and Pattern Recognition. 2018.) adjusts selected model parameters by pruning when faced with a new task. Specifically, it first trains the current task using all parameters, then removes non-essential parameters through pruning, retrains in the remaining parameter space, and adds the pruned parameters back into the training for subsequent tasks. The Expert Gate method proposed by Aljundi et al. (Aljundi, Rahaf, Punarjay Chakravarty, and Tinne Tuytelaars. Expert gate: Lifelong learning with a network of experts. Proceedings of the IEEE conference on computer vision and pattern recognition. 2017.) replicates the model multiple times to fine-tune it for different tasks, ensuring that the parameters of each model are independent. It also uses a gating module to automatically select the model for different tasks, thereby aggregating the capabilities of different models. Finally, it uses ensemble learning to select the optimal path as the model's prediction result.
[0007] However, existing forgetting mitigation methods still face several challenges during continuous learning. Data replay methods, which add representative samples from old tasks to the training data for new tasks, can mitigate catastrophic forgetting, but balancing the weights between old and new tasks is difficult, and model performance is highly sensitive to task order. Therefore, this method typically relies on large-scale storage and computational resources, resulting in poor stability. Regularization methods, while theoretically effective, are complex to implement and difficult to apply in practice. Parameter isolation methods train independent modules for each new task, effectively preventing forgetting, but as the number of tasks increases, the model's storage overhead and computational complexity rise significantly, leading to decreased training and inference efficiency. Therefore, combining the advantages of these methods to achieve a balance between performance and efficiency during continuous fine-tuning has become a key research focus. Summary of the Invention
[0008] This invention discloses a method and system for expanding the capabilities of large models based on module fusion. It can efficiently expand the capabilities of large models for new tasks without sacrificing their original capabilities, reduce the overhead of large models in the continuous learning process, and improve training and inference efficiency.
[0009] To achieve the above objectives, the technical solution of the present invention includes the following:
[0010] A method for expanding the capabilities of large models based on module fusion, the method comprising:
[0011] Get LoRA module A′ t parameters This includes the LoRA module A′ t The large model has the ability to solve t types of tasks simultaneously;
[0012] Insert a trainable LoRA module into the large model M, and train the LoRA module on the training dataset of the new task t+1 to obtain the LoRA module A. t+1 parameters This includes the LoRA module A. t+1 The large model has the ability to solve a new task t+1;
[0013] Insert a LoRA module A′ with fixed parameters into a large model M t LoRA module A with fixed parameters t+1 And a trainable LoRA fusion module, which is trained on a balanced sampling dataset to obtain the parameters of the LoRA fusion module. The balanced sampling dataset is constructed based on the training datasets of t tasks and the new task t+1.
[0014] Merge parameters parameter and parameters Obtain LoRA module A′ t+1 parameters This includes the LoRA module A′ t+1 The large model has the ability to solve t types of tasks and a new task t+1 simultaneously.
[0015] Furthermore, at t=1, obtain the LoRA module A′. t parameters include:
[0016] The parameters M of the fixed large model M θ ;
[0017] Insert a trainable LoRA module into the large model M, and train the LoRA module on the training dataset for task t to obtain a LoRA module A suitable for task t. t parameters The training objective is to minimize the loss function for task t.
[0018] The LoRA module A t And the LoRA module A t parameters As LoRA module A′ respectively t and the LoRA module A′ t parameters
[0019] Furthermore, the balanced sampling dataset is constructed based on the training datasets of t tasks and the new task t+1, including:
[0020] The maximum amount of data L required to obtain a balanced sampling dataset;
[0021] Based on the maximum data volume L, calculate the data volume k allocated to each task t and the new task t+1;
[0022] Based on the data volume k, data is sampled in the training dataset for each task t and the new task t+1 to construct the balanced sampling dataset.
[0023] Furthermore, the LoRA module A′ with fixed parameters is inserted into the large model M. t LoRA module A with fixed parameters t+1 And a trainable LoRA fusion module, which is trained on a balanced sampling dataset to obtain the parameters of the LoRA fusion module. include:
[0024] The LoRA module A′ t The LoRA module A t+1 Insert large models with trainable LoRA fusion modules;
[0025] The parameters M of the fixed large model M θ ;
[0026] Based on the parameters and the parameters Fix LoRA module A′ respectively t and LoRA module A t+1 Parameters;
[0027] The LoRA fusion module is trained on a balanced sampling dataset to obtain its parameters.
[0028] Furthermore, the merging parameters parameter and parameters Obtain LoRA module A′ t+1 parameters include:
[0029] For parameters parameter and parameters Perform a dot product operation to obtain the parameters. and the parameters As LoRA module A′ t+1 The parameters.
[0030] A large model capability extension system based on module fusion, the system comprising:
[0031] The first parameter acquisition module is used to obtain the LoRA module A′. t parameters This includes the LoRA module A′ t The large model has the ability to solve t types of tasks simultaneously;
[0032] The second parameter acquisition module is used to insert trainable LoRA modules into the large model M, and to train the LoRA modules on the training dataset of the new task t+1 to obtain LoRA module A. t+1 parameters This includes the LoRA module A. t+1 The large model has the ability to solve a new task t+1;
[0033] The third parameter acquisition module is used to insert LoRA modules A′ with fixed parameters into the large model M. t LoRA module A with fixed parameters t+1 And a trainable LoRA fusion module, which is trained on a balanced sampling dataset to obtain the parameters of the LoRA fusion module. The balanced sampling dataset is constructed based on the training datasets of t tasks and the new task t+1.
[0034] The parameter merging and acquisition module is used to merge parameters. parameter and parameters Obtain LoRA module A′ t+1 parameters This includes the LoRA module A′ t+1The large model has the ability to solve t types of tasks and a new task t+1 simultaneously.
[0035] An electronic device includes: a processor and a memory storing computer program instructions; the processor, when executing the computer program instructions, implements the large model capability expansion method based on module fusion as described above.
[0036] A computer-readable storage medium, characterized in that the computer-readable storage medium stores computer program instructions, which, when executed by a processor, implement the large model capability expansion method based on module fusion as described in any one of claims 1-5.
[0037] A computer program product, when run on a computer device, causes the computer device to execute the large model capability extension method based on module fusion as described above.
[0038] Compared with the prior art, this application has at least the following beneficial effects.
[0039] 1. Enhancing Continuous Learning Capability: This application focuses on improving the performance of large pre-trained models in continuous task learning. Unlike conventional techniques that typically focus only on one aspect of efficiency or performance, this method can quickly introduce new capabilities into large models with low computational overhead and effectively mitigate the catastrophic forgetting phenomenon when large models are learning new tasks.
[0040] 2. An Innovative Approach Combining Parameter Isolation and Module Fusion: This application proposes an innovative approach combining parameter isolation and module fusion. Specifically, the LoRA (Low-Rank Adaptation) activation module is first independently fine-tuned on different tasks. Then, the LoRA fusion module is adjusted by sampling and replaying task data, thereby achieving a performance balance for the model in multi-task learning. Compared to conventional data replay strategies, this approach not only outperforms in performance but also exhibits greater robustness, adapting to changes in the order of different tasks.
[0041] 3. Module fusion improves the flexibility and efficiency of capability expansion: Compared with previous parameter isolation techniques, this method integrates the capabilities of multiple tasks into a unified module through module fusion, thereby improving the flexibility and efficiency of capability expansion and avoiding increased storage overhead caused by the increase in the number of tasks.
[0042] 4. Experimental Verification: Experimental results show that the capability extension method based on module fusion proposed in this study can effectively prevent catastrophic forgetting and add new capabilities such as code generation and conversational emotion recognition to the large model without compromising the original task performance, thus significantly expanding the application scope of the model. Attached Figure Description
[0043] Figure 1 is a schematic diagram of the large model capability expansion strategy proposed in this application.
[0044] Figure 2 is a schematic diagram of the model structure used in this application.
[0045] Figure 3 is a schematic diagram of the LoRA module used in this application. Detailed Implementation
[0046] This application aims to clearly illustrate its purpose, technical solution and advantages, and will be described in detail with reference to the accompanying drawings.
[0047] This invention employs a parameter isolation approach, independently fine-tuning the LoRA (Low-Rank Adaptation) module for each task and adjusting the LoRA fusion module through sampling and replaying of task data. This achieves capability balance and effective mitigation of catastrophic forgetting in multi-task learning, efficiently introducing new task capabilities into the fine-tuned large model.
[0048] The large model capability expansion method based on module fusion of the present invention, as shown in Figure 1, includes the following steps 1 to 4.
[0049] Step 1: Obtain LoRA module A′ t parameters This includes the LoRA module A′ t The large model has the ability to solve t types of tasks simultaneously.
[0050] The LoRA module A′ described in this embodiment can simultaneously handle t types of tasks. t It is derived from an extension that can only solve one task t. When training the LoRA module for task t, firstly, the parameters M of the base model (large model M) are fixed. θ A trainable LoRA module is inserted into the large model M. Then, the parameters of the LoRA module are trained separately on task t. The optimization objective is to minimize the loss function of this task. And through the dataset D of this task t Optimize the LoRA module. By minimizing the loss function, the model can perform better on task t. The goal of this step is to obtain the LoRA module parameters suitable for task t. The optimization objective formula is as follows:
[0051] in, D is the loss function for task t. t This is the dataset for task t. At this point, the present invention assumes that parameters have been set. The LoRA module parameter is the LoRA module A′ that can solve a specific task. t And the LoRA module A′ t Configuration parameters
[0052] Step 2: Insert a trainable LoRA module into the large model M, and train the LoRA module on the training dataset of the new task t+1 to obtain LoRA module A. t+1 parameters This includes the LoRA module A. t+1 The large model has the ability to solve new tasks t+1.
[0053] When training the LoRA module for the new task t+1, the parameters M of the fixed-base model are still used. θ A new trainable LoRA module is then inserted into the large model M. The LoRA module parameters are then trained on the new task t+1. The goal is to obtain a LoRA module suitable for the new task. The optimization objective is to minimize the loss function for the new task t+1. And through the dataset D of this task t+1 Optimize the LoRA module parameters. The optimization target formula is as follows:
[0054] in, It is the loss function for the new task t+1, D t+1 It is the dataset for the new task t+1.
[0055] Step 3: Insert a LoRA module A′ with fixed parameters into the large model M t LoRA module A with fixed parameters t+1 And a trainable LoRA fusion module, which is trained on a balanced sampling dataset to obtain the parameters of the LoRA fusion module. The balanced sampling dataset is constructed based on the training datasets of t tasks and the new task t+1.
[0056] Train the LoRA fusion module. In steps 1 and 2, the LoRA module A′ has already been obtained. t and LoRA module A t+1 Next, the fixed base model M θ and LoRA module A′ t and LoRA module A t+1 Then, a trainable LoRA fusion module is inserted into the model, and the parameters of the fusion module are trained on a balanced sampled dataset of t tasks and a new task t+1. By minimizing the loss function of the fusion module, a fusion module adapted to multi-task learning can be obtained.
[0057] Specifically, the training data uses uniform sampling of all visited tasks. For the n different visited training task data (D1, D2, ..., D...), n The training data for each task is evenly distributed. Where L is the maximum amount of data that can be used under given conditions:
[0058] This process maintains data balance across tasks by sampling the training data for all tasks. Therefore, the fusion module... The optimization objective formula is as follows:
[0059] Step 4: Merge parameters parameter and parameters Obtain LoRA module A′ t+1 parameters This includes the LoRA module A′ t+1 The large model has the ability to solve t types of tasks and a new task t+1 simultaneously.
[0060] Merge the LoRA module and the fusion module. Combine the parameters of the LoRA module trained in step 1 for task t, the LoRA module trained in step 2 for task t+1, and the LoRA fusion module trained in step 3 into a new LoRA module. This results in an extended module capable of processing both tasks t and t+1 simultaneously, preparing for the introduction of new tasks. The merged module can be represented as follows:
[0061] In summary, this application proposes an efficient method for expanding the capabilities of large-scale models, aiming to address the performance and efficiency challenges in continuous learning. Without forgetting the original task capabilities, this application optimizes the capability expansion of large-scale pre-trained models when introducing new tasks by introducing LoRA and fusion modules, maintaining high fine-tuning and inference efficiency. By sampling and replaying task data, this application effectively alleviates the problem caused by differences in data quality across different tasks, reducing the difficulty of adapting to new tasks. Since the model structure designed in this scheme does not contain nonlinear layers, merging multiple LoRAs is equivalent to multiplying the parameter matrices, a process that can complete capability expansion without significantly increasing computational overhead.
[0062] The following is a specific experiment illustrating the capability expansion method of the large model provided in this application.
[0063] This application relates to a method for extending the capabilities of large-scale pre-trained models in continuous learning, aiming to alleviate the catastrophic forgetting problem through efficient module fusion techniques and to introduce new task capabilities into large models. The model capability extension algorithm of this application can be decomposed into the following four main steps: task preprocessing, independent module training, fused module training, and module merging.
[0064] 1. Task preprocessing stage.
[0065] The purpose of the task preprocessing stage is to ensure the independence of data between different tasks, thereby avoiding data interference in subsequent training. Specifically, this application first divides the training data into a total of N disjoint subsets (D1, D2, ..., D...). N ), where each subset D i Includes task T i Relevant data samples. The training dataset for each task should be partitioned according to task characteristics to ensure discriminability and independence between tasks. Furthermore, a loss function needs to be defined for each task during the task preprocessing stage. The choice of loss function depends on the nature of the task. For example, cross-entropy loss is used for classification tasks, and mean squared error loss is used for regression tasks. These loss functions are used to evaluate the performance of the model on their respective tasks and guide the optimization of model parameters.
[0066] 2. Independent module training based on LoRA.
[0067] In this stage, this application employs the LoRA (Low-Rank Adaptation) method to fine-tune individual task modules of a large-scale pre-trained model (such as LLaMA). The LoRA module design reduces computational overhead and storage requirements by introducing a low-rank matrix, ensuring that only a small subset of parameters are adjusted during fine-tuning, rather than the weights of the entire model, as shown in Figure 2. Specifically, for each task T... i For each independent LoRA module, during fine-tuning, the parameters of the LoRA module are adjusted using the gradient descent optimization algorithm. To minimize task T i The loss function is applied to optimize the model's performance on the task. Each task's LoRA module is trained independently and does not directly affect other task modules, as shown in Figure 3.
[0068] 3. Fusion module training.
[0069] To accommodate multi-tasking capabilities, this application introduces a LoRA fusion module to merge LoRA modules from different tasks. The fusion module accepts LoRA modules from multiple tasks and aggregates them into a unified representation through a fully connected layer. The rank of the fusion module is typically set to the sum of the rank values of all input LoRA modules.
[0070] When a new task T is introduced i In this application, the independently trained LoRA module and the previously fused LoRA module are inserted together into the corresponding layer of the base model M, and their parameters are fixed. A fusion module is inserted, receiving the concatenated output of multiple task modules and adjusting its parameters. During the training of the fusion module, to ensure fairness across tasks, this application employs a balanced data sampling method to ensure that the data for each task has the same weight during training.
[0071] To verify this invention, this experiment selected five common task capability dimensions: general question answering, mathematical reasoning, knowledge-based question answering, code generation, and conversational emotion recognition, as evaluation criteria for the large model's capabilities. For each capability, representative tasks were selected to verify the continuous learning performance of the capability extension method designed in this application across multiple tasks. The specific dataset composition is shown in Table 1.
[0072] Table 1. Details of the Multi-Task Continuous Learning Dataset
[0073] To verify the effectiveness of the module fusion method in continuous learning, this application conducted experiments on the LLaMA-7B model. The aforementioned datasets were used to sequentially incorporate AlpacaGPT4, Camel Math, MMLU, Code Contests, and MELD training data for continuous and efficient parameter fine-tuning. In all experiments, the batch size was fixed at 512, the maximum learning rate was set to 5e-4, the LoRA rank assigned to each task was 8, the LoRA Alpha was set to 32, and the LoRA Dropout was set to 0.05.
[0074] In continuous learning, 1K representative samples are selected as a validation set for each task category to determine whether the model has converged. Experimental results show that the module fusion method proposed in this application can effectively mitigate the forgetting phenomenon and efficiently expand new capabilities. The results show that the continuous learning performance of this application outperforms previous methods on tasks involving five different capability dimensions.
[0075] This application also compares the efficiency and performance of different continuous learning methods, evaluating three baseline methods including continuous fine-tuning and data fusion fine-tuning, as well as three forgetting mitigation methods: iCaRL based on data replay, GEM based on regularized gradient constraints, and Adapter Fusion based on isolated parameter fusion. Training was performed on the aforementioned multi-task dataset, and the overall training time was used to compare the efficiency of different methods. Specific results are shown in Table 2.
[0076] Table 2 Cumulative training time of different continuous learning methods in LLaMA-7B
[0077] Compared with other continuous learning methods, the training time of this application is relatively low. Furthermore, since the LoRA modules obtained after training can be incorporated into the weights of the base model, additional inference time is avoided, fully demonstrating the efficiency of the design method in this application.
[0078] Table 3. Average performance of different continuation learning methods in LLaMA-7B
[0079] After efficient parameter fine-tuning on multiple task datasets, the model performance of the proposed method was compared with other methods. The experimental results, shown in Table 3, indicate that the overall performance of the proposed method is close to that of data fusion methods, but with less performance loss on individual tasks. This demonstrates that the proposed module fusion method can effectively and continuously expand the model with new capabilities while maintaining good performance during the expansion process, avoiding the catastrophic forgetting problem common in conventional methods.
[0080] The above description is merely an illustration of a specific example of this application and does not impose any limitations on it. Obviously, those skilled in the art, once they understand the content and principles of this application, can make various modifications and changes in form and detail without departing from the original principles and structure of this application. However, these modifications and changes based on the ideas of this application are still considered to be within the scope of protection of the claims of this application.
Claims
1. A method for expanding the capabilities of a large model based on module fusion, characterized in that, The method includes: Get LoRA module A′ t parameters This includes the LoRA module A′ t The large model has the ability to solve t types of tasks simultaneously; Insert a trainable LoRA module into the large model M, and train the LoRA module on the training dataset of the new task t+1 to obtain the LoRA module A. t+1 parameters This includes the LoRA module A. t+1 The large model has the ability to solve a new task t+1; Insert a LoRA module A′ with fixed parameters into a large model M t LoRA module A with fixed parameters t+1 And a trainable LoRA fusion module, which is trained on a balanced sampling dataset to obtain the parameters of the LoRA fusion module. The balanced sampling dataset is constructed based on the training datasets of t tasks and the new task t+1. Merge parameters parameter and parameters Obtain LoRA module A′ t+1 parameters This includes the LoRA module A′ t+1 The large model has the ability to solve t types of tasks and a new task t+1 simultaneously.
2. The method according to claim 1, characterized in that, At t=1, obtain LoRA module A′ t parameters include: The parameters M of the fixed large model M θ ; Insert a trainable LoRA module into the large model M, and train the LoRA module on the training dataset for task t to obtain a LoRA module A suitable for task t. t parameters The training objective is to minimize the loss function for task t. The LoRA module A t And the LoRA module A t parameters As LoRA module A′ respectively t and the LoRA module A′ t parameters 3. The method according to claim 1, characterized in that, The balanced sampling dataset is constructed based on the training datasets of t tasks and a new task t+1, including: The maximum amount of data L required to obtain a balanced sampling dataset; Based on the maximum data volume L, calculate the data volume k allocated to each task t and the new task t+1; Based on the data volume k, data is sampled in the training dataset for each task t and the new task t+1 to construct the balanced sampling dataset.
4. The method according to claim 1, characterized in that, The LoRA module A′ with fixed parameters is inserted into the large model M t LoRA module A with fixed parameters t+1 And a trainable LoRA fusion module, which is trained on a balanced sampling dataset to obtain the parameters of the LoRA fusion module. include: The LoRA module A′ t The LoRA module A t+1 Insert large models with trainable LoRA fusion modules; The parameters M of the fixed large model M θ ; Based on the parameters and the parameters Fix LoRA module A′ respectively t and LoRA module A t+1 Parameters; The LoRA fusion module is trained on a balanced sampling dataset to obtain its parameters.
5. The method according to claim 1, characterized in that, The merging parameters parameter and parameters Obtain LoRA module A′ t+1 parameters include: For parameters parameter and parameters Perform a dot product operation to obtain the parameters. and the parameters As LoRA module A′ t+1 The parameters.
6. A large-scale model capability expansion system based on module fusion, characterized in that, The system includes: The first parameter acquisition module is used to obtain the LoRA module A′. t parameters This includes the LoRA module A′ t The large model has the ability to solve t types of tasks simultaneously; The second parameter acquisition module is used to insert trainable LoRA modules into the large model M, and to train the LoRA modules on the training dataset of the new task t+1 to obtain LoRA module A. t+1 parameters This includes the LoRA module A. t+1 The large model has the ability to solve a new task t+1; The third parameter acquisition module is used to insert LoRA modules A′ with fixed parameters into the large model M. t LoRA module A with fixed parameters t+1 And a trainable LoRA fusion module, which is trained on a balanced sampling dataset to obtain the parameters of the LoRA fusion module. The balanced sampling dataset is constructed based on the training datasets of t tasks and the new task t+1. The parameter merging and acquisition module is used to merge parameters. parameter and parameters Obtain LoRA module A′ t+1 parameters This includes the LoRA module A′ t+1 The large model has the ability to solve t types of tasks and a new task t+1 simultaneously.
7. An electronic device, characterized in that, The electronic device includes: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, it implements the large model capability expansion method based on module fusion as described in any one of claims 1-5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program instructions, which, when executed by a processor, implement the large model capability expansion method based on module fusion as described in any one of claims 1-5.
9. A computer program product, characterized in that, When the computer program product is run on a computer device, the computer device performs the large model capability extension method based on module fusion as described in any one of claims 1-5.