A model inference configuration optimization method, device, equipment, medium and program

By acquiring candidate model inference configuration information generated by multiple heterogeneous proposers, filtering and fusing target parameter combination configuration information, and optimizing hardware and software configuration parameters, the problem of low performance optimization efficiency and poor adaptability caused by manual dependence in the prior art is solved, realizing automated optimal configuration and improving model inference performance.

CN123159559APending Publication Date: 2026-11-24SHANGHAI SUIYUAN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611674713.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-28
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

The performance optimization of existing model inference Harness relies on human experience, lacks systematization and automation, and is difficult to adapt to diverse hardware environments and model combination scenarios, resulting in poor adaptability, low optimization efficiency, and inability to achieve Pareto optimality for multi-dimensional indicators.

Method used

By acquiring candidate model inference configuration information generated by multiple heterogeneous proposers, filtering and fusing target parameter combination configuration information, optimizing hardware and software configuration parameters, and employing automated mechanisms to find the optimal trade-off between latency, throughput, resource consumption, and quality.

Benefits of technology

It reduces the cost of manual tuning, improves model inference performance, achieves optimal configuration under multi-dimensional conditions, and enhances the adaptability and efficiency of model inference.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123159559A_ABST
    Figure CN123159559A_ABST
Patent Text Reader

Abstract

This invention discloses a method, apparatus, device, medium, and program for optimizing model inference configuration, comprising: acquiring multiple candidate model inference configuration information generated by multiple heterogeneous proposers when the current target model triggers the model inference configuration optimization condition; filtering target parameter combination configuration information from each candidate model inference configuration information and then fusing them to obtain multiple fused candidate model inference configuration information; filtering target candidate model inference configuration information based on the candidate model inference configuration information and the fused candidate model inference configuration information; and optimizing and updating the model inference configuration parameters of the current target model based on the target candidate model inference configuration information. The technical solution of this invention can automatically find the optimal trade-off between multiple objectives such as latency, throughput, resource consumption, and quality during the model inference process, reducing manual tuning costs and improving model inference performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of artificial intelligence technology, and in particular to a model reasoning configuration optimization method, apparatus, electronic device, storage medium and program. Background Technology

[0002] Harness, in the context of large models, refers to an external engineering system used to manage AI (Artificial Intelligence) agents. Its core function is to transform the probabilistic output of large models into reliable and controllable task execution capabilities. It encompasses all the code, configuration, and execution logic outside the model.

[0003] Currently, the performance optimization system for model inference Harness heavily relies on human experience. Its core components, including pre- and post-processing code development, operator fusion strategy design, and batch processing parameter configuration, all require engineers to leverage their professional expertise and practical experience for tuning. This traditional optimization method lacks a systematic and automated mechanism for parameter search, strategy iteration, and closed-loop optimization. Manual tuning is highly subjective and limited, making it difficult to adapt to diverse and differentiated hardware operating environments, and unable to quickly adapt to different model combination scenarios. Therefore, existing technical solutions struggle to achieve Pareto optimality for core metrics such as inference performance and resource consumption under multi-dimensional constraints. They suffer from poor adaptability, low optimization efficiency, and insufficient versatility, severely limiting the application effectiveness and performance of model inference Harness in complex deployment scenarios. Summary of the Invention

[0004] This invention provides a model inference configuration optimization method, apparatus, electronic device, storage medium, and program that can automatically find the optimal trade-off between multiple objectives such as latency, throughput, resource consumption, and quality during the model inference process, reducing manual tuning costs and improving model inference performance.

[0005] According to one aspect of the present invention, a model inference configuration optimization method is provided, comprising: Given that the current target model triggers the model inference configuration optimization condition, obtain the inference configuration information of multiple candidate models generated by multiple heterogeneous proposers; Target parameter combination configuration information is filtered for each candidate model inference configuration information, and the target parameter combination configuration information is fused to obtain multiple fused candidate model inference configuration information; Target candidate model inference configuration information is filtered based on the candidate model inference configuration information and the fused candidate model inference configuration information; The model inference configuration parameters of the current target model are optimized and updated based on the target candidate model inference configuration information; wherein, the model inference configuration parameters include hardware configuration parameters and software configuration parameters.

[0006] According to another aspect of the present invention, a model inference configuration optimization apparatus is provided, comprising: The candidate model inference configuration information acquisition module is used to acquire multiple candidate model inference configuration information generated by multiple heterogeneous proposers when the current target model triggers the model inference configuration optimization condition. The candidate model inference configuration information processing module is used to filter target parameter combination configuration information for each candidate model inference configuration information, and to fuse the target parameter combination configuration information to obtain multiple fused candidate model inference configuration information. The target candidate model inference configuration information filtering module is used to filter the target candidate model inference configuration information based on the candidate model inference configuration information and the fused candidate model inference configuration information. The model inference configuration parameter update module is used to optimize and update the model inference configuration parameters of the current target model based on the target candidate model inference configuration information; wherein, the model inference configuration parameters include hardware configuration parameters and software configuration parameters.

[0007] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising: At least one processor; and a memory communicatively connected to said at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the model inference configuration optimization method according to any embodiment of the present invention.

[0008] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the model inference configuration optimization method according to any embodiment of the present invention.

[0009] According to another aspect of the present invention, a computer program product is also provided, comprising a computer program that, when executed by a processor, implements the model inference configuration optimization method described in any embodiment of the present invention.

[0010] This invention addresses the issues of high manual costs and poor tuning results in existing Harness performance tuning processes. It automatically finds the optimal trade-off between multiple objectives such as latency, throughput, resource consumption, and quality during model inference, reducing manual tuning costs and improving model inference performance.

[0011] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0012] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0013] Figure 1 This is a flowchart of a model inference configuration optimization method provided in Embodiment 1 of the present invention; Figure 2 This is a flowchart of a model inference configuration optimization method provided in Embodiment 2 of the present invention; Figure 3 This is a flowchart illustrating a model inference configuration optimization method provided in Embodiment 2 of the present invention; Figure 4 This is a schematic diagram of a model inference configuration optimization device provided in Embodiment 3 of the present invention; Figure 5 This is a schematic diagram of the structure of an electronic device provided in Embodiment 4 of the present invention. Detailed Implementation

