Fine tuning training method and platform for large language model

Through multi-source data acquisition and preprocessing, comparative analysis coefficient DBS is generated, combined with threshold judgment and correction difference calculation, the refined adjustment of the large language model is realized, the problems of insufficient data and extensive adjustment in the existing technology are solved, and the model is improved Fine-tuning effect and stability.

CN118940745APending Publication Date: 2024-11-12SHENZHEN QITIANYUN TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411072872.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-06
Publication Date
2024-11-12

AI Technical Summary

Technical Problem

The existing large language model fine-tuning training methods rely on a single data source, and the data quality and diversity are insufficient, resulting in unsatisfactory model fine-tuning results and lack of scientific quantitative basis. The adjustment process is extensive and difficult to control in detail, affecting the performance and stability of the model.

Method used

Through multi-source data acquisition and preprocessing, a comparison and analysis coefficient DBS is generated, and whether adjustments are needed are judged based on the preset threshold, and the correction difference is repeatedly calculated to achieve refined adjustments, providing scientific judgment basis to ensure that the model performance meets the expected standards.

Benefits of technology

Improve data quality and diversity, ensure the accuracy of model correction and optimization, avoid excessive or insufficient adjustment, improve the reliability and practicality of the model after it is launched, and enhance the fine-tuning effect and stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118940745A_ABST
    Figure CN118940745A_ABST
Patent Text Reader

Abstract

The invention discloses a fine tuning training method and platform for a large language model, and relates to the technical field of model adjustment, the fine tuning training method for the large language model improves data quality and diversity through collection and preprocessing of multi-source data, and provides comprehensive data support for debugging of the model. Secondly, through multiple times of data analysis and comparison, quantitative comparison analysis coefficients and correction difference values are generated, a scientific judgment basis is provided, it is ensured that correction and optimization of the model are more accurate, through multiple times of verification and adjustment, it is ensured that the performance of the model reaches an expected standard, the reliability and practicability of the model after online are improved, and through calculation of the correction difference values XZX, the accuracy of the model is improved. The model can be finely adjusted, the accuracy of each time of fine adjustment is ensured, the fine adjustment degree is dynamically adjusted according to the DBS values of two times of calculation, excessive or insufficient adjustment is avoided, and the effectiveness of fine adjustment is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of model tuning technology, specifically to a fine-tuning training method and platform for large language models. Background Technology

[0002] In the broad fields of artificial intelligence and natural language processing, large language models (LLMs), as a core technology, have seen rapid development and widespread application in recent years. LLMs can understand and generate natural language text and are widely used in a variety of specific areas, including machine translation, text generation, and question-answering systems.

[0003] However, in practical applications, different scenarios and tasks place varying demands on language models, causing general-purpose large language models to perform unsatisfactorily in specific applications. Therefore, fine-tuning large language models for specific application scenarios has become an important means of improving model performance. Current fine-tuning methods typically rely on a single data source, resulting in limited data quality and diversity, making it difficult to fully reflect the complexities of real-world applications and leading to unsatisfactory fine-tuning results. Furthermore, existing methods lack scientific quantitative basis during model fine-tuning, resulting in a relatively coarse adjustment process that is difficult to fine-tune, easily leading to over- or under-tuning, thus affecting the final performance and stability of the model. Summary of the Invention

[0004] Technical problems solved

[0005] To address the shortcomings of existing technologies, this invention provides a fine-tuning training method for large language models, which solves the problems mentioned in the background section.

[0006] Technical Solution

[0007] To achieve the above objectives, the present invention provides the following technical solution: a fine-tuning training method for large language models, characterized by the following specific steps:

[0008] S1. Data acquisition: Input the test samples into the model to be debugged and the general model for separate execution, and sample the process and results of the execution of the model to be debugged and the general model.

[0009] S2. Data processing: preprocess the multi-source data from the sampling activity and reorganize it into the first dataset, the second dataset, and the third dataset.

[0010] S3. Data analysis: Integrate and calculate the reorganized first, second, and third datasets to generate comparative analysis coefficients (DBS).

[0011] S4, data analysis, comparing the comparative analysis coefficient DBS with a preset first threshold value Y to generate a first comparison result, and judging whether the model to be debugged needs to be adjusted based on the first comparison result;

[0012] S5. Data re-analysis: If the first comparison result indicates that adjustment is needed, the model to be debugged is corrected, the comparison analysis coefficient is regenerated, the comparison analysis coefficients DBS obtained from the two calculations are calculated with the preset first threshold Y respectively to generate the correction difference XZX, and the correction difference XZX is compared with the preset second threshold R to generate the second comparison result.

