Course guiding type multi-task learning large language model fine tuning method

By employing a course-guided multi-task learning approach and training a large language model in stages, the problems of model overfitting and catastrophic forgetting in low-resource language machine translation are solved. This approach significantly improves translation fluency, terminology consistency, and format alignment, making it suitable for cross-language information retrieval and intelligent applications in minority languages.

CN121724040APending Publication Date: 2026-03-24XINJIANG UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-12
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

Traditional low-resource language machine translation suffers from problems such as the scarcity of parallel corpora, data scarcity leading to overfitting and insufficient generalization ability, catastrophic forgetting caused by task conflicts, and gradient competition, making it difficult to coordinate and balance fluency, terminology consistency, and format alignment.

Method used

We employ a course-guided multi-task learning approach, training a large language model in stages through tasks such as denoising autoencoder tasks, vocabulary-restricted translation tasks, and main machine translation tasks. By minimizing prediction error, cross-entropy loss, and regularization loss functions, we gradually enhance semantic modeling, term alignment, and cross-linguistic output capabilities.

Benefits of technology

It significantly improves translation fluency, terminology consistency, and format alignment, reduces task interference and catastrophic forgetting, and increases sacreBLEU and terminology coverage, making it suitable for cross-language communication in low-resource languages.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121724040A_ABST
    Figure CN121724040A_ABST
Patent Text Reader

Abstract

The invention provides a course-guided multi-task learning large language model fine tuning method, which comprises the following steps of: inputting monolingual corpus into a large language model, and performing restoration clean text training by minimizing a prediction error to obtain a first model; inputting the parallel corpora into the first model, and performing specified term generation training through cross entropy loss to obtain a second model; and inputting the bilingual parallel corpora into the second model, and performing cross-language output training through a regularization item loss function to obtain a large language fine tuning model. According to the method, semantic modeling is enhanced through a de-noising auto-encoder task, term alignment knowledge is integrated through a translation task limited by a vocabulary, cross-language format alignment is enhanced through a machine translation task, and a multi-stage shift arrangement training strategy is introduced, so that task interference and disastrous forgetting in multi-task learning are effectively reduced; and the security BLEU and the term coverage rate are obviously improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of large language model, in particular to a course-guided multi-task learning large language model fine-tuning method. BACKGROUND

[0002] Machine translation is a core task in the field of natural language processing, aiming to achieve automatic conversion between different natural languages, accurately preserving the semantic information and context relationship of the source language text, and improving the efficiency of cross-language information exchange and understanding. In recent years, fine-tuning large language models has been widely applied in machine translation tasks, but the fine-tuning of large language models in traditional low-resource language machine translation is limited by the scarcity of parallel corpus and the difficulty in balancing fluency, term consistency and format alignment.

[0003] Existing solutions have limitations: single-stage instruction fine-tuning is prone to overfitting and insufficient generalization due to data scarcity; denoising autoencoder tasks can improve monolingual fluency, but lack a clear cross-lingual term alignment mechanism; term table constrained translation often sacrifices sentence naturalness and coherence to ensure lexical accuracy; static multi-task learning is prone to negative transfer due to task conflicts, and has serious "gradient competition" and catastrophic forgetting problems, making it difficult to balance the fluency, term consistency and format alignment effects of translation. SUMMARY

[0004] The purpose of the present application is to provide a course-guided multi-task learning large language model fine-tuning method, which reduces task interference and catastrophic forgetting in multi-task learning through denoising autoencoder tasks, vocabulary table restricted translation tasks and main machine translation tasks.

[0005] To achieve the above purpose, the present application provides the following solutions: A course-guided multi-task learning large language model fine-tuning method, comprising the following steps: Inputting monolingual corpus randomly injected with noise into a preset large language model, and training the large language model to restore clean text by minimizing prediction error, to obtain a first model; Inputting parallel corpus spliced with term prompts into the first model, and training the first model to generate specified terms through cross-entropy loss, to obtain a second model; Inputting standard bilingual parallel corpus into the second model, and training the second model to output across languages through a regularization term loss function, to obtain a large language fine-tuning model.

