Large model training method and device for data enhancement based on high-quality data

By generating high-dimensional vector representations of the basic data and conducting large-model training, combining multiple iterative training and reverse data enhancement strategies, the problems of data quality and computing resource consumption in large-model training are solved, and a more efficient and accurate model is achieved Training effect.

CN119514653APending Publication Date: 2025-02-25BEIJING TONGXIANG QIANFANG TECHNOLOGY CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411554692.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-01
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

Existing large-model training technologies face problems such as uneven data quality, insufficient generalization capabilities and huge computing resource consumption, resulting in low efficiency and poor effectiveness of model training.

Method used

By inputting the basic data into the self-trained word vector model, generating high-dimensional vector representations, and inputting the input removes the position embedded large model for training and tuning, multi-round iterative training and reverse data enhancement strategies are used to improve the generalization of the model Ability and training efficiency.

Benefits of technology

It effectively improves the generalization ability and training efficiency of large models, reduces dependence on massive low-quality data, and improves the performance and stability of the model in practical applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119514653A_ABST
    Figure CN119514653A_ABST
Patent Text Reader

Abstract

The invention discloses a large model training method and device for data enhancement based on high-quality data, and the method comprises the steps: inputting basic data into a self-training word vector model, and generating a corresponding high-dimensional vector representation; inputting the high-dimensional vector representation into the embedded large model with the removal position for training and tuning to obtain a preliminarily trained large model; and performing performance evaluation on the preliminarily trained large model by using the verification set, and performing multi-round iterative training on the preliminarily trained large model based on an evaluation result to obtain a finally trained large model. By optimizing data input and enhancing the data processing capability, the effectiveness and precision of the large model are improved, the problem of excessive dependence on large data and the large model in the prior art is solved, the utilization efficiency of the large model on high-quality data is remarkably improved, the generalization capability of the large model and the performance in practical application are enhanced, and the method is suitable for popularization and application. And a technical path with higher operability and higher efficiency is provided for large model training.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of large model training, and in particular to a large model training method and device based on high-quality data for data enhancement. Background Art

[0002] In the current development of large models, the number of model parameters and computing power are constantly increasing. Pre-trained models such as GPT and BERT have exceeded the scale of billions or even hundreds of billions of parameters. However, with the increase in model parameters, although it has shown stronger expressiveness in processing complex tasks, it also brings some obvious challenges and disadvantages. First of all, ultra-large-scale models require extremely large amounts of training data to support them, which places extremely high demands on data acquisition, processing, and storage. However, relying solely on the increase in the amount of data cannot ensure the generalization ability of the model, especially when the quality of data is uneven. The model may overfit low-quality data, resulting in poor final output performance. Secondly, with the rapid increase in the amount of data, it becomes increasingly difficult to obtain a sufficient amount of high-quality data, and the diversity and accuracy of the data are difficult to guarantee, which further increases the difficulties in model training.

[0003] In addition to the difficulty in obtaining data and the uneven quality, the hardware resource consumption for training large models is also increasing. The computational complexity of large models is linearly related to the number of parameters. The larger the model, the more computing resources are required for training. This not only increases the cost of training, but also prolongs the training cycle, making the practical application and iterative optimization of the model more difficult. Therefore, the strategy of simply relying on increasing the number of model parameters and data scale to improve model performance has faced a bottleneck, and there is an urgent need to find a more efficient and refined large model training method. Summary of the invention

[0004] In order to solve the problems existing in the prior art, the present invention provides the following technical solutions.

[0005] A first aspect of the present invention provides a large model training method for data enhancement based on high-quality data, comprising:

[0006] S101, input the basic data into the self-trained word vector model to generate the corresponding high-dimensional vector representation;

[0007] S102, inputting the high-dimensional vector representation into a large model with position embedding removed, training and tuning the large model with position embedding removed, and obtaining a preliminarily trained large model;

[0008] S103, using the validation set to perform performance evaluation on the preliminarily trained large model, and based on the evaluation results, performing multiple rounds of iterative training on the preliminarily trained large model to obtain a final trained large model.