[0013] S6. Based on the second comparison result, determine whether the model to be debugged needs to be adjusted again. If so, repeat steps S3 to S5. If not, put the model online.

[0014] Preferably, in step S1, the sampled data includes text data, label data and quality data;

[0015] The text data includes text length, number of sentences and average word length;

[0016] Label data includes the number of labels, label imbalance, and label consistency;

[0017] Quality data include missing value ratio, duplicate data ratio and data coverage.

[0018] Preferably, in step S2, the text data, label data and quality data collected in step S1 are preprocessed, including deduplication, noise filtering and dimensionless conversion. Then, the preprocessed multi-source data are reorganized to generate the first dataset, the second dataset and the third dataset.

[0019] The first dataset includes text length, number of sentences, and average word length. The text length is denoted as WBC1 and WBC2 according to the results of the model under test and the general model, respectively. The number of sentences is denoted as JZS1 and JZS2 according to the results of the model under test and the general model, respectively. The average word length is denoted as PJC1 and PJC2 according to the results of the model under test and the general model, respectively.

[0020] The second dataset includes the number of labels, label imbalance, and label consistency. The number of labels is denoted as BJL1 and BJL2 according to the results of the test model and the general model, respectively. The label imbalance is denoted as BPD1 and BPD2 according to the results of the test model and the general model, respectively. The label consistency is denoted as YZX1 and YZX2 according to the results of the test model and the general model, respectively.

[0021] The third dataset includes the proportion of missing values, the proportion of duplicate data, and the data coverage. The proportion of missing values ​​is denoted as QSZ1 and QSZ2 according to the results of the model to be debugged and the general model, respectively. The proportion of duplicate data is denoted as CFZ1 and CFZ2 according to the results of the model to be debugged and the general model, respectively. The data coverage is denoted as FGL1 and FGL2 according to the results of the model to be debugged and the general model, respectively.

[0022] Preferably, in step S3, the comparative analysis coefficient DBS is obtained by calculating using the following formula:

[0023]

[0024] In the formula: S1 is the first reference value, S2 is the second reference value, S1 and S2 are obtained by integrating the first dataset, the second dataset and the third dataset respectively, a1, a2 and a3 are weight values, and the values ​​of a1, a2 and a3 are adjusted and set by the user.

[0025] Preferably, the first reference value S1 and the second reference value S2 are respectively calculated and obtained by the following formulas:

[0026]

[0027]

[0028] In the formula: J1, J2, J3 and J4 are the first integrated value, the second integrated value, the third integrated value and the fourth integrated value, respectively. The values ​​of J1, J2, J3 and J4 are obtained by integrating the first dataset and the second dataset, respectively. K1, K2, K3 and K4 are the first correction value, the second correction value, the third correction value and the fourth correction value, respectively. The values ​​of K1, K2, K3 and K4 are obtained by integrating the third dataset.

[0029] Preferably, the first integrated value J1, the second integrated value J2, the third integrated value J3, the fourth integrated value J4, the first corrected value K1, and the second corrected value K2 are respectively calculated and obtained by the following formulas:

[0030] J1=b1×WBC1+b2×JZS1+b3×PJC1;

[0031] J2=c1×BJL1+c2×BPD1+c3×YZX1;

[0032] J3 = b1 × WBC2 + b2 × JZS2 + b3 × PJC2;

[0033] J4=c1×BJL2+c2×BPD2+c3×YZX2;

[0034]

[0035]

[0036]

[0037]

[0038] Where: WBC1 is the text length of the model to be debugged, JZS1 is the number of sentences of the model to be debugged, PJC1 is the average word length of the model to be debugged, BJL1 is the number of labels of the model to be debugged, BPD1 is the label imbalance degree of the model to be debugged, YZX1 is the label consistency of the model to be debugged, QSZ1 is the missing value ratio of the model to be debugged, CFZ1 is the duplicate data ratio of the model to be debugged, and FGL1 is the data coverage rate of the model to be debugged;

[0039] WBC2 is the text length of the general model, JZS2 is the number of sentences of the general model, PJC2 is the average word length of the general model, BJL2 is the number of labels of the general model, BPD2 is the label imbalance degree of the general model, YZX2 is the label consistency of the general model, QSZ2 is the missing value ratio of the general model, CFZ2 is the duplicate data ratio of the general model, and FGL2 is the data coverage rate of the general model;

[0040] b1, b2, b3, c1, c2, and c3 are weight values, and the values of b1, b2, b3, c1, c2, and c3 are adjusted and set by the user. [[ID=***]]