[0014] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0015] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0016] Example 1 Figure 1 This is a flowchart of a model inference configuration optimization method provided in Embodiment 1 of the present invention. This embodiment is applicable to situations where model inference configuration parameters are automatically updated. This method can be executed by a model inference configuration optimization device, which can be implemented in software and / or hardware, and is generally integrated into an electronic device. This electronic device can be a terminal device or a server device, as long as it can execute the model inference configuration optimization method. The present invention does not limit the specific type of electronic device. Correspondingly, as... Figure 1 As shown, the method includes the following operations: S110. Given that the current target model triggers the model inference configuration optimization condition, obtain the inference configuration information of multiple candidate models generated by multiple heterogeneous proposers.

[0017] The current target model can be any type of model with model inference optimization requirements, such as including but not limited to large language models, large visual models, large multimodal models, and large basic scientific models. It can also be a holistic system composed of multiple types of models, such as an agent-based human-computer interaction system that integrates lightweight models and complex inference models. This embodiment of the invention does not limit the model type of the current target model. The model inference configuration optimization conditions can be trigger conditions configured for the current target model, used to automatically update the model inference configuration parameters of the current target model. The proposer can be used to generate candidate model inference configuration parameter configuration schemes for the current target model. Heterogeneous proposers can independently generate candidate model inference configuration parameter configuration schemes for the current target model from different strategy perspectives. The candidate model inference configuration information can be the configuration schemes of the model inference configuration parameters generated by each proposer for the current target model. Among them, the model inference configuration parameters are the configuration parameters related to the model inference process of the current target model. For example, they may include, but are not limited to, pre- and post-processing code, operator fusion strategy parameters, hardware device parameters involved in the model inference process, and batch processing configuration parameters, as long as they are related to the model inference process. The embodiments of the present invention do not limit the specific parameter types of the model inference configuration parameters.

[0018] The current target model primarily involves a two-layer loop structure during application: an inner loop and an outer loop. The inner loop specifically refers to the main inference process of the current target model. For example, if the current target model is an agent-based human-computer interaction system, its inner loop can perform processes such as user request preprocessing, problem difficulty classification, model scheduling, and response generation. The outer loop of the current target model can be the Harness optimization process, which can be executed periodically or triggered in the background and interacts with the inner loop through shared configuration storage. In this embodiment of the invention, an automatic Harness search optimization mechanism is proposed for the current target model. This mechanism is used to optimize the model inference configuration of the current target model and can be deeply integrated with the main inference process of the model inference to form an outer loop search architecture. It can be understood that Harness can refer to the model inference execution framework, which may include, but is not limited to, pre- and post-processing code, operator fusion strategies, batching strategies, memory management configurations, and KV-Cache (key-value cache) management strategies.

[0019] During the application of the current target model, it is possible to monitor in real time whether the current target model triggers model inference configuration optimization conditions. For example, model inference configuration optimization conditions may include, but are not limited to, time-triggered conditions, performance degradation triggered conditions, and model change triggered conditions. Time-triggered conditions can be for optimizing model inference configuration at fixed intervals, such as updating and optimizing the model inference configuration every 6 hours. Performance degradation triggered conditions can be for optimizing model inference configuration when the performance of the current target model degrades to a certain level, such as triggering immediately when the average response latency P99 value of the current target model rises above a certain threshold from the baseline or when user satisfaction continuously declines above a certain threshold. Here, the P99 value can refer to the value where 99% of the request response times are less than or equal to a certain value across all requests. Model change triggered conditions can be triggered from the perspective of changes to the current target model, such as triggering an update and optimization of the model inference configuration when a new, deleted, or updated model instance appears in the model pool of the current target model.

[0020] Accordingly, if the current target model is determined to trigger the model inference configuration optimization condition, an architecture with multiple heterogeneous proposers working in parallel can be adopted. Each proposer independently generates candidate model inference configuration information for optimizing the model inference configuration of the current target model based on a different strategy perspective. The candidate model inference configuration information generated by each proposer can be a complete set of configuration parameters that can be used to optimize the inference process of the current target model. By acquiring multiple candidate model inference configuration information generated by multiple heterogeneous proposers, the candidate model inference configuration information can be merged and integrated to generate the most ideal model inference configuration information.

[0021] S120. Filter the target parameter combination configuration information for each candidate model inference configuration information, and fuse the target parameter combination configuration information to obtain multiple fused candidate model inference configuration information.

[0022] The target parameter combination configuration information can be selected from the candidate model inference configuration information and can be fused with other candidate model inference configuration information. The fused candidate model inference configuration information can be the model inference configuration information generated by fusing the target parameter combination configuration information.

[0023] After obtaining multiple candidate model inference configuration information generated by various heterogeneous proposers, parameter filtering can be performed on these candidate model inference configuration information. This includes selecting the expected optimal parameter values ​​from the candidate model inference configuration information or calculating a compromise value based on multiple parameter values ​​of the same type from the candidate model inference configuration information. This yields various types of target parameter combination configuration information. These target parameter combination configuration information can then be fused as needed to obtain multiple fused candidate model inference configuration information. Each fused candidate model inference configuration information can be a combined optimized model inference configuration information, which can be used to optimize the model inference process of the current target model. Since the fused candidate model inference configuration information integrates the advantageous parameter combinations of multiple proposers, it has a higher probability of being located at the Pareto front.

[0024] S130. Filter the target candidate model inference configuration information based on the candidate model inference configuration information and the fused candidate model inference configuration information.

[0025] Among them, the target candidate model inference configuration information can be the optimal model inference configuration information finally selected from the candidate model inference configuration information of various types.

[0026] Correspondingly, after fusing the target parameter combination configuration information to obtain multiple fused candidate model inference configuration information, the multiple candidate model inference configuration information generated by each proposer can be merged with the fused candidate model inference configuration information generated by the organization to form the final candidate configuration set. Then, the target candidate model inference configuration information used for inference configuration optimization of the current target model can be selected from the candidate configuration set.

[0027] S140. Optimize and update the model inference configuration parameters of the current target model based on the target candidate model inference configuration information; wherein, the model inference configuration parameters include hardware configuration parameters and software configuration parameters.

