Data enhancement method and device for large model training optimization, equipment and medium

By building task template functions to generate diversified data samples and adjusting the data proportion, the problems of high cost of manual annotation data and insufficient diversity in large model training are solved, and the efficiency and accuracy of model training are improved.

CN119903935APending Publication Date: 2025-04-29SHANDONG INSPUR SCI RES INST CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411675140.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-21
Publication Date
2025-04-29

AI Technical Summary

Technical Problem

Relying on manual annotation data during large model training has high cost and privacy risks, which makes it difficult to obtain sufficient diverse training data, and the existing data generation methods are insufficient in terms of quality and diversity.

Method used

By constructing task template functions, a diversified data samples are generated to form a mixed data set, and the data proportion is adjusted according to the accuracy of the model on different tasks, generating an enhanced data set.

Benefits of technology

It improves the richness and diversity of the data set, makes the enhanced data set more in line with the model training needs, improves the efficiency and accuracy of model training, and reduces the dependence on manual labeled data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119903935A_ABST
    Figure CN119903935A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of computer vision, and particularly relates to a data enhancement method, device and equipment for large model training optimization and a storage medium, and the method comprises the following steps: constructing a task template function for generating a task sample pair; diversified data samples are generated by calling different types of task template functions for multiple times to generate a mixed data set; obtaining a model set M according to a data training model generated by the template corresponding to each task; predicting the sample data of the tasks based on the model set, calculating an evaluation index value according to the prediction result of the model and the real label, and obtaining the precision of each task according to the evaluation index value; calculating the weight of a task template by using a Softmax function based on the precision of each task; according to the weight of the task template, the data proportion of different task types in the mixed data set is adjusted, and an enhanced data set is generated. And the richness and diversity of the data set are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] With the rapid development of artificial intelligence and deep learning technologies, computer vision and natural language processing models based on large models have demonstrated powerful performance in various application scenarios, such as text generation, document summarization, machine translation, and question-answering systems.

[0003] However, the training and fine-tuning process of these large models usually relies on a large number of high-quality annotated datasets, and the construction of these datasets consumes a lot of time and human resources. In addition, the source and scale of the data affect the generalization performance of the model to a certain extent. At the same time, manually annotated data has high costs and privacy risks, making it difficult to obtain sufficiently diverse training data in many scenarios. In addition, current methods of generating data are insufficient in data quality and diversity. Directly relying on data generated by existing large models often leads to problems such as similar generated content and insufficient coverage of task scenarios, which affects the performance of the model in practical applications. Summary of the invention

[0004] In order to address the problem that relying on manually labeled data during large model training optimization has high costs and privacy risks, resulting in difficulty in obtaining sufficiently diverse training data in many scenarios, the present invention provides a data enhancement method, device, equipment and medium for large model training optimization.

[0005] In a first aspect, the technical solution of the present invention provides a data enhancement method for large model training optimization, comprising the following steps: Construct a task template function for generating task sample pairs; Generate a mixed data set by calling different types of task template functions multiple times to generate diverse data samples; According to the template corresponding to each task Generated data training model Get the model set M; Based on the model set M, the sample data corresponding to N tasks are predicted, and the evaluation index value is calculated according to the prediction result of the model and the true label. According to the calculated evaluation index value, the accuracy of each task is obtained; The weight of the task template is calculated using the Softmax function based on the accuracy of each task; According to the weight of the task template, the data proportion of different task types in the mixed dataset is adjusted to generate an enhanced dataset.

[0006] By generating data through a variety of task template functions, the richness and diversity of the data set are improved. The data ratio is adjusted according to the task accuracy, making the enhanced data set more in line with the needs of model training and improving the efficiency and accuracy of model training.

[0007] As a further limitation of the technical solution of the present invention, the step of constructing a task template function for generating a task sample pair includes: constructing different types of task template functions according to the type of task sample data generated on demand and configuring parameters for each task template function; The construction process of each type of task template function is as follows: Design input and output formats according to task requirements; Formulate logical rules for generating input and output that meet task requirements; Prompt words are made according to the format and logical rules of the input and output, and the corresponding task template function is generated using the GPT-4o model; the task template function can receive input data and generate corresponding output data according to the logical rules.