[0041] Preferably, in step S4, the first comparison result is specifically as follows;

[0042] When DBS < Y, it means that the current model does not need to be fine-tuned;

[0043] When DBS ≥ Y, it means that the current model needs to be fine-tuned.

[0044] Preferably, in step S5, the correction difference XZX is obtained by calculating through the following formula;

[0045]

[0046] Where: DBS1 is the comparative analysis coefficient calculated in the previous time, DBS2 is the comparative analysis coefficient calculated in the later time, and Y is the first threshold.

[0047] Preferably, the second comparison result is as follows;

[0048] When XZX < R, it means that the current is the first-level adjustment waiting level, and after re-executing according to the adjustment method, the model is put on the line;

[0049] When XZX≥R, it means that the current level is Level 2 and needs adjustment. The adjustment is re-executed by increasing the previous adjustment level by 5% each time, and then the analysis and verification are performed again until the model goes online.

[0050] The present application also provides a fine-tuning training platform for a large language model, comprising a data acquisition unit, a data processing unit, a data analysis unit, a data comparison unit, and a data re-analysis unit;

[0051] Data collection unit, which collects the running process and results of the model to be debugged and the general model, including text data, label data and quality data;

[0052] The data processing unit pre-processes the collected multi-source data, including deduplication, noise filtering and dimensionless conversion, and organizes the pre-processed data into a first data set, a second data set and a third data set;

[0053] A data analysis unit, integrating and calculating the first data set, the second data set, and the third data set to generate a comparative analysis coefficient DBS;

[0054] a data comparison unit, comparing the generated DBS with a preset first threshold value Y to generate a first comparison result;

[0055] If the first comparison result needs adjustment, the data reanalysis unit corrects the model to be debugged, recalculates the DBS, calculates the correction difference XZX between the two DBS, and compares it with the preset second threshold R to generate a second comparison result. Based on the second comparison result, it determines whether the model to be debugged needs further adjustment.

[0056] Beneficial effects

[0057] The present invention provides a fine-tuning training method for a large language model with the following beneficial effects:

[0058] 1. This fine-tuning training method for large language models improves data quality and diversity through the collection and preprocessing of multi-source data, providing comprehensive data support for model debugging. Secondly, through multiple data analyses and comparisons, quantitative comparative analysis coefficients and correction differences are generated, providing a scientific basis for judgment and ensuring more accurate model correction and optimization. Through multiple verifications and adjustments, the model's performance meets the expected standards, improving the model's reliability and practicality after launch. This series of improvements enhances the fine-tuning training results of large language models and provides stronger guarantees for the model's performance in practical applications.

[0059] 2. This fine-tuning training method for large language models can finely adjust the model by calculating the correction difference XZX, ensuring the accuracy of each fine-tuning. Based on the DBS values ​​calculated before and after, the degree of fine-tuning is dynamically adjusted to avoid over- or under-adjustment, improving the effectiveness of fine-tuning. By finely calculating the correction difference and dynamically adjusting the degree of fine-tuning, the accuracy and effectiveness of the fine-tuning process are ensured. A tiered adjustment strategy is implemented to ensure the flexibility and targeting of the fine-tuning process, improving the accuracy of the adjustment. For the second level to be adjusted, the model is gradually optimized by increasing the adjustment by 5% each time, ensuring the fine-tuning effect and avoiding the instability caused by a large one-time adjustment. Through repeated adjustments and verification until the model meets the online conditions, the final performance of the model is ensured to meet the expected requirements, improving the stability and reliability of the model. The tiered adjustment strategy and stepwise optimization method ensure the flexibility and stability of the fine-tuning process, improving the final performance of the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] Figure 1 This is a schematic diagram of the method steps of the present invention.

[0061] Figure 2 This is a schematic diagram of the platform system structure of the present invention. DETAILED DESCRIPTION

[0062] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. 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 making creative efforts are within the scope of protection of the present invention.

[0063] Example 1

[0064] Please see Figure 1 A fine-tuning training method for large language models, characterized by the following specific steps:

[0065] S1. Data acquisition: Input the test samples into the model to be debugged and the general model for separate execution, and sample the process and results of the execution of the model to be debugged and the general model.

[0066] S2. Data processing: preprocess the multi-source data from the sampling activity and reorganize it into the first dataset, the second dataset, and the third dataset.

[0067] S3. Data analysis: Integrate and calculate the reorganized first, second, and third datasets to generate comparative analysis coefficients (DBS).

[0068] S4, data analysis, comparing the comparative analysis coefficient DBS with a preset first threshold value Y to generate a first comparison result, and judging whether the model to be debugged needs to be adjusted based on the first comparison result;