[0006] Optionally, inputting monolingual corpus randomly injected with noise into a preset large language model, and training the large language model to restore clean text by minimizing prediction error, to obtain a first model, comprising: Random sampling was performed on the Uyghur general monolingual corpus to obtain sampled samples, and diverse instruction templates were extracted from a pre-set prompt word library; The sampled data is converted into the format using the instruction template to obtain the instruction data; Noisy text is obtained by randomly injecting masks, inserting characters, and shuffling sentences into instruction data using automated scripts. The first model is obtained by using noisy text as input to the model and training the large language model in the first stage with the goal of restoring clean text.

[0007] Optionally, the parallel corpus concatenated with term suggestions is input into the first model, and the first model is trained using cross-entropy loss to generate specific terms, resulting in a second model, including: A terminology table is constructed based on Uyghur-Chinese bilingual parallel sentence pairs, using an automated term extraction strategy from a mature large language model. Clean text source sentences and manually constructed correct reference translations are input into the preset large language model through the API of a mature large language model, and effective term pairs in the terminology list that meet the preset threshold requirements are selected through quantitative rules; By appending effective term pairs to the beginning of clean text source sentences, term alignment knowledge is obtained. The first model is then trained using this term alignment knowledge to obtain the second model.

[0008] Optionally, the expression for the quantitative rule is: ;in, For source language terms and target language terminology The terminology pair that makes up the term, Align confidence levels with the output terms. This is a preset threshold.

[0009] Optionally, standard bilingual parallel corpora are input into the second model, and the second model is trained across languages ​​using a regularization loss function to obtain a large language fine-tuning model, including: By incorporating the regularization loss function into the main translation task loss function, a composite loss function is obtained. Using standard Uyghur-Chinese bilingual parallel corpora as model input, the second model is trained across languages ​​through a composite loss function to obtain a large language fine-tuning model.

[0010] Optionally, cross-language output training employs a staged learning rate decay strategy, with the update rule for this strategy being: ;in, Let be the learning rate for stage s. This represents the learning rate from the previous stage. This is the attenuation coefficient.

[0011] Alternatively, the expression for the composite loss function is: ;in, The composite loss function for the primary translation task. For batch size, The average token length across all samples. For sample index, For the first The length of the token for each sample. Indexed by token Let be the logarithm of the conditional probability. For the first The first sample Source language token For the first The first sample A target language reference token. For LoRA adapter parameters, For constraint parameters, To reinforce knowledge of regularization terms, For terminology-aware parameters.

[0012] According to specific embodiments provided by the present invention, the following technical effects are disclosed: The course-guided multi-task learning large language model fine-tuning method provided by the present invention includes: inputting a monolingual corpus with randomly injected noise into a preset large language model, and training the large language model to restore clean text by minimizing prediction error to obtain a first model; inputting parallel corpus with concatenated term prompts into the first model, and training the first model to generate specified terms through cross-entropy loss to obtain a second model; inputting standard bilingual parallel corpus into the second model, and training the second model to cross-lingual output through a regularization term loss function to obtain a large language fine-tuning model. This method first enhances semantic modeling through a denoising autoencoder task; furthermore, in order to fully capture the semantic information of relations, term alignment knowledge is integrated through a vocabulary-restricted translation task; finally, cross-lingual format alignment is strengthened through the main machine translation task, and a course-based multi-stage scheduling training strategy is introduced to construct a multi-task learning large language model fine-tuning framework for course-guided model fine-tuning. This effectively reduces task interference and catastrophic forgetting in multi-task learning, and significantly improves sacreBLEU and term coverage. Attached Figure Description

[0013] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0014] Figure 1 This is a flowchart of the course-guided multi-task learning large language model fine-tuning method according to an embodiment of the present invention; Figure 2 This is a schematic diagram showing the performance comparison results of the models in an embodiment of the present invention. Detailed Implementation