[0009] Preferably, it also includes S104, deploying the finally trained large model to the actual application scenario, and continuously optimizing the finally trained large model by using the new data obtained in the actual application scenario.

[0010] Preferably, the large model that removes position embedding adopts a word vector model based on the transformer architecture.

[0011] Preferably, inputting the high-dimensional vector representation into the large model from which position embedding is removed comprises: inputting the high-dimensional vector representation into the first layer of the transformer structure of the large model from which position embedding is removed.

[0012] Preferably, training and tuning the large model with position embedding removed includes: inputting the generated high-dimensional vector representation into the forward model and the reverse model based on the large model with position embedding removed for training respectively, during the training process of the forward model and the reverse model, the forward model uses positive examples for reasoning, and the reverse model uses negative examples for elimination and optimization, and the outputs of the forward model and the reverse model are fed back through reverse loss for the next round of training adjustment.

[0013] Preferably, a validation set is used to perform performance evaluation on the preliminarily trained large model, including calculating the accuracy, recall rate and loss value of the preliminarily trained large model, the forward model and the reverse model to determine the tuning effect of the preliminarily trained large model.

[0014] Preferably, based on the evaluation results, the hyperparameters and reverse loss weights of the initially trained large model are further adjusted, and multiple rounds of iterative training are performed until the performance of the initially trained large model meets the expected accuracy requirements.

[0015] A second aspect of the present invention provides a large model training device for data enhancement based on high-quality data, comprising:

[0016] The high-dimensional input acquisition module is used to input basic data into the self-trained word vector model to generate the corresponding high-dimensional vector representation;

[0017] A preliminary training module, used for inputting the high-dimensional vector representation into the large model with the position embedding removed, training and tuning the large model with the position embedding removed, and obtaining a preliminarily trained large model;

[0018] In the final training module, the validation set is used to perform performance evaluation on the preliminarily trained large model. Based on the evaluation results, multiple rounds of iterative training are performed on the preliminarily trained large model to obtain the final trained large model.

[0019] The third aspect of the present invention also provides a memory storing a plurality of instructions, wherein the instructions are used to implement the large model training method for data enhancement based on high-quality data as described in the first aspect.

[0020] The fourth aspect of the present invention also provides an electronic device, comprising a processor and a memory connected to the processor, the memory storing a plurality of instructions, which can be loaded and executed by the processor so that the processor can execute the large model training method for data enhancement based on high-quality data as described in the first aspect.

[0021] The beneficial effects of the present invention are as follows: the large model training method and device based on high-quality data for data enhancement provided by the present invention solves the problem of the existing technology's excessive reliance on massive low-quality data by inputting basic data into the self-trained word vector model to generate the corresponding high-dimensional vector representation of such high-quality data enhancement strategy, and avoids the uneven data quality and insufficient generalization ability during the large model training process. This application improves the effectiveness and accuracy of large models by optimizing data input and enhancing data processing capabilities, which not only solves the problem of the existing technology's excessive reliance on big data and large models, but also significantly improves the efficiency of the large model's use of high-quality data, enhances the generalization ability of the large model and its performance in practical applications, and provides a more operational and efficient technical path for large model training. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 It is a flow chart of the large model training method for data enhancement based on high-quality data according to the present invention;

[0023] Figure 2 This is a schematic diagram of the functional structure of the large model training device for data enhancement based on high-quality data according to the present invention. DETAILED DESCRIPTION

[0024] In order to better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0025] The method provided by the present invention can be implemented in the following terminal environment, and the terminal may include one or more of the following components: a processor, a memory, and a display screen. The memory stores at least one instruction, and the instruction is loaded and executed by the processor to implement the method described in the following embodiment.

[0026] The processor may include one or more processing cores. The processor uses various interfaces and lines to connect various parts of the entire terminal, and executes various functions of the terminal and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory, and calling data stored in the memory.