[0069] S5. Data re-analysis: If the first comparison result indicates that adjustment is needed, the model to be debugged is corrected, the comparison analysis coefficient is regenerated, the comparison analysis coefficients DBS obtained from the two calculations are calculated with the preset first threshold Y respectively to generate the correction difference XZX, and the correction difference XZX is compared with the preset second threshold R to generate the second comparison result.

[0070] S6. Based on the second comparison result, determine whether the model to be debugged needs to be adjusted again. If so, repeat steps S3 to S5. If not, put the model online.

[0071] In this embodiment: Step S1 involves inputting test samples into the model to be debugged and the general model respectively. Data on the running process and results of the model to be debugged and the general model are collected to form a rich sample library. This process ensures that the collected data is diverse and representative, providing a solid foundation for subsequent data processing and analysis. The beneficial effect of this step is to comprehensively understand the performance of the model to be debugged in practical applications, providing necessary data support for subsequent debugging and optimization.

[0072] Step S2 involves preprocessing the collected multi-source data and reorganizing it into three datasets: the first dataset, the second dataset, and the third dataset. Preprocessing includes steps such as removing noisy data, imputing missing values, and standardizing data formats to ensure data quality and consistency. Organizing the data into multiple datasets helps classify and manage different types of data, improving data processing efficiency. The benefit of this step is that by standardizing and organizing the data, it improves data quality and lays the foundation for subsequent data analysis.

[0073] Step S3 involves integrating and calculating the reorganized first, second, and third datasets to generate the comparative analysis coefficients (DBS). This integrated calculation allows for a comprehensive analysis of the differences between the model under test and the general model, revealing potential problems. The beneficial effect of this step is that generating the DBS provides a quantitative basis for determining whether the model needs adjustment, thus improving the scientific rigor and accuracy of the analysis.

[0074] Step S4 involves comparing the generated comparative analysis coefficients DBS with a preset first threshold Y to generate a first comparison result. Based on this result, it is determined whether the model to be debugged needs adjustment. If the comparison result indicates that the model needs adjustment, the next step of the correction process is initiated. The beneficial effect of this step is that by setting a threshold standard, it provides an objective basis for judging model performance, ensuring that the model performance meets the requirements.

[0075] Step S5: If the first comparison result indicates that adjustment is needed, the model to be debugged is corrected, and the comparison analysis coefficients are regenerated. The comparison analysis coefficients DBS obtained from the two calculations are respectively calculated with the preset first threshold Y to generate a correction difference XZX. The correction difference XZX is then compared with the preset second threshold R to generate a second comparison result. The beneficial effect of this step is that by repeatedly calculating and comparing, it ensures that the model correction achieves the expected improvement effect, thereby improving the reliability and performance of the model.

[0076] Step S6: Based on the second comparison result, determine whether the model to be debugged needs further adjustment. If so, repeat steps S3 to S5; otherwise, deploy the model. The beneficial effect of this step is that through multiple verifications and adjustments, it ensures that the final performance of the model meets the expected standards, guaranteeing the high quality and high reliability of the deployed model.

[0077] This method improves data quality and diversity through multi-source data collection and preprocessing, providing comprehensive data support for model debugging. Secondly, through multiple data analyses and comparisons, quantitative comparative analysis coefficients and correction differences are generated, providing a scientific basis for judgment and ensuring more accurate model correction and optimization. Finally, through multiple verifications and adjustments, the model's performance is ensured to meet expected standards, improving its reliability and practicality after deployment. This series of improvements enhances the fine-tuning training effect of large language models, providing stronger assurance for the model's performance in practical applications.

[0078] Example 2

[0079] Please see Figure 1 ,In step S1, the sampled data includes text data, label data and quality data;

[0080] The text data includes text length, number of sentences and average word length;

[0081] Label data includes the number of labels, label imbalance, and label consistency;

[0082] Quality data include missing value ratio, duplicate data ratio and data coverage.

[0083] In step S2, the text data, label data and quality data collected in step S1 are preprocessed, including deduplication, noise filtering and dimensionless conversion. Then the preprocessed multi-source data are reorganized to generate the first dataset, the second dataset and the third dataset.

[0084] The first dataset includes text length, number of sentences, and average word length. The text length is denoted as WBC1 and WBC2 according to the results of the model under test and the general model, respectively. The number of sentences is denoted as JZS1 and JZS2 according to the results of the model under test and the general model, respectively. The average word length is denoted as PJC1 and PJC2 according to the results of the model under test and the general model, respectively.