[0028] The hardware configuration parameters can be the relevant parameters involved in the inference process of the current target model at the hardware level. The software configuration parameters can be the relevant parameters involved in the inference process of the current target model at the software level.

[0029] After determining the inference configuration information of the target candidate model, the hardware and software inference configuration parameters of the current target model can be optimized and updated based on this information. For example, the hardware configuration parameters in the model inference configuration parameters may include, but are not limited to, video memory and memory management parameters, parallelism and device mapping parameters, and batch processing and context length parameters. Specifically, video memory and memory management parameters may include, but are not limited to, GPU (Graphics Processing Unit) memory utilization, maximum GPU video memory usage, CPU (Central Processing Unit) memory limit, memory pool block size, and weight unloading directory; parallelism and device mapping parameters may include, but are not limited to, tensor parallelism, data parallelism, the number of GPUs used, and weight distribution strategies; batch processing and context length parameters may include, but are not limited to, block size, maximum number of requests per batch, and context window length, which directly affect video memory usage and throughput. The software configuration parameters in the model inference configuration parameters may include, but are not limited to, operator fusion strategy, operator fusion strength, and the number of concurrent threads.

[0030] Therefore, the above technical solution takes into account that a single proposer is limited by the scope of its strategy and is prone to getting trapped in local optima. By using multiple proposers to explore the model inference configuration space from different angles and integrating the complementary advantages of the inference configuration information of each candidate model, higher quality and broader coverage of candidate model inference configuration information can be generated, thereby improving the effect of optimizing the model inference configuration and thus improving the overall inference performance of the current target model.

[0031] This invention addresses the issues of high manual costs and poor tuning results in existing Harness performance tuning processes. It automatically finds the optimal trade-off between multiple objectives such as latency, throughput, resource consumption, and quality during model inference, reducing manual tuning costs and improving model inference performance.

[0032] Example 2 Figure 2 This is a flowchart of a model inference configuration optimization method provided in Embodiment 2 of the present invention. Figure 3 This is a flowchart illustrating a model inference configuration optimization method according to Embodiment 2 of the present invention. This embodiment is a specific implementation based on the above embodiment. In this embodiment, various specific optional implementation methods are provided for obtaining multiple candidate optimization model configuration information generated by multiple heterogeneous proposers, filtering target parameter combination configuration information from each candidate model inference configuration information, and filtering target candidate model inference configuration information. Correspondingly, as... Figure 2 and Figure 3 As shown, the method in this embodiment may include: S210. Given that the current target model triggers the model inference configuration optimization condition, obtain the inference configuration information of multiple candidate models generated by multiple heterogeneous proposers.

[0033] In an optional embodiment of the present invention, obtaining multiple candidate model inference configuration information generated by multiple heterogeneous proposers may include: obtaining original candidate model inference configuration information generated by a rule proposer according to predefined heuristic rules; obtaining original candidate model inference configuration information generated by a mutation proposer through random perturbation of the target stored candidate model inference configuration information; obtaining historical candidate model inference configuration information from an experience proposer that is similar to the current load mode, hardware configuration, and model combination of the current target model, as original candidate model inference configuration information; performing deduplication and conflict detection processing on each of the original candidate model inference configuration information, deleting redundant information in the original candidate model inference configuration information, and marking conflict parameters in the original candidate model inference configuration information to obtain the candidate model inference configuration information.

[0034] The original candidate model inference configuration information can be the unprocessed candidate model inference configuration information originally generated by the proposer. The rule proposer can generate original candidate model inference configuration information based on predefined rules. The mutation proposer can generate corresponding original candidate model inference configuration information by perturbation and mutation processing based on the model configuration information. The target stored candidate model inference configuration information can be historically stored model inference configuration information of a certain type. The experience proposer can generate corresponding original candidate model inference configuration information based on historical experience data. The historical candidate model inference configuration information can be the candidate model inference configuration information generated in the past.

[0035] Optionally, the heterogeneous proposer can include a rule proposer, a mutation proposer, and an experience proposer. The rule proposer can generate original candidate model inference configuration information based on predefined heuristic rules. For example, when the sequence length distribution of the current target model changes, the rule proposer can automatically adjust the KV-Cache pre-allocation strategy of the current target model; when the number of concurrent requests for the current target model exceeds a threshold, the rule proposer can increase the batch processing window; when the GPU memory utilization is below a certain threshold, the rule proposer can enable a more aggressive operator fusion strategy. The mutation proposer can select the Pareto optimal historical candidate model inference configuration information from the elite archive as the target storage candidate model inference configuration information, and perform random perturbation processing based on the target storage candidate model inference configuration information to generate the corresponding original candidate model inference configuration information. Optionally, the perturbation dimension of the mutation proposer can include, but is not limited to, batch size, operator fusion granularity, memory pool block size, and number of concurrent threads, and the perturbation amplitude can adopt an adaptive step size, i.e., large exploration in the early stage and fine-grained fine-tuning in the later stage. The experience proposer can obtain information such as the current load mode, hardware configuration, and model combination of the current target model. It then filters historical candidate model inference configurations that are similar to the current target model's current load mode, hardware configuration, and model combination from the candidate model inference configurations generated historically by each proposer, using these as the original candidate model inference configurations. Optionally, the similarity of historical candidate model inference configurations can be measured by the cosine distance of the load feature vector of the current target model.

[0036] Optionally, each proposer can independently generate M original candidate model inference configuration information. Each original candidate model inference configuration information can be represented as a configuration vector: C=[c1,c2,...,ck], where C represents the configuration vector, ck represents the k dimensions in the configuration vector, and each dimension corresponds to a Harness parameter. All heterogeneous proposers can generate a total of N×M original candidate model inference configuration information, where N represents the number of proposers. Deduplication and conflict detection processing can be performed on each original candidate model inference configuration information. For example, similarity clustering can be performed on all original candidate model inference configuration information based on the Euclidean distance of the configuration vectors, thereby grouping original candidate model inference configuration information with a distance less than a threshold ε into the same cluster and removing redundant original candidate model inference configuration information. Furthermore, conflict parameters between original candidate model inference configuration information generated by different proposers can be detected, and conflict dimensions can be marked. For example, if one proposes to increase the batch processing window and another proposes to decrease the batch processing window, the batch processing window can be marked as conflicting. After deduplication and conflict detection processing, the original candidate model inference configuration information can be organized to generate multiple candidate model inference configuration information.