[0008] Through clear task template functions, data samples that meet specific task requirements can be easily generated, which improves the flexibility and customizability of data generation.

[0009] As a further limitation of the technical solution of the present invention, the step of generating a mixed data set by repeatedly calling different types of task template functions to generate diversified data samples includes: According to the number and type of data samples to be generated, different types of task template functions are called multiple times, and different parameters are passed each time to generate different data samples; The generated data samples are integrated into a mixed data set, and data preprocessing operations are performed on the mixed data set.

[0010] By calling the task template function multiple times and passing different parameters, a variety of data samples are generated, which improves the richness of the data set. Data preprocessing operations help improve data quality and provide better data support for model training.

[0011] As a further limitation of the technical solution of the present invention, the steps of predicting sample data corresponding to N tasks based on the model set M, calculating the evaluation index value according to the prediction result of the model and the true label, and obtaining the accuracy of each task according to the calculated evaluation index value include: According to the task type and goal, select prediction accuracy as the evaluation indicator; Obtain corresponding sample data based on the type of task n; Input the acquired sample data into the model set M to obtain the prediction result set R of task n; Set the result with the highest frequency in R as the true label; According to the prediction results and true labels of each model in its corresponding task, the number of samples predicted correctly and the number of samples predicted incorrectly are counted; Calculate the prediction accuracy based on the statistical results and obtain the accuracy of each task .

[0012] By calculating the accuracy of the model, we can understand the performance of the model on different tasks, which provides an important basis for the subsequent adjustment of the data ratio.

[0013] As a further limitation of the technical solution of the present invention, the task template is calculated using the Softmax function based on the accuracy of each task. Weight The formula in the steps is as follows:

[0014] Task Templates , the ratio of the mixed data set is expressed as: ; Where s is an adjustable coefficient used to control the smoothness of the weight. Calculating weights through the Softmax function can ensure that the distribution of weights is more reasonable and stable. The introduction of coefficient s provides flexibility in controlling the smoothness of weights.

[0015] As a further limitation of the technical solution of the present invention, the step of adjusting the data proportions of different task types in the mixed data set according to the weights of the task templates to generate the enhanced data set includes: According to the calculated weight , adjust the data ratio of each task type in the mixed dataset, The amount of data for each task is , then the adjusted data volume ; Where M is the total amount of data in the mixed dataset.

[0016] By adjusting the data ratio, the enhanced data set is made more in line with the needs of model training. This improves the efficiency and accuracy of model training and helps improve the performance of the model on specific tasks.

[0017] In a second aspect, the technical solution of the present invention also provides a data enhancement device for large model training optimization, including a construction module, a mixed data set generation module, a model set generation module, a task accuracy calculation module, a template weight calculation module and an enhanced data set generation module; A building module, used to build a task template function for generating task sample pairs; A mixed data set generation module is used to generate a mixed data set by calling different types of task template functions multiple times to generate diversified data samples; Model collection generation module, used to generate templates corresponding to each task Generated data training model Get the model set M; The task accuracy calculation module is used to predict the sample data corresponding to N tasks based on the model set M, and calculate the evaluation index value according to the prediction result of the model and the true label, and obtain the accuracy of each task according to the calculated evaluation index value; The template weight calculation module is used to calculate the weight of the task template using the Softmax function based on the accuracy of each task; The enhanced dataset generation module is used to adjust the data proportions of different task types in the mixed dataset according to the weights of the task templates to generate an enhanced dataset.

[0018] As a further limitation of the technical solution of the present invention, the construction module is specifically used to construct different types of task template functions and configure parameters for each task template function according to the type of task sample data generated according to the requirements; The building blocks include a format design unit, a logic rule formulation unit, and a function writing unit; Format design unit, used to design input and output formats according to task requirements; A logic rule formulation unit, used to formulate logic rules for generating input and output that meet task requirements; A function writing unit is used to make prompt words according to the format and logical rules of the input and output, and generate corresponding task template functions using the GPT-4o model; the task template function can receive input data and generate corresponding output data according to the logical rules.