[0027] The memory may include random access memory (RAM) or read-only memory (ROM). The memory may be used to store instructions, programs, codes, code sets or instructions.

[0028] The display screen is used to display the user interface of each application.

[0029] In addition, those skilled in the art can understand that the structure of the above terminal does not constitute a limitation on the terminal, and the terminal may include more or fewer components, or combine certain components, or arrange the components differently. For example, the terminal also includes components such as a radio frequency circuit, an input unit, a sensor, an audio circuit, and a power supply, which will not be described in detail here.

[0030] Embodiment 1

[0031] like Figure 1 As shown, an embodiment of the present invention provides a large model training method for data enhancement based on high-quality data, including:

[0032] S101, input the basic data into the self-trained word vector model to generate the corresponding high-dimensional vector representation;

[0033] It should be noted that this step is used to generate the embedding vector of the basic data. Specifically, the self-trained word vector model is to establish a data corpus according to user needs. The data corpus contains several semantic nouns and a large amount of knowledge composed of semantics. According to the contextual distribution of semantics in these knowledge, a word vector model is trained. This word vector model maps each semantic to a vector in a high-dimensional space, so that the vectors obtained by mapping two synonyms are relatively close, and the vectors obtained by mapping two antonyms are relatively different; through the self-trained word vector model, the input symptoms, characteristics and other basic data are mapped to a high-dimensional vector space. Each basic data (such as a word or a concept) corresponds to a high-dimensional vector. These high-dimensional vectors contain rich semantic information and can well capture the similarities and differences between basic data. The high-dimensional vector representation generated by this embedding can greatly expand the diversity and expression ability of training data, thereby improving the training effect of the model without increasing the amount of data.

[0034] S102, inputting the high-dimensional vector representation into a large model with position embedding removed, training and tuning the large model with position embedding removed, and obtaining a preliminarily trained large model;

[0035] It should be noted that this step is used to enhance the embedding structure and optimize data quality. The large model adopts a word vector model based on the transformer architecture. In conventional large models, position embedding is usually used to represent the position information in the input sequence. However, in this application, since the high-dimensional vector representation is an unordered embedding rather than ordered data such as natural language, removing the position embedding can improve the generalization of the transformer model. Removing the position information makes the transformer model more stable when processing unordered and nonlinear data, thereby avoiding excessive reliance on the order of the input data.

[0036] Specifically, inputting the high-dimensional vector representation into the large model with position embedding removed includes: inputting the high-dimensional vector representation into the first layer of the transformer structure of the large model with position embedding removed as initial input data. Training and tuning the large model with position embedding removed includes: inputting the generated high-dimensional vector representation into the forward model and the reverse model based on the large model with position embedding removed for training respectively, and feeding back the outputs of the forward model and the reverse model through reverse loss for the next round of training adjustment; it should be noted that when the data corpus is constructed, the data is marked as positive data or negative data, the positive examples output by the forward model are regarded as negative examples of the reverse model, and the negative examples output by the reverse model are positive examples of the forward model, the forward data are positive examples of the forward model and negative examples of the reverse model; the reverse data are negative examples of the forward model and positive examples of the reverse model. When training the large model with removed position embedding, negative data is introduced as a means of enhancing the large model. Specifically, two models are used for parallel training. A forward model is used to infer the "may be" situation, and the other reverse model is used to infer the "cannot be" situation. The data between the two are reverse data to each other, that is, the forward model and the reverse model are used to train whether the relationship between the corpora in the established data corpus is positive or negative. The forward model refers to a word vector model that infers which conditions should be based on known answers, and the reverse model refers to a word vector model that infers which answers should not be based on known conditions. The "answers" and "conditions" mentioned above are all data corpora in the data corpus established by the self-trained word vector model. That is to say, the generated high-dimensional vector representation is input into the forward model and the reverse model for training respectively. During the training process, the forward model uses positive examples for reasoning, while the reverse model uses negative examples for elimination and optimization. The outputs of the forward model and the reverse model are fed back through the reverse loss loss for the next round of training adjustment. For example, the loss function uses the cross entropy loss, the weight coefficient of the positive example is set to 1, the weight coefficient of the negative example is set to -1, and the loss term of the negative example needs to be truncated to -1 to prevent the loss from being too small. The output data of the forward model is marked with loss, with 1 representing the positive example and -1 representing the negative example. The data generated by the forward model with -1 is put into the training data of the reverse model for the next round of training. Because the output results of the forward model and the reverse model are opposite examples to each other, the forward and reverse models are optimized by bidirectional data enhancement. The forward model adjusts the accuracy of its prediction results through the reverse data, while the reverse model is tuned to exclude irrelevant information through the forward data. This two-way complementary approach can maximize the generalization ability of the large model and improve the overall training effect.