[0037] S220. The candidate model inference configuration information is classified according to the conflict marker to obtain the first candidate model inference configuration information and the second candidate model inference configuration information.

[0038] The first candidate model inference configuration information can be candidate model inference configuration information that does not conflict with each other. The second candidate model inference configuration information can be candidate model inference configuration information that conflicts with the inference configuration information of other candidate models.

[0039] After deduplication and conflict detection of the original candidate model inference configuration information to generate multiple candidate model inference configuration information, the candidate model inference configuration information can be classified according to the conflict marking results to obtain the first candidate model inference configuration information that does not contain conflicts and the second candidate model inference configuration information that includes conflicts.

[0040] S230. Select the target expected parameter value from the first candidate model inference configuration information. Based on the voting weight of the proposer to which the second candidate model inference configuration information belongs, perform weighted processing on the conflict parameters in the second candidate model inference configuration information to obtain the conflict reconciliation parameter value.

[0041] The target expected parameter value can be the target parameter combination configuration information selected from the first candidate model inference configuration information. The conflict reconciliation parameter value can be the target parameter combination configuration information generated by comprehensively calculating the conflict parameters in the second candidate model inference configuration information.

[0042] Specifically, for the conflict-free first candidate model inference configuration information, the parameter value expected to be optimal can be directly selected as the target expected parameter value. For the conflicting second candidate model inference configuration information, a voting mechanism can be used. Based on the voting weights configured for the proposers corresponding to the second candidate model inference configuration information, the conflicting parameters in the second candidate model inference configuration information are weighted and calculated to obtain the conflict reconciliation parameter value corresponding to the conflicting parameters. Optionally, the voting weights corresponding to each proposer can be configured based on the historical hit rate of each proposer, i.e., the proportion of historical proposals that were ultimately adopted and entered the Pareto front. Accordingly, both the target expected parameter value and the conflict reconciliation parameter value can constitute the target parameter combination configuration information.

[0043] In an optional embodiment of the present invention, before weighting the conflict parameters in the second candidate model inference configuration information according to the voting weight of the proposer to which the second candidate model inference configuration information belongs, the method may further include: calculating the current round hit rate of each proposer; calculating the reputation evaluation value of each proposer based on the current round hit rate of each proposer; and normalizing the reputation evaluation value of each proposer to obtain the voting weight of each proposer.

[0044] The hit rate in this round can be the proportion of candidate model inference configuration information or selected target parameter combination configuration information generated by the proposer that enter the Pareto front. The reputation evaluation value can characterize the proposer's contribution in historical searches and can be used to dynamically adjust voting weights.

[0045] Specifically, a reputation score table for proposers can be maintained. This table records the reputation evaluation value of each proposer, which in turn records the contribution of each proposer in the historical search—that is, the frequency with which its generated candidate model inference configuration information or the selected target parameter combination configuration information enters the Pareto front. This is used to dynamically adjust the voting weights in cross-scheme fusion, so that the system automatically favors the better-performing proposers over time. After the t-th round of Harness outer loop search, the hit rate of each proposer P_i in this round can be calculated, and the reputation evaluation value of each proposer can be calculated based on the hit rate. Finally, the reputation evaluation value of each proposer is normalized to obtain the voting weight of each proposer.

[0046] In an optional embodiment of the present invention, calculating the current-round hit rate of each of the proposers may include: calculating the current-round hit rate of each of the proposers based on the following formula: ; Where h_i(t) represents the hit rate of the i-th proposer in round t, n_pareto_i(t) represents the number of candidate model inference configurations generated by the i-th proposer in round t that are selected and stored in the elite archive, and n_total_i(t) represents the total number of candidate model inference configurations output by the i-th proposer in round t. The elite archive can be used to store model inference configurations for Pareto fronts.

[0047] In an optional embodiment of the present invention, the method may further include: determining the number of target parameters to be added to the fused candidate model inference configuration information in the candidate model inference configuration information of the proposer in the current round; calculating the ratio of the number of target parameters to the total number of parameters in the fused candidate model inference configuration information to obtain the number of candidate model inference configuration information generated by the proposer in the current round that are selected and stored in the elite archive.

[0048] The target parameter can be a parameter that incorporates the candidate model inference configuration information into the candidate model inference configuration information.

[0049] Optionally, when calculating the hit rate of the proposer in this round, the parameter n_pareto_i(t) can be obtained based on the proportion of each proposer's parameter dimensions that are adopted. Specifically, when the fused candidate model inference configuration information enters the Pareto front, the source proposer can be traced for each parameter dimension c_j, and the contribution count of each proposer is obtained according to the proportion of its parameter dimensions that are adopted, thus obtaining the value of n_pareto_i(t). For example, assuming that the fused candidate model inference configuration information has k parameter dimensions, of which ki dimensions come from proposer Pi, then the value of n_pareto_i(t) corresponding to proposer Pi can be ki / k.

[0050] In an optional embodiment of the present invention, calculating the reputation evaluation value of each proposer based on the current round hit rate of each proposer may include: calculating the reputation evaluation value of each proposer based on the following formula: Where R_i(t) represents the reputation evaluation value of the i-th proposer in round t. α represents the smoothing decay factor, with a default value of 0.85 and a range of [0.7, 0.95]. R_i(t-1) represents the reputation evaluation value of the i-th proposer in round t-1. R_i(0) can be the initial reputation score, which can be determined using a uniform initialization method, i.e., R_i(0) = 1 / N, where N is the number of proposers, with a default value of R_i(0) = 1 / 3. When a significant change in the system load pattern is detected, such as QPS (Queries Per Second) fluctuations exceeding a certain threshold or a model combination switch, the value of α can be temporarily reduced to 0.5 to accelerate the score's adaptation to the new environment, and the default value can be restored after the change stabilizes. The above method for calculating the reputation evaluation value of proposers uses an exponentially weighted moving average smoothing update method, which can effectively avoid drastic changes in the score caused by random fluctuations in single-round search results.