[0019] As a further limitation of the technical solution of the present invention, the task accuracy calculation module is specifically used to select the prediction accuracy as the evaluation index according to the type and goal of task n; obtain the corresponding sample data based on the type of task n; input the obtained sample data into the model set M to obtain the prediction result set R of task n; set the result with the highest frequency in R as the true label; according to the prediction results and true labels of each model in its corresponding task, count the number of samples predicted correctly and the number of samples predicted incorrectly; calculate the prediction accuracy based on the statistical results to obtain the accuracy of each task .

[0020] The task template is calculated using the Softmax function based on the accuracy of each task. Weight The formula is as follows:

[0021] Task Templates , the ratio of the mixed data set is expressed as: ; Where s is an adjustable coefficient used to control the smoothness of the weight. As a further limitation of the technical solution of the present invention, the enhanced data set generation module is used to calculate the weights , adjust the data ratio of each task type in the mixed dataset, The amount of data for each task is , then the adjusted data volume ; Where M is the total amount of data in the mixed dataset.

[0022] In a third aspect, the technical solution of the present invention also provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; the memory stores computer program instructions executable by the at least one processor, and the computer program instructions are executed by the at least one processor so that the at least one processor can execute the data enhancement method for large model training optimization as described in the first aspect.

[0023] In a fourth aspect, the technical solution of the present invention also provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions enable the computer to execute the data enhancement method for large model training optimization as described in the first aspect.

[0024] It can be seen from the above technical solutions that the present invention has the following advantages: by constructing templates adapted to specific tasks, automatically generating data samples that conform to task logic, and introducing a multi-task data mixing strategy, the data enhancement process can be made more efficient and flexible, thereby greatly improving the training effect of large models. Specifically, the method first analyzes the task and designs a template suitable for a specific task, so that the data generation process has stronger pertinence, thereby improving the matching degree between the generated samples and the actual tasks. Under the guidance of the template, data samples that meet the specific requirements of the task are automatically generated to simulate the input-output relationship in a variety of real applications. These generated data samples can be used to supplement existing data sets or directly used in the fine-tuning process of the model. In order to further improve the diversity of generated data, a multi-task data mixing strategy is proposed, that is, mixing data from different tasks in the data enhancement process, so that the model can learn common features from multiple tasks during the fine-tuning process, thereby improving its generalization performance.

[0025] This data enhancement method can not only significantly reduce the reliance on manually annotated data and reduce labor costs, but also effectively solve the problem of data content convergence that may exist in the data generation process. Since this method does not directly rely on existing large models for generation, but enhances the quality and diversity of data through specific task templates and multi-task hybrid strategies, it has significant advantages in data coverage and task performance. This data enhancement solution can help the model better understand and adapt to different task requirements, thereby demonstrating stronger adaptability and robustness in various application scenarios, enabling large-model-based artificial intelligence systems to achieve better performance in a variety of tasks such as text generation, question-answering systems, and machine translation. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] 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, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0027] Figure 1 is a schematic flow chart of a method according to an embodiment of the present invention.

[0028] Figure 2 is a schematic block diagram of an apparatus according to an embodiment of the present invention. DETAILED DESCRIPTION

[0029] In order to enable those skilled in the art to better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings 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 should fall within the scope of protection of the present invention.

[0030] like Figure 1 As shown, an embodiment of the present invention provides a data enhancement method for large model training optimization, comprising the following steps: Step 1: Construct a task template function for generating task sample pairs; Different types of task template functions are designed according to specific task requirements (such as text classification, image recognition, etc.). These functions define how to generate corresponding output data based on input data.

[0031] Step 2: Generate a mixed data set by calling different types of task template functions multiple times to generate diverse data samples; By calling these task template functions multiple times and passing different parameters, diverse data samples are generated. These data samples are then integrated into a mixed dataset.

[0032] Step 3: According to the template corresponding to each task Generated data training model Get the model set M; Step 4: Predict the sample data corresponding to N tasks based on the model set M, and calculate the evaluation index value according to the prediction result of the model and the true label. According to the calculated evaluation index value, the accuracy of each task is obtained; Predict the sample data in the mixed dataset based on the model set and calculate the accuracy (such as accuracy) of each task.