[0085] The second dataset includes the number of labels, label imbalance, and label consistency. The number of labels is denoted as BJL1 and BJL2 according to the results of the test model and the general model, respectively. The label imbalance is denoted as BPD1 and BPD2 according to the results of the test model and the general model, respectively. The label consistency is denoted as YZX1 and YZX2 according to the results of the test model and the general model, respectively.

[0086] The third dataset includes the proportion of missing values, the proportion of duplicate data, and the data coverage. The proportion of missing values ​​is denoted as QSZ1 and QSZ2 according to the results of the model to be debugged and the general model, respectively. The proportion of duplicate data is denoted as CFZ1 and CFZ2 according to the results of the model to be debugged and the general model, respectively. The data coverage is denoted as FGL1 and FGL2 according to the results of the model to be debugged and the general model, respectively.

[0087] In this embodiment, the comprehensive collection of text data, label data, and quality data ensures the diversity and representativeness of the data, thereby providing comprehensive data support for model debugging. Text data (text length, number of sentences, average word length) provides basic structural information of the language model input, helping to analyze the model's performance under different text complexities. Label data (number of labels, label imbalance, label consistency) provides detailed information about label distribution, helping to detect and adjust the model's ability to process different labels. Quality data (proportion of missing values, proportion of duplicate data, data coverage) provides evaluation criteria for data quality, helping to improve the overall quality of the data. The collected data covers multiple dimensions of text structure, label distribution, and data quality, enabling comprehensive performance evaluation and comparative analysis during model debugging, ensuring the scientific nature and accuracy of the debugging process.

[0088] Preprocessing steps (deduplication, noise filtering, and dimensionless transformation) help remove redundant information and noise from the data, fill in missing values, and standardize the data format, thereby improving data quality. The preprocessed data is then reorganized into the first dataset, the second dataset, and the third dataset, which helps to classify and manage different types of data and improves the efficiency of data processing.

[0089] The rich variety of sampling data types ensures comprehensive data support for model debugging. The preprocessing steps improve the quality and consistency of the data, providing a high-quality data foundation for subsequent analysis. Through the integration and calculation of multi-source data, comparative analysis coefficients and correction differences are generated, providing a scientific basis for judgment and ensuring that the model correction and optimization are more accurate. This step improves the reliability and performance of the model, providing a stronger guarantee for the model's performance in practical applications.

[0090] Example 3

[0091] Please see Figure 1 In step S3, the comparative analysis coefficient DBS is calculated using the following formula;

[0092]

[0093] In the formula: S1 is the first reference value, S2 is the second reference value, S1 and S2 are obtained by integrating the first dataset, the second dataset and the third dataset respectively, a1, a2 and a3 are weight values, and the values ​​of a1, a2 and a3 are adjusted and set by the user.

[0094] The first reference value S1 and the second reference value S2 are obtained by calculation using the following formulas:

[0095]

[0096]

[0097] In the formula: J1, J2, J3 and J4 are the first integrated value, the second integrated value, the third integrated value and the fourth integrated value, respectively. The values ​​of J1, J2, J3 and J4 are obtained by integrating the first dataset and the second dataset, respectively. K1, K2, K3 and K4 are the first correction value, the second correction value, the third correction value and the fourth correction value, respectively. The values ​​of K1, K2, K3 and K4 are obtained by integrating the third dataset.

[0098] The first integration value J1, the second integration value J2, the third integration value J3, the fourth integration value J4, the first correction value K1, and the second correction value K2 are calculated using the following formulas respectively;

[0099] J1=b1×WBC1+b2×JZS1+b3×PJC1;

[0100] J2=c1×BJL1+c2×BPD1+c3×YZX1;

[0101] J3 = b1 × WBC2 + b2 × JZS2 + b3 × PJC2;

[0102] J4=c1×BJL2+c2×BPD2+c3×YZX2;

[0103]

[0104]

[0105]

[0106]

[0107] In the formula: WBC1 is the text length of the model to be debugged, JZS1 is the number of sentences in the model to be debugged, PJC1 is the average word length of the model to be debugged, BJL1 is the number of labels in the model to be debugged, BPD1 is the label imbalance of the model to be debugged, YZX1 is the label consistency of the model to be debugged, QSZ1 is the proportion of missing values ​​in the model to be debugged, CFZ1 is the proportion of duplicate data in the model to be debugged, and FGL1 is the data coverage of the model to be debugged.