[0051] Optionally, normalizing the reputation evaluation value of each proposer to obtain the voting weight of each proposer may include: normalizing the reputation evaluation value of each proposer based on the following formula to obtain the voting weight of each proposer: Where W_i(t) represents the voting weight of the i-th proposer in round t, j represents the number of proposers, and satisfies To prevent a proposer from being completely marginalized and losing its exploration ability due to poor short-term performance, a lower bound W_min = 0.05 can be set for the voting weight, meaning each proposer retains at least 5% voting influence: W_i(t) = max(W_i(t), W_min). Then, renormalization is performed to make Σ... i W_i(t)=1.

[0052] In an optional embodiment of the present invention, the above method may further include: when it is determined that the candidate model inference configuration information generated by the proposer in multiple consecutive rounds has not participated in the screening of the target parameter combination configuration information, the reputation evaluation value of the proposer is attenuated according to the time decay factor; when it is determined that the proposer is a newly added proposer, the initial reputation evaluation value of the newly added proposer is calculated based on the reputation evaluation values ​​of all current non-new proposers, and the reputation evaluation value of the non-new proposers is scaled proportionally.

[0053] If a proposer is not triggered to participate in the search for T consecutive rounds (default T=10), that is, if the candidate model inference configuration information generated by a proposer for T consecutive rounds is not selected as the target parameter combination configuration information, the reputation score of the proposer can be decreased round by round by the time decay factor β: The decay stops when it reaches the lower bound R_min = W_min. Optionally, β can be initialized to 0.95. When a new proposer P_new is dynamically added to the system, the initial reputation score of the new proposer can be set to the average score of all current proposers, i.e. Simultaneously, the reputation scores of all existing proposers are scaled proportionally to ensure that new proposers receive a fair initial voting weight after normalization. Optionally, the updated reputation score table for each proposer can be written to a shared configuration store for use in the cross-scheme fusion processing flow of the next round of search.

[0054] S240. The target parameter combination configuration information is constructed based on the target expected parameter value and the conflict reconciliation parameter value, and the target parameter combination configuration information is fused to obtain multiple fused candidate model inference configuration information.

[0055] S250. Filter the target candidate model inference configuration information based on the candidate model inference configuration information and the fused candidate model inference configuration information.

[0056] In an optional embodiment of the present invention, the step of filtering target candidate model inference configuration information based on the candidate model inference configuration information and the fused candidate model inference configuration information may include: using the candidate model inference configuration information and the fused candidate model inference configuration information as test candidate model inference configuration information, performing offline stress testing on the test candidate model inference configuration information, and collecting multi-objective performance indicators for each of the test candidate model inference configuration information; selecting target model inference configuration information from each of the test candidate model inference configuration information based on the multi-objective performance indicators, and adding the target model inference configuration information to the elite archive library; filtering recommended model inference configuration information that matches the current load characteristics of the current target model from the model inference configuration information stored in the elite archive library; and, if it is determined that the recommended model inference configuration information passes the gray-scale test, using the recommended model inference configuration information as the target candidate model inference configuration information.

[0057] The test candidate model inference configuration information can be the inference configuration information of the candidate models that need to be tested. The target model inference configuration information can be the Pareto optimal model inference configuration information selected based on the stress test results. The recommended model inference configuration information can be the model inference configuration information recommended by the system.

[0058] Specifically, the inference configuration information of each candidate model and each fusion candidate model can be used as the inference configuration information of the test candidate model. Offline stress tests are performed on the test candidate model inference configuration information using recently collected real data samples (such as query samples or image samples), and multi-objective performance metrics are collected for each test candidate model inference configuration information. For example, multi-objective performance metrics may include, but are not limited to, latency metrics, throughput metrics, resource utilization metrics, and quality metrics. Among these, latency metrics may include, but are not limited to, average latency and P99 latency; throughput metrics may include, but are not limited to, requests per second; resource utilization metrics may include, but are not limited to, GPU memory utilization and GPU compute utilization; and quality metrics may include, but are not limited to, response satisfaction prediction scores.

[0059] For the multi-objective performance metrics of the inference configuration information of each test candidate model, a non-dominated ranking algorithm can be used for Pareto front analysis, with the objectives being to minimize latency and resource consumption, and maximize throughput and quality score. The inference configuration information of the target models located on the Pareto front can be stored in an elite archive.

[0060] When selecting target candidate model inference configuration information, the optimal model inference configuration information that matches the current load characteristics of the current target model can be selected from the model inference configuration information stored in the elite archive. This optimal configuration information is then used as the recommended model inference configuration information, and deployed to a subset of inference nodes for A / B testing via a canary release mechanism. If the performance metrics of the test inference nodes are better than the current production configuration within a set time range (e.g., 10 minutes), the recommended model inference configuration information can be selected as the target candidate model inference configuration information, and then promoted to all inference nodes. If the test inference nodes experience performance degradation or anomalies, the configuration is automatically rolled back to the previous version.

[0061] S260. Optimize and update the model inference configuration parameters of the current target model based on the target candidate model inference configuration information; wherein, the model inference configuration parameters include hardware configuration parameters and software configuration parameters.

[0062] Before each invocation of the current target model, the model scheduling module in the main inference flow can first read the current Harness configuration (i.e., the current model inference configuration parameters) from the shared configuration storage, thereby selecting the inference backend, such as whether to enable operator fusion and batch window size. After the Harness optimization process updates the configuration, it can notify the main flow to load the new model inference parameter configuration through a version number mechanism. The configuration switching process adopts a read-time real-time copy strategy to ensure that currently executing requests are not affected. At the same time, it can also record the performance index comparison before and after each change in model inference configuration parameters, providing empirical data for the subsequent fusion processing of inference configuration information of each proposer and candidate model. During the application of the current target model, the reputation evaluation value of the proposer can be continuously updated based on the historical fusion effect of the candidate model inference configuration information, optimizing the voting weight allocation for cross-scheme fusion.

[0063] In a specific example, using intelligent customer service in the e-commerce field as an application scenario, this paper fully demonstrates the model inference configuration optimization process of a human-computer interaction system based on multi-model collaborative scheduling. This system can invoke different types of models to process user queries based on their complexity, thereby generating corresponding interactive response information.