[0033] Step 5: Calculate the weight of the task template using the Softmax function based on the accuracy of each task; Step 6: According to the weight of the task template, adjust the data ratio of different task types in the mixed dataset to generate an enhanced dataset, thereby improving the quality and diversity of the dataset.

[0034] By generating data through a variety of task template functions, the richness and diversity of the data set are improved. The data ratio is adjusted according to the model accuracy, making the enhanced data set more in line with the needs of model training and improving the efficiency and accuracy of model training.

[0035] In some embodiments, the step of constructing a task template function for generating task sample pairs includes: constructing different types of task template functions according to the type of task sample data to be generated and configuring parameters for each task template function; clarifying the type of task sample data to be generated, such as text classification, image recognition, etc. The construction process of each type of task template function is as follows: Step 11: Design the input and output formats according to the task requirements; the specific requirements of the task need to be clarified, including the task type (such as text classification, question-answering system, named entity recognition, etc.), input and output formats, data size, etc. Design the specific formats of input and output according to the task requirements. The input can include documents, questions, sentences, etc., and the output can be classification labels, answers, entities, etc.; Step 12: Formulate logical rules for generating input and output that meet the task requirements; these rules can be based on language models, knowledge bases, pattern matching and other methods to ensure that the generated input and output pairs meet the task requirements.

[0036] Step 13: Prompt words are made according to the format and logical rules of the input and output, and the corresponding task template function is generated using the GPT-4o model; the task template function can receive input data and generate corresponding output data according to the logical rules.

[0037] In some embodiments, the step of generating a mixed data set by multiple calls to different types of task template functions to generate diversified data samples includes: Step 21: Call different types of task template functions multiple times according to the number and type of data samples to be generated. Pass different parameters each time to generate different data samples. Step 22: Integrate the generated data samples into a mixed data set and perform data preprocessing operations on the mixed data set.

[0038] The core work of the task template function is to generate data samples. This usually involves random sampling from a predefined distribution, generating data according to rules, etc. For example, the generation of numerical data may involve sampling from a normal distribution; the generation of categorical data may involve random selection from a predefined set of categories, etc.

[0039] The task template function controls the data sample generation process by receiving parameters. These parameters may include the range, distribution type, quantity, etc. of the data. By adjusting these parameters, data samples with different characteristics can be generated to meet the diversity requirements of the data set. After the task template function generates the data sample, it needs to be output for subsequent use. The output format may include arrays, lists, data frames, etc., depending on the needs of subsequent analysis or training tasks. The task template function should be extensible so that new data generation types can be easily added or existing types can be adjusted. This helps to adapt to changing data requirements and keep the data generation process flexible and maintainable.

[0040] The process of generating diverse data samples by calling different types of task template functions multiple times and integrating them into a mixed data set involves steps such as defining task template functions, configuring parameters, calling functions, integrating data samples, and data preprocessing. The specific work of the task template function includes data generation, parameter control, data output, and scalability. The organic combination of these steps and work can efficiently generate a data set that meets the requirements.

[0041] It should be noted that in the embodiment of the present invention, the model is trained by a weak supervision method, and the specific steps generally include the following aspects: Collect weakly labeled data containing task-related information. This data can be user-generated, noisy annotations, or inaccurate annotations obtained by other means. Use the weakly labeled data to train a weakly supervised learning model. This model can be rule-based, statistical-based, or machine learning-based. Use the trained weakly supervised learning model to predict the unlabeled data and obtain the prediction results. Evaluate the performance of the weakly supervised learning model by comparing it with known labeled data. This can be measured using indicators such as accuracy, recall, and F1 score. Estimate the accuracy of each task based on the performance of the model on the evaluation data set. This can be achieved by calculating the accuracy of the model on a specific task or other relevant indicators. Based on the estimated task accuracy, optimize and adjust the weakly supervised learning model to improve its performance. This can include adjusting model parameters, improving feature engineering, increasing training data, etc. Then, re-predict and evaluate until satisfactory accuracy is achieved. The trained model is stored, and in the embodiment of the present invention, the trained model is directly used to predict the task accuracy and calculate the task accuracy based on the prediction results.