[0037] S103, using the validation set to perform performance evaluation on the preliminarily trained large model, and based on the evaluation results, performing multiple rounds of iterative training on the preliminarily trained large model to obtain a final trained large model.

[0038] It should be noted that the validation set is used to evaluate the performance of the preliminarily trained large model, including calculating the accuracy, recall rate and loss value of the preliminarily trained large model, the forward model and the reverse model to determine the tuning effect of the preliminarily trained large model. According to the evaluation results, the hyperparameters and reverse loss weights of the preliminarily trained large model are further adjusted, and multiple rounds of iterative training are performed until the performance of the preliminarily trained large model reaches the expected accuracy requirements, and the final trained large model is obtained. The data used in iterative training is the new data collected during performance evaluation. In other words, the model is continuously tuned according to the data generated during user use, and a new round of iterative training is performed after a certain amount of new data is collected. Among them, the new data is the user's use of the word vector derived from the model to give a judgment on the approximation or opposite situation, and the recommendation is correct or wrong. These labeled data are the data for the next round of iteration. For example, a new round of iterative training is started every time 10,000 data are collected, and the data generated or labeled during the user's use of the model is used as the training data for the next round. This step can be repeated multiple times to gradually improve the generalization ability and robustness of the preliminarily trained large model in different scenarios.

[0039] An optional embodiment also includes S104, deploying the finally trained large model to the actual application scenario, and continuously optimizing the finally trained large model using new data obtained in the actual application scenario.

[0040] It should be noted that when the final trained large model reaches the expected performance, it can be deployed in actual applications. The final trained large model can be applied to various scenarios, such as auxiliary medical diagnosis, data classification, etc., especially in tasks that require processing complex and high-dimensional data. At the same time, in actual applications, the final trained large model continues to be tuned and optimized through new data to ensure the stability and accuracy of the final trained large model in long-term applications.

[0041] Through the above-mentioned implementation steps, the present application provides a large model training method based on high-quality data for data enhancement, which effectively improves the generalization ability and training efficiency of the large model without relying on massive data, and can adapt to a variety of complex data scenarios. The present application has the following significant beneficial effects:

[0042] 1. Improved data utilization efficiency of large models

[0043] This application uses a self-trained word vector model to more efficiently understand the semantics of the data, and directly inputs these high-dimensional vectors into the model, avoiding unnecessary redundant information in the data, and effectively improving the training efficiency and the accuracy of the results. That is, this application is enhanced by high-quality data, and no longer relies solely on massive data for training, solving the problem of dependence on large data sets in the prior art. By directly mapping the embedding of basic data to a high-dimensional vector space and using it as the input of a large model, the expressive power of the data is effectively expanded, and the efficiency of the large model in utilizing limited data is improved. This not only reduces the cost and difficulty of large-scale data acquisition, but also ensures the stability of data quality.

[0044] 2. Remove position embedding to enhance the generalization ability of large models

[0045] Traditional large models usually rely on position embedding to capture the position information of the input sequence, but this will cause unnecessary limitations when processing non-sequential or vectorized data. The input data of this application is an embedded vector rather than a natural language text, and the sequential information is no longer important. Therefore, removing the position embedding can make the large model more adaptable to a wider range of data types. That is, the solution of this application innovatively removes the position embedding, ensuring that the large model will not be affected by the sequence order when processing unordered data, thereby improving the generalization of the model, especially when processing complex or unordered data.