[0108] WBC2 is the text length of the general model, JZS2 is the number of sentences in the general model, PJC2 is the average word length of the general model, BJL2 is the number of labels in the general model, BPD2 is the label imbalance of the general model, YZX2 is the label consistency of the general model, QSZ2 is the proportion of missing values ​​in the general model, CFZ2 is the proportion of duplicate data in the general model, and FGL2 is the data coverage of the general model.

[0109] b1, b2, b3, c1, c2, and c3 are weight values, and the values ​​of b1, b2, b3, c1, c2, and c3 are adjusted and set by the user.

[0110] In this embodiment, by calculating the comparative analysis coefficient DBS, a quantitative analysis of the differences between the model to be debugged and the general model is ensured, providing a scientific and accurate basis for judgment. Parameters a1, a2 and a3 are weight values, which can be adjusted by the user according to the specific situation, increasing the flexibility and adaptability of the analysis and better meeting the debugging needs of different models.

[0111] By calculating the first reference value S1 and the second reference value S2, the comprehensive evaluation of the model performance is ensured, which comprehensively reflects the performance of the model in different dimensions. S1 and S2 are calculated by integrating the first dataset, the second dataset and the third dataset, which can accurately reflect the differences between the model to be debugged and the general model, and help to discover and analyze potential problems existing in the model.

[0112] By calculating the first integration value J1, the second integration value J2, the third integration value J3, the fourth integration value J4, as well as the first correction value K1, the second correction value K2, the third correction value K3 and the fourth correction value K4 through formulas, the fine integration of data is ensured, and the accuracy of data analysis is improved. The formulas cover multiple dimensions such as text length, number of sentences, average word length, number of labels, label imbalance, label consistency, proportion of missing values, proportion of duplicate data and data coverage rate, which helps to comprehensively evaluate the model performance and ensure the reliability of the debugging results. The parameters b1, b2, b3, c1, c2 and c3 are weight values that can be adjusted by users according to needs, which increases the flexibility and adaptability of model debugging.

[0113] Through the calculation of the comparative analysis coefficient DBS, the first reference value S1 and the second reference value S2, the scientific quantitative analysis in the model debugging process is ensured, providing an accurate judgment basis. The multi-dimensional data integration and evaluation ensure the comprehensive evaluation of the model performance, help to discover potential problems and optimize them. Through the user-adjustable weight setting, the flexibility and adaptability of the analysis are increased, ensuring that the model debugging can adapt to different requirements and situations.

[0114] Embodiment 4

[0115] Please refer to Figure 1 , in step S4, the first comparison result is specifically as follows;

[0116] When DBS < Y, it means that the current model does not need to be fine-tuned;

[0117] When DBS ≥ Y, it means that the current model needs to be fine-tuned.

[0118] In step S5, the correction difference XZX is calculated through the following formula;

[0119]

[0120] In the formula: DBS1 is the comparative analysis coefficient calculated in the previous time, DBS2 is the comparative analysis coefficient calculated in the next time, and Y is the first threshold value.

[0121] When XZX < R, it means that the current is the first-level adjustment waiting level, and after re-executing according to the adjustment method, the model is put on the line;

[0122] When XZX ≥ R, it represents the current secondary adjustment level. The adjustment is re - executed in the way of increasing by 5% of the previous adjustment degree each time, and then analyzed and verified again until the model online condition is met.

[0123] In this embodiment: Through the condition judgment of DBS < Y and DBS ≥ Y, it can automatically identify whether the model needs fine - tuning, reduce manual intervention, and improve efficiency. By setting the threshold Y, the standard for fine - tuning is clarified, ensuring that the model is adjusted only after meeting certain conditions, improving the pertinence and effectiveness of fine - tuning. By automatically judging whether the model needs fine - tuning, manual intervention is reduced, and the efficiency of the fine - tuning process is improved.

[0124] Calculating the correction difference XZX can finely adjust the model, ensuring the accuracy of each fine - tuning. According to the DBS values calculated before and after, the degree of fine - tuning is dynamically adjusted, avoiding excessive or insufficient adjustments, and improving the effectiveness of fine - tuning. By finely calculating the correction difference and dynamically adjusting the degree of fine - tuning, the accuracy and effectiveness of the fine - tuning process are ensured.

[0125] Through the condition judgment of XZX < R and XZX ≥ R, a hierarchical adjustment strategy is implemented to ensure the flexibility and pertinence of the fine - tuning process, improve the accuracy of adjustment. For the secondary adjustment level, by adjusting in the way of increasing by 5% each time, the model is gradually optimized to ensure the fine - tuning effect, avoiding the instability caused by a large - scale one - time adjustment. Through repeated adjustments and verifications until the model online condition is met, it is ensured that the final performance of the model meets the expected requirements, improving the stability and reliability of the model. Through the hierarchical adjustment strategy and the gradual optimization method, the flexibility and stability of the fine - tuning process are ensured, and the final performance of the model is improved.