[0015] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0016] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0017] like Figure 1 As shown, this embodiment of the invention provides a method for fine-tuning a large language model in a course-guided multi-task learning approach, comprising the following steps: Step 100: Input the monolingual corpus with randomly injected noise into the preset large language model, and train the large language model to restore clean text by minimizing the prediction error to obtain the first model; Step 200: Input the parallel corpus with concatenated term suggestions into the first model, and train the first model to generate specified terms using cross-entropy loss to obtain the second model; Step 300: Input the standard bilingual parallel corpus into the second model, and train the second model across languages ​​using a regularization loss function to obtain the large language fine-tuning model.

[0018] It should be noted that this embodiment adopts a progressive fine-tuning process based on parameter inheritance, where the LoRA parameters trained in the previous stage are directly used as the initial parameters for the next stage. The overall process is divided into three stages: Stage 1 (Denoising Autoencoder): The input is a monolingual corpus randomly injected with noise (masking, scrambling, etc.). The model is trained to restore clean text by minimizing the prediction error, thereby enhancing language modeling capabilities. Stage 2 (Terminology-Constrained Translation): The input is a parallel corpus with "terminology prompts" concatenated. Cross-entropy loss (with terminology token weights set to 2) is used to force the model to accurately generate the specified terms. Stage 3 (Master Machine Translation): The input is a standard bilingual parallel corpus. A loss function including a regularization term (KCR) is used to optimize the translation format while constraining the parameters to not deviate from the terminology knowledge of Stage 2. Each stage yields model parameters (LoRA adapter weights) fine-tuned for a specific task. These parameters are retained and passed to the next stage for further optimization until the final model is output in Stage 3. Specifically, in terms of strategy design during model training, the translation fluency, terminology consistency, and overall translation quality were optimized through phased task design and training strategies, resulting in significant improvements in core metrics such as sacreBLEU and COMET-22. Among these, terminology coverage increased by 19.6 percentage points, effectively balancing translation fluency, terminology consistency, and cross-language format alignment.

[0019] Preferably, the monolingual corpus with randomly injected noise is input into a pre-defined large language model, and the large language model is trained to restore clean text by minimizing the prediction error, resulting in a first model, including: Random sampling was performed on the Uyghur general monolingual corpus to obtain sampled samples, and diverse instruction templates were extracted from a pre-set prompt word library; The sampled data is converted into the format using the instruction template to obtain the instruction data; Noisy text is obtained by randomly injecting masks, inserting characters, and shuffling sentences into instruction data using automated scripts. The first model is obtained by using noisy text as input to the model and training the large language model in the first stage with the goal of restoring clean text.

[0020] Specifically, step 100 focuses on the monolingual denoising autoencoder task, used to train a Qwen-3-8B-based model to generate clean text from noisy input. Specifically, it involves randomly sampling samples (approximately 19,922 entries) from a general Uyghur monolingual corpus, and then extracting diverse instruction templates from a pre-defined prompt lexicon to provide a standard paradigm for subsequent text format unification. Next, the extracted instruction templates are used to batch convert the samples into Alpaca format instruction data. Then, three controllable noise methods—random masking, character insertion (randomly adding [MASK] at arbitrary positions), and sentence shuffling (scrambling the word order within short sentences)—are injected via an automated script to generate corresponding noisy text. This noisy text is then used as input to the Qwen-3-8B model. Based on minimizing prediction error, the model is trained with the traditional goal of "restoring clean text" to complete the first stage of training, thereby enhancing the model's lexical and syntactic modeling capabilities, robustness, and establishing strong linguistic priors for the target language.

[0021] Furthermore, the expression for minimizing the prediction error is: ;in, The average loss value for the denoising autoencoder task. For training batch size, The average token length of all samples within the batch. For sample index, For the first The length of the token for each sample. Indexed by token For the first The first sample A noisy token (i.e., noisy data input to the model). For the first The first sample A clean token (i.e., a real tag). For the model in parameters Given a noisy token At that time, a clean token is predicted. The probability, This is a logarithmic probability transformation, which converts multiplicative probabilities into addition operations, simplifying calculations and improving numerical stability. These are the trainable parameters of the first model.