[0064] Suppose that during an e-commerce promotional event, the number of concurrent requests per second (QPS) in a human-computer interaction system based on multi-model collaborative scheduling surges from 120 to 480. The average response latency of model A in the system spikes from 1.2s to 4.5s, and the P99 latency reaches 8.0s, a 167% increase from the baseline of 3.0s. At this point, the Harness outer loop search can be triggered. Specifically, the system can collect 5000 real queries from the past hour as a stress test set, and three proposers generate candidate configurations in parallel. The rule proposer detects that the GPU memory utilization is saturated (e.g., reaching 92%) and the request queuing depth exceeds 50. The generated candidate model inference configuration information is as follows: increase the batch window from 4 to 16 and enable dynamic batching to merge fragmented requests, and expand the KV-Cache memory pool from 8GB to 16GB to reduce runtime memory reallocation overhead.

[0065] The mutation proposer uses the current Pareto optimal configuration in the elite archive as a base and performs adaptive step-size perturbation on three dimensions: batch size (changed from 4 to 12), operator fusion granularity (changed from v1 to v3), and number of concurrent threads (changed from 8 to 16) to generate three candidate model inference configuration information.

[0066] The experience proposer retrieves historical candidate model inference configuration information (cosine distance < 0.15) from the historically stored candidate model inference configuration information, which is similar to the current load characteristics (QPS > 400, high concurrency scenario). It matches a configuration scheme that "switches model A from single-card inference to 2-card tensor parallelism during the Double Eleven peak period", which reduced latency by 42%. Based on this, the candidate model inference configuration information is generated: switch model A from single-card inference to 2-card tensor parallelism.

[0067] After performing deduplication and clustering on the five candidate configurations generated by each proposer, a conflict was found in the parameter dimensions of the "batch processing window": the rule proposer suggested 16, while the mutation proposer suggested 12. In this case, a weighted voting system based on the historical hit rate of each proposer was used. If the voting weight of the rule proposer was 0.45, the voting weight of the mutation proposer was 0.32, and the voting weight of the experience proposer was 0.23, then the final compromise value calculated for the "batch processing window" was 14. Simultaneously, two fused candidate model inference configuration information were generated through cross-scheme fusion. Finally, the scheme with seven model inference configuration information entered the stress test evaluation.

[0068] After Pareto non-dominated sorting, the fusion candidate model inference configuration information C_fusion_1, with "14 batch processing windows + dynamic batch processing + 2-card tensor parallelism + operator fusion granularity using v3", is at the forefront in terms of latency and throughput, with a significant reduction in P99 latency and a substantial increase in QPS. Furthermore, a 10-minute A / B test was conducted by canary deployment of the fusion candidate model inference configuration information C_fusion_1 to some inference nodes. The test results showed that the P99 latency dropped to 2.1s with zero abnormal requests, so the fusion candidate model inference configuration information C_fusion_1 was then fully rolled out to all inference nodes. After updating the model inference configuration of the human-computer interaction system based on multi-model collaborative scheduling according to the fusion candidate model inference configuration information C_fusion_1, the system smoothly passed the promotion peak. After this search, the rule proposer hit rate increased from 0.45 to 0.48, and the proposer reputation score table was updated synchronously to optimize the voting weight allocation for subsequent cross-scheme fusion.

[0069] The above technical solution generates various types of candidate model inference configuration information through multiple heterogeneous proposers, and then combines the candidate model inference configuration information to generate fused candidate model inference configuration information. The conflict parameter dimensions of each model inference configuration information are reasonably calculated using a voting mechanism. At the same time, the non-dominated sorting method is used to filter the final model inference configuration information of various test models. This can achieve multi-objective Pareto optimality of model inference configuration in terms of latency, throughput, resource consumption and quality.

[0070] It should be noted that the relevant information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for display, data used for analysis, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data comply with the relevant laws, regulations and standards of the relevant regions, and do not violate public order and good morals.

[0071] It should be noted that any arrangement or combination of the technical features in the above embodiments also falls within the protection scope of this invention.

[0072] Example 3 Figure 4 This is a schematic diagram of a model inference configuration optimization device provided in Embodiment 3 of the present invention, as shown below. Figure 4 As shown, the device includes: a candidate model inference configuration information acquisition module 410, a fusion candidate model inference configuration information processing module 420, a target candidate model inference configuration information filtering module 430, and a model inference configuration parameter update module 440, wherein: The candidate model inference configuration information acquisition module 410 is used to acquire multiple candidate model inference configuration information generated by multiple heterogeneous proposers when the current target model triggers the model inference configuration optimization condition. The candidate model inference configuration information processing module 420 is used to filter target parameter combination configuration information for each candidate model inference configuration information, and fuse the target parameter combination configuration information to obtain multiple fused candidate model inference configuration information. The target candidate model inference configuration information filtering module 430 is used to filter the target candidate model inference configuration information according to the candidate model inference configuration information and the fused candidate model inference configuration information. The model inference configuration parameter update module 440 is used to optimize and update the model inference configuration parameters of the current target model based on the target candidate model inference configuration information; wherein, the model inference configuration parameters include hardware configuration parameters and software configuration parameters.

[0073] This invention addresses the issues of high manual costs and poor tuning results in existing Harness performance tuning processes. It automatically finds the optimal trade-off between multiple objectives such as latency, throughput, resource consumption, and quality during model inference, reducing manual tuning costs and improving model inference performance.

[0074] Optionally, the candidate model inference configuration information acquisition module 410 is further configured to: acquire the original candidate model inference configuration information generated by the rule proposer according to predefined heuristic rules; acquire the original candidate model inference configuration information generated by the mutation proposer through random perturbation of the target stored candidate model inference configuration information; acquire the historical candidate model inference configuration information of the experience proposer that is similar to the current load mode, hardware configuration and model combination of the current target model, as the original candidate model inference configuration information; perform deduplication and conflict detection processing on each of the original candidate model inference configuration information, delete redundant information in the original candidate model inference configuration information, and mark the conflict parameters in the original candidate model inference configuration information to obtain the candidate model inference configuration information.