[0042] In some embodiments, the steps of predicting sample data corresponding to N tasks based on the model set M, calculating an evaluation index value according to the prediction result of the model and the true label, and obtaining the accuracy of each task according to the calculated evaluation index value include: Step 41: Select prediction accuracy as the evaluation indicator according to the task type and goal; Specify the task type, such as classification task, regression task, etc. In this example, we assume that all tasks are classification tasks. For classification tasks, prediction accuracy is an intuitive and commonly used evaluation indicator, which indicates the proportion of samples predicted correctly by the model to the total number of samples. Therefore, we choose prediction accuracy as the indicator to evaluate the performance of each task.

[0043] Step 42: Obtain corresponding sample data based on the type of task n; Ensure that the mixed dataset has been divided according to the task type, and the dataset of each task contains all the samples of the task, including feature data and the corresponding true labels. According to the type of task that needs to be evaluated, extract the corresponding sample data from the mixed dataset. This usually involves data screening and preprocessing to ensure the integrity and accuracy of the data.

[0044] Step 43: Input the acquired sample data into the model set M to obtain the prediction result set R of task n; Make sure that a suitable prediction model has been selected for the current task, and that the model has been trained and has the ability to predict new samples. Input the sample data extracted in step 42 into the model set for prediction. The prediction result is usually a probability distribution or a direct category label, depending on the design of the model. Record the prediction result of the model for subsequent comparison with the true label.

[0045] Step 44: Set the result with the highest frequency in R as the true label, and count the number of samples predicted correctly and the number of samples predicted incorrectly according to the prediction results and true labels of each model in the corresponding task; Compare the prediction results with the true label of each sample to determine whether the prediction is correct. Use data structures such as counters or arrays to count the number of samples predicted correctly and the number of samples predicted incorrectly.

[0046] Step 45: Calculate the prediction accuracy based on the statistical results and obtain the accuracy of each task .

[0047] = Number of samples predicted correctly / total number of samples; i represents the index or identifier of the current task.

[0048] Accordingly, the task template is calculated using the Softmax function based on the accuracy of each task Weight The formula in the steps is as follows:

[0049] Task Templates , the ratio of the mixed data set is expressed as: ; Where s is an adjustable coefficient used to control the smoothness of the weight. According to the weight of the task template, the data proportion of different task types in the mixed data set is adjusted. The steps of generating an enhanced data set include: According to the calculated weight , adjust the data ratio of each task type in the mixed dataset, The amount of data for each task is , then the adjusted data volume ; Where M is the total amount of data in the mixed dataset.

[0050] like Figure 2As shown, an embodiment of the present invention also provides a data enhancement device for large model training optimization, including a construction module, a mixed data set generation module, a model set generation module, a task accuracy calculation module, a template weight calculation module and an enhanced data set generation module; A building module, used to build a task template function for generating task sample pairs; A mixed data set generation module is used to generate a mixed data set by calling different types of task template functions multiple times to generate diversified data samples; Model collection generation module, used to generate templates corresponding to each task Generated data training model Get the model set M; The task accuracy calculation module is used to predict the sample data corresponding to N tasks based on the model set M, and calculate the evaluation index value according to the prediction result of the model and the true label, and obtain the accuracy of each task according to the calculated evaluation index value; The template weight calculation module is used to calculate the weight of the task template using the Softmax function based on the accuracy of each task; The enhanced dataset generation module is used to adjust the data proportions of different task types in the mixed dataset according to the weights of the task templates to generate an enhanced dataset.

[0051] In some embodiments, the construction module is specifically used to construct different types of task template functions and configure parameters for each task template function according to the type of task sample data generated on demand; The building blocks include a format design unit, a logic rule formulation unit, and a function writing unit; Format design unit, used to design input and output formats according to task requirements; A logic rule formulation unit, used to formulate logic rules for generating input and output that meet task requirements; A function writing unit is used to make prompt words according to the format and logical rules of the input and output, and generate corresponding task template functions using the GPT-4o model; the task template function can receive input data and generate corresponding output data according to the logical rules.

[0052] In some embodiments, the task accuracy calculation module is specifically used to select the prediction accuracy as the evaluation indicator according to the type and goal of task n; obtain the corresponding sample data based on the type of task n; input the obtained sample data into the model set M to obtain the prediction result set R of task n; set the result with the highest frequency in R as the true label; according to the prediction results and true labels of each model in its corresponding task, count the number of samples predicted correctly and the number of samples predicted incorrectly; calculate the prediction accuracy based on the statistical results to obtain the accuracy of each task .

[0053] The task template is calculated using the Softmax function based on the accuracy of each task. Weight The formula is as follows:

[0054] Task Templates , the ratio of the mixed data set is expressed as: ; Where s is an adjustable coefficient used to control the smoothness of the weight. In some embodiments, the enhanced data set generation module is used to calculate the weights , adjust the data ratio of each task type in the mixed dataset, The amount of data for each task is , then the adjusted data volume ; Where M is the total amount of data in the mixed dataset.

[0055] An embodiment of the present invention also provides an electronic device, comprising: a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus. The communication bus can be used for information transmission between the electronic device and the sensor. The processor can call the logic instructions in the memory to execute the following method: Step 1: Construct a task template function for generating task sample pairs; Step 2: Generate a mixed data set by calling different types of task template functions multiple times to generate diversified data samples; Step 3: Generate a mixed data set based on the template corresponding to each task. Generated data training model Get the model set M; predict the sample data corresponding to N tasks based on the model set M, and calculate the evaluation index value according to the prediction result of the model and the true label, and obtain the accuracy of each task according to the calculated evaluation index value; Step 4: Calculate the weight of the task template using the Softmax function based on the accuracy of each task; Step 5: According to the weight of the task template, adjust the data proportion of different task types in the mixed data set to generate an enhanced data set.

[0056] In addition, the logic instructions in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program code.

[0057] The embodiment of the present invention provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions enable a computer to execute the method provided by the above method embodiment, for example, including: step 1: constructing a task template function for generating task sample pairs; step 2: generating a mixed data set by generating diversified data samples by calling different types of task template functions multiple times; step 3: generating a mixed data set according to the template corresponding to each task Generated data training model Get the model set M; predict the sample data corresponding to N tasks based on the model set M, and calculate the evaluation index value according to the prediction result of the model and the true label, and obtain the accuracy of each task according to the calculated evaluation index value; Step 4: Calculate the weight of the task template using the Softmax function based on the accuracy of each task; Step 5: According to the weight of the task template, adjust the data proportion of different task types in the mixed data set to generate an enhanced data set.

[0058] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.

[0059] An embodiment of the data enhancement device for large model training optimization provided in an embodiment of the present invention belongs to the same inventive concept as the data enhancement method for large model training optimization in the above-mentioned embodiments. For details not described in detail in the embodiment of the data enhancement device for large model training optimization, reference can be made to the embodiment of the data enhancement method for large model training optimization in the above-mentioned embodiments.

[0060] The data enhancement device for large model training optimization is a unit and algorithm step of each example described in combination with the embodiments disclosed herein, which can be implemented by electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0061] Those skilled in the art will appreciate that various aspects of the data enhancement method for large model training optimization can be implemented as a system, method or program product. Therefore, various aspects of the present disclosure can be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which can be collectively referred to as "circuit", "module" or "system" here.

[0062] Although the present invention has been described in detail with reference to the accompanying drawings and in combination with the preferred embodiments, the present invention is not limited thereto. Without departing from the spirit and essence of the present invention, a person of ordinary skill in the art may make various equivalent modifications or substitutions to the embodiments of the present invention, and these modifications or substitutions shall be within the scope of the present invention. Any person of ordinary skill in the art may easily think of changes or substitutions within the technical scope disclosed by the present invention, and these shall be within the scope of protection of the present invention.

Claims

1. A data enhancement method for large model training optimization, characterized in that: The steps include: Construct a task template function for generating task sample pairs; Generate a mixed data set by calling different types of task template functions multiple times to generate diverse data samples; According to the template corresponding to each task Generated data training model Get the model set M; Based on the model set M, the sample data corresponding to N tasks are predicted, and the evaluation index value is calculated according to the prediction result of the model and the true label. According to the calculated evaluation index value, the accuracy of each task is obtained; The weight of the task template is calculated using the Softmax function based on the accuracy of each task; According to the weight of the task template, the data proportion of different task types in the mixed dataset is adjusted to generate an enhanced dataset.