[0126] This application also provides a fine - tuning training platform for large - language models, including a data acquisition unit, a data processing unit, a data analysis unit, a data comparison unit, and a data re - analysis unit.

[0127] The data acquisition unit collects the operation processes and results of the to - be - debugged model and the general model, including text data, label data, and quality data.

[0128] The data processing unit pre - processes the multi - source data collected, including duplicate removal, noise filtering, and dimensionless processing, and organizes the pre - processed data into the first data set, the second data set, and the third data set.

[0129] The data analysis unit integrates and calculates the first data set, the second data set, and the third data set to generate a comparative analysis coefficient DBS.

[0130] The data comparison unit compares the generated DBS with a preset first threshold Y to generate a first comparison result.

[0131] If the first comparison result needs to be adjusted, the data reanalysis unit corrects the model to be debugged, recalculates the DBS, calculates the corrected difference XZX between the two DBSs, and compares it with the preset second threshold R to generate a second comparison result. Based on the second comparison result, it is determined whether the model to be debugged needs to be adjusted again.

[0132] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.

Claims

1. A fine-tuning training method for a large language model, characterized in that: The specific steps are as follows: S1. Data collection: input the test samples into the model to be debugged and the general model for running respectively, and sample the running process and results of the model to be debugged and the general model; S2, data processing, pre-processing the multi-source data of the sampling activity and reorganizing them into a first data set, a second data set and a third data set; S3, data analysis, integrating and calculating the rearranged first data set, the second data set and the third data set, so as to generate a comparative analysis coefficient DBS; S4, data analysis, comparing the comparison analysis coefficient DBS with a preset first threshold value Y, thereby generating a first comparison result, and judging whether the model to be debugged needs to be adjusted according to the first comparison result; S5, reanalyze the data. If the first comparison result is that adjustment is required, the model to be debugged is corrected, and the comparison analysis coefficient is regenerated. The comparison analysis coefficient DBS obtained by the two calculations is respectively calculated with the preset first threshold value Y to generate a correction difference value XZX, and the correction difference value XZX is compared and analyzed with the preset second threshold value R to generate a second comparison result; S6. According to the second comparison result, determine whether the model to be debugged needs to be adjusted again. If so, repeat steps S3 to S5. If not, put the model online.

2. The fine-tuning training method for a large language model according to claim 1, characterized in that: In step S1, the sampled data includes text data, label data and quality data; The text data includes text length, number of sentences and average word length; Label data includes the number of labels, label imbalance, and label consistency; Quality data include missing value ratio, duplicate data ratio and data coverage.

3. The fine-tuning training method for a large language model according to claim 2, characterized in that: In step S2, the text data, label data and quality data collected in step S1 are preprocessed, including deduplication, noise filtering and dimensionless conversion, and then the preprocessed multi-source data are reorganized to generate a first data set, a second data set and a third data set; The first data set includes text length, number of sentences and average word length, where the text length is recorded as WBC1 and WBC2 according to the running results of the model to be debugged and the general model, the number of sentences is recorded as JZS1 and JZS2 according to the running results of the model to be debugged and the general model, and the average word length is recorded as PJC1 and PJC2 according to the running results of the model to be debugged and the general model; The second data set includes the number of labels, label imbalance, and label consistency, where the number of labels is recorded as BJL1 and BJL2 according to the running results of the model to be debugged and the general model, the label imbalance is recorded as BPD1 and BPD2 according to the running results of the model to be debugged and the general model, and the label consistency is recorded as YZX1 and YZX2 according to the running results of the model to be debugged and the general model; The third data set includes the proportion of missing values, the proportion of duplicate data, and the data coverage rate. The proportion of missing values is denoted as QSZ1 and QSZ2 respectively according to the running results of the model to be debugged and the general model. The proportion of duplicate data is denoted as CFZ1 and CFZ2 respectively according to the running results of the model to be debugged and the general model. The data coverage rate is denoted as FGL1 and FGL2 respectively according to the running results of the model to be debugged and the general model.

4. The fine-tuning training method for a large language model according to claim 3, characterized in that: In step S3, the comparative analysis coefficient DBS is calculated and obtained through the following formula; In the formula: S1 is the first reference value, S2 is the second reference value. S1 and S2 are respectively calculated and obtained by integrating the first data set, the second data set, and the third data set. a1, a2, and a3 are weight values, and the values of a1, a2, and a3 are adjusted and set by the user.