[0075] Optionally, the candidate model inference configuration information processing module 420 is further configured to: classify the candidate model inference configuration information according to conflict markers to obtain first candidate model inference configuration information and second candidate model inference configuration information; select target expected parameter values ​​from the first candidate model inference configuration information; perform weighted processing on the conflict parameters in the second candidate model inference configuration information according to the voting weight of the proposer to which the second candidate model inference configuration information belongs to obtain conflict reconciliation parameter values; and construct the target parameter combination configuration information according to the target expected parameter values ​​and the conflict reconciliation parameter values.

[0076] Optionally, the fusion candidate model inference configuration information processing module 420 is further configured to: calculate the current round hit rate of each of the proposers; calculate the reputation evaluation value of each proposer based on the current round hit rate of each proposer; and normalize the reputation evaluation value of each proposer to obtain the voting weight of each proposer.

[0077] Optionally, the fusion candidate model inference configuration information processing module 420 is further configured to: calculate the current round hit rate of each of the proposers based on the following formula: ; Where h_i(t) represents the hit rate of the i-th proposer in round t, n_pareto_i(t) represents the number of candidate model inference configuration information generated by the i-th proposer in round t that is selected and stored in the elite archive, and n_total_i(t) represents the total number of candidate model inference configuration information output by the i-th proposer in round t.

[0078] Optionally, the fusion candidate model inference configuration information processing module 420 is further configured to: determine the number of target parameters to be added to the fusion candidate model inference configuration information in the candidate model inference configuration information of the proposer in the current round; calculate the ratio of the number of target parameters to the total number of parameters in the fusion candidate model inference configuration information, and obtain the number of candidate model inference configuration information generated by the proposer in the current round that are selected and stored in the elite archive.

[0079] Optionally, the fusion candidate model inference configuration information processing module 420 is further configured to: calculate the reputation evaluation value of each proposer based on the following formula: ; Where R_i(t) represents the reputation evaluation value of the i-th proposer in round t, α represents the smoothing decay factor, and R_i(t-1) represents the reputation evaluation value of the i-th proposer in round t-1. The voting weight of each proposer is obtained by normalizing its reputation evaluation value using the following formula: ; Where W_i(t) represents the voting weight of the i-th proposer in round t, and j represents the number of proposers.

[0080] Optionally, the candidate model inference configuration information processing module 420 is further configured to: when it is determined that the candidate model inference configuration information generated by the proposer in multiple consecutive rounds has not participated in the screening of the target parameter combination configuration information, perform attenuation processing on the reputation evaluation value of the proposer according to the time attenuation factor; when it is determined that the proposer is a newly added proposer, calculate the initial reputation evaluation value of the newly added proposer based on the reputation evaluation values ​​of all current non-new proposers, and perform proportional scaling processing on the reputation evaluation values ​​of the non-new proposers.

[0081] Optionally, the target candidate model inference configuration information filtering module 430 is further configured to: use the candidate model inference configuration information and the fused candidate model inference configuration information as test candidate model inference configuration information, and perform offline stress testing on the test candidate model inference configuration information, and collect multi-objective performance indicators of each test candidate model inference configuration information; select target model inference configuration information from each test candidate model inference configuration information according to the multi-objective performance indicators of each test candidate model inference configuration information, and add the target model inference configuration information to the elite archive library; filter recommended model inference configuration information that matches the current load characteristics of the current target model from the model inference configuration information stored in the elite archive library; and, if it is determined that the recommended model inference configuration information has passed the gray-scale test, use the recommended model inference configuration information as the target candidate model inference configuration information.

[0082] The above-described model inference configuration optimization apparatus can execute the model inference configuration optimization method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the method. Technical details not described in detail in this embodiment can be found in the model inference configuration optimization method provided in any embodiment of the present invention.

[0083] Since the model inference configuration optimization apparatus described above is an apparatus capable of executing the model inference configuration optimization method in the embodiments of the present invention, those skilled in the art can understand the specific implementation methods and various variations of the model inference configuration optimization apparatus of this embodiment based on the model inference configuration optimization method described in the embodiments of the present invention. Therefore, how the model inference configuration optimization apparatus implements the model inference configuration optimization method in the embodiments of the present invention will not be described in detail here. Any apparatus used by those skilled in the art to implement the model inference configuration optimization method in the embodiments of the present invention falls within the scope of protection of this application.

[0084] Example 4 Figure 5 A schematic diagram of an electronic device 10, which can be used to implement embodiments of the present invention, is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0085] like Figure 5 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded into the RAM 13 from storage unit 18. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0086] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0087] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as model inference configuration optimization methods.

[0088] Optionally, the model inference configuration optimization method may include: when determining that the current target model triggers the model inference configuration optimization condition, obtaining multiple candidate model inference configuration information generated by multiple heterogeneous proposers; filtering target parameter combination configuration information for each candidate model inference configuration information, and fusing the target parameter combination configuration information to obtain multiple fused candidate model inference configuration information; filtering target candidate model inference configuration information based on the candidate model inference configuration information and the fused candidate model inference configuration information; optimizing and updating the model inference configuration parameters of the current target model based on the target candidate model inference configuration information; wherein, the model inference configuration parameters include hardware configuration parameters and software configuration parameters.

[0089] In some embodiments, the model inference configuration optimization method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or mounted on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the model inference configuration optimization method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the model inference configuration optimization method by any other suitable means (e.g., by means of firmware).

[0090] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0091] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0092] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0093] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device for displaying information to the user (e.g., a CRT (Cathode Ray Tube) or LCD (Liquid Crystal Display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0094] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0095] A computing system can include clients and servers. Clients and servers are generally geographically separated and typically interact via communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system. It addresses the shortcomings of traditional physical hosts and VPS (Virtual Private Server) services, such as high management difficulty and weak business scalability.

[0096] This invention also discloses a computer program product, which includes a computer program that, when executed by a processor, implements the model inference configuration optimization method provided in any embodiment of this invention. This program product shares the same inventive concept as the model inference configuration optimization methods disclosed in the embodiments of this invention, and therefore will not be described in detail here.

[0097] It should be understood that the various forms of processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the embodiments of the present invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in the embodiments of the present invention can be achieved, and this is not limited herein.