[0022] Preferably, the parallel corpus concatenated with terminology suggestions is input into the first model, and the first model is trained using cross-entropy loss to generate specific terms, resulting in a second model, including: A terminology table is constructed based on Uyghur-Chinese bilingual parallel sentence pairs, using an automated term extraction strategy from a mature large language model. Clean text source sentences and manually constructed correct reference translations are input into the preset large language model through the API of a mature large language model, and effective term pairs in the terminology list that meet the preset threshold requirements are selected through quantitative rules; By appending effective term pairs to the beginning of clean text source sentences, term alignment knowledge is obtained. The first model is then trained using this term alignment knowledge to obtain the second model.

[0023] Specifically, step 200 executes a terminology-constrained translation task in the second stage, fine-tuning the model from the first stage to further improve the consistency of terminology translation. It employs Uyghur-Chinese bilingual parallel sentence pairs consistent with the main translation task (i.e., machine translation from the source language to the target language). Based on the known mature DeepSeekV3.1 large language model enhanced by few-shot prompts, it constructs a terminology list using the automated term extraction strategy provided by the DeepSeek large model and learns with few-shot prompts. Simultaneously, it calls the API of this mature large model, inputting clean source sentences and correct reference translations from a manually constructed dataset. Valid term pairs that meet the confidence threshold are selected using quantitative rules. The expression for the quantitative rules is: ; in, For source language terms and target language terminology The terminology pair that makes up the term, The term alignment confidence score output by the Large Language Model (LLM). A preset threshold is set. Then, effective term pairs are appended to the source sentence as "terminology prompts" to construct term alignment knowledge. This knowledge is then used as input samples and integrated into the self-trained fine-tuning model based on Qwen-3-8B after the first stage is completed, thereby improving the model's term translation quality and mitigating term shift.

[0024] Preferably, a standard bilingual parallel corpus is input into the second model, and the second model is trained across languages ​​using a regularization loss function to obtain a large language fine-tuning model, including: By incorporating the regularization loss function into the main translation task loss function, a composite loss function is obtained. Using standard Uyghur-Chinese bilingual parallel corpora as model input, the second model is trained across languages ​​through a composite loss function to obtain a large language fine-tuning model.

[0025] Specifically, the third stage of step 300 focuses on the main translation task, directly inheriting the LoRA adapter parameters trained in the second stage, continuing the efficient training strategy of the first two stages, and using Uyghur-Chinese standard bilingual parallel corpora (approximately 12,000 training samples each) of the same scale as the first two stages. Then, a composite loss function of "cross-entropy loss + knowledge integration regularization (KCR)" is used to train the model with the goal of balancing translation quality and knowledge preservation, thereby optimizing the model's cross-language output format alignment capability, and integrating the target language modeling capability and terminology consistency of the first two stages, ultimately improving the overall translation quality of the model.

[0026] Furthermore, this embodiment introduces a course-based multi-stage scheduling training strategy, progressing from easy to difficult, during the task transition and parameter optimization process from the second to the third stage, and incorporates a knowledge consolidation regularization mechanism. In the third stage of model training, a staged learning rate decay strategy is employed, with the update rule as follows: ; in, Let be the learning rate for stage s. This represents the learning rate from the previous stage. The attenuation coefficient is set to a default value of 0.5 in this embodiment. Simultaneously, the third stage incorporates a knowledge consolidation regularization term into the loss function of the main translation task, resulting in the following expression for the composite loss function: ; in, The composite loss function for the primary translation task. For batch size, The average token length across all samples. For sample index, For the first The length of the token for each sample. Indexed by token Let be the logarithm of the conditional probability. For the first The first sample Source language token For the first The first sample A target language reference token. For the third-stage LoRA adapter parameters, For constraint parameters, To reinforce knowledge of regularization terms, For the second stage of terminology perception parameters. The cross-entropy loss component optimizes core translation quality (such as semantic consistency and format alignment). For the KCR regularization term, this part constrains the new parameters in the third stage using the L2 norm. ) and the second-stage terminology sensitivity parameters ( The distance, The optimal value was set to 0.08 (experimental optimization value) to balance translation quality, terminology retention, and fluency, preventing the model from forgetting knowledge acquired in previous stages during fine-tuning. This strategy enables the model to progressively acquire language knowledge and translation skills, achieving robust cross-linguistic generalization.

[0027] It should be noted that the data construction process in all three stages follows three principles: "alignment with the scale of the main task, unified label format, and scripted generation process." Furthermore, the training data for all three stages is constructed using diverse templates extracted from the prompt word library into Alpaca format instructions to ensure consistency of the model input interface. Specifically, the Uyghur-Chinese parallel sentence pairs for the main translation task were obtained from multiple Uyghur news portals using automated web crawlers and analyzed based on the cosine similarity formula. Calculate the semantic consistency between the source sentence and the target sentence, where, This represents the cosine similarity score between the source and target sentences. These are source language sentences in a parallel corpus. For the source sentence The corresponding reference sentence in the target language For source sentence semantic embedding vector, For the target sentence semantic embedding vector, Embedded vector and dot product, Embedded vector The L2 norm (i.e., the magnitude of the vector). Embedded vector L2 norm, computational logic AND Consistent, A semantic consistency screening threshold was set. Only corpora meeting the consistency requirements were retained. The overall data covers typical low-resource scenarios such as government affairs, agriculture, and ethnic culture. There are approximately 12,000 training samples each in the Chinese-to-Uyghur and Uyghur-to-Chinese directions, with an additional 2,000 samples selected as the validation and test sets (1,000 samples each). Regarding parameter optimization, this embodiment uses the Qwen-3-8B model as the initial base model, employing an efficient parameter fine-tuning method, focusing only on the q-axis of the attention mechanism. proj and v projThe LoRA adapter is injected into the module, while other parameters remain frozen. To adapt to low-memory environments, 4-bit quantization, gradient checkpointing, and bfloat16 mixed precision training are used. The batch size per GPU is set to 8, the gradient accumulation step is 8 (total batch size is 64), and the LoRA parameters are set to low-rank dimension r=16, scaling factor α=32, and dropout probability 0.1, thereby ensuring the efficiency and stability of model training.

[0028] The large language model training method proposed in this embodiment of the invention gradually injects language priors, terminology knowledge, and format alignment capabilities through task scheduling from easy to difficult. Regarding regularization, a Knowledge Consolidation Regularization (KCR) term is designed to prevent the model from forgetting previously learned terminology knowledge during multi-stage training through mathematical constraints. In terms of weighted optimization, a terminology weighting mechanism is introduced into the training loss function, forcing the model to assign higher weights to domain terms during gradient updates. A performance comparison between the large language model trained in this embodiment and conventional models is detailed below. Figure 2 As shown.

[0029] The beneficial effects of this invention are as follows: 1) Through multi-stage task design such as monolingual denoising pre-training and term alignment integration, the model translation performance can still be steadily improved in scenarios with limited data, effectively alleviating the problems of model overfitting and insufficient generalization ability caused by the scarcity of parallel corpora. 2) It ensures the accuracy of domain terminology translation through terminology constraint training, and avoids the loss of text coherence and naturalness by using natural language modeling, thus taking into account translation fluency, terminology consistency and cross-language format alignment. 3) Through a course scheduling strategy that progresses from easy to difficult, a phased learning rate decay, and a knowledge consolidation regularization (KCR) mechanism, task interference, gradient competition, and catastrophic forgetting are significantly reduced, and the steady accumulation of language knowledge, terminology knowledge, and translation skills is achieved. 4) By adopting optimization schemes such as high-efficiency parameter fine-tuning (LoRA adapter), 4-bit quantization, and bfloat16 mixed precision training, the computational cost and memory usage are controlled while freezing the core parameters of the basic model. This enables the model to adapt to low-resource training environments and ensures training stability and efficiency. 5) It is applicable to diverse scenarios such as cross-language information acquisition, government public service translation, multilingual intelligent customer service, professional document translation, and digital protection of minority languages. It has the advantages of wide application scenarios and strong practicality, and provides key technical support for cross-language communication and intelligent application of low-resource languages.

[0030] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0031] Specific examples have been used to illustrate the principles and implementation methods of this invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this invention. Furthermore, those skilled in the art will recognize that, based on the ideas of this invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this invention.

Claims

1. A method for fine-tuning a large language model in a course-guided multi-task learning approach, characterized in that: Includes the following steps: The monolingual corpus with randomly injected noise is input into a pre-set large language model, and the large language model is trained to restore clean text by minimizing the prediction error to obtain the first model; The parallel corpus with concatenated term suggestions is input into the first model, and the first model is trained to generate specific terms using cross-entropy loss to obtain the second model. The standard bilingual parallel corpus is input into the second model, and the cross-language output of the second model is trained by the regularization loss function to obtain the large language fine-tuning model.

2. The method for fine-tuning a large language model in course-guided multi-task learning according to claim 1, characterized in that, The monolingual corpus with randomly injected noise is input into a pre-defined large language model, and the large language model is trained to restore clean text by minimizing the prediction error, resulting in a first model, including: Random sampling was performed on the Uyghur general monolingual corpus to obtain sampled samples, and diverse instruction templates were extracted from a pre-set prompt word library; The sampled data is converted into format using the instruction template to obtain instruction data. The instruction data is subjected to random mask injection, character insertion, and sentence scrambling using an automated script to obtain noisy text. The noisy text is used as the model input, and the large language model is trained in the first stage with the goal of restoring clean text, thus obtaining the first model.

3. The method for fine-tuning a large language model in a course-guided multi-task learning approach according to claim 1, characterized in that, The first model is input into a parallel corpus with concatenated term suggestions, and then trained using cross-entropy loss to generate specific terms, resulting in a second model, which includes: A terminology table is constructed based on Uyghur-Chinese bilingual parallel sentence pairs, using an automated term extraction strategy from a mature large language model. Clean text source sentences and manually constructed correct reference translations are input into the preset large language model through the API of the mature large language model, and effective term pairs in the terminology list that meet the preset threshold requirements are selected by quantitative rules; The effective term pairs are appended to the clean text source sentence to obtain term alignment knowledge, and the first model is trained using the term alignment knowledge to obtain the second model.

4. The method for fine-tuning a large language model in course-guided multi-task learning according to claim 3, characterized in that, The expression for the quantitative rule is: ;in, For source language terms and target language terminology The terminology pair that makes up the term, Align confidence levels with the output terms. This is a preset threshold.

5. The method for fine-tuning a large language model in course-guided multi-task learning according to claim 1, characterized in that, The standard bilingual parallel corpus is input into the second model, and the second model is trained across languages ​​using a regularization loss function to obtain a large language fine-tuning model, including: The regularization term loss function is incorporated into the main translation task loss function to obtain a composite loss function; Using the Uyghur-Chinese standard bilingual parallel corpus as model input, the second model is trained across languages ​​using the composite loss function to obtain the large language fine-tuning model.

6. The method for fine-tuning a large language model in course-guided multi-task learning according to claim 5, characterized in that, The cross-language output training employs a phased learning rate decay strategy, and the update rule of the phased learning rate decay strategy is as follows: ;in, Let be the learning rate for stage s. This represents the learning rate from the previous stage. This is the attenuation coefficient.

7. The method for fine-tuning a large language model in course-guided multi-task learning according to claim 5, characterized in that, The expression for the composite loss function is: ;in, The composite loss function for the primary translation task. For batch size, The average token length across all samples. For sample index, For the first The length of the token for each sample. Indexed by token Let be the logarithm of the conditional probability. For the first The first sample Source language token For the first The first sample A target language reference token. For LoRA adapter parameters, For constraint parameters, To reinforce knowledge of regularization terms, For terminology-aware parameters.