Model updating method, electronic equipment, storage medium and program product
By updating the probability distribution table when the model state is abnormal and adjusting the output strategy, the low accuracy problem caused by frequent switching of the model is solved, and the rapid recovery of model performance and improvement of accuracy is achieved.
Patent Information
- Application Number
- CN202510885829.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-27
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2045-06-27
AI Technical Summary
The model frequently switches ideas during dynamic adjustment of inference, which leads to premature abandoning correct inference ideas, extending the inference time, wasting computing resources, and low accuracy of output results.
By obtaining the current input data of the target model and determining that its status is abnormal, the probability distribution table is updated, and the input data is processed according to the updated probability distribution table, and the output strategy is adjusted.
Quickly restore model performance, reduce error output caused by abnormal states, and improve the accuracy of model output results.
Smart Images

Figure CN120406989A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular, to a model updating method, an electronic device, a storage medium, and a program product. Background Art
[0002] With the development of artificial intelligence, models can imitate the process of human deep thinking, continuously explore various reasoning strategies, reflect on decisions, and iteratively optimize solutions when dealing with complex tasks, providing innovative solutions in scenarios such as mathematical problem solving and code generation.
[0003] During the process of the model dynamically adjusting its reasoning, it may switch ideas more frequently, resulting in the model prematurely abandoning potentially correct reasoning ideas and generating a large amount of intermediate reasoning data, prolonging the reasoning time, wasting computing resources, and leading to a low accuracy of the model output results. Summary of the Invention
[0004] Embodiments of the present application provide a model updating method, an electronic device, a storage medium, and a program product to at least solve the problem of low accuracy of model output results in related technologies.
[0005] The present application provides a model updating method, including:
[0006] Obtaining current input data input to the target model;
[0007] Determining the current state of the target model, where the current state includes a normal state and an abnormal state, and the current state is determined according to a first index value and a second index value of the target model. The first index value is used to represent the degree of overthinking of the target model during the solution process, and the second index value is used to represent the degree of diversity of ideas of the target model during the solution process;
[0008] In the case where the current state of the target model is an abnormal state, performing an update process on the probability distribution table corresponding to the target model, and processing the current input data according to the target model and the updated probability distribution table to obtain a current output result, where the probability distribution table is used to indicate the probability of each token among multiple tokens being an output token.
[0009] The present application further provides a model updating device, including:
[0010] An obtaining module, configured to obtain current input data input to the target model;
[0011] A determination module, configured to determine the current state of a target model, where the current state includes a normal state and an abnormal state, and the current state is determined according to a first index value and a second index value of the target model. The first index value is used to represent the degree of overthinking of the target model during the solving process, and the second index value is used to represent the degree of diversity of thinking of the target model during the solving process;
[0012] An output module, configured to, when the current state of the target model is an abnormal state, perform an update process on the probability distribution table corresponding to the target model, and process the current input data according to the target model and the updated probability distribution table to obtain a current output result. The probability distribution table is used to indicate the probability of each token among multiple tokens being the output token.
[0013] This application also provides an electronic device, including: a memory, configured to store a computer program; a processor, configured to implement the steps of any of the above model update methods when executing the computer program.
[0014] This application also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above model update methods are implemented.
[0015] This application also provides a computer program product, including a computer program. When the computer program is executed by a processor, the steps of any of the above model update methods are implemented.
[0016] Through this application, since, when the current state of the target model is an abnormal state, an update process is performed on the probability distribution table corresponding to the target model, and the current input data is processed according to the target model and the updated probability distribution table to obtain a current output result, the output strategy of the target model can be adjusted, the performance of the target model can be quickly restored, the wrong output caused by the abnormal state can be reduced, and the accuracy of the model output result is improved. Description of the Drawings
[0017] To more clearly illustrate the embodiments of this application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of this application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0018] Figure 1 It is a schematic structural diagram of a model update system provided by an embodiment of this application;
[0019] Figure 2 It is a schematic flowchart of a model update method provided by an embodiment of this application;
[0020] Figure 3 It is a schematic flowchart of another model update method provided by an embodiment of the present application;
[0021] Figure 4 It is a schematic flowchart of yet another model update method provided by an embodiment of the present application;
[0022] Figure 5 It is a schematic flowchart of another model update method provided by an embodiment of the present application;
[0023] Figure 6 It is a schematic flowchart of yet another model update method provided by an embodiment of the present application;
[0024] Figure 7 It is a schematic structural diagram of a model update device provided by an embodiment of the present application;
[0025] Figure 8 It is a schematic structural diagram of an electronic device provided by the present application. Detailed implementation manners
[0026] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts fall within the protection scope of the present application.
[0027] It should be noted that in the description of the present application, the terms "include", "comprise" or any other variant thereof are intended to cover a non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. The terms "first", "second", etc. in the present application are used to distinguish similar objects and are not used to describe a specific order or sequence.
[0028] With the development of artificial intelligence, large language models can imitate the process of human deep thinking, continuously explore various reasoning strategies, reflect on decisions and iteratively optimize solutions when dealing with complex tasks, and provide innovative solutions in scenarios such as mathematical problem solving and code generation.
[0029] In the process of a large language model dynamically adjusting its reasoning, it may switch ideas more frequently, resulting in the model prematurely abandoning a possibly correct reasoning idea and generating a large amount of intermediate reasoning data, prolonging the reasoning time, wasting computing resources, and resulting in a low accuracy of the model output result.
[0030] To solve the above technical problems, an embodiment of the present application provides a model update method. By obtaining the current input data input to the target model, when the current state of the target model is an abnormal state, the probability distribution table corresponding to the target model is updated, and the current input data is processed according to the target model and the updated probability distribution table to obtain the current output result. In this way, when the current state of the target model is an abnormal state, by updating the probability distribution table to adjust the output strategy of the target model, the performance of the target model can be quickly restored, the incorrect output caused by the abnormal state can be reduced, and the accuracy of the model output result is improved.
[0031] To enable those skilled in the art of the present technology to better understand the solution of the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0032] Combined with the specific application environment architecture or specific hardware architecture on which the execution of the model update method depends, the specific application environment architecture or specific hardware architecture is described herein.
[0033] Figure 1 It is a schematic structural diagram of a model update system provided by an embodiment of the present application. Please refer to Figure 1 , Figure 1 It may include a data input layer, a model state monitoring layer, a model update layer, and a model output layer.
[0034] Among them, the data input layer can be used to provide the input data required by the target model.
[0035] For example, the input data can be text data input by the user, or sensor data, or numerical data, etc.
[0036] The data input layer can also be used to clean, format, and preprocess the input data to ensure that the data meets the input requirements of the model.
[0037] For example, preprocessing operations such as word segmentation and stop word removal can be performed on the text data.
[0038] The model state monitoring layer can store the historical output results of the target model.
[0039] The model state monitoring layer can be used to analyze the historical output results of the target model, determine multiple index values of the target model, and determine the current state of the target model.
[0040] The model update layer can store the probability distribution table of the target model.
[0041] The probability distribution table can be the basis for the dynamic adjustment of the output of the target model. By updating the probability distribution table, the target model can better adapt to the changes in the input data and quickly recover the performance of the target model.
[0042] The output layer of the model can be used to generate output results based on the input data and the probability distribution table.
[0043] For example, in a natural language generation task, a more appropriate token is selected as the output according to the updated probability distribution table to obtain the output result.
[0044] Figure 2 It is a schematic flowchart of a model update method provided by an embodiment of the present application. The execution subject of the embodiment of the present application can be a processor. The processor can be implemented by software or by a combination of software and hardware. Please refer to Figure 2 and the method includes:
[0045] S201. Obtain the current input data input to the target model.
[0046] The target model can be a large language model, which is not limited here.
[0047] For example, the target model can be a long thinking chain model.
[0048] The long thinking chain model can refer to a large language model that can generate a long reasoning process and solves complex problems by simulating the way of human step-by-step thinking.
[0049] The current input data can be the input data received by the target model at the current moment.
[0050] The input data can refer to the specific data content that the target model needs to process.
[0051] The current input data input to the target model can be obtained in response to the data input by the user in the text box control of the target model and the selection operation on the confirmation control of the target model.
[0052] S202. Determine the current state of the target model.
[0053] The current state includes a normal state and an abnormal state.
[0054] The current state is determined according to the first index value and the second index value of the target model.
[0055] The first index value is used to represent the degree of overthinking of the target model during the solution process.
[0056] The second index value is used to represent the degree of diversity of ideas of the target model during the solution process.
[0057] Optionally, the current state of the target model can be determined in the following manner: obtain multiple historical output results of the target model, and input the multiple historical output results into a state prediction model to determine the current state of the target model.
[0058] Optionally, the current state of the target model can be determined in the following manner: obtain multiple historical output results of the target model; determine a first metric value and a second metric value according to the multiple historical output results; determine the current state of the target model according to the first metric value and the second metric value.
[0059] Among them, a first metric value and a second metric value can be determined according to multiple historical output results through multiple preset formulas.
[0060] A first weighted value of the first metric value can be determined according to a first preset weight corresponding to the first metric value; a second weighted value of the second metric value can be determined according to a second preset weight corresponding to the second metric value; the current state of the target model can be determined according to the first weighted value and the second weighted value.
[0061] Among them, the first preset weight can be a preset value, and the second preset weight can be a preset value, which are not limited herein.
[0062] The current state of the target model can be determined according to whether the first weighted value is within a first preset range and whether the second weighted value is within a second preset range.
[0063] S203. In the case where the current state of the target model is an abnormal state, perform an update process on the probability distribution table corresponding to the target model, and process the current input data according to the target model and the updated probability distribution table to obtain a current output result.
[0064] The probability distribution table is used to indicate the probability of each token among multiple tokens being an output token.
[0065] The probability distribution table can store the probability of each token among multiple tokens in a vocabulary as an output token.
[0066] The update process can be used to change the output probabilities of multiple preset tokens among multiple tokens.
[0067] Optionally, in the case where the current state of the target model is an abnormal state, the probability distribution table corresponding to the target model can be updated according to a preset algorithm, and the updated probability distribution table is used to process the current input data in combination with other parameters of the target model to obtain a current output result.
[0068] Optionally, when the current state of the target model is an abnormal state, the target model can be used to analyze and process the current input data to determine the first initial probability distribution table. Based on the first initial probability distribution table, the first output token is generated; based on the first i output tokens, the (i + 1)-th initial probability distribution table is determined; the (i + 1)-th initial probability distribution table is updated to obtain the (i + 1)-th updated probability distribution table, and the (i + 1)-th output token is generated based on the (i + 1)-th updated probability distribution table.
[0069] Among them, i takes values of 1, 2, ……, n until the n-th output token meets the preset termination condition, and the current output result is determined based on the n output tokens.
[0070] The first initial probability distribution table can directly determine the first output token.
[0071] The (i + 1)-th initial probability distribution table is used to indicate the initial probability of each token among multiple tokens being the (i + 1)-th output token.
[0072] Assume that when the t-th token is generated, the initial prediction value of the output layer of the model is obtained and denoted as logit t , the length of this initial prediction value is the same as the length of the vocabulary when the target model is trained. A preset function can be used to calculate the initial probability values of multiple tokens at this position based on the initial prediction value to obtain the initial probability distribution table.
[0073] For example, assume that when generating the t-th token based on the previously generated (t - 1) tokens, the initial probability value that this token is w can be expressed by the following formula:
[0074]
[0075] Among them, V can represent the vocabulary of the target model, and the vocabulary includes multiple tokens. can represent the initial prediction value corresponding to any token v among the multiple tokens in the vocabulary. can represent the initial prediction value corresponding to the token w, and exp() can represent the exponential function.
[0076] The preset termination condition can be to determine whether the output token is a preset termination token.
[0077] Optionally, when the current state of the target model is a normal state, the current input data is processed according to the target model to obtain the current output result.
[0078] A model update method provided in this embodiment includes obtaining current input data input to a target model; determining a current state of the target model, where the current state includes a normal state and an abnormal state, and the current state is determined according to a first index value and a second index value of the target model. The first index value is used to represent the degree of overthinking of the target model during the solution process, and the second index value is used to represent the degree of diversity of ideas of the target model during the solution process. When the current state of the target model is an abnormal state, perform an update process on the probability distribution table corresponding to the target model, and process the current input data according to the target model and the updated probability distribution table to obtain a current output result. The probability distribution table is used to indicate the probability of each token among multiple tokens being an output token. In this way, when the current state of the target model is an abnormal state, by updating the probability distribution table to adjust the output strategy of the target model, the performance of the target model can be quickly restored, the wrong output caused by the abnormal state can be reduced, and the accuracy of the model output result is improved.
[0079] Next, in combination with Figure 3 , the specific process of updating the (i + 1)-th initial probability distribution table to obtain the (i + 1)-th updated probability distribution table will be explained.
[0080] Figure 3 is a schematic flowchart of another model update method provided in an embodiment of the present application. Based on the above embodiment, refer to Figure 3 , this method includes:
[0081] S301. Obtain multiple preset tokens corresponding to the target model.
[0082] The preset tokens are used to represent the idea conversion of the target model during the solution process.
[0083] For example, the multiple preset tokens may include but, etc., however, or, may, perhaps, re, let me again, let us again, Wait, Hmm, but, perhaps, alternatively, again, Or, etc.
[0084] The multiple preset tokens corresponding to the target model can be obtained from the storage space.
[0085] S302. Determine the target order corresponding to the target token among the first i output tokens.
[0086] The target token is any one of the multiple preset tokens.
[0087] The target order is the maximum order of the target token among the first i output tokens.
[0088] The target order corresponding to the target token can be used to represent the order corresponding to any preset token closest to the (i + 1)-th output token.
[0089] Among the first i output tokens, the order corresponding to at least one target token can be determined respectively, and the largest order among the at least one order is determined as the target order.
[0090] S303. Determine whether the interval between the target order and the (i + 1)-th corresponding order is less than the first threshold.
[0091] If so, execute S304;
[0092] If not, execute S305.
[0093] The interval can be the interval between the target token and the (i + 1)-th output token.
[0094] The interval between the target order and the (i + 1)-th corresponding order can be used to determine whether the interval is less than the first threshold.
[0095] S304. Perform an update process on multiple tokens in the (i + 1)-th initial probability distribution table to obtain the (i + 1)-th updated probability distribution table.
[0096] For any token, according to preset conditions, it can be determined whether the initial predicted value corresponding to the token needs to be updated. If so, obtain the updated predicted value corresponding to the token. If not, determine the initial predicted value corresponding to the token as the updated predicted value. According to the updated predicted values corresponding to multiple tokens respectively, the (i + 1)-th updated probability distribution table is determined.
[0097] Among them, the preset conditions can include whether the initial preset value is less than the second threshold, whether the token is a preset token, etc., which are not limited here.
[0098] S305. Determine the (i + 1)-th initial probability distribution table as the (i + 1)-th updated probability distribution table.
[0099] If the interval between the target order and the (i + 1)-th corresponding order is greater than the first threshold, there is no need to update the (i + 1)-th initial probability distribution table.
[0100] In the embodiments of the present application, the implementation content of each step can refer to the description of the corresponding step or operation in the above method embodiments, and the repeated content will not be elaborated.
[0101] A model update method provided in this embodiment obtains multiple preset tokens corresponding to a target model, where the preset tokens are used to represent the thought conversion of the target model during the solution process; among the first i output tokens, determine the target order corresponding to the target token, where the target token is any one of the multiple preset tokens, and the target order is the maximum order of the target token among the first i output tokens; determine whether the interval between the target order and the corresponding order of i + 1 is less than a first threshold; if so, update multiple tokens in the (i + 1)-th initial probability distribution table to obtain the (i + 1)-th updated probability distribution table; if not, determine the (i + 1)-th initial probability distribution table as the (i + 1)-th updated probability distribution table. In this way, by introducing a judgment mechanism for preset tokens and target orders, the probability distribution of the output tokens of the model is dynamically adjusted, enabling the model to explore each reasoning idea more deeply when facing complex problems, avoiding prematurely abandoning a possibly correct reasoning direction, reducing the invalid content generated due to frequent switching of ideas, making the reasoning process more efficient, and improving the accuracy of the model output results.
[0102] Next, in combination with Figure 4 , the specific process of updating multiple tokens in the (i + 1)-th initial probability distribution table to obtain the (i + 1)-th updated probability distribution table will be explained.
[0103] Figure 4 is a schematic flowchart of another model update method provided in an embodiment of this application. On the basis of the above embodiment, refer to Figure 4 , this method includes:
[0104] S401. For any token, determine whether the token is a preset token.
[0105] If so, execute S402;
[0106] If not, execute S407.
[0107] The preset token can be used to represent the thought conversion of the target model during the solution process.
[0108] S402. Determine whether the initial prediction value corresponding to the token is less than a second threshold to obtain a judgment result.
[0109] The second threshold can be a preset value.
[0110] The initial prediction value can be used to represent the raw prediction value output by the target model without normalization processing.
[0111] For example, the initial prediction value can be the log-odds vector corresponding to the token.
[0112] The judgment result may include that the initial prediction value is less than the second threshold, and that the initial prediction value is greater than or equal to the second threshold.
[0113] S403. Determine a first correction coefficient according to the target order.
[0114] The first correction coefficient may be a coefficient for correcting the initial prediction value according to the distance from the position of the last thought switch.
[0115] The closer the current position is to the position of the last path switch, the greater the value of the first correction coefficient.
[0116] A first mapping table may be obtained, and the first correction coefficient is determined according to the interval between the target order and the (i + 1)-th corresponding order and the first mapping table.
[0117] Wherein, the first mapping table may include multiple intervals and the first correction coefficient corresponding to each interval.
[0118] Optionally, the first correction coefficient may be determined according to the target order in the following manner: obtain a first preset parameter corresponding to the first correction coefficient; determine a first difference between a first preset maximum value and a first preset minimum value; determine the interval between the target order and the (i + 1)-th corresponding order; determine a first factor according to the interval and a first threshold; determine a first value according to the product of the first difference, the first factor and a first preset coefficient; and determine the difference between the first preset maximum value and the first value as the first correction coefficient.
[0119] Wherein, the first preset parameter includes a first preset maximum value and a first preset minimum value.
[0120] For example, the first correction coefficient may be determined by the following formula :
[0121]
[0122] Wherein, and are respectively the maximum value and the minimum value that can be taken set by humans, t last is the target order, t is the (i + 1)-th corresponding order, and a is a constant.
[0123] a may be used to represent that only the preset tokens that appear again within the range of a for the preset tokens of the last thought switch are penalized. The larger the value of a, the wider the penalty range for the initial prediction value and the stronger the penalty intensity.
[0124] S404. Determine a second correction coefficient according to the (i + 1)-th corresponding order.
[0125] The second correction coefficient may be a coefficient for correcting the initial prediction value according to the distance of the current position from the starting position of the reasoning.
[0126] When the position corresponding to i + 1 is within the starting position range of the reasoning, the target model is allowed to perform a more flexible switching of thinking. When a relatively large number of tokens have been generated in the previous sequence corresponding to the position of i + 1, the penalty is increased to reduce the possibility of switching thinking again.
[0127] The second mapping table can be obtained, and according to the order corresponding to i + 1 and the second mapping table, the second correction coefficient is determined.
[0128] Among them, the second mapping table may include multiple orders and the second correction coefficient corresponding to each order.
[0129] Optionally, the second correction coefficient can be determined according to the order corresponding to i + 1 in the following way: obtain the second preset parameter corresponding to the second correction coefficient; determine the second difference between the second preset maximum value and the second preset minimum value; determine the second factor according to the order corresponding to i + 1 and the preset length; determine the product of the second difference, the second factor, and the second preset coefficient as the second value; determine the difference between the second preset maximum value and the second value as the second correction coefficient.
[0130] Among them, the second preset parameter includes the second preset maximum value and the second preset minimum value.
[0131] For example, the second correction coefficient can be determined by the following formula :
[0132]
[0133] Among them, and are respectively the maximum and minimum values that can be taken set artificially, t max is the maximum output length of the target model, and t is the order corresponding to i + 1.
[0134] The farther the current position is from the starting position, the larger the value of the second correction coefficient and the stronger the penalty on the initial prediction value.
[0135] S405. When the judgment result is that the initial prediction value is less than the second threshold, determine the product value of the first correction coefficient, the second correction coefficient, and the third threshold, and subtract the product value from the initial prediction value to obtain the updated prediction value corresponding to the token.
[0136] When the judgment result is that the initial prediction value is less than the second threshold, a more intense penalty on the initial prediction value can be achieved through the subtraction algorithm to obtain a smaller updated prediction value.
[0137] The third threshold can represent the magnitude of the penalty.
[0138] The larger the third threshold is, the greater the punishment intensity is.
[0139] S406. When the judgment result is that the initial prediction value is greater than or equal to the second threshold, determine the product value between the initial prediction value, the first correction coefficient, the second correction coefficient, and the fourth threshold as the updated prediction value corresponding to the token.
[0140] After executing S406, execute S408.
[0141] When the judgment result is that the initial prediction value is greater than or equal to the second threshold, a stronger punishment for the initial prediction value can be achieved through a multiplication algorithm to obtain a smaller updated prediction value.
[0142] The fourth threshold can be determined according to the initial prediction value.
[0143] Among them, when the initial prediction value is greater than 0, the fourth threshold is the first preset value; when the initial prediction value is less than or equal to 0, the fourth threshold is the second preset value. The first preset value and the second preset value are reciprocals of each other, and the second preset value is a number greater than 1.
[0144] The larger the second preset value is, the greater the punishment intensity is.
[0145] S407. Determine the initial prediction value corresponding to the token as the updated prediction value corresponding to the token.
[0146] S408. Determine the (i + 1)-th updated probability distribution table according to the updated prediction values respectively corresponding to multiple tokens.
[0147] The (i + 1)-th updated probability distribution table may include the updated prediction values respectively corresponding to multiple tokens.
[0148] For the implementation content of each step in the embodiments of the present application, reference may be made to the description of the corresponding steps or operations in the above method embodiments, and repeated content will not be elaborated.
[0149] A model update method provided in this embodiment determines, for any given token, whether the token is a preset token; if so, it determines whether the initial prediction value corresponding to the token is less than a second threshold to obtain a judgment result, determines a first correction coefficient according to the target order; determines a second correction coefficient according to the order corresponding to i + 1; in the case where the judgment result is that the initial prediction value is less than the second threshold, determines the product value among the first correction coefficient, the second correction coefficient, and a third threshold, subtracts the product value from the initial prediction value to obtain the updated prediction value corresponding to the token; in the case where the judgment result is that the initial prediction value is greater than or equal to the second threshold, determines the product value among the initial prediction value, the first correction coefficient, the second correction coefficient, and a fourth threshold as the updated prediction value corresponding to the token; if not, determines the initial prediction value corresponding to the token as the updated prediction value corresponding to the token; determines the (i + 1)-th updated probability distribution table according to the updated prediction values respectively corresponding to multiple tokens. In this way, through the updated probability distribution table, the penalty reduces the number of thought-switching tokens and increases the interval between thoughts, thereby penalizing thought-switching during the reasoning decoding process, thus encouraging the model to more comprehensively elaborate each reasoning thought before considering alternative thoughts, and improving the accuracy of the model output result.
[0150] Next, in conjunction with Figure 5 , the specific process of determining the first index value according to multiple historical output results will be explained. The historical output results include at least one thought data and result data.
[0151] Figure 5 is a schematic flowchart of another model update method provided in an embodiment of the present application. Based on the above embodiment, reference can be made to Figure 5 , and this method includes:
[0152] S501. For any given historical output result, analyze and process the result data corresponding to the historical output result to determine whether the result data is analyzed correctly.
[0153] If so, execute S502;
[0154] If not, execute S503.
[0155] For example, the analysis and processing may include analyzing grammar errors or semantic incoherences in the generated text of the result data, analyzing whether there are samples with incorrect predictions by the target model, and analyzing the deviation between the result data and the real data.
[0156] S502. Determine that the first score corresponding to the historical output result is 0.
[0157] If the target model switches rounds frequently during the thinking process but still obtains the correct result data, it is not considered that the thinking process of the target model is redundant, and the first score corresponding to the historical output result is determined to be 0.
[0158] If the target model obtains an incorrect final result after multiple rounds of thinking process switches and has not obtained the correct answer during the intermediate thinking process, and this is not a problem caused by the overthinking phenomenon of the large language model, then the first score corresponding to the historical output result is determined to be 0.
[0159] S503. Analyze and process at least one piece of thinking data to determine whether there is any thinking data with correct analysis.
[0160] If there is, execute S504;
[0161] If not, execute S502.
[0162] The analysis and processing may include grammar errors or semantic incoherence in the generated text of the thinking data, analyzing whether there are samples with incorrect predictions by the target model, and analyzing the deviation between the result data and the true data, etc.
[0163] It is possible to analyze and process at least one piece of thinking data to determine whether there is any thinking data with correct analysis among the at least one piece of thinking data.
[0164] S504. Determine the first score corresponding to the historical output result according to at least one piece of thinking data.
[0165] The first score can be used to represent the degree of overthinking of the target model during the solution process in this historical output result.
[0166] Optionally, it is possible to determine the first number of tokens corresponding to the thinking data with incorrect analysis, determine the total number of tokens corresponding to the historical output result, and determine the ratio of the first number of tokens to the total number of tokens as the first score corresponding to the historical output result.
[0167] Optionally, the first score corresponding to the historical output result can be determined according to at least one piece of thinking data in the following way: determine the total number of tokens corresponding to the historical output result; determine the number of target tokens corresponding to the target thinking data; determine the first ratio of the number of target tokens to the total number of tokens; determine the difference between 1 and the first ratio as the first score corresponding to the historical output result.
[0168] Among them, the target thinking data is the first piece of thinking data with correct analysis in the historical output result, and the number of target tokens is the number of tokens corresponding to the output of the target thinking data.
[0169] S505. Determine the first index value according to the first scores corresponding to multiple historical output results respectively.
[0170] The first scores corresponding to multiple historical output results can be added respectively to determine the first total value, the number of results corresponding to the multiple historical output results can be determined, and the ratio between the first total value and the number of results can be determined as the first index value.
[0171] For the implementation content of each step in the embodiments of the present application, reference may be made to the description of the corresponding steps or operations in the above method embodiments, and repeated content will not be elaborated.
[0172] A model updating method provided in this embodiment, for any one historical output result, analyzes and processes the result data corresponding to the historical output result to determine whether the result data is analyzed correctly; if so, determines that the first score corresponding to the historical output result is 0; if not, analyzes and processes at least one piece of thinking data to determine whether there is correctly analyzed thinking data, if there is, determines the first score corresponding to the historical output result according to the at least one piece of thinking data, if not, determines that the first score corresponding to the historical output result is 0; determines the first index value according to the first scores respectively corresponding to the multiple historical output results. In this way, for the situation where the target model has switched thinking multiple times and obtained a wrong final result, but the correct answer was obtained in the intermediate thinking process, the severity of overthinking is measured by the first index value to determine the state of the target model.
[0173] Next, in combination with Figure 6 , the specific process of determining the second index value according to multiple historical output results will be explained. The historical output results include at least one piece of thinking data and result data.
[0174] Figure 6 It is a schematic flowchart of another model updating method provided in the embodiments of the present application. On the basis of the above embodiments, reference may be made to Figure 6 , and this method includes:
[0175] S601. For any one historical output result, analyze and process the historical output result to determine multiple solution ideas corresponding to the historical output result and the generation order corresponding to each solution idea.
[0176] The solution idea can be multiple possible thinking paths explored by the target model during the reasoning process.
[0177] The generation order can be a time series or a logical sequence.
[0178] The text corresponding to the historical output result can be analyzed and processed to determine multiple solution ideas and the generation order corresponding to each solution idea.
[0179] S602. Sort multiple solution ideas according to their respective generation orders.
[0180] In this way, the order of each solution idea in the historical output results can be determined.
[0181] S603. Determine the second ratio corresponding to each of the multiple solution ideas in sequence according to the order of the multiple solution ideas.
[0182] The second ratio can be used to represent the degree of non - repetition of this solution idea with other ideas.
[0183] Optionally, the second ratio corresponding to each of the multiple solution ideas can be determined in sequence according to the order of the multiple solution ideas in the following way: Determine the total number of lemmas corresponding to the historical output results; According to the order of the multiple solution ideas, for the j - th solution idea, determine whether there is a solution idea in the previous j - 1 solution ideas whose similarity to the j - th solution idea is greater than the fifth threshold; If so, determine that the second ratio corresponding to the j - th solution idea is 0; If not, determine the number of the first lemmas corresponding to the j - th solution idea, and determine the ratio between the number of the first lemmas and the total number of lemmas as the second ratio corresponding to the j - th solution idea;
[0184] Where j takes values from 1 to m, and m is the number of solution ideas corresponding to the multiple solution ideas.
[0185] The fifth threshold can be a pre - determined value.
[0186] Where the method for determining whether there is a solution idea in the previous j - 1 solution ideas whose similarity to the j - th solution idea is greater than the fifth threshold is as follows: Determine whether j - 1 is greater than 0; If so, determine the similarities between the j - th solution idea and the previous j - 1 solution ideas respectively. If there is at least one similarity greater than the fifth threshold, determine that there is a solution idea whose similarity to the j - th solution idea is greater than the fifth threshold; If there is no at least one similarity greater than the fifth threshold, determine that there is no solution idea whose similarity to the j - th solution idea is greater than the fifth threshold; If not, determine that there is no solution idea whose similarity to the j - th solution idea is greater than the fifth threshold.
[0187] S604. Add up the second ratios corresponding to the multiple solution ideas to determine the second score corresponding to the historical output results.
[0188] The second score can be used to represent the degree of diversity of ideas in the solution process of the target model in this historical output result.
[0189] S605. Determine the second index value according to the second scores corresponding to the multiple historical output results.
[0190] The second index value is used to represent the degree of diversity of thinking in the process of solving by the target model.
[0191] The reasoning process jumps repeatedly among several fixed similar solution strategies and cannot be guided to the correct thinking to obtain the correct result, which is reflected in the lack of richness in the thinking angles during the reasoning process of the large model.
[0192] Optionally, the second index value can be determined according to the second scores respectively corresponding to multiple historical output results in the following manner: add the second scores respectively corresponding to multiple historical output results to determine the second total value; determine the number of results corresponding to multiple historical output results; and determine the ratio between the second total value and the number of results as the second index value.
[0193] For the implementation content of each step in the embodiments of the present application, reference may be made to the description of the corresponding steps or operations in the above method embodiments, and repeated content will not be elaborated.
[0194] A model update method provided in this embodiment, for any one historical output result, analyzes and processes the historical output result to determine multiple solution ideas corresponding to the historical output result and the generation order corresponding to each solution idea, sorts the multiple solution ideas according to the generation order respectively corresponding to the multiple solution ideas, determines the second ratio respectively corresponding to the multiple solution ideas in sequence according to the order of the multiple solution ideas, adds the second ratios respectively corresponding to the multiple solution ideas to determine the second score corresponding to the historical output result, and determines the second index value according to the second scores respectively corresponding to the multiple historical output results. In this way, the diversity of solution ideas can be measured by the second index value to determine the state of the target model.
[0195] Through the description of the above implementation manners, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases, the former is a better implementation manner.
[0196] Figure 7 It is a schematic structural diagram of a model update device provided in an embodiment of the present application. Please refer to Figure 7 , the model update device 700 includes an acquisition module 701, a determination module 702, and an output module 703.
[0197] The acquisition module 701 is configured to acquire the current input data input by the target model;
[0198] A determination module 702, configured to determine the current state of the target model, where the current state includes a normal state and an abnormal state, and the current state is determined according to a first index value and a second index value of the target model. The first index value is used to represent the degree of overthinking of the target model during the solution process, and the second index value is used to represent the degree of diversity of ideas of the target model during the solution process;
[0199] An output module 703, configured to, when the current state of the target model is an abnormal state, update the probability distribution table corresponding to the target model, and process the current input data according to the target model and the updated probability distribution table to obtain a current output result. The probability distribution table is used to indicate the probability of each token among multiple tokens being the output token.
[0200] In a possible implementation manner, the output module 703 is specifically configured to:
[0201] Analyze and process the current input data through the target model to determine a first initial probability distribution table, and generate a first output token according to the first initial probability distribution table;
[0202] Determine a (i + 1)-th initial probability distribution table according to the first i output tokens. The (i + 1)-th initial probability distribution table is used to indicate the initial probability of each token among multiple tokens being the (i + 1)-th output token;
[0203] Update the (i + 1)-th initial probability distribution table to obtain a (i + 1)-th updated probability distribution table, and generate a (i + 1)-th output token according to the (i + 1)-th updated probability distribution table;
[0204] Wherein, i takes 1, 2,..., n until the n-th output token meets a preset termination condition, and the current output result is determined according to the n output tokens.
[0205] In a possible implementation manner, the output module 703 is specifically configured to:
[0206] Obtain multiple preset tokens corresponding to the target model, where the preset tokens are used to represent the idea conversion of the target model during the solution process;
[0207] Determine the target order corresponding to the target token among the first i output tokens, where the target token is any one of the multiple preset tokens, and the target order is the maximum order of the target token among the first i output tokens;
[0208] Judge whether the interval between the target order and the (i + 1)-th corresponding order is less than a first threshold;
[0209] If so, update the multiple tokens in the (i + 1)-th initial probability distribution table to obtain a (i + 1)-th updated probability distribution table;
[0210] If not, determine the (i + 1)-th initial probability distribution table as the (i + 1)-th updated probability distribution table.
[0211] In a possible implementation, the output module 703 is specifically configured to:
[0212] For any given token, determine whether the token is a preset token;
[0213] If so, determine whether the initial prediction value corresponding to the token is less than a second threshold, obtain a judgment result, and determine the updated prediction value corresponding to the token according to the judgment result and the initial prediction value corresponding to the token;
[0214] If not, determine the initial prediction value corresponding to the token as the updated prediction value corresponding to the token;
[0215] Determine the (i + 1)-th updated probability distribution table according to the updated prediction values respectively corresponding to multiple tokens.
[0216] In a possible implementation, the output module 703 is specifically configured to:
[0217] Determine a first correction coefficient according to the target order;
[0218] Determine a second correction coefficient according to the order corresponding to i + 1;
[0219] In the case where the judgment result is that the initial prediction value is less than the second threshold, determine the product value among the first correction coefficient, the second correction coefficient, and the third threshold, and subtract the product value from the initial prediction value to obtain the updated prediction value corresponding to the token;
[0220] In the case where the judgment result is that the initial prediction value is greater than or equal to the second threshold, determine the product value among the initial prediction value, the first correction coefficient, the second correction coefficient, and the fourth threshold as the updated prediction value corresponding to the token.
[0221] In a possible implementation, the output module 703 is specifically configured to:
[0222] Obtain a first preset parameter corresponding to the first correction coefficient, where the first preset parameter includes a first preset maximum value and a first preset minimum value;
[0223] Determine a first difference between the first preset maximum value and the first preset minimum value;
[0224] Determine the interval between the target order and the order corresponding to i + 1;
[0225] Determine a first factor according to the interval and the first threshold;
[0226] Determine the product of the first difference, the first factor, and the first preset coefficient as the first value;
[0227] Determine the difference between the first preset maximum value and the first numerical value as the first correction coefficient.
[0228] In a possible implementation manner, the output module 703 is specifically configured to:
[0229] Obtain a second preset parameter corresponding to the second correction coefficient, where the second preset parameter includes a second preset maximum value and a second preset minimum value;
[0230] Determine a second difference between the second preset maximum value and the second preset minimum value;
[0231] Determine a second factor according to the order corresponding to i + 1 and a preset length;
[0232] Determine the product of the second difference, the second factor, and the second preset coefficient as the second numerical value;
[0233] Determine the difference between the second preset maximum value and the second numerical value as the second correction coefficient.
[0234] In a possible implementation manner, the fourth threshold is determined according to an initial prediction value;
[0235] Wherein, when the initial prediction value is greater than 0, the fourth threshold is a first preset value, and when the initial prediction value is less than or equal to 0, the fourth threshold is a second preset value. The first preset value and the second preset value are reciprocals of each other, and the second preset value is a number greater than 1.
[0236] In a possible implementation manner, the determination module 702 is specifically configured to:
[0237] Obtain multiple historical output results of the target model;
[0238] Determine a first index value and a second index value according to the multiple historical output results;
[0239] Determine the current state of the target model according to the first index value and the second index value.
[0240] In a possible implementation manner, the historical output result includes at least one idea data and result data. The determination module 702 is specifically configured to:
[0241] For any one historical output result, analyze and process the result data corresponding to the historical output result to determine whether the result data is analyzed correctly;
[0242] If so, determine that the first score corresponding to the historical output result is 0;
[0243] Otherwise, analyze and process at least one train of thought data to determine whether there is any train of thought data with correct analysis. If there is, determine the first score corresponding to the historical output result according to the at least one train of thought data. If not, determine the first score corresponding to the historical output result as 0;
[0244] Determine the first index value according to the first scores respectively corresponding to multiple historical output results.
[0245] In a possible implementation manner, the determining module 702 is specifically configured to:
[0246] Determine the total number of lemmas corresponding to the historical output result;
[0247] Determine the number of lemmas corresponding to the target train of thought data, where the target train of thought data is the first train of thought data with correct analysis in the historical output result, and the number of lemmas is the number of lemmas corresponding to the output of the target train of thought data;
[0248] Determine the first ratio of the number of lemmas to the total number of lemmas;
[0249] Determine the difference between 1 and the first ratio as the first score corresponding to the historical output result.
[0250] In a possible implementation manner, the determining module 702 is specifically configured to:
[0251] For any historical output result, analyze and process the historical output result to determine multiple solution trains of thought corresponding to the historical output result and the generation order corresponding to each solution train of thought;
[0252] Determine the second score corresponding to the historical output result according to the multiple solution trains of thought and the generation order corresponding to each solution train of thought;
[0253] Determine the second index value according to the second scores respectively corresponding to multiple historical output results.
[0254] In a possible implementation manner, the determining module 702 is specifically configured to:
[0255] Sort the multiple solution trains of thought according to the generation order respectively corresponding to the multiple solution trains of thought;
[0256] Determine the second ratios respectively corresponding to the multiple solution trains of thought in turn according to the order of the multiple solution trains of thought;
[0257] Add the second ratios respectively corresponding to the multiple solution trains of thought to determine the second score corresponding to the historical output result.
[0258] In a possible implementation manner, the determining module 702 is specifically configured to:
[0259] Determine the total number of tokens corresponding to the historical output result;
[0260] According to the order of multiple solution ideas, for the j-th solution idea, determine whether there is a solution idea in the previous j - 1 solution ideas whose similarity to the j-th solution idea is greater than the fifth threshold;
[0261] If so, determine that the second ratio corresponding to the j-th solution idea is 0;
[0262] If not, determine the first number of tokens corresponding to the j-th solution idea, and determine the second ratio corresponding to the j-th solution idea as the ratio between the first number of tokens and the total number of tokens;
[0263] Where j takes values from 1, ……, m, and m is the number of solution ideas corresponding to multiple solution ideas.
[0264] In a possible implementation manner, the determining module 702 is specifically configured to:
[0265] Determine whether j - 1 is greater than 0;
[0266] If so, determine the similarity between the j-th solution idea and the previous j - 1 solution ideas respectively. If there is at least one similarity greater than the fifth threshold, determine that there is a solution idea whose similarity to the j-th solution idea is greater than the fifth threshold. If there is no at least one similarity greater than the fifth threshold, determine that there is no solution idea whose similarity to the j-th solution idea is greater than the fifth threshold;
[0267] If not, determine that there is no solution idea whose similarity to the j-th solution idea is greater than the fifth threshold.
[0268] In a possible implementation manner, the determining module 702 is specifically configured to:
[0269] Add the second scores corresponding to multiple historical output results respectively to determine the second total value;
[0270] Determine the number of results corresponding to multiple historical output results;
[0271] Determine the ratio between the second total value and the number of results as the second index value.
[0272] In a possible implementation manner, the determining module 702 is specifically configured to:
[0273] Determine the first weight value of the first index value according to the first preset weight corresponding to the first index value;
[0274] Determine the second weight value of the second index value according to the second preset weight corresponding to the second index value;
[0275] Determine the current state of the target model according to the first weight value and the second weight value.
[0276] For the descriptions of the features in the embodiments corresponding to the model update device, reference may be made to the relevant descriptions of the embodiments corresponding to the model update method, which will not be elaborated here one by one.
[0277] Figure 8 This is a schematic structural diagram of the electronic device provided by this application. As Figure 8 shown, the electronic device 80 provided in this embodiment includes: at least one processor 801 and a memory 802. Optionally, the device 80 further includes a communication component 803. Among them, the processor 801, the memory 802, and the communication component 803 are connected through a bus.
[0278] In the specific implementation process, at least one processor 801 executes the computer execution instructions stored in the memory 802, so that at least one processor 801 executes the above-mentioned model update method embodiment.
[0279] For the specific implementation process of the processor 801, reference may be made to the above method embodiment. The implementation principle and technical effects are similar, and will not be elaborated here in this embodiment.
[0280] In the above embodiment, it should be understood that the processor may be a central processing unit (Central Processing Unit, abbreviated as: CPU), or other general-purpose processors, digital signal processors (Digital Signal Processor, abbreviated as: DSP), application specific integrated circuits (Application Specific Integrated Circuit, abbreviated as: ASIC), etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in combination with the application can be directly embodied as being executed by a hardware processor, or executed by a combination of hardware and software modules in the processor.
[0281] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (Non-volatile Memory, NVM), such as at least one disk memory.
[0282] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the buses in the drawings of this application are not limited to only one bus or one type of bus.
[0283] An embodiment of the present application also provides a computer-readable storage medium, in which a computer program is stored. Wherein, the computer program is configured to execute the steps in any one of the above-described model update method embodiments when running.
[0284] In an exemplary embodiment, the above computer-readable storage medium may include, but is not limited to: USB flash drives, read-only memories (ROMs), random access memories (RAMs), external hard drives, magnetic disks, or optical discs, and other various media that can store computer programs.
[0285] An embodiment of the present application also provides a computer program product. The above computer program product includes a computer program, and when the computer program is executed by a processor, it implements the steps in any one of the above-described model update method embodiments.
[0286] An embodiment of the present application also provides another computer program product, including a non-volatile computer-readable storage medium. The non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the steps in any one of the above-described model update method embodiments.
[0287] Those skilled in the art can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed in this document can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Skilled professionals can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.
[0288] The above has introduced in detail a model update method provided by this application. Specific examples are used in this article to elaborate on the principle and implementation manner of this application. The description of the above embodiments is only used to help understand the method and its core idea of this application. It should be noted that for those of ordinary skill in the art of this technology, without departing from the principle of this application, several improvements and modifications can still be made to this application, and these improvements and modifications also fall within the protection scope of the claims of this application.
Claims
1. A model update method, characterized in that, Including: Obtain the current input data input by the target model; Determine the current state of the target model, where the current state includes a normal state and an abnormal state, and the current state is determined according to a first index value and a second index value of the target model. The first index value is used to represent the degree of overthinking of the target model during the solution process, and the second index value is used to represent the degree of diversity of ideas of the target model during the solution process; In the case where the current state of the target model is the abnormal state, perform an update process on the probability distribution table corresponding to the target model, and process the current input data according to the target model and the updated probability distribution table to obtain a current output result. The probability distribution table is used to indicate the probability of each token among multiple tokens being the output token.
2. The method according to claim 1, characterized in that Performing an update process on the probability distribution table corresponding to the target model, and processing the current input data according to the target model and the updated probability distribution table to obtain a current output result, including: Analyze and process the current input data through the target model to determine a first initial probability distribution table, and generate a first output token according to the first initial probability distribution table; Determine a (i + 1)-th initial probability distribution table according to the first i output tokens. The (i + 1)-th initial probability distribution table is used to indicate the initial probability of each token among multiple tokens being the (i + 1)-th output token; Perform an update process on the (i + 1)-th initial probability distribution table to obtain a (i + 1)-th updated probability distribution table, and generate a (i + 1)-th output token according to the (i + 1)-th updated probability distribution table; Wherein, i takes 1, 2,..., n until the n-th output token meets a preset termination condition, and determine the current output result according to the n output tokens.
3. The method according to claim 2, wherein Performing an update process on the (i + 1)-th initial probability distribution table to obtain a (i + 1)-th updated probability distribution table, including: Obtain multiple preset tokens corresponding to the target model, and the preset tokens are used to represent the idea conversion of the target model during the solution process; Among the first i output tokens, determine the target order corresponding to the target token. The target token is any one of the multiple preset tokens, and the target order is the maximum order of the target token among the first i output tokens; Judge whether the interval between the target order and the (i + 1)-th corresponding order is less than a first threshold; If so, perform an update process on multiple tokens in the (i + 1)-th initial probability distribution table to obtain a (i + 1)-th updated probability distribution table; If not, determine the (i + 1)-th initial probability distribution table as the (i + 1)-th updated probability distribution table.
4. The method according to claim 3, characterized in that Performing an update process on multiple tokens in the (i + 1)-th initial probability distribution table to obtain a (i + 1)-th updated probability distribution table, including: For any one token, judge whether the token is the preset token; If so, judge whether the initial prediction value corresponding to the token is less than a second threshold to obtain a judgment result, and determine the updated prediction value corresponding to the token according to the judgment result and the initial prediction value corresponding to the token; Otherwise, determine the initial prediction value corresponding to the token as the updated prediction value corresponding to the token; Determine the (i + 1)-th updated probability distribution table according to the updated prediction values respectively corresponding to the multiple tokens.
5. The method according to claim 4, wherein Determining the updated prediction value corresponding to the token according to the judgment result and the initial prediction value corresponding to the token includes: Determine a first correction coefficient according to the target order; Determine a second correction coefficient according to the order corresponding to i + 1; When the judgment result is that the initial prediction value is less than the second threshold, determine the product value among the first correction coefficient, the second correction coefficient, and the third threshold, and subtract the product value from the initial prediction value to obtain the updated prediction value corresponding to the token; When the judgment result is that the initial prediction value is greater than or equal to the second threshold, determine the product value among the initial prediction value, the first correction coefficient, the second correction coefficient, and the fourth threshold as the updated prediction value corresponding to the token.
6. The method according to claim 5, wherein Determining a first correction coefficient according to the target order includes: Obtain a first preset parameter corresponding to the first correction coefficient, where the first preset parameter includes a first preset maximum value and a first preset minimum value; Determine a first difference between the first preset maximum value and the first preset minimum value; Determine the interval between the target order and the order corresponding to i + 1; Determine a first factor according to the interval and the first threshold; Determine a first value according to the product of the first difference, the first factor, and the first preset coefficient; Determine the difference between the first preset maximum value and the first value as the first correction coefficient.
7. The method according to claim 5, characterized in that, Determining a second correction coefficient according to the order corresponding to i + 1 includes: Obtain a second preset parameter corresponding to the second correction coefficient, where the second preset parameter includes a second preset maximum value and a second preset minimum value; Determine a second difference between the second preset maximum value and the second preset minimum value; Determine a second factor according to the order corresponding to i + 1 and the preset length; Determine a second value according to the product of the second difference, the second factor, and the second preset coefficient; Determine the difference between the second preset maximum value and the second value as the second correction coefficient.
8. The method according to any one of claims 5 to 7, characterized in that The fourth threshold is determined according to the initial prediction value; Wherein, when the initial prediction value is greater than 0, the fourth threshold is a first preset value, and when the initial prediction value is less than or equal to 0, the fourth threshold is a second preset value, the first preset value and the second preset value are reciprocals of each other, and the second preset value is a number greater than 1.
9. The method according to any one of claims 1-7, characterized in that, Determining the current state of the target model includes: Obtain multiple historical output results of the target model; Determine the first index value and the second index value according to the multiple historical output results; Determine the current state of the target model according to the first index value and the second index value.
10. The method according to claim 9, wherein The historical output results include at least one idea data and result data. Determining the first index value according to the multiple historical output results includes: For any historical output result, analyze and process the result data corresponding to the historical output result to determine whether the result data is analyzed correctly; If so, determine that the first score corresponding to the historical output result is 0; If not, analyze and process the at least one idea data to determine whether there is any idea data that is analyzed correctly. If there is, determine the first score corresponding to the historical output result according to the at least one idea data. If not, determine that the first score corresponding to the historical output result is 0; Determine the first index value according to the first scores respectively corresponding to the multiple historical output results.
11. The method according to claim 10, characterized in that, Determining the first score corresponding to the historical output result according to the at least one idea data includes: Determine the total number of lemmas corresponding to the historical output result; Determine the number of target lemmas corresponding to the target idea data, where the target idea data is the first correctly analyzed idea data in the historical output result, and the number of target lemmas is the number of lemmas corresponding to the output of the target idea data; Determine the first ratio between the number of target lemmas and the total number of lemmas; Determine the difference between 1 and the first ratio as the first score corresponding to the historical output result.
12. The method according to claim 9, characterized in that, Determining the second index value according to the multiple historical output results includes: For any historical output result, analyze and process the historical output result to determine the multiple solution ideas corresponding to the historical output result and the generation order corresponding to each solution idea; Determine the second score corresponding to the historical output result according to the multiple solution ideas and the generation order corresponding to each solution idea; Determine the second index value according to the second scores respectively corresponding to the multiple historical output results.
13. The method according to claim 12, wherein Determining the second score corresponding to the historical output result according to the multiple solution ideas and the generation order corresponding to each solution idea includes: Sort the multiple solution ideas according to the generation order corresponding to each of the multiple solution ideas; Determine the second ratio corresponding to each of the multiple solution ideas in turn according to the order of the multiple solution ideas; Add up the second ratios corresponding to the multiple solution ideas respectively to determine the second score corresponding to the historical output result.
14. The method according to claim 13, wherein Determining the second ratio corresponding to each of the multiple solution ideas in turn according to the order of the multiple solution ideas includes: Determine the total number of lemmas corresponding to the historical output result; According to the order of the multiple solution ideas, for the j-th solution idea, determine whether there is a solution idea in the first j - 1 solution ideas whose similarity to the j-th solution idea is greater than the fifth threshold; If so, determine that the second ratio corresponding to the j-th solution idea is 0; If not, determine the number of first lemmas corresponding to the j-th solution idea, and determine the ratio between the number of first lemmas and the total number of lemmas as the second ratio corresponding to the j-th solution idea; Where j takes 1, ……, m, and m is the number of solution ideas corresponding to the multiple solution ideas.
15. The method according to claim 14, wherein Determine whether there is a solution idea in the previous j - 1 solution ideas whose similarity to the jth solution idea is greater than the fifth threshold, including: Determine whether j - 1 is greater than 0; If so, determine the similarity between the jth solution idea and each of the previous j - 1 solution ideas. If there is at least one similarity greater than the fifth threshold, determine that there is a solution idea whose similarity to the jth solution idea is greater than the fifth threshold. If there is no at least one similarity greater than the fifth threshold, determine that there is no solution idea whose similarity to the jth solution idea is greater than the fifth threshold; If not, determine that there is no solution idea whose similarity to the jth solution idea is greater than the fifth threshold.
16. The method according to any one of claims 12-15, characterized in that, Determine the second index value according to the second scores respectively corresponding to the multiple historical output results, including: Add up the second scores respectively corresponding to the multiple historical output results to determine the second total value; Determine the number of results corresponding to the multiple historical output results; Determine the ratio between the second total value and the number of results as the second index value.
17. The method according to claim 9, wherein Determine the current state of the target model according to the first index value and the second index value, including: Determine the first weight value of the first index value according to the first preset weight corresponding to the first index value; Determine the second weight value of the second index value according to the second preset weight corresponding to the second index value; Determine the current state of the target model according to the first weight value and the second weight value.
18. An electronic device, characterized in that, Include: A memory for storing a computer program; A processor for implementing the steps of the model update method according to any one of claims 1 to 17 when executing the computer program.
19. A computer-readable storage medium, characterized in that, A computer program is stored in the computer-readable storage medium, wherein the computer program implements the steps of the model update method according to any one of claims 1 to 17 when executed by a processor.
20. A computer program product comprising a computer program, characterized in that, The computer program implements the steps of the model update method according to any one of claims 1 to 17 when executed by a processor.
Citation Information
Patent Citations
Large language model reasoning acceleration method, device and system and medium
CN119067221A
Inference method and device based on large model and program product
CN119990339A
Cited By
Aggregation method of importance sampling ratio, electronic equipment, medium and product
CN121543044A