5. The fine-tuning training method for a large language model according to claim 4, characterized in that: The first reference value S1 and the second reference value S2 are respectively calculated and obtained through the following formula: In the formula: J1, J2, J3, and J4 are the first integration value, the second integration value, the third integration value, and the fourth integration value respectively. The values of J1, J2, J3, and J4 are respectively calculated and obtained by integrating the first data set and the second data set. K1, K2, K3, and K4 are the first correction value, the second correction value, the third correction value, and the fourth correction value respectively. The values of K1, K2, K3, and K4 are respectively calculated and obtained by integrating the third data set.

6. The fine-tuning training method for a large language model according to claim 5, characterized in that: The first integration value J1, the second integration value J2, the third integration value J3, the fourth integration value J4, the first correction value K1, and the second correction value K2 are respectively calculated and obtained through the following formula; J1 = b1 × WBC1 + b2 × JZS1 + b3 × PJC1; J2 = c1 × BJL1 + c2 × BPD1 + c3 × YZX1; J3 = b1 × WBC2 + b2 × JZS2 + b3 × PJC2; J4 = c1 × BJL2 + c2 × BPD2 + c3 × YZX2; In the formula: WBC1 is the text length of the model to be debugged, JZS1 is the number of sentences of the model to be debugged, PJC1 is the average word length of the model to be debugged, BJL1 is the number of labels of the model to be debugged, BPD1 is the label imbalance degree of the model to be debugged, YZX1 is the label consistency of the model to be debugged, QSZ1 is the proportion of missing values of the model to be debugged, CFZ1 is the proportion of duplicate data of the model to be debugged, FGL1 is the data coverage rate of the model to be debugged; WBC2 is the text length of the general model, JZS2 is the number of sentences of the general model, PJC2 is the average word length of the general model, BJL2 is the number of labels of the general model, BPD2 is the label imbalance degree of the general model, YZX2 is the label consistency of the general model, QSZ2 is the proportion of missing values of the general model, CFZ2 is the proportion of duplicate data of the general model, FGL2 is the data coverage rate of the general model; b1, b2, b3, c1, c2, and c3 are weight values, and the values of b1, b2, b3, c1, c2, and c3 are adjusted and set by the user.

7. The fine-tuning training method for a large language model according to claim 6, characterized in that: In step S4, the first comparison result is as follows; When DBS < Y, it means that the current model does not need to be fine-tuned; When DBS ≥ Y, it means that the current model needs to be fine-tuned.

8. The fine-tuning training method for a large language model according to claim 7, characterized in that: In step S5, the correction difference XZX is calculated and obtained through the following formula; In the formula: DBS1 is the comparative analysis coefficient calculated in the previous time, DBS2 is the comparative analysis coefficient calculated in the later time, and Y is the first threshold value.

9. The fine-tuning training method for a large language model according to claim 8, characterized in that: The second comparison result is as follows; When XZX < R, it represents that the current is the first-level adjustment waiting level, and after re-executing according to the adjustment method, the model is put on the line; When XZX ≥ R, it represents that the current is the second-level adjustment waiting level, and according to the method of increasing the previous adjustment degree by 5% each time, the adjustment is re-executed, and then the analysis and verification are carried out again until the model online condition is met.

10. A fine-tuning training platform for a large language model, characterized by: This platform is used to execute a fine-tuning training method for a large language model described in any one of claims 1-9 above, including a data acquisition unit, a data processing unit, a data analysis unit, a data comparison unit, and a data re-analysis unit; The data acquisition unit acquires the operation processes and results of the model to be debugged and the general model, including text data, label data, and quality data; The data processing unit preprocesses the multi-source data acquired, including deduplication, noise filtering, and dimensionlessization, and arranges the preprocessed data into a first data set, a second data set, and a third data set; The data analysis unit integrates and calculates the first data set, the second data set, and the third data set to generate a comparative analysis coefficient DBS; The data comparison unit compares the generated DBS with the preset first threshold value Y to generate a first comparison result; The data re-analysis unit, if the first comparison result needs to be adjusted, corrects the model to be debugged, recalculates DBS, calculates the correction difference XZX between the DBS before and after the calculation, and compares it with the preset second threshold value R to generate a second comparison result, and judges whether the model to be debugged needs to be readjusted according to the second comparison result.

Citation Information

Patent Citations

  • Model training method and device suitable for large language model, equipment and medium

    CN116976424A

  • Large language model training method and device

    CN118036757A

  • Cross-lingual language models and pretraining of cross-lingual language models

    US20220318255A1