Method and device for dynamic configuration of hyperparameters in model training
Patent Information
- Application Number
- CN202610982279.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-02
- Publication Date
- 2026-08-18
AI Technical Summary
[0003]本申请实施例的目的在于提供一种模型训练中超参数的动态配置方法及装置,用以改善现有技术中采用预设递减的学习率无法适应模型在不同训练轮次的实际学习动态的问题
[0008] Fourthly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the steps of the method provided in the present aspect above.
Smart Images

Figure CN122596296A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of model training, and more specifically, to a method and apparatus for dynamically configuring hyperparameters in model training. Background Technology
[0002] In existing multi-stage model training methods, hyperparameters such as the learning rate are typically configured statically or according to pre-defined rules. Specifically, the learning rate is set to an initial value at the beginning of training and then gradually reduced according to a pre-designed decay strategy. Common strategies include step decay, cosine annealing, or linear reduction at a fixed ratio. However, this pre-defined decreasing learning rate cannot adapt to the actual learning dynamics of the model in different training epochs. For example, when the model has converged sufficiently at a certain stage, a relatively conservative decay strategy may result in excessively high hyperparameters, causing the model parameters to exceed the optimal region, leading to overfitting or the destruction of learned knowledge. Conversely, an overly aggressive decay strategy may result in insufficient learning, limiting the model's ability to iterate further and affecting the final inference performance. Summary of the Invention
[0003] The purpose of this application is to provide a method and apparatus for dynamically configuring hyperparameters during model training, so as to improve the problem in the prior art that the preset decreasing learning rate cannot adapt to the actual learning dynamics of the model in different training rounds.
[0004] In a first aspect, embodiments of this application provide a method for dynamically configuring hyperparameters during model training, the method comprising: In response to the end signal of any current training round, obtain the current performance of the model in at least two different capability evaluation dimensions, where the current training round represents a non-final training round; Based on at least two current performance metrics, evaluate the learning status of the model in each capability evaluation dimension in the corresponding current training round. The learning status includes at least one of the following: performance difference and learning sufficiency. Based on the learning state, the hyperparameters of the model in the next training round are determined and configured, including the maximum learning rate.
[0005] In the above implementation process, by obtaining the model's current performance across at least two capability evaluation dimensions after each training epoch, and dynamically adjusting the maximum learning rate for the next epoch based on performance differences and the degree of learning sufficiency, the hyperparameter configuration can closely align with the model's actual learning progress and multi-dimensional capability evolution. Compared to traditional fixed or preset decay strategies, this approach effectively avoids overfitting, knowledge destruction, or performance limitations caused by improper hyperparameter settings during model training.
[0006] Secondly, embodiments of this application provide a device for dynamically configuring hyperparameters during model training, the device comprising: The performance acquisition module is used to acquire the current performance of the model in at least two different capability evaluation dimensions in response to the end signal of any current training round. The current training round represents a non-final training round. The learning state acquisition module is used to evaluate the learning state of the model in each capability evaluation dimension in the corresponding current training round based on at least two current performance metrics. The learning state includes at least one of the following: performance difference and learning sufficiency. The parameter configuration module is used to determine and configure the hyperparameters of the model in the next training round based on the learning state, wherein the hyperparameters include at least the maximum learning rate.
[0007] Thirdly, embodiments of this application provide an electronic device including a processor and a memory, the memory storing computer-readable instructions, which, when executed by the processor, perform the steps of the method provided in the present aspect above.
[0008] Fourthly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the steps of the method provided in the present aspect above.
[0009] Other features and advantages of this application will be set forth in the following description and will be apparent in part from the description or may be learned by practicing embodiments of this application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings. Attached Figure Description
[0010] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0011] Figure 1 A flowchart illustrating a method for dynamically configuring hyperparameters during model training, provided as an embodiment of this application; Figure 2 A structural block diagram of a device for dynamically configuring hyperparameters in model training provided in an embodiment of this application; Figure 3This is a schematic diagram of the structure of an electronic device for performing a dynamic configuration method of hyperparameters in model training, as provided in an embodiment of this application. Detailed Implementation
[0012] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.
[0013] It should be noted that the terms "system" and "network" in the embodiments of this invention can be used interchangeably. "Multiple" refers to two or more; therefore, in the embodiments of this invention, "multiple" can also be understood as "at least two". "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / ", unless otherwise specified, generally indicates that the preceding and following related objects have an "or" relationship.
[0014] It should also be noted that all actions involving the acquisition of signals, information, or data in this application are carried out in compliance with the relevant data protection laws and policies of the country where the application is located, and with the authorization granted by the owner of the relevant device.
[0015] This application provides a method for dynamically configuring hyperparameters during model training. This method obtains the model's current performance across at least two capability evaluation dimensions after each training epoch and dynamically adjusts the maximum learning rate for the next epoch based on performance differences and the degree of learning sufficiency. This ensures that the hyperparameter configuration closely matches the model's actual learning progress and multi-dimensional capability evolution. Compared to traditional fixed or preset decay strategies, this approach effectively avoids overfitting, knowledge destruction, or performance limitations caused by improper hyperparameter settings during model training.
[0016] During the multi-round training process of the model, after each training round, the system will trigger the hyperparameter dynamic configuration process, that is, trigger the hyperparameter dynamic configuration method provided below.
[0017] Please refer to Figure 1 , Figure 1 A flowchart illustrating a method for dynamically configuring hyperparameters during model training, provided in this application embodiment, is included. The method comprises the following steps: Step S110: In response to the end signal of any current training round, obtain the current performance of the model in at least two different capability evaluation dimensions.
[0018] Among them, the capability evaluation dimension refers to an evaluation direction that can independently measure a core capability of the model, such as visual understanding capability, language generation capability, instruction following capability, long context processing capability, and multi-resolution adaptation capability. Each dimension corresponds to an independent validation set and evaluation metric. During training, at least two dimensions can be selected to comprehensively capture the multifaceted performance of the model. The D capability evaluation dimensions can be denoted as... .
[0019] In a preferred embodiment, visual understanding ability is evaluated by accuracy on visual question answering tasks, language generation ability is evaluated by accuracy on text understanding and generation tasks, instruction compliance ability is characterized by success rate on instruction execution tasks, long context processing ability is evaluated based on task execution performance on long sequence tasks, and multi-resolution adaptability is characterized by the mean and variance of performance on tasks at different resolutions.
[0020] The current training epoch represents a non-final training epoch. After the current training epoch (which can be denoted as epoch n), the system performs forward propagation of the model on the validation sets corresponding to each capability evaluation dimension, calculating the performance index score for each dimension. This forms the model's current performance in each capability evaluation dimension at the end of the epoch. The current performance can refer to the performance index value obtained by the model in each capability evaluation dimension, which can be denoted as... Where D is the total number of dimensions. This represents the performance metric value (such as accuracy, success rate, etc.) on the i-th capability evaluation dimension, which reflects the actual level of the model on each capability evaluation dimension at the end of the current training round.
[0021] In some implementations, a termination signal is issued when each training epoch meets the termination condition. The termination condition includes: the gradient update steps or epochs of the current training epoch reaching a preset threshold, or the model capability meeting a threshold; this application does not impose any restrictions on this. When the current training epoch meets the termination condition, a termination signal for the current training epoch is generated. At this time, the system saves a snapshot of the current model's parameters and proceeds to the performance evaluation in step S110.
[0022] More preferably, the model's loss or performance changes on the validation set are monitored in real time during training. The model's ability to meet the threshold may include: if the loss value decreases below a preset threshold after a preset number of consecutive evaluations, the model can be determined to have fully converged in the current round, and the round can be terminated early, triggering a round termination signal. This approach avoids undertraining or overtraining caused by a fixed number of steps.
[0023] Step S120: Based on at least two current performance metrics, evaluate the learning status of the model in each capability evaluation dimension in the corresponding current training round.
[0024] The learning status includes at least one of the following: performance difference and learning sufficiency.
[0025] Performance differences can characterize the performance increment of a model in the current training epoch compared to previous training epochs, i.e., the performance change. , ,That This represents the performance increment of the model in the i-th capability assessment dimension between the n-th and (n-1)-th training epochs. n is greater than 1. A positive performance increment indicates that the current training epoch has improved the model's performance to a certain extent, while a negative value indicates that the capability has degraded to a certain extent. The absolute value of the performance increment represents the magnitude of the performance improvement or degradation in the current training epoch.
[0026] Learning adequacy is used to evaluate how well a model adapts to the current resolution range. Here, resolution range refers to the allowed resolution of input or feature images during training, typically measured by the number of sub-patterns, K. Learning adequacy can be quantified using the Resolution Readiness (RR) metric, which considers both the model's average performance within the current resolution range and the performance uniformity across different resolution configurations. The details of obtaining learning adequacy will be explained in subsequent examples.
[0027] Step S130: Based on the learning state, determine and configure the hyperparameters of the model in the next training round.
[0028] Hyperparameters can include the maximum learning rate, which is the upper limit of the learning rate allowed by the optimizer in the next training epoch. After obtaining the learning state, the hyperparameters for the next training epoch can be determined based on the performance differences and / or the degree of learning sufficiency in the learning state. For example, if the performance differences of each capability evaluation dimension are small and have converged (e.g., the performance increments in consecutive epochs converge around a constant value), and the degree of learning sufficiency within the current resolution range is high (e.g., the resolution readiness index RR is greater than a preset first threshold), then the maximum learning rate for the next epoch can be appropriately reduced for fine-tuning to prevent overfitting. If there is significant performance degradation in one or more dimensions (e.g., the performance difference is negative and greater than a preset second threshold), then the maximum learning rate can be significantly reduced to slow down the parameter update and curb the degradation trend. If the model's learning within the current resolution range is not yet sufficient, even if other dimensions are still learning rapidly, it is not advisable to rashly increase the learning rate. Instead, the learning rate should be maintained or moderately suppressed to avoid training instability due to increased input complexity. Conversely, if the learning is sufficiently advanced and the performance across all dimensions is still rapidly improving, the learning rate can be maintained or appropriately increased to accelerate convergence.
[0029] After determining the hyperparameters, the system can configure them for the next training epoch of the model. Once configured, the training process proceeds to the next epoch, and the optimizer will continue iterating using the newly determined maximum learning rate. This process is automatically repeated at the end of each non-final training epoch until the termination condition for that epoch is met. The termination conditions for each training epoch can be the same or completely different, and are dynamically determined based on the training objective of each epoch.
[0030] In the above implementation process, by obtaining the model's current performance across at least two capability evaluation dimensions after each training epoch, and dynamically adjusting the maximum learning rate for the next epoch based on performance differences and the degree of learning sufficiency, the hyperparameter configuration can closely align with the model's actual learning progress and multi-dimensional capability evolution. Compared to traditional fixed or preset decay strategies, this approach effectively avoids overfitting, knowledge destruction, or performance limitations caused by improper hyperparameter settings during model training.
[0031] Based on the above embodiments, the learning state includes performance differences. In the method of obtaining the learning state of the model in each capability assessment dimension, the performance differences of the model in each capability assessment dimension in different training rounds can be determined based on the current performance of the model in each capability assessment dimension and the historical performance in historical training rounds.
[0032] Specifically, based on the model's current performance across each capability assessment dimension and its performance in at least one historical training epoch, the absolute value of the current performance change can be determined, and the performance difference with the smallest absolute value of performance change can be identified as the minimum performance difference. Then, based on the model's historical performance across each capability assessment dimension in at least one historical training epoch, the average performance change over those historical training epochs can be determined. The performance difference includes the aforementioned absolute value of the current performance change, the minimum performance difference, and the average performance change.
[0033] Among them, the absolute value of the current performance change can be the absolute magnitude of the performance change in the current round relative to the previous round.
[0034] Minimum performance difference can be defined as the value with the smallest absolute change in performance across all historical adjacent rounds.
[0035] The average performance change can be the arithmetic mean of the absolute values of the performance changes from the first round to the current round.
[0036] For example, after the current training epoch ends, when determining the absolute value of the current performance change, the system obtains the model's current performance across D capability evaluation dimensions, as described above. And the performance of the previous training round. Alternatively, the average performance of at least the two most recent historical training rounds can be obtained. Then, the system calculates the absolute value of the current performance change for each capability evaluation dimension i: This yields the set of absolute values of performance changes in each dimension for the current training epoch. Understandably, if the average performance of historical training epochs is taken, then the formula... Simply replace it with the average value.
[0037] To obtain more comprehensive information on performance differences, the system also needs to calculate two additional statistics: the minimum performance difference and the average performance change.
[0038] To minimize the performance difference, the system needs to maintain the absolute values of performance changes from the k-th training epoch to the current training epoch n, and determine the minimum value among them. Specifically, after each training epoch, the absolute values of performance changes for each dimension calculated in the current training epoch are compared with the minimum values in the historical records. For each capability evaluation dimension i, the system records the minimum value to date, i.e. This minimum value represents the minimum performance difference for dimension i. If the current training epoch n is the first training epoch, then the minimum performance difference is... itself, or The difference between the value and the baseline performance index. k is less than n-2 and greater than or equal to 1.
[0039] For the average performance change, the system calculates the arithmetic mean of the absolute values of the performance changes from training epoch k1 to the current training epoch n for each dimension i: Here, we take an example where k1 = k = 1. This average value reflects the average drastic change in performance of this dimension during historical training. k1 is less than n-2 and greater than or equal to 1.
[0040] Therefore, the learning state of performance difference in this approach specifically includes the absolute value of the current performance change, the minimum performance difference, and the average performance change. The absolute value of the current performance change reflects the magnitude of change in this round, the minimum performance difference reflects the most stable change in history, and the average performance change reflects the average change in history. These components together describe the characteristics of the model's performance change over training rounds across various capability evaluation dimensions, providing a more granular basis for subsequent hyperparameter decisions.
[0041] In the above implementation process, by introducing three statistical dimensions—the absolute value of the current performance change, the minimum performance difference, and the average performance change—it is possible to more comprehensively and precisely characterize the model's learning dynamics across various capability evaluation dimensions. Specifically, the absolute value of the current performance change reflects the instantaneous fluctuation amplitude of this training round, the minimum performance difference reveals the most stable learning phase in history, and the average performance change expresses the long-term overall trend. The combination of these three metrics allows the system to not only determine whether the model is changing rapidly or converging, but also to identify the risk of overfitting or learning instability. Compared to existing methods that rely solely on a single performance increment or loss value, this approach significantly improves the accuracy and robustness of learning state evaluation.
[0042] Based on the above embodiments, after obtaining the aforementioned performance differences, the system uses them as at least part of the learning state, combined with other possible learning states such as the degree of learning sufficiency, to determine the hyperparameters for the next training round. The hyperparameters may include the maximum learning rate. Specifically, the convergence degree of the corresponding capability evaluation dimension can be determined based on the ratio of the absolute value of the current performance change to the average value of the performance change. Then, a weighted summation is performed on the convergence degrees of each capability evaluation dimension to determine the model's learning convergence degree. Based on the learning convergence degree and the minimum performance difference, the maximum learning rate of the model in the next training round can be determined. Here, the learning rate adjustment factor can be determined first based on the learning convergence degree and the minimum performance difference. Then, based on the maximum learning rate of the current training round and the learning rate adjustment factor, the maximum learning rate of the model in the next training round is determined and configured.
[0043] The convergence degree is used to quantify the learning stability of a certain ability assessment dimension in the current training round relative to its historical change range. The smaller the value, the more convergent the performance change of that dimension tends to be. The learning convergence degree is a comprehensive index obtained by weighted summation of the convergence degrees of each dimension, reflecting whether the model as a whole has entered a stable learning stage. The learning rate adjustment factor is a multiplicative coefficient used to adjust the current learning rate according to the learning status to obtain the maximum learning rate for the next round.
[0044] After calculating the aforementioned performance differences, the system calculates the degree of convergence for each capability evaluation dimension i. Specifically, the degree of convergence Defined as the ratio of the absolute value of the current performance change to the average value of the performance change, i.e.: This ratio means that if the change in the current training round is close to or less than the historical average change, for example... This indicates that the learning fluctuations in that dimension have weakened and are tending to converge; if If the value is significantly greater than 1, it indicates that there is still a large performance variation in the current round, and the learning has not yet converged.
[0045] Subsequently, the system performs a weighted summation of the convergence degrees of each dimension to obtain the overall learning convergence degree of the model. The weight This refers to the weight corresponding to the ability assessment dimension i. It can be pre-set according to the importance of different ability assessment dimensions or the optimization goal of the current training round. For example, in rounds that focus on visual ability, the weight of the visual dimension is increased. In the preference optimization stage, the weights of instruction compliance and language generation dimensions are higher. The larger the value of the learning convergence degree, the more the model is still in a large range of learning changes. The closer the value is to 0, the more the model tends to converge.
[0046] Next, the system will assess the degree of learning convergence and the minimum performance difference in each dimension. ,Right now Alternatively, depending on the requirements, a certain aggregation of the minimum values of each dimension can be used to determine the learning rate adjustment factor for the next training round.
[0047] In one implementation, the learning rate adjustment factor The following calculation formula is used: Where f is a preset function, the numerical range of which is usually positive, and this adjustment factor can directly reflect the learning state's need for learning rate scaling. In a preferred embodiment, f can be a piecewise function or a lookup table rule.
[0048] In some other implementations, f can be a piecewise linear function, and the learning rate adjustment factor is determined as follows:
[0049] in, This represents the learning rate adjustment factor. This represents the baseline adjustment factor, which is typically set to 1. Represents the amplitude limiting function. Indicates the degree of convergence of learning. This represents the reference convergence level, used to normalize the learning convergence level. This represents the lower limit of the amplitude limiting function. This represents the upper limit of the limiting function. This represents the sigmoid function. Indicates the smallest performance difference. This indicates a degradation-sensitive parameter.
[0050] The above limiting function Indicates that you will input Limited to Within the interval. If Then output This has the effect of reducing the learning rate. Then output This serves to increase the learning rate; otherwise, the output... itself.
[0051] The output is a coefficient between 0 and 1. When there is severe degradation, the coefficient is close to 0, which significantly lowers the overall adjustment factor and thus significantly reduces the learning rate to curb degradation. When there is no degradation or very slight degradation, the coefficient is close to 1 and has little effect on the adjustment factor.
[0052] After obtaining the learning rate adjustment factor, the system can use the maximum learning rate of the current training round. Using the learning rate adjustment factor mentioned above, calculate the maximum learning rate for the next training round using the following formula: Understandably, the learning rate adjustment factor obtained in each training round may be different.
[0053] In the above implementation process, the ratio of the absolute value of the current performance change in each dimension to the historical average change is used as a measure of convergence. This ratio is then weighted and summed to obtain the overall learning convergence, quantifying whether the model is currently in a rapid learning phase or approaching convergence. Combining this with the minimum performance difference—an indicator reflecting the most stable historical change—to determine the learning rate adjustment factor allows for differentiated adjustment strategies for different learning stages: maintaining or moderately increasing the learning rate to accelerate convergence when the model is still changing significantly; reducing the learning rate to avoid overfitting when the model is approaching convergence; and further suppressing the learning rate to prevent the destruction of learned knowledge when there has been a historically extremely stable phase. This mechanism ensures that the learning rate adjustment considers both the current real-time trend and historical extreme stability, resulting in more robust and accurate decisions.
[0054] Based on the above embodiments, the learning rate adjustment factor can also be determined based on the following principles: (1) If the learning convergence is greater than the first threshold and the minimum performance difference is not negative, then the learning rate adjustment factor is determined to be the first set value.
[0055] When the learning rate adjustment factor is set to the first set value, the learning rate adjustment factor can keep the maximum learning rate of the next training round unchanged compared with the maximum learning rate of the current training round, or make the relative change between the two less than or greater than the preset fluctuation threshold.
[0056] The first threshold can be a preset convergence threshold, such as setting the first threshold to 0.8. The first setting value is a preset adjustment factor value, which is a positive number. The first setting value can be 1 or close to 1, such as 0.9 or 1.1.
[0057] If the learning convergence is greater than the first threshold and the minimum performance difference is greater than or equal to 0, the model is determined to still be in the fast learning phase and has not experienced performance degradation in the past. At this time, the learning rate adjustment factor is set to the first set value, which means maintaining or slightly increasing or decreasing the learning rate to take advantage of the current good learning situation.
[0058] (2) If the learning convergence is less than the second threshold and the minimum performance difference is not negative, then the learning rate adjustment factor is determined to be the second set value. The second set value is a positive number and less than 1, the second set value is less than the first set value, and the first threshold is greater than the second threshold.
[0059] The second threshold also refers to the preset convergence threshold. The second threshold is less than the first threshold. For example, if the first threshold is 0.8, the second threshold can be 0.5. The second set value is less than the first set value. If the first set value is 0.9, then the second set value can be 0.6.
[0060] If the learning convergence is less than the second threshold and the minimum performance difference is greater than or equal to 0, the model is considered to have converged and has no history of degradation. In this case, the learning rate adjustment factor is set to the second set value. This means that the learning rate needs to be appropriately reduced in order to fine-tune the model and prevent the convergence ability from being destroyed due to an excessively large learning rate.
[0061] (3) If the minimum performance difference is less than 0, the learning rate adjustment factor is set to the third setting value, which is less than the second setting value.
[0062] If the minimum performance difference is less than 0, indicating that performance degradation has occurred historically, the learning rate adjustment factor is directly set to the third setpoint, regardless of the degree of learning convergence. If the third setpoint is less than the second setpoint, such as 0.2, it indicates that the learning rate needs to be significantly reduced to curb potential degradation trends and stabilize model training.
[0063] In practical implementation, the above three principles include execution priority: first, check for degradation; if satisfied, directly use the third setting; if not satisfied, determine whether the learning rate adjustment factor should be the first or second setting based on the learning convergence degree. If it falls between the second and first thresholds (i.e., second threshold ≤ learning convergence degree ≤ first threshold), and no performance degradation has occurred, then the default adjustment factor or other interpolation methods can be used. The default adjustment factor can be 1.
[0064] In the above implementation, a concise decision rule based on threshold comparison is used to replace the complex continuous function calculation, significantly reducing runtime overhead while maintaining high adaptability. Specifically, the learning convergence level is divided into a fast learning region, an intermediate transition region, and a convergence region using a first threshold and a second threshold, and the presence of historical degradation is identified by whether the minimum performance difference is negative. When the model is in a fast learning phase and has no history of degradation, a larger first setting value is used to accelerate training; when the model tends to converge and has no degradation, a moderate second setting value is used for fine-tuning to prevent overfitting; once a negative minimum performance difference is detected, the smallest third setting value is directly used to significantly reduce the learning rate to curb the degradation trend and stabilize training.
[0065] Based on the above embodiments, if the performance difference corresponding to any capability evaluation dimension is less than a preset degradation threshold, the learning rate in the next training round corresponding to that capability evaluation dimension is configured to be greater than the maximum learning rate of the current training round, and / or the number of training samples related to that capability evaluation dimension is increased, with the preset degradation threshold being less than 0. If the performance difference corresponding to that capability evaluation dimension is greater than or equal to the preset degradation threshold, the maximum learning rate of the model as a whole in the next training round can continue to be adjusted based on the learning state.
[0066] The preset degradation threshold is a preset value less than 0 (e.g., -0.05) used to determine whether a significant performance degradation requiring special intervention has occurred in a certain dimension; the maximum learning rate of the current training round refers to the upper limit of the learning rate allowed by the optimizer in this stage.
[0067] Training samples related to this capability assessment dimension refer to a subset of samples in the training dataset that can effectively improve the capability of this dimension, such as image-text pair data for the visual understanding dimension, or complex instruction data for the instruction compliance dimension.
[0068] After each non-final training round, the system obtains the performance differences of the model across various capability evaluation dimensions. For each dimension i, the system determines the corresponding dimension. Is it less than a preset degradation threshold (e.g.) <-0.05). If this condition is met, it indicates that the model has experienced a significant degradation in capability beyond the acceptable range in this dimension, and the system will take targeted intervention measures for this dimension.
[0069] Interventions include at least one of the following: (1) Configure the learning rate in the next training round corresponding to the degraded dimension to a value greater than the maximum learning rate of the current training round. Specifically, the system can assign an independent parameter group learning rate to each dimension. The learning rate of this dimension can be set to a number of times the current overall maximum learning rate, such as 1.5 times or 2 times, to promote the rapid repair of the capability of this dimension.
[0070] (2) Increase the proportion of training samples related to the degradation dimension in the next round of data mixing. The system can adjust the data sampling weights to increase the probability of selecting samples corresponding to this dimension, thereby guiding the model to learn more about this dimension. This can be done by manually issuing instructions to adjust the sample data.
[0071] The two interventions mentioned above can be used alone or in combination to enhance the repair effect.
[0072] For dimensions that do not show significant degradation, i.e. If the learning rate is greater than or equal to a preset degradation threshold, the system does not adjust its learning rate or sample ratio individually. Instead, it continues to determine the maximum learning rate for the model in the next training round based on the learning status across various dimensions, such as the degree of learning convergence and the overall performance trend. The determination of this overall learning rate follows the aforementioned adaptive decision-making logic based on learning status, ensuring that the model maintains a stable training pace across most dimensions. This adaptive decision-making logic may include calculations based on adjustment factors such as comprehensive convergence metrics and minimum performance differences.
[0073] The aforementioned differential processing strategy can be applied simultaneously to one or more dimensions exhibiting degradation within a single training epoch. For each degradation dimension, the system can allocate an independent learning rate higher than the overall learning rate, while simultaneously increasing the sampling weights of samples related to that dimension. The overall learning rate, however, continues to be adjusted from the current learning rate according to the original rules, unaffected by the individual increase in the learning rate for the degradation dimension. This process is automatically executed at the end of each non-final training epoch, thereby achieving precise repair of capability degradation while maintaining the model's learning stability across other dimensions.
[0074] In the above implementation process, for capability dimensions that show significant degradation, instead of uniformly reducing the global learning rate, a higher learning rate is configured for each dimension individually, and the proportion of relevant training samples is increased, thereby achieving differentiated and precise repair. This approach avoids the inhibitory effect of globally reducing the learning rate on already learned dimensions, while specifically accelerating the recovery process of degraded dimensions.
[0075] Based on the above embodiments, the hyperparameters also include a resolution upper limit, the model can be a multimodal model, the capability assessment dimension can include a visual understanding capability dimension, and the learning state includes the degree of learning sufficiency. In the above method of determining the learning state of the model in each capability assessment dimension, the visual understanding performance of the multimodal model in the visual understanding capability dimension and the uniformity of the performance of the multimodal model under different resolution configurations can be obtained based on the resolution interval value of the current training round. Then, based on the visual understanding performance and the uniformity, the resolution index value representing the current degree of learning sufficiency is determined.
[0076] The upper limit of resolution refers to the maximum input resolution that the model is allowed to use in the current training round. It is measured by the number of sub-tiles or the pixel size and controls the complexity of image details that the model can access in this training round.
[0077] A multimodal model can refer to a model that supports multiple inputs and outputs such as images, videos, speech, and text, such as image understanding models, visual models, and image-text multimodal models; the resolution range value can refer to the upper limit of the current resolution allowed in the current training epoch and the lower limit of the optional range; visual understanding performance refers to the average performance score obtained by the model on the visual validation set within the current resolution range; uniformity refers to the magnitude of the fluctuation in the model's performance under different resolution configurations, usually expressed by standard deviation or variance. The higher the uniformity, the more consistent the model's adaptability to different resolutions.
[0078] The resolution index is a quantitative value that comprehensively reflects the degree of learning adequacy; the higher the value, the more adequacy the learning.
[0079] In practice, before the start of each non-final training epoch, the system sets a resolution cap for that epoch. In a preferred embodiment, the initial training epoch has a lower resolution cap, which can be gradually increased in subsequent epochs. During the training of this epoch, the multimodal model can only be trained using a resolution configuration with no more than this cap of sub-tiles. After the epoch ends, the system needs to evaluate the model's learning sufficiency within the current resolution range to determine whether the resolution cap can be expanded in the next epoch.
[0080] For example, the resolution grid configuration set G is sorted by the number of sub-tiles. The permutation defines the upper limit of the allowed resolution in round n as follows: (Maximum number of valid subgraph blocks), satisfying The actual available configuration subset in round n is: Initial training phase As training progresses, it will gradually expand to .
[0081] The system first obtains the model's visual understanding performance in the visual understanding capability dimension. Specifically, this can be achieved by using a dedicated visual validation set covering all allowed resolution configurations within the current resolution range to batch test the model, and calculating the model's average performance score (e.g., image question answering accuracy) on these validation samples. This average score is denoted as... This refers to the performance of visual understanding.
[0082] Simultaneously, the system also needs to evaluate the uniformity of model performance across different resolution configurations. To this end, the system calculates the independent performance score of the model for each specific resolution configuration within the current resolution range (e.g., 320×320, 384×384, 448×448, etc., as long as the number of subplots does not exceed the current upper limit), and then calculates the standard deviation (or variance) of these scores. A smaller standard deviation indicates a more stable and uniform performance across different resolutions; a larger standard deviation indicates poor adaptation of the model to certain resolution configurations and lower uniformity. This standard deviation is denoted as . .
[0083] Next, the system will assess its visual understanding performance. The resolution index RR, which characterizes the adequacy of the current learning process, is determined by combining the uniformity and the degree of uniformity. The uniformity can be determined through... Quantification.
[0084] In some implementations, uniformity is determined based on a first mathematical statistical value of performance under each resolution configuration, such as the standard deviation in the example above. When determining the resolution index value RR, a second mathematical statistical value of the baseline performance under each resolution configuration can also be obtained. Then, the resolution index value is determined based on the ratio of visual understanding performance to the baseline value of visual understanding performance, as well as the first mathematical statistical value and the second mathematical statistical value.
[0085] The first mathematical statistic mentioned above can refer to the standard deviation of the model's performance under different resolution configurations. The second mathematical statistic is the baseline standard deviation of the performance under each allowed resolution configuration, which can be the maximum standard deviation or the average of the standard deviations. The baseline performance value and the second mathematical statistic can be obtained in advance through reference models or reference training epochs, representing the expected performance level and uniformity.
[0086] An exemplary comprehensive calculation method is as follows:
[0087] in, This indicates the resolution index value. This indicates the performance of visual understanding. This represents a benchmark value for visual understanding performance. Indicates the degree of uniformity, i.e., the first mathematical statistical value. This represents the second mathematical statistical value.
[0088] In this formula, the first term reflects whether the average performance meets expectations, and the second term reflects whether the performance is uniformly distributed across different resolutions. higher and When the RR value is small, a larger RR value indicates a higher degree of learning adequacy; conversely, if... Low or If the value is too large, the RR value will be small, indicating that the learning is not yet sufficient. The RR value is usually normalized to the [0,1] interval.
[0089] The above implementation introduces a second mathematical statistical value of the benchmark performance, comparing the current model's visual understanding performance and uniformity with a preset benchmark to obtain a normalized resolution index value. This design eliminates the influence of differences in absolute performance values under different model sizes or task difficulties, making the evaluation results universal and comparable across models and tasks.
[0090] Once the resolution metric value (RR) is obtained, the system can use it as part of the learning state for subsequent decisions. This process is performed automatically at the end of each non-final training epoch, ensuring that the model has been sufficiently learned within the current resolution range before introducing higher resolution inputs.
[0091] In the above implementation process, a resolution-based learning sufficiency evaluation mechanism is introduced to combine visual understanding performance with the performance uniformity under different resolution configurations, quantifying the model's adaptation level to the current resolution range. This scheme ensures that the model has fully learned within the current resolution range and achieved stable cross-resolution performance before considering expanding the resolution upper limit, thereby avoiding training instability, convergence difficulties, or visual capability degradation caused by prematurely introducing high-resolution inputs.
[0092] Based on the above embodiments, when determining the upper limit of the model's resolution in the next training round, it can be determined according to the above resolution index value. For example, if the resolution index value is greater than or equal to the preset index threshold, the upper limit of the resolution in the next training round is increased; if the resolution index value is less than the preset index threshold, the upper limit of the resolution remains unchanged.
[0093] The preset index threshold is a pre-defined comparison threshold, which can be, for example, 0.7 or 0.8, and is used to determine whether the model is ready to accept higher resolution input.
[0094] In practice, after each non-final training round, the system calculates a resolution metric value (RR) based on the model's visual understanding performance and uniformity within the current resolution range. The system then compares this RR value with a preset threshold value. Compare them. Preferably, =0.75.
[0095] If RR≥ This indicates that the model has been sufficiently learned within the current resolution range: average performance is satisfactory and performance is relatively uniform across different resolution configurations, capable of stably handling all currently allowed resolution inputs. At this point, the system determines that the upper limit of resolution for the next training epoch should be greater than the upper limit of resolution for the current epoch. Specifically, the system can increase the current resolution upper limit by a fixed step size ΔK (e.g., increasing the number of sub-tiles or the resolution level each time), but not exceeding the globally allowed maximum resolution upper limit K. max .Right now: .
[0096] If RR < This indicates that the model's learning at the current resolution range is insufficient: either the average performance has not reached the expected level, or the performance fluctuations between different resolution configurations are large, and the model has not yet stably adapted to all allowed resolutions. In this case, the system determines that the upper limit of the resolution for the next training epoch will remain the same as the current epoch, i.e., no expansion will be performed. .
[0097] Once the resolution cap for the next training round is determined, the system configures it as a hyperparameter in the training environment. During the next training round, the model will only use resolution configurations with no more than this new cap in the number of subplots. This judgment and configuration process is automatically executed at the end of each non-final training round, ensuring that the model always learns within a sufficiently adapted resolution range and avoiding training instability or performance degradation due to prematurely introducing higher resolution inputs.
[0098] In the above implementation, the decision to expand the resolution upper limit is directly related to the degree of learning sufficiency. This ensures that higher resolution inputs are only introduced after the model has learned sufficiently and achieved stable performance within the current resolution range, avoiding training instability or performance degradation caused by prematurely increasing the resolution. Simultaneously, during resolution expansion, a compensation factor is determined based on the adjustment step size of the resolution upper limit to positively compensate for the maximum learning rate, thereby accelerating the model's adaptation to new resolution inputs. If the upper limit is not met, it remains unchanged to avoid ineffective expansion.
[0099] The hyperparameters of the model in the next training round can be determined by the above method, namely the maximum learning rate and the resolution limit. This scheme can also perform joint scheduling for the learning rate and resolution. The specific implementation method includes: if the resolution limit of the next training round is greater than the resolution limit of the current training round, a compensation factor is applied to the maximum learning rate to obtain the adjusted maximum learning rate. The adjusted maximum learning rate is used as the maximum learning rate of the next training round. The compensation factor is positively correlated with the incremental step size of the resolution limit.
[0100] After each non-final training round, the system first determines the upper limit of resolution for the next round based on the comparison between the resolution metric value and the preset metric threshold. .like That is, if the resolution upper limit is expanded, the system's maximum learning rate for the next round will be increased. Applying another compensation factor yields the adjusted maximum learning rate. This is used as the maximum learning rate for the next training epoch. The compensation factor is positively correlated with the increment step size ΔK of the resolution upper limit, where the increment step size refers to the increase in the resolution upper limit of the next epoch relative to the current epoch. The larger the increment step, the larger the compensation factor, which in turn increases the learning rate more.
[0101] One exemplary implementation is as follows: ,in This is the preset resolution compensation coefficient. This represents the maximum allowed resolution globally. This is the normalized increment step size. This formula ensures the compensation factor... The compensation factor is always greater than or equal to 1 and monotonically increases with ΔK. When ΔK = 0, i.e., when the resolution is not expanded, the compensation factor is 1, and the learning rate remains unchanged; when ΔK > 0, the compensation factor is greater than 1, and the learning rate receives positive compensation. >0.
[0102] After determining the adjusted maximum learning rate Subsequently, the system can further adjust the learning rate based on other learning states, such as training objectives, but this implementation focuses on the compensation mechanism triggered by resolution expansion. Finally, the system configures the adjusted maximum learning rate and the resolution cap for the next round into the training environment. In the next training round, the model uses the expanded resolution range for training, while employing a higher, compensated learning rate, thereby accelerating the adaptation process to newly introduced high-resolution inputs.
[0103] The aforementioned joint scheduling process is executed automatically at the end of each non-final training round, ensuring that the learning rate and the resolution upper limit are coordinated and matched, thus avoiding slow convergence caused by insufficient learning rate due to a sudden increase in resolution.
[0104] In some implementations, this scheme can also perform joint scheduling of learning rate and stage objective. Specifically, if the training objective type of the next training round is different from that of the current training round, a reduction factor is applied to the maximum learning rate to obtain the adjusted maximum learning rate. The adjusted maximum learning rate is used as the maximum learning rate of the next training round, and the reduction factor is a positive number less than 1.
[0105] The training objective type refers to the optimization paradigm or task objective adopted by the model in a certain training epoch, such as Supervised Fine-Tuning (SFT), Direct Preference Optimization (DPO), and Reinforcement Learning (RL). Different objective types have different sensitivities to the learning rate and convergence characteristics.
[0106] The maximum learning rate here is the upper limit of the learning rate allowed by the optimizer in the next training round, as determined according to the aforementioned embodiments.
[0107] The reduction factor is a positive multiplicative coefficient less than 1, used to reduce the learning rate when switching target types to avoid instability or overfitting caused by sudden changes in the optimization target. The preferred value of the reduction factor is 0.3 or 0.5.
[0108] After each non-final training epoch, the system obtains the training objective type T(n) used in the current epoch and the pre-planned training objective type T(n+1) for the next epoch. The system determines whether T(n+1) is the same as T(n). If they are different, indicating a switch in the training objective type (e.g., from supervised fine-tuning to preference optimization), the system applies a reduction factor to the maximum learning rate for the next epoch. ( ), to obtain the adjusted maximum learning rate This is then used as the maximum learning rate for the next training round. (Reduction factor) The specific value depends on the learning rate sensitivity requirements of the target switching type: for example, when switching from SFT to DPO, since DPO is more sensitive to the learning rate and prone to overfitting, a smaller reduction factor can be used, such as 0.3; while when switching from a certain stage to a similar target type, a larger reduction factor can be used, such as 0.7. The reduction factor can be obtained through a preset switching mapping table or dynamically determined based on experience.
[0109] If the training objective type in the next round is the same as that in the current round, the reduction factor will not be applied to the learning rate, and the learning rate will be adjusted according to other existing rules or not adjusted at all.
[0110] Determine the adjusted maximum learning rate Then, the system configures it into the training environment for the next round. If other joint scheduling factors such as resolution scaling exist simultaneously, adjustment terms such as resolution compensation factors can be superimposed after applying the reduction factor, but this implementation mainly describes the independent reduction mechanism caused by target switching. This process is automatically executed at the end of each non-final training round to ensure that the learning rate can be reduced accordingly when the training target is switched, thereby stably transitioning to the new optimization paradigm.
[0111] In some implementations, this scheme can also perform joint scheduling for learning rate, resolution, and stage objectives. Specifically, if the upper limit of resolution in the next training round is greater than the upper limit of resolution in the current training round, and the training objective type in the next training round is different from the training objective type in the current training round, then a compensation factor and a reduction factor are applied to the maximum learning rate to obtain the adjusted maximum learning rate. The adjusted maximum learning rate is used as the maximum learning rate in the next training round. The compensation factor is positively correlated with the incremental step size of the upper limit of resolution, and the reduction factor is a positive number less than 1.
[0112] The reduction factor is a positive multiplicative coefficient less than 1, used to reduce the learning rate when switching training targets to avoid instability or overfitting.
[0113] After each non-final training epoch, the system first determines the upper limit of resolution for the next epoch. And the training target type T(n+1), and compare it with the current round. If both conditions are met: (1) That is, the resolution upper limit expansion occurs; (2) T(n+1)≠T(n), indicating the training target type switching, then the system's maximum learning rate for the next training round. Simultaneously applying the compensation factor and the reduction factor, the adjusted maximum learning rate is obtained. This will be used as the maximum learning rate for the next training round.
[0114] Specifically, the adjusted maximum learning rate is calculated using the following formula: ,in As a compensation factor, Reduction factor. Compensation factor. It is positively correlated with the increment step size ΔK of the resolution upper limit. This represents the maximum global resolution. Reduction factor. It is a positive number less than 1, and its value depends on the specific type of target switching. Preferably, for example, it is 0.3 when the training target type is switched from SFT to DPO, and 0.7 when switched from DPO to SFT. The above settings can be determined by a preset mapping table.
[0115] Understandably, if only one condition is met—either resolution scaling or training target type switching—only the corresponding single factor is applied; if neither condition is met, the original learning rate adjustment rule is maintained. When applying two factors simultaneously, the compensation factor is usually applied first, followed by the reduction factor, or they are directly combined multiplicatively; the order does not affect the product result. The system will calculate the... With the next round of resolution cap The new training target type T(n+1) is also configured into the training environment. In the next training round, the model will use the expanded resolution range under the new target type and update the parameters with a jointly adjusted learning rate.
[0116] This joint scheduling process is executed automatically at the end of each non-final training round. When resolution scaling and training target switching occur simultaneously, a synergistic balance between two opposing adjustment needs is achieved by jointly applying a compensation factor and a reduction factor to the maximum learning rate. On the one hand, resolution scaling requires increasing the learning rate to accelerate adaptation to the new input resolution; on the other hand, target type switching requires decreasing the learning rate to avoid overfitting and instability. The compensation factor is positively correlated with the incremental step size, ensuring that the greater the resolution increase, the stronger the positive compensation; the reduction factor is a positive number less than 1, providing a basic inhibitory effect. The multiplicative combination of the two allows the learning rate to be finely adjusted according to the relative strength of the two changes, preventing a sharp drop in the learning rate caused by target switching from slowing down the adaptation to high resolution, and preventing the increase in the learning rate brought about by resolution scaling from disrupting the training stability of the new target type.
[0117] Based on the above embodiments, the initial value of the training rounds of the model can also be determined according to the total number of parameters of the model and the number of capability evaluation dimensions.
[0118] A training round refers to a complete parameter update cycle in a multi-stage training process. Hyperparameters can be adjusted after each round.
[0119] The initial value of the training rounds refers to the total number of stages required, estimated before training begins based on the model's characteristics and task complexity, and is used to plan the entire training process.
[0120] Total parameters refer to the number of all trainable parameters in a model, usually measured in millions (M) or billions (B), denoted as . .
[0121] Before training begins, the system obtains the total number of parameters of the model. And the number D of the capability assessment dimensions that the training focuses on. Subsequently, the system calculates estimates of the initial values for each training epoch using a parameterized formula. This formula comprehensively considers the requirements of model size and target capability complexity on the number of training rounds: models with a larger number of parameters have a higher learning capacity and require more stages to fully explore their potential; more capability evaluation dimensions mean that the model needs more differentiated stages to optimize each capability separately. An example calculation formula is as follows:
[0122] in, Indicates rounding up. Indicates the initial value. This indicates the minimum number of rounds to be played, which can be greater than or equal to 2. This represents the scaling factor, used to control the strength of the influence of the parameter quantity on the number of stages. This represents the total number of parameters in the model. Indicates the preset reference parameter value. This represents the scaling factor for the capability dimension. This indicates the number of multiple competency assessment dimensions.
[0123] This value serves as an initial estimate of the total number of training rounds, and can be dynamically adjusted or terminated early based on the actual convergence.
[0124] Calculate The system then uses this as the initial configuration for the training plan, arranging the timing of changes to the objectives and resolution cap for each round, as well as the schedule for the learning rate scheduling strategy. For example, the system can... The training process is roughly divided into several equal parts or phases with different target types allocated according to a specific ratio. If an early termination condition is triggered during training, the actual number of phases may be less than [the required number of phases]. Otherwise, training will continue until the target is reached. Up to this stage.
[0125] This implementation allows the initial setting of training epochs to adaptively match the model's capacity and the task's complexity, avoiding undertraining or overtraining issues caused by a fixed number of epochs. Specifically, by adaptively determining the initial value of the training epochs based on the total number of model parameters and the number of capability evaluation dimensions, the scale of multi-stage training is matched with the model's complexity and the task's difficulty. A larger total number of parameters results in a higher model capacity, requiring more epochs to fully exploit its learning potential; more capability evaluation dimensions mean more differentiated epochs are needed to optimize each capability individually.
[0126] Building upon the above embodiments, after each training epoch, a multi-dimensional capability convergence index can be used to determine whether to terminate training early. Specifically, the multi-dimensional capability convergence index can be calculated based on the current performance of each capability evaluation dimension and the minimum performance difference in each capability evaluation dimension. The minimum performance difference is determined based on the model's current performance in each capability evaluation dimension and its performance in historical training epochs, and can be obtained using the method described in the aforementioned embodiments. If the multi-dimensional capability convergence index is greater than a preset convergence threshold, the training termination condition is met.
[0127] Among them, the multi-dimensional capability convergence index is a comprehensive quantitative indicator used to determine whether the model has reached the target level in most capability dimensions without significant degradation, denoted as . Preset convergence threshold It is a preset threshold, when When the training is terminated, the preferred method is to determine if the conditions for termination are met. =0.9.
[0128] The multi-dimensional capability convergence index is calculated using the following formula:
[0129] in, This represents a multi-dimensional capability convergence index. This indicates an indicator function (1 if the condition is true, 0 otherwise). This represents the current performance of capability assessment dimension i. This represents the target performance threshold for dimension i of the capability assessment. This indicates the number of multiple competency assessment dimensions. Indicates the smallest performance difference. This indicates a degradation-sensitive parameter.
[0130] In the above formula The calculated proportions reflect how well the model has achieved its target performance. It can represent a penalty term for performance degradation, i.e., a degradation factor. The more severe the degradation, the closer the penalty factor is to 0.
[0131] The system will calculate With preset convergence threshold Compare. If If the model has reached the target level in most capability dimensions without significant degradation, the training termination condition is met, and the system terminates the entire training process early. At this point, the actual number of training rounds is less than the initially estimated number of rounds. Otherwise, training continues until the next round or until the maximum number of rounds is reached, i.e., the initial value mentioned above. This judgment is automatically executed after each non-final round, achieving adaptive early termination of training and avoiding unnecessary computational overhead.
[0132] In the above implementation process, by introducing a multi-dimensional capability convergence index, the performance achievement rate of each capability dimension is combined with the minimum performance difference, achieving a comprehensive and quantitative evaluation of the model training status. When the model reaches the preset target in most capability dimensions without significant degradation, training is automatically terminated early, thereby avoiding the waste of computational resources and the risk of overfitting caused by overtraining. At the same time, the penalty mechanism for the minimum performance difference effectively prevents misjudgment as convergence when performance degrades in some dimensions but the average achievement rate is high, ensuring the reliability of the early termination decision.
[0133] Please refer to the above method embodiments. Figure 2 , Figure 2 This is a structural block diagram of a dynamic hyperparameter configuration device 200 for model training provided in an embodiment of this application. The device 200 may be a module, program segment, or code on an electronic device. It should be understood that the device 200 corresponds to the method embodiment described above and is capable of executing the various steps involved in the method embodiment. The specific functions of the device 200 can be found in the description above, and detailed descriptions are omitted here to avoid repetition.
[0134] Optionally, the device 200 includes: The performance acquisition module 210 is used to acquire the current performance of the model in at least two different capability evaluation dimensions in response to the end signal of any current training round, where the current training round represents a non-final training round. The learning state acquisition module 220 is used to evaluate the learning state of the model in each capability evaluation dimension in the corresponding current training round based on at least two current performance metrics. The learning state includes at least one of the following: performance difference and learning sufficiency. The parameter configuration module 230 is used to determine and configure the hyperparameters of the model in the next training round based on the learning state, wherein the hyperparameters include at least the maximum learning rate.
[0135] Optionally, the learning state includes the performance difference. The learning state acquisition module 220 is used to determine the absolute value of the current performance change based on the model's current performance in each capability evaluation dimension and its performance in at least one historical training round, and to determine the performance difference with the smallest absolute value of performance change as the minimum performance difference; and to determine the average performance change of the historical training rounds based on the model's historical performance in each capability evaluation dimension in at least one historical training round; wherein, the learning state includes the absolute value of the current performance change, the minimum performance difference, and the average performance change.
[0136] Optionally, the learning state acquisition module 220 is used to determine the convergence degree of the corresponding capability evaluation dimension based on the ratio of the absolute value of the current performance change to the average value of the performance change; perform a weighted summation on the convergence degrees of each capability evaluation dimension to determine the learning convergence degree of the model; determine the learning rate adjustment factor based on the learning convergence degree and the minimum performance difference; and determine and configure the maximum learning rate of the model in the next training round based on the maximum learning rate of the current training round and the learning rate adjustment factor.
[0137] Optionally, the learning state acquisition module 220 is configured to: if the learning convergence degree is greater than a first threshold and the minimum performance difference is not negative, determine the learning rate adjustment factor as a first set value; if the learning convergence degree is less than a second threshold and the minimum performance difference is not negative, determine the learning rate adjustment factor as a second set value, wherein the second set value is a positive number and less than 1, the second set value is less than the first set value, and the first threshold is greater than the second threshold; if the minimum performance difference is less than 0, determine the learning rate adjustment factor as a third set value, wherein the third set value is less than the second set value.
[0138] Optionally, the parameter configuration module 230 is further configured to, if the performance difference corresponding to any of the capability evaluation dimensions is less than a preset degradation threshold, configure the learning rate in the next training round corresponding to the capability evaluation dimension to be greater than the maximum learning rate of the current training round, and / or increase the number of training samples related to the capability evaluation dimension, wherein the preset degradation threshold is less than 0.
[0139] Optionally, the hyperparameters also include a resolution upper limit, the model is a multimodal model, the capability assessment dimension includes a visual understanding capability dimension, the learning state includes the learning sufficiency, and the learning state acquisition module 220 is used to acquire the visual understanding performance of the multimodal model in the visual understanding capability dimension and the uniformity of the performance of the multimodal model under different resolution configurations based on the resolution interval value of the current training round; and determine the resolution index value representing the current learning sufficiency based on the visual understanding performance and the uniformity.
[0140] Optionally, the uniformity is determined based on a first mathematical statistical value of the performance under each resolution configuration; the learning state acquisition module 220 is used to acquire a second mathematical statistical value of the benchmark performance under each resolution configuration; and the resolution index value is determined based on the ratio of the visual understanding performance to the benchmark value of the visual understanding performance, as well as the first mathematical statistical value and the second mathematical statistical value.
[0141] Optionally, the parameter configuration module 230 is configured to increase the upper limit of the resolution in the next training round if the resolution index value is greater than or equal to a preset index threshold, determine a compensation factor based on the adjustment value of the upper limit of the resolution, and adjust and configure the maximum learning rate in the next training round based on the compensation factor; if the resolution index value is less than the preset index threshold, the upper limit of the resolution remains unchanged.
[0142] Optionally, the device 200 further includes: The training termination judgment module is used to calculate a multi-dimensional capability convergence index based on the current performance of each capability evaluation dimension and the minimum performance difference in each capability evaluation dimension. The minimum performance difference is determined based on the current performance of the model in each capability evaluation dimension and its performance in historical training rounds. If the multi-dimensional capability convergence index is greater than a preset convergence threshold, the training termination condition is met.
[0143] It should be noted that those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the device described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0144] Please refer to Figure 3 , Figure 3This is a schematic diagram of an electronic device for performing a dynamic configuration method of hyperparameters in model training, provided in an embodiment of this application. The electronic device may include: at least one processor 310, such as a CPU; at least one communication interface 320; at least one memory 330; and at least one communication bus 340. The communication bus 340 is used to establish communication between these components. In this embodiment, the communication interface 320 is used for signaling or data communication with other node devices. The memory 330 may be a high-speed RAM or non-volatile memory, such as at least one disk storage device. Optionally, the memory 330 may also be at least one storage device located remotely from the aforementioned processor. The memory 330 stores computer-readable instructions, which, when executed by the processor 310, cause the electronic device to perform the aforementioned method process.
[0145] Understandable. Figure 3 The structure shown is for illustrative purposes only; the electronic device may also include components that are more advanced than those shown. Figure 3 The more or fewer components shown, or having the same Figure 3 The different configurations shown. Figure 3 The components shown can be implemented using hardware, software, or a combination thereof.
[0146] This application provides a computer-readable storage medium storing a computer program thereon. When the computer program is executed by a processor, it performs the method process executed by the electronic device in the above method embodiments.
[0147] This embodiment discloses a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions, and when the program instructions are executed by a computer, the computer can perform the methods provided in the above-described method embodiments, such as including: In response to the end signal of any current training round, obtain the current performance of the model in at least two different capability evaluation dimensions, where the current training round represents a non-final training round; Based on at least two current performance metrics, evaluate the learning status of the model in each capability evaluation dimension in the corresponding current training round. The learning status includes at least one of the following: performance difference and learning sufficiency. Based on the learning state, the hyperparameters of the model in the next training round are determined and configured, including the maximum learning rate.
[0148] In summary, this application provides a method and apparatus for dynamically configuring hyperparameters during model training. This method obtains the model's current performance across at least two capability evaluation dimensions after each training epoch and dynamically adjusts the maximum learning rate for the next epoch based on performance differences and the degree of learning sufficiency. This ensures that the hyperparameter configuration closely matches the model's actual learning progress and multi-dimensional capability evolution. Compared to traditional fixed or preset decay strategies, this approach effectively avoids overfitting, knowledge corruption, or performance limitations caused by improper hyperparameter settings during model training.
[0149] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the displayed or discussed mutual couplings or direct couplings or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.
[0150] Furthermore, the units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0151] Furthermore, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0152] In this paper, relational terms such as current and second are used only to distinguish one entity or operation from another, without necessarily requiring or implying any such actual relationship or order between these entities or operations.
[0153] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A method for dynamically configuring hyperparameters during model training, characterized in that, The method includes: In response to the end signal of any current training round, obtain the current performance of the model in at least two different capability evaluation dimensions, where the current training round represents a non-final training round; Based on at least two current performance metrics, evaluate the learning status of the model in each capability evaluation dimension in the corresponding current training round. The learning status includes at least one of the following: performance difference and learning sufficiency. Based on the learning state, the hyperparameters of the model in the next training round are determined and configured, including the maximum learning rate.
2. The method according to claim 1, characterized in that, The learning state includes the performance difference, and the evaluation of the model's learning state across each capability evaluation dimension in the corresponding current training epoch, based on at least two current performance metrics, includes: Based on the model's current performance in each capability assessment dimension and its performance in at least one historical training round, determine the absolute value of the current performance change, and determine the performance difference with the smallest absolute value of the performance change as the minimum performance difference. Based on the historical performance of the model in each capability assessment dimension in at least one historical training round, determine the average performance change of the historical training round; The learning state includes the absolute value of the current performance change, the minimum performance difference, and the average value of the performance change.
3. The method according to claim 2, characterized in that, The step of determining and configuring the hyperparameters of the model in the next training round based on the learning state includes: The degree of convergence of the corresponding capability assessment dimension is determined based on the ratio of the absolute value of the current performance change to the average value of the performance change. The convergence of each capability assessment dimension is weighted and summed to determine the learning convergence of the model. The learning rate adjustment factor is determined based on the degree of learning convergence and the minimum performance difference. Based on the maximum learning rate of the current training round and the learning rate adjustment factor, determine and configure the maximum learning rate of the model in the next training round.
4. The method according to claim 3, characterized in that, The step of determining the learning rate adjustment factor based on the learning convergence degree and the minimum performance difference includes: If the degree of learning convergence is greater than the first threshold and the minimum performance difference is not negative, then the learning rate adjustment factor is determined to be the first set value. If the learning convergence is less than the second threshold and the minimum performance difference is not negative, then the learning rate adjustment factor is determined to be the second set value. The second set value is positive and less than 1. The second set value is less than the first set value. The first threshold is greater than the second threshold. If the minimum performance difference is less than 0, then the learning rate adjustment factor is determined to be a third set value, which is less than the second set value.
5. The method according to claim 1, characterized in that, Before determining and configuring the hyperparameters of the model for the next training round based on the learning state, the method further includes: If the performance difference corresponding to any of the capability assessment dimensions is less than a preset degradation threshold, then the learning rate in the next training round corresponding to that capability assessment dimension is configured to be greater than the maximum learning rate of the current training round, and / or the number of training samples related to that capability assessment dimension is increased, wherein the preset degradation threshold is less than 0.
6. The method according to claim 1, characterized in that, The hyperparameters also include a resolution upper limit; the model is a multimodal model; the capability evaluation dimension includes a visual understanding capability dimension; the learning state includes the degree of learning sufficiency; and the evaluation of the model's learning state across each capability evaluation dimension in the corresponding current training epoch, based on at least two current performance metrics, includes: Based on the resolution range value of the current training round, obtain the visual understanding performance of the multimodal model in the visual understanding ability dimension and the uniformity of the performance of the multimodal model under different resolution configurations. Based on the visual understanding performance and the uniformity, a resolution index value representing the current level of learning sufficiency is determined.
7. The method according to claim 6, characterized in that, The uniformity is determined based on a first mathematical statistical value of the performance under each resolution configuration; the determination of the resolution index value characterizing the current learning sufficiency based on the visual understanding performance and the uniformity includes: Obtain the second mathematical statistics of the baseline performance under each resolution configuration; The resolution index value is determined based on the ratio of the visual understanding performance to the visual understanding performance benchmark, and the first mathematical statistical value and the second mathematical statistical value.
8. The method according to claim 7, characterized in that, Based on the learning state, determine and configure the hyperparameters of the model in the next training round, including: If the resolution index value is greater than or equal to the preset index threshold, the resolution upper limit of the next training round is increased, and a compensation factor is determined based on the adjustment value of the resolution upper limit. The maximum learning rate of the next training round is adjusted and configured based on the compensation factor. If the resolution index value is less than the preset index threshold, the upper limit of resolution remains unchanged.
9. The method according to claim 1, characterized in that, In response to the end signal of any current training round, it also includes: A multi-dimensional capability convergence index is calculated based on the current performance of each capability assessment dimension and the minimum performance difference in each capability assessment dimension. The minimum performance difference is determined based on the current performance of the model in each capability assessment dimension and its performance in historical training rounds. If the multi-dimensional capability convergence index is greater than the preset convergence threshold, then the training termination condition is met.
10. A device for dynamically configuring hyperparameters during model training, characterized in that, The device includes: The performance acquisition module is used to acquire the current performance of the model in at least two different capability evaluation dimensions in response to the end signal of any current training round. The current training round represents a non-final training round. The learning state acquisition module is used to evaluate the learning state of the model in each capability evaluation dimension in the corresponding current training round based on at least two current performance metrics. The learning state includes at least one of the following: performance difference and learning sufficiency. The parameter configuration module is used to determine and configure the hyperparameters of the model in the next training round based on the learning state, wherein the hyperparameters include at least the maximum learning rate.