[0098] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. A model inference configuration optimization method, characterized in that, include: Given that the current target model triggers the model inference configuration optimization condition, obtain the inference configuration information of multiple candidate models generated by multiple heterogeneous proposers; Target parameter combination configuration information is filtered for each candidate model inference configuration information, and the target parameter combination configuration information is fused to obtain multiple fused candidate model inference configuration information; Target candidate model inference configuration information is filtered based on the candidate model inference configuration information and the fused candidate model inference configuration information. The model inference configuration parameters of the current target model are optimized and updated based on the target candidate model inference configuration information; wherein, the model inference configuration parameters include hardware configuration parameters and software configuration parameters.

2. The method of claim 1, wherein, The step of obtaining inference configuration information for multiple candidate models generated by multiple heterogeneous proposers includes: Obtain the original candidate model inference configuration information generated by the rule proposer based on predefined heuristic rules; Obtain the original candidate model inference configuration information generated by the mutation proposer through random perturbation of the target stored candidate model inference configuration information; Obtain historical candidate model inference configuration information that is similar to the current load mode, hardware configuration and model combination of the current target model from the experience proposer, and use it as the original candidate model inference configuration information; The original candidate model inference configuration information is deduplicated and conflict detected. Redundant information in the original candidate model inference configuration information is deleted, and conflict parameters in the original candidate model inference configuration information are marked to obtain the candidate model inference configuration information.

3. The method of claim 2, wherein, The selection of target parameter combination configuration information for each candidate model inference configuration information includes: The candidate model inference configuration information is classified according to the conflict marker to obtain the first candidate model inference configuration information and the second candidate model inference configuration information; Select the target expected parameter value from the inference configuration information of the first candidate model; Based on the voting weight of the proposer to which the second candidate model inference configuration information belongs, the conflict parameters in the second candidate model inference configuration information are weighted to obtain the conflict reconciliation parameter value. The target parameter combination configuration information is constructed based on the target expected parameter value and the conflict reconciliation parameter value.

4. The method of claim 3, wherein, Before weighting the conflict parameters in the second candidate model inference configuration information according to the voting weight of the proposer to which the second candidate model inference configuration information belongs, the process also includes: Calculate the hit rate for each of the proposers in this round; Calculate the reputation assessment value of each proposer based on the hit rate of each proposer in this round; The reputation evaluation value of each proposer is normalized to obtain the voting weight of each proposer.

5. The method of claim 4, wherein, The calculation of the current round hit rate for each of the proposers includes: The hit rate of each proposer in this round is calculated based on the following formula: ; Where h_i(t) represents the hit rate of the i-th proposer in round t, n_pareto_i(t) represents the number of candidate model inference configuration information generated by the i-th proposer in round t that is selected and stored in the elite archive, and n_total_i(t) represents the total number of candidate model inference configuration information output by the i-th proposer in round t.

6. The method of claim 5, wherein, Also includes: Determine the number of target parameters to be added to the fused candidate model inference configuration information in the candidate model inference configuration information of the proposer in the current round; Calculate the ratio of the number of target parameters to the total number of parameters in the fusion candidate model inference configuration information to obtain the number of candidate model inference configuration information generated by the proposer in the current round that are selected and stored in the elite archive.

7. The method of claim 5, wherein, The calculation of the reputation evaluation value of each proposer based on the hit rate of each proposer in this round includes: The reputation assessment value of each proposer is calculated based on the following formula: ; Where R_i(t) represents the reputation evaluation value of the i-th proposer in round t, α represents the smoothing decay factor, and R_i(t-1) represents the reputation evaluation value of the i-th proposer in round t-1. The normalization process for the reputation evaluation value of each proposer to obtain the voting weight of each proposer includes: The voting weight of each proposer is obtained by normalizing its reputation evaluation value using the following formula: ; Where W_i(t) represents the voting weight of the i-th proposer in round t, and j represents the number of proposers.

8. The method according to any of claims 4-7, characterized by, Also includes: If it is determined that the candidate model inference configuration information generated by the proposer in multiple consecutive rounds has not been used to filter the target parameter combination configuration information, the reputation evaluation value of the proposer is attenuated according to the time decay factor. If the proposer is determined to be a newly added proposer, the initial reputation assessment value of the newly added proposer is calculated based on the reputation assessment values ​​of all non-new proposers, and the reputation assessment values ​​of the non-new proposers are scaled proportionally.

9. The method of claim 1, wherein, The step of filtering the target candidate model inference configuration information based on the candidate model inference configuration information and the fused candidate model inference configuration information includes: The candidate model inference configuration information and the fused candidate model inference configuration information are used as test candidate model inference configuration information, and offline stress testing is performed on the test candidate model inference configuration information to collect multi-objective performance indicators of each test candidate model inference configuration information. Based on the multi-objective performance indicators of the test candidate model inference configuration information, target model inference configuration information is selected from the test candidate model inference configuration information, and the target model inference configuration information is added to the elite archive library; Select recommended model inference configuration information that matches the current load characteristics of the current target model from the model inference configuration information stored in the elite archive; If the recommendation model inference configuration information is determined to pass the gray-scale test, the recommendation model inference configuration information is used as the target candidate model inference configuration information.

10. A model inference configuration optimization apparatus, comprising: include: The candidate model inference configuration information acquisition module is used to acquire multiple candidate model inference configuration information generated by multiple heterogeneous proposers when the current target model triggers the model inference configuration optimization condition. The candidate model inference configuration information processing module is used to filter target parameter combination configuration information for each candidate model inference configuration information, and to fuse the target parameter combination configuration information to obtain multiple fused candidate model inference configuration information. The target candidate model inference configuration information filtering module is used to filter the target candidate model inference configuration information based on the candidate model inference configuration information and the fused candidate model inference configuration information. The model inference configuration parameter update module is used to optimize and update the model inference configuration parameters of the current target model based on the target candidate model inference configuration information; wherein, the model inference configuration parameters include hardware configuration parameters and software configuration parameters.

11. An electronic device, comprising: The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that is executed by the at least one processor to enable the at least one processor to perform the model inference configuration optimization method according to any one of claims 1-9.

12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the model inference configuration optimization method according to any one of claims 1-9.

13. A computer program product, characterised in that, Includes a computer program / instruction, wherein the computer program / instruction, when executed by a processor, implements the model inference configuration optimization method according to any one of claims 1-9.