[0046] 3. Bidirectional tuning is achieved through negative data enhancement

[0047] This application can maintain a high degree of judgment in different scenarios by mutual verification and tuning of the positive and negative models, avoiding the single tuning mechanism caused by relying only on positive data, so that the model can make more comprehensive and accurate judgments when facing complex and uncertain data. Through this complementary way of positive and negative data, the model can maintain a high degree of accuracy in various situations, avoiding the limitation of relying only on one-way data. That is, the negative data enhancement strategy proposed in this application realizes the two-way tuning of the model by simultaneously training the forward reasoning model ("may be") and the reverse reasoning model ("cannot be") . The two models are each other's negative data enhancement objects, and are tuned using the loss of negative weights, thereby effectively improving the model's ability to judge complex data. This mechanism enables the model to handle uncertain data and abnormal data more accurately, enhancing the robustness of the model.

[0048] 4. Reduce model complexity and improve computational efficiency

[0049] In the traditional large model training process, as the number of parameters increases, the computational complexity and training time of the model increase dramatically. This application avoids excessive reliance on huge data and computing resources by simplifying the model structure, especially removing unnecessary position embeddings, and combining data enhancement mechanisms, making large models more efficient in training and application. That is, this application reduces the need for huge computing resources by optimizing the input structure, removing position embeddings, and improving the performance of the model through data enhancement strategies. This optimization scheme greatly reduces the complexity of the model, improves training efficiency, shortens training time, and maintains the high efficiency of the model in practical applications.

[0050] 5. Improved model accuracy and robustness

[0051] The introduction of negative data in this application provides the model with more "negative example" information, allowing large models to be optimized from more dimensions. The two-way tuning strategy allows the model to find a balance in learning in the positive and negative directions, so that it has superior performance in more practical application scenarios. That is, by introducing negative data enhancement and two-way tuning mechanisms, this application can more accurately process complex input data and improve the generalization ability of the model in different scenarios. Especially in dealing with abnormal data and boundary conditions, two-way tuning makes the model more robust and stable, avoiding the problem that traditional models are prone to errors under extreme conditions.

[0052] 6. More adaptable to diverse application scenarios

[0053] This application innovatively removes position embedding and processes basic data through a self-trained word vector model, which has a higher adaptability to diverse data types such as disordered data and structured data. This makes the final trained large model not only suitable for natural language processing, but also for various non-sequential data scenarios, such as auxiliary medical diagnosis, complex data classification, etc., and has a wider application prospect.

[0054] Embodiment 2

[0055] like Figure 2 As shown, another aspect of the present invention also includes a functional module architecture that is completely consistent with the aforementioned method flow, that is, an embodiment of the present invention also provides a large model training device for data enhancement based on high-quality data, including:

[0056] An input acquisition module 201 is used to input basic data into a self-trained word vector model to generate a corresponding high-dimensional vector representation;

[0057] A preliminary training module 202 is used to input the high-dimensional vector representation into the large model with the position embedding removed, train and tune the large model with the position embedding removed, and obtain a preliminarily trained large model;

[0058] The final training module 203 uses the validation set to perform performance evaluation on the initially trained large model. Based on the evaluation results, multiple rounds of iterative training are performed on the initially trained large model to obtain the final trained large model.

[0059] In an optional embodiment, the large model training device also includes a model application module, which is used to deploy the finally trained large model to the actual application scenario, and continuously optimize the finally trained large model by using new data obtained in the actual application scenario.

[0060] The device can be implemented through the large model training method based on high-quality data for data enhancement provided in the above-mentioned embodiment 1. The specific implementation method can be found in the description in embodiment 1 and will not be repeated here.

[0061] The present invention also provides a memory storing a plurality of instructions, wherein the instructions are used to implement the large model training method for data enhancement based on high-quality data as described in Example 1.