2. The data enhancement method for large model training optimization according to claim 1, characterized in that: The steps of constructing a task template function for generating task sample pairs include: constructing different types of task template functions according to the type of task sample data to be generated and configuring parameters for each task template function; the construction process of each type of task template function is as follows: Design input and output formats according to task requirements; Formulate logical rules for generating input and output that meet task requirements; Prompt words are made according to the format and logical rules of the input and output, and the corresponding task template function is generated using the GPT-4o model; the task template function can receive input data and generate corresponding output data according to the logical rules.

3. The data enhancement method for large model training optimization according to claim 2, characterized in that: The steps of generating a mixed data set by calling different types of task template functions multiple times to generate diverse data samples include: According to the number and type of data samples to be generated, different types of task template functions are called multiple times, and different parameters are passed each time to generate different data samples; The generated data samples are integrated into a mixed data set, and data preprocessing operations are performed on the mixed data set.

4. The data enhancement method for large model training optimization according to claim 3, characterized in that: The sample data corresponding to N tasks are predicted based on the model set M, and the evaluation index value is calculated according to the prediction result of the model and the true label. The steps of obtaining the accuracy of each task according to the calculated evaluation index value include: According to the task type and goal, choose prediction accuracy as the evaluation indicator; Obtain corresponding sample data based on the type of task n; Input the acquired sample data into the model set M to obtain the prediction result set R of task n; Set the result with the highest frequency in R as the true label; According to the prediction results and true labels of each model in its corresponding task, the number of samples predicted correctly and the number of samples predicted incorrectly are counted; Calculate the prediction accuracy based on the statistical results and obtain the accuracy of each task .

5. The data enhancement method for large model training optimization according to claim 4, characterized in that: The task template is calculated using the Softmax function based on the accuracy of each task. Weight The formula in the steps is as follows: Task Templates , the ratio of the mixed data set is expressed as: ; Where s is an adjustable coefficient used to control the smoothness of the weight.

6. The data enhancement method for large model training optimization according to claim 5, characterized in that: According to the weight of the task template, the data proportion of different task types in the mixed data set is adjusted. The steps of generating an enhanced data set include: According to the calculated weight , adjust the data ratio of each task type in the mixed dataset, The amount of data for each task is , then the adjusted data volume ; Where M is the total amount of data in the mixed dataset.

7. A data enhancement device for large model training optimization, characterized in that: It includes a construction module, a mixed data set generation module, a model set generation module, a task accuracy calculation module, a template weight calculation module and an enhanced data set generation module; A building module, used to build a task template function for generating task sample pairs; A mixed data set generation module is used to generate a mixed data set by calling different types of task template functions multiple times to generate diversified data samples; Model collection generation module, used to generate templates corresponding to each task Generated data training model Get the model set M; The task accuracy calculation module is used to predict the sample data corresponding to N tasks based on the model set M, and calculate the evaluation index value according to the prediction result of the model and the true label, and obtain the accuracy of each task according to the calculated evaluation index value; The template weight calculation module is used to calculate the weight of the task template using the Softmax function based on the accuracy of each task; The enhanced dataset generation module is used to adjust the data proportions of different task types in the mixed dataset according to the weights of the task templates to generate an enhanced dataset.

8. The data enhancement device for large model training optimization according to claim 7, characterized in that: The task accuracy calculation module uses the Softmax function to calculate the task template based on the accuracy of each task. Weight The formula in the steps is as follows: Task Templates , the ratio of the mixed data set is expressed as: ; Where s is an adjustable coefficient used to control the smoothness of the weight.

9. An electronic device, characterized in that: The electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; the memory stores computer program instructions executable by the at least one processor, and the computer program instructions are executed by the at least one processor to enable the at least one processor to execute the data enhancement method for large model training optimization as described in any one of claims 1 to 6.

10. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium stores computer instructions, which enable the computer to execute the data enhancement method for large model training optimization as described in any one of claims 1 to 6.