[0062] The present invention also provides an electronic device, comprising a processor and a memory connected to the processor, wherein the memory stores a plurality of instructions, and the instructions can be loaded and executed by the processor so that the processor can execute the large model training method for data enhancement based on high-quality data as described in Example 1.

[0063] Although preferred embodiments of the present invention have been described, additional changes and modifications may be made to these embodiments by those skilled in the art once the basic inventive concepts are known. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention. Obviously, those skilled in the art may make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A large model training method based on high-quality data for data enhancement, characterized in that: include: S101, input the basic data into the self-trained word vector model to generate the corresponding high-dimensional vector representation; S102, inputting the high-dimensional vector representation into a large model with position embedding removed, training and tuning the large model with position embedding removed, and obtaining a preliminarily trained large model; S103, using the validation set to perform performance evaluation on the preliminarily trained large model, and based on the evaluation result, performing multiple rounds of iterative training on the preliminarily trained large model to obtain a final trained large model.

2. The large model training method for data enhancement based on high-quality data according to claim 1, characterized in that: The method also includes S104, deploying the finally trained large model to an actual application scenario, and continuously optimizing the finally trained large model by using new data obtained in the actual application scenario.

3. The large model training method based on high-quality data for data enhancement according to claim 1, characterized in that: The large model that removes position embedding uses a word vector model based on the transformer architecture.

4. The large model training method for data enhancement based on high-quality data as claimed in claim 3, characterized in that: Inputting the high-dimensional vector representation into the large model with position embedding removed includes: inputting the high-dimensional vector representation into the first layer of the transformer structure of the large model with position embedding removed.

5. The large model training method based on high-quality data for data enhancement according to claim 1, characterized in that: Training and tuning the large model with position embedding removed includes: inputting the generated high-dimensional vector representation into the forward model and the reverse model based on the large model with position embedding removed for training respectively; during the training process of the forward model and the reverse model, the forward model uses positive examples for reasoning, and the reverse model uses negative examples for elimination and optimization; and the outputs of the forward model and the reverse model are fed back through reverse loss for the next round of training adjustment.

6. The large model training method for data enhancement based on high-quality data according to claim 1, characterized in that: Use the validation set to evaluate the performance of the preliminarily trained large model, including calculating the accuracy, recall rate, and loss value of the preliminarily trained large model, the forward model, and the reverse model to determine the tuning effect of the preliminarily trained large model.

7. The large model training method for data enhancement based on high-quality data according to claim 6, characterized in that: According to the evaluation results, the hyperparameters and reverse loss weights of the initially trained large model are further adjusted, and multiple rounds of iterative training are performed until the performance of the initially trained large model meets the expected accuracy requirements.

8. A large model training device for data enhancement based on high-quality data, characterized in that: include: The high-dimensional input acquisition module is used to input basic data into the self-trained word vector model to generate the corresponding high-dimensional vector representation; A preliminary training module, used for inputting the high-dimensional vector representation into the large model with the position embedding removed, training and tuning the large model with the position embedding removed, and obtaining a preliminarily trained large model; In the final training module, the validation set is used to perform performance evaluation on the preliminarily trained large model. Based on the evaluation results, multiple rounds of iterative training are performed on the preliminarily trained large model to obtain the final trained large model.

9. A memory, characterized in that: Multiple instructions are stored, and the instructions are used to implement the large model training method based on high-quality data for data enhancement as described in any one of claims 1-7.

10. An electronic device, characterized in that: It includes a processor and a memory connected to the processor, the memory stores a plurality of instructions, and the instructions can be loaded and executed by the processor, so that the processor can execute the large model training method based on high-quality data for data enhancement as described in any one of claims 1-7.

Citation Information

Patent Citations

  • BERT-LSTM-based rumor detection model

    CN112270187A

  • Answer selection method and system based on semantic union

    CN113342950A

  • AI model optimization method, system, equipment and medium

    CN117151240A

  • Prompt generation and tuning method based on large model

    CN118468932A

  • Keyboard dynamic information generation method and system based on deep learning and storage medium

    CN118732864A