Model inference performance simulation method and device, electronic equipment and storage medium

By decomposing the model inference process into operator intermediate representations and combining them with dynamic scheduling parameters, the high cost and low efficiency of performance evaluation in existing technologies are solved, lightweight performance simulation is achieved, and efficient hardware selection and resource planning references are provided.

CN123178229APending Publication Date: 2026-11-27INSPUR (SHANDONG) COMPUTER TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing performance evaluation methods for model inference services consume a lot of machine computing resources and human resources, making it difficult to adapt to the rapid iterative evaluation needs of multiple models, multiple hardware, and multiple scenarios. Moreover, the evaluation process is cumbersome and has a long cycle.

Method used

The model inference process is decomposed into intermediate operator representations. A list of queryable operators is generated by combining dynamic scheduling parameters. The measured runtime of each operator is queried based on the operator performance repository. The total time is accumulated round by round to output the inference performance index, thus achieving lightweight simulation.

Benefits of technology

It significantly reduces machine downtime and model deployment and debugging costs, and the simulation results closely resemble real-world deployment performance, providing efficient and accurate hardware selection and resource planning references.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123178229A_ABST
    Figure CN123178229A_ABST
Patent Text Reader

Abstract

The present disclosure provides a model inference performance simulation method and device, electronic equipment and storage medium, relating to the technical field of artificial intelligence. The method comprises: decomposing a to-be-evaluated model according to a model structure and configuration parameters of the to-be-evaluated model to obtain an operator intermediate representation; obtaining business request data, scheduling the business request data, and generating dynamic scheduling parameters corresponding to each round of inference; filling the dynamic scheduling parameters into the operator intermediate representation to obtain a queryable operator list; for each round of inference, querying an operator performance warehouse based on the queryable operator list to obtain measured running durations of each operator in the queryable operator list; determining total time consumption of each round of inference according to the measured running durations of each operator; and determining an inference performance index of the to-be-evaluated model under the business request data according to total time consumption of all rounds of inference.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of artificial intelligence technology, and in particular to a method, apparatus, electronic device, and storage medium for simulating model inference performance. Background Technology

[0002] As large language models are deployed on a large scale in various business scenarios such as human-computer dialogue, code generation, retrieval enhancement generation, and multimodal understanding, performance evaluation of model inference services is becoming increasingly critical. Before the formal engineering deployment of large language models, comprehensive performance testing needs to be conducted on target hardware devices and real business scenarios. Core evaluation indicators include key parameters such as first token generation latency (TTFT), single token generation latency (TPOT), service throughput, and concurrency capacity, to ensure the stability and response efficiency of the service after launch.

[0003] The current mainstream performance evaluation method in the industry is mainly end-to-end stress testing. This involves building a complete inference service chain separately for each type of large model and each deployment hardware environment, and collecting and evaluating performance data by initiating real business requests. This method can realistically reproduce the online service status, and the evaluation results are intuitive and accurate. However, it requires a lot of machine computing resources, model download time, and deployment and debugging manpower costs. The evaluation process is cumbersome and time-consuming, making it difficult to adapt to the rapid iterative evaluation needs of multiple models, multiple hardware, and multiple scenarios. Summary of the Invention

[0004] This disclosure provides a method, apparatus, electronic device, and storage medium for simulating model inference performance, in order to at least solve the above-mentioned technical problems existing in the prior art.

[0005] According to a first aspect of this disclosure, a method for simulating model inference performance is provided, the method comprising: Based on the model structure and configuration parameters of the model to be evaluated, the model to be evaluated is decomposed to obtain an intermediate representation of operators. The intermediate representation of operators is used to describe the sequence of operators involved in the execution of the inference task by the model to be evaluated and the static intrinsic parameters of each operator. Obtain business request data, schedule the business request data, and generate dynamic scheduling parameters for each round of inference; The dynamic scheduling parameters are filled into the intermediate representation of the operator to obtain a list of queryable operators; For each round of inference, based on the list of queryable operators, query the operator performance repository to obtain the measured runtime corresponding to each operator in the list of queryable operators; The total time consumed for each round of inference is determined based on the measured runtime corresponding to each operator. Based on the total time spent in all rounds of inference, the inference performance metrics of the model to be evaluated under the business request data are determined.

[0006] According to a second aspect of this disclosure, a model inference performance simulation apparatus is provided, the apparatus comprising: The operator decomposition module is used to decompose the model to be evaluated according to the model structure and configuration parameters of the model to be evaluated, and obtain the intermediate operator representation. The intermediate operator representation is used to describe the operator sequence and the static intrinsic parameters of each operator involved in the execution of the inference task by the model to be evaluated. The scheduling module is used to acquire business request data, schedule the business request data, and generate dynamic scheduling parameters for each round of inference. The scheduling module is also used to fill the dynamic scheduling parameters into the intermediate representation of the operator to obtain a list of queryable operators; The query module is used to query the operator performance repository based on the list of queryable operators for each round of inference, and obtain the actual runtime corresponding to each operator in the list of queryable operators. The performance estimation module is used to determine the total time consumption of each round of inference based on the measured runtime corresponding to each operator. The performance estimation module is also used to determine the inference performance index of the model to be evaluated under the business request data based on the total time spent in all rounds of inference.

[0007] According to a third aspect of this disclosure, an electronic device is provided, comprising: At least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the methods described in this disclosure.

[0008] According to a fourth aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions for causing the computer to perform the methods described in this disclosure.

[0009] This disclosure discloses a model inference performance simulation method, apparatus, electronic device, and storage medium. It decomposes the model inference process into intermediate operator representations and, after combining scheduling simulation to generate dynamic scheduling parameters, populates a queryable operator list. Then, based on a pre-built operator performance repository, it queries the runtime of each operator and accumulates it round by round to obtain the total time, finally outputting the inference performance metrics. This achieves lightweight simulation that can complete performance evaluation without starting a full inference service. Compared with existing technologies that repeatedly perform end-to-end real-world deployment stress tests for each model, hardware, and load combination, it significantly reduces machine downtime, model deployment, and debugging costs. Furthermore, because it is based on operator-level latency data actually collected from the target hardware platform and combined with actual runtime parameters such as tensor parallel partitioning and dynamic batch processing for round-by-round simulation, the simulation results closely resemble real-world deployment performance. Moreover, within the same framework, performance metrics under different hardware, parallel strategies, and load conditions can be quickly compared by modifying the input configuration, providing an efficient and accurate reference for hardware selection, resource planning, and service parameter optimization before deployment.

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

[0011] The above and other objects, features, and advantages of this disclosure will become readily apparent from the following detailed description of exemplary embodiments, taken in conjunction with the accompanying drawings. Several embodiments of this disclosure are illustrated in the drawings by way of example and not limitation, in which: In the accompanying drawings, the same or corresponding reference numerals indicate the same or corresponding parts.

[0012] Figure 1 A schematic diagram of the composition structure of a model inference performance simulation system according to an embodiment of the present disclosure is shown; Figure 2 A schematic diagram illustrating the implementation flow of a model inference performance simulation method according to an embodiment of this disclosure is shown; Figure 3 A schematic diagram illustrating the workflow of a model inference performance simulation system according to an embodiment of this disclosure is shown. Figure 4 A schematic diagram of the composition structure of an electronic device according to an embodiment of the present disclosure is shown. Detailed Implementation

[0013] To make the objectives, features, and advantages of this disclosure more apparent and understandable, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without creative effort are within the scope of protection of this disclosure.

[0014] A first aspect of this disclosure provides a model inference performance simulation method, which is applied to a performance simulation system, such as... Figure 1 As shown, this performance simulation system includes an operator decomposer, a scheduling simulator, an operator performance repository, and a performance calculator. Figure 2 As shown, the method includes the following steps: Step 101: Based on the model structure and configuration parameters of the model to be evaluated, the model to be evaluated is decomposed to obtain an intermediate representation of operators. The intermediate representation of operators is used to describe the sequence of operators involved in the inference task performed by the model to be evaluated and the static intrinsic parameters of each operator.

[0015] The model to be evaluated is a large language model whose inference performance needs to be simulated. Its model structure may include multi-head attention mechanisms, feedforward neural networks, layer normalization, and residual connection structures in a Transformer decoder architecture. Configuration parameters must include at least the model specifications and tensor parallelism parameters. Model specifications must include at least the model name, number of layers, number of attention heads, hidden layer dimension, intermediate layer dimension, and vocabulary size. Tensor parallelism parameters specify the number of parallel computing devices used during model inference and the weight splitting strategy.

[0016] The operator decomposer decomposes the model to be evaluated layer by layer and operator by operator, based on the model structure and configuration parameters. Specifically, the operator decomposer takes the model specifications and tensor parallel parameters from the model structure and configuration parameters as input, and traverses each computational unit in the model layer by layer according to the actual execution order during model inference, decomposing the complete inference process into a sequence of operators arranged in execution order. Simultaneously, for each operator in the sequence, its name, type, stage, input / output shape, and operator attributes are determined according to the model specifications. Furthermore, the local dimension of the operator on a single computational device after tensor parallel partitioning is calculated based on the tensor parallel parameters, thereby extracting the static intrinsic parameters of each operator. Finally, the above operator sequence and the static intrinsic parameters of each operator are summarized to construct the operator intermediate representation corresponding to the model to be evaluated.

[0017] Taking the LLaMA-2-7B model as an example, the operator decomposer obtains all the operators called during the inference process of the model, such as FlashAttention, MLP, AllReduce, and Softmax, and their corresponding static intrinsic parameters, based on the model structure and configuration parameters. This is the intermediate representation of the operators corresponding to the model.

[0018] It should be noted that the static intrinsic parameters remain fixed once the model to be evaluated is determined. In addition to the static intrinsic parameters mentioned above, the intermediate representation of the operator does not assign specific values ​​to dynamic parameters that depend on the actual scheduling rounds, such as the input sequence length, the query length (q_len) of the FlashAttention operator, the key value length (kv_len), and the variable-length batch cumulative index (cu_seqlens_q).

[0019] Step 102: Obtain business request data, schedule the business request data, and generate dynamic scheduling parameters for each round of inference.

[0020] The business request data is a set of requests constructed to simulate the actual business scenarios of the inference service, and includes at least the arrival time of each business request, the length of the input sequence, and the number of target generated tokens.

[0021] The scheduling simulator processes business request data in rounds according to a preset batch processing strategy. This scheduling process includes at least two scenarios. In the first scenario, all business request data arrives in the waiting queue at the start of the simulation. At the beginning of each round, the scheduling simulator retrieves all business requests in the current waiting queue. Based on the preset batch processing strategy and maximum concurrency constraints, it selects business requests from the current waiting queue to participate in this round of inference, forming a batch processing request combination and generating the dynamic scheduling parameters corresponding to this round of inference. After one round of scheduling, if a business request has not generated all target tokens, it remains in the waiting queue to participate in subsequent rounds of scheduling. If it has generated all target tokens, it is removed from the waiting queue, and the completion time of the request is recorded. Each round of scheduling proceeds sequentially until all business requests have been processed. In the second scenario, business request data arrives sequentially on the simulation timeline according to a preset request arrival rate, rather than all arriving simultaneously at the start of the simulation. In this scenario, the scheduling process, based on the first scenario, also includes a dynamic request generation and queue update mechanism. That is, after each round of scheduling is completed, the simulation timeline is advanced according to the total inference time of that round, and new business requests are generated on the advanced timeline according to the request arrival rate. The new business requests are added to the waiting queue to participate in the scheduling of subsequent rounds.

[0022] In both scenarios described above, the scheduling simulator generates dynamic scheduling parameters for each round of inference based on the input sequence length of each service request in the current batch request combination and the number of tokens currently generated. These dynamic scheduling parameters include at least the batch size for this round, the input sequence length of each service request in this round, the key-value cache length of each service request in this round, the FlashAttention query length of each service request in this round, and the variable-length batch cumulative index. During the scheduling process, the scheduling simulator also updates the composition of the waiting queue and the key-value cache length of each request in real time, obtaining updated waiting queue information, batch length information, FlashAttention query length information, key-value cache length information, and request number information generated in this round, which are used as the basis for decision-making in the next round of scheduling.

[0023] Step 103: Fill the dynamic scheduling parameters into the intermediate representation of the operator to obtain a list of queryable operators.

[0024] After each round of scheduling in step 102 is completed, the scheduling simulator fills the corresponding symbolic variables or fields to be filled in the intermediate representation of the operator with the dynamic scheduling parameters generated in this round, such as the batch size of this round, the length of the input sequence of each service request in this round, the key-value cache length of each service request in this round, the FlashAttention query length of each service request in this round, and the cumulative index of variable-length batch processing.

[0025] After the population is complete, all parameters in the operator intermediate representation that were originally determined only at runtime are assigned specific values. This transforms the operator intermediate representation from a static drawing that only describes the static structure and parameter information of the model and whose performance cannot be directly queried into a complete operator instance containing complete shape information that can be directly used to query the operator performance repository. Each round of scheduling corresponds to a complete operator instance, and the complete operator instances from all rounds are summarized to obtain a list of queryable operators.

[0026] Step 104: For each round of inference, based on the list of queryable operators, query the operator performance repository to obtain the actual runtime corresponding to each operator in the list of queryable operators.

[0027] The queryable operator list contains all operator instances required for this round of inference. Each operator instance carries complete runtime parameter information, including operator name, operator type, stage, input and output shape, local dimension after tensor parallelization, operator attributes, as well as the batch size obtained by filling, the length of the input sequence corresponding to each request, the length of the key-value cache, the FlashAttention query length, and the variable-length batch cumulative index.

[0028] The simulator runs, indexed by operator type and complete parameter information, and queries the operator performance repository for each operator instance within the queryable operator list. The operator performance repository pre-stores operator latency and communication latency data measured on the target hardware platform. Each record is associated with the operator type, parameter combination, and corresponding measured operator runtime and measured communication runtime. If a record in the operator performance repository matches the operator type and parameter combination of an operator instance, the measured runtime and measured communication runtime of that record are extracted and used as the measured runtime of that operator instance. The query is completed by traversing all operator instances in the queryable operator list, yielding the measured runtime for each operator.

[0029] Step 105: Determine the total time consumption for each round of inference based on the measured runtime corresponding to each operator.

[0030] Step 106: Determine the inference performance index of the model to be evaluated under the business request data based on the total inference time of all rounds.

[0031] In step 104, the measured runtime for each operator in each round of inference has been obtained. For each round of inference, the measured runtimes of all operators in that round of inference are summed to obtain the total time consumed in that round of inference.

[0032] Arrange the total inference time of all rounds in chronological order, and combine it with the arrival time of each business request, the scheduling records of each round, and the completion time of each request in step 102 to calculate the inference performance index of the model to be evaluated under the current business request data. The inference performance index includes at least one of the following: first token time, determined by the difference between the generation time of the first token in each round of inference and the arrival time of the corresponding business request; time per output token, determined by the average time interval between each business request generating an output token in the decoding phase; end-to-end inference latency, determined by the total time taken from the arrival of each business request to the completion of the full response generation; system throughput, determined by dividing the total number of tokens processed in all rounds of inference by the total simulation time.

[0033] Based on the above calculations, the inference performance index of the model to be evaluated under the business request data is obtained, and the inference performance simulation is completed.

[0034] This embodiment decomposes the model inference process into intermediate operator representations, and then fills a queryable operator list with dynamically generated scheduling parameters generated by scheduling simulation. Based on a pre-built operator-level measured latency library, the runtime of each operator is queried and accumulated round by round to obtain the total latency, ultimately outputting inference performance metrics. This achieves lightweight simulation that can complete performance evaluation without starting a full inference service. Compared with existing technologies that repeatedly perform end-to-end real-world deployment stress tests for each model, hardware, and load combination, this significantly reduces machine downtime, model deployment, and debugging costs. Furthermore, because it is based on operator-level latency data actually collected from the target hardware platform and combined with actual runtime parameters for round-by-round simulation, the simulation results closely resemble real-world deployment performance. Moreover, within the same framework, performance metrics under different hardware, parallel strategies, and load conditions can be quickly compared by modifying the input configuration, providing an efficient and accurate reference for hardware selection, resource planning, and service parameter optimization before deployment.

[0035] In another embodiment of this disclosure, the step of acquiring business request data, scheduling the business request data, and generating dynamic scheduling parameters corresponding to each round of inference includes: acquiring request configuration parameters, the request configuration parameters including request arrival rate and maximum concurrency constraint; generating a time-distributed business request sequence on a simulated time axis based on the request arrival rate to obtain business request data; and scheduling the business request data round by round based on the maximum concurrency constraint and a preset batch processing strategy to determine the batch processing request combination for each round of inference and generate dynamic scheduling parameters corresponding to each round of inference; wherein the dynamic scheduling parameters include batch size, length of input sequence corresponding to each request, and key-value cache length.

[0036] First, obtain the request configuration parameters. Request configuration parameters are configuration information describing the load characteristics of the simulated business scenario, including at least the request arrival rate and the maximum concurrency constraint. The request arrival rate controls the generation density of business requests on the simulated timeline, such as the average number of requests arriving per second; the maximum concurrency constraint limits the upper limit of the number of requests the system can process in parallel at any given time, reflecting the limitations of memory capacity and computing resources on concurrent processing capabilities in real inference services.

[0037] Then, based on the request arrival rate, a time-series distributed sequence of business requests is generated on the simulated timeline, and this sequence is used as the business request data. Specifically, starting from the simulation start time, the arrival time of each business request is generated sequentially according to the average time interval determined by the request arrival rate. Attributes such as the input sequence length and the target number of generated tokens are configured for each request, resulting in business request data with time-series distribution characteristics. This process simulates the behavior of requests arriving successively at different times in a real business scenario.

[0038] Subsequently, during the simulation's timeline progression, business request data is scheduled round by round based on maximum concurrency constraints and a preset batch processing strategy. At the start of each round, all business requests that have arrived but not yet been processed in the waiting queue at the current simulation moment are checked. Then, the maximum number of requests that can be processed in this round is determined based on the maximum concurrency constraints. Next, business requests participating in this round of inference are selected from the waiting queue according to the preset batch processing strategy, forming the batch processing request combination for this round. After a round of scheduling is completed, the business requests selected for processing in that round enter the inference execution phase, while the remaining requests continue to queue in the waiting queue, awaiting subsequent rounds of scheduling.

[0039] After the inference round is completed, dynamic scheduling parameters are generated based on the input sequence length of each service request in this batch request combination, the number of tokens currently generated, and the key-value cache length. The dynamic scheduling parameters include at least the batch size, the input sequence length of each service request in this round, and the key-value cache length of each service request in this round. These parameters are used to fill the dynamic placeholders in the intermediate representation of the operator in subsequent steps.

[0040] Through the above round-by-round scheduling process, the dynamic scheduling parameters corresponding to each round of inference are obtained.

[0041] This embodiment generates a time-distributed sequence of business requests on the simulated timeline by introducing request arrival rate, and performs round-by-round scheduling in conjunction with maximum concurrency constraints and preset batch processing strategies. This allows the performance simulation to reflect the actual behavior of requests arriving sequentially, queuing, and dynamically batching in real business scenarios. It can more realistically simulate the load fluctuation characteristics and queuing backlog of inference services in a production environment, thereby improving the reference value of performance evaluation results in actual deployment.

[0042] In another embodiment of this disclosure, the method further includes: obtaining hardware configuration information of the target hardware platform; decomposing the model to be evaluated according to the model structure of the model to be evaluated, and determining all operator types involved in the inference task performed by the model to be evaluated; configuring different input dimensions and tensor parallel configurations for each operator type to obtain multiple operator configuration instances; determining test cases corresponding to each operator configuration instance; running the test cases on the target hardware platform and collecting duration data corresponding to each operator configuration instance; and establishing an association between the operator type, operator configuration instance, hardware configuration information and corresponding duration data to construct an operator performance repository.

[0043] First, obtain the hardware configuration information of the target hardware platform. The target hardware platform refers to the computing device to be used when the model to be evaluated is actually deployed. The hardware configuration information includes at least the GPU model, memory capacity, computing power version, and data type support. This information is used to identify the hardware environment corresponding to the duration data collected subsequently.

[0044] Then, based on the model structure of the model to be evaluated, the model is decomposed layer by layer to determine all operator types involved in the inference task. Different model architectures contain different types of operators; for example, the Transformer decoder architecture typically includes matrix multiplication operators, attention computation operators, normalization operators, fully connected operators, and communication synchronization operators. By decomposing the complete inference process of the model to be evaluated at the operator level, a list of all operator types called by the model when performing the inference task is obtained, ensuring that the subsequently built operator performance repository can cover all operators actually needed in the model's inference process.

[0045] For each operator type, different input dimensions and tensor parallelism configurations are configured to obtain multiple operator configuration instances. For the same operator type, the dimensions of its input tensors (such as batch size, sequence length, hidden layer dimensions, etc.) will change under different inference scenarios. Simultaneously, under different tensor parallelism configurations (such as single-card inference, dual-card parallelism, quad-card parallelism, etc.), the actual data size processed on each computing device and whether additional communication is required will also change accordingly. For each operator type, its parameter combinations under different input dimensions and different tensor parallelism configurations are enumerated, and each set of parameter combinations is determined as an operator configuration instance. An operator configuration instance contains complete parameter information for that operator under specific operating conditions. For example, a configuration instance of a matrix multiplication operator can be represented as: input dimensions M=1024, K=4096, N=11008, tensor parallelism TP=2, and local dimension N_local=5504.

[0046] Each test case is generated based on the operator configuration instance. Each test case corresponds to an operator configuration instance, which contains all the execution parameters required for the actual operation of the operator on the target hardware platform, such as operator type, input data shape, parallel partitioning method, data type, and number of executions, and is used to drive the target hardware platform to execute the actual computation of the operator.

[0047] Run the above test cases on the target hardware platform and collect the duration data corresponding to each operator configuration instance. The duration data includes two parts: the actual runtime of the operator and the actual runtime of communication. The actual runtime of the operator refers to the time consumed by the operator to complete one computation task on the target hardware platform, and the actual runtime of communication refers to the time consumed by the operator to perform data synchronization (such as AllReduce, AllGather, and other communication operations) in a multi-GPU parallel scenario. The data collection process is completed offline on the target hardware platform and does not depend on the complete model deployment and inference service startup.

[0048] Finally, the operator type, operator configuration instance, hardware configuration information, and corresponding runtime data are associated to construct an operator performance repository. Specifically, the operator performance repository uses the operator type and operator configuration instance as index keys, and the hardware configuration information and corresponding runtime data as index values, forming a complete key-value record. When it is necessary to query the runtime of a certain operator during subsequent simulations, the operator type and operator configuration instance can be used as query conditions to retrieve the measured runtime data of that operator on the target hardware platform from the operator performance repository. Through the above steps, the operator performance repository is constructed.

[0049] This embodiment decomposes all operator types based on the model structure of the model to be evaluated, then generates operator configuration instances by configuring different input dimensions and tensor parallel configurations for each operator type, and collects actual test duration data by running corresponding test cases offline on the target hardware platform. Finally, the operator types, operator configuration instances, hardware configuration information, and duration data are associated to construct an operator performance repository. This ensures that the data sources in the performance repository accurately match the actual operator requirements of the model to be evaluated, avoiding redundant testing of irrelevant operators and reducing the time cost and resource consumption of building the performance repository. Furthermore, since the duration data comes from the actual running results of the target hardware platform rather than theoretical estimates, and covers various parameter combinations under different input dimensions and tensor parallel configurations, the duration data queried during subsequent simulations can accurately reflect the actual performance of the hardware platform under various operating conditions, thus ensuring the accuracy of inference performance simulation. In addition, after the operator performance repository is built, it can be reused for performance evaluation of different models and different load scenarios on the same target hardware platform without re-executing hardware tests for each evaluation, further improving evaluation efficiency.

[0050] In another embodiment of this disclosure, the step of querying the operator performance repository based on the queryable operator list to obtain the measured runtime corresponding to each operator in the queryable operator list includes: for each operator in the queryable operator list, searching in the operator performance repository to see if there is a matching operator configuration instance; if there is, determining the measured runtime corresponding to the operator based on the runtime data corresponding to the matching operator configuration instance; if there is no matching operator configuration instance, determining the nearest operator configuration instance with the smallest parameter value difference within the same operator type; and determining the measured runtime corresponding to the operator based on the runtime data corresponding to the nearest operator configuration instance.

[0051] The queryable operator list contains all operator instances required for each round of inference. Each operator instance carries complete parameter information, including operator name, operator type, stage, input and output shape, local dimension after tensor parallelization, operator attributes, as well as runtime parameters such as batch size after padding, input sequence length for each request, key-value cache length, FlashAttention query length, and variable-length batch cumulative index.

[0052] For each operator instance in the queryable operator list, the operator type and complete parameter combination of that operator instance are used as search criteria to search the operator performance repository for a matching operator configuration instance. Each record stored in the operator performance repository contains the operator type, operator configuration instance, and its corresponding measured runtime and actual communication duration. The operator configuration instance records the parameter combination of the operator under a specific input dimension and tensor parallel configuration.

[0053] There are two possible scenarios during the search process.

[0054] In the first scenario, if an operator configuration instance exists in the operator performance repository that perfectly matches the operator type and parameter combination of the target operator instance, then the runtime data corresponding to that operator configuration instance is directly read, and this runtime data is determined as the actual measured runtime corresponding to that operator. A perfect match means that the operator type of the target operator instance is the same as the operator type recorded in the repository, and all parameter values ​​(including input dimension, output dimension, local dimension after tensor parallelization, etc.) are consistent with the operator configuration instance recorded in the repository.

[0055] In the second scenario, if no operator configuration instance in the operator performance repository perfectly matches the target operator instance, then within the same operator type, the parameter differences between the parameter combination of the target operator instance and the parameter combinations of each record in the repository are calculated. The nearest neighboring operator configuration instance with the smallest parameter difference is selected as the replacement. The parameter difference can be calculated using distance metrics along each parameter dimension. For example, for matrix multiplication operators, the absolute differences along the M, K, and N dimensions are calculated, and the weighted sum of these differences or the Euclidean distance is used as the total difference. For attention operators, the differences in parameters such as batch size, sequence length, number of attention heads, and head dimension are calculated. Then, based on the duration data corresponding to the nearest neighboring operator configuration instance, the measured runtime of the target operator is determined. This method can provide reasonable approximate estimates for parameter combinations not yet covered in the repository without interrupting the simulation process, ensuring the continuity of the simulation.

[0056] By performing the above query operation on each operator instance in the queryable operator list, the actual runtime corresponding to each operator in this round of inference can be obtained.

[0057] This embodiment retrieves operator configuration instances that match the target operator instance from the operator performance repository. When a perfect match is found, the corresponding measured duration data is directly read, ensuring the accuracy and efficiency of the query results. When no perfect match is found in the repository, the nearest operator configuration instance with the smallest parameter value difference within the same operator type is selected as a replacement. This prevents the simulation process from being interrupted due to incomplete repository coverage. Furthermore, since the nearest record with the smallest parameter difference is selected, the approximate error in duration is controllable, ensuring the rationality and continuity of the simulation results even with incomplete repository coverage.

[0058] In another embodiment of this disclosure, the intermediate representation of the operator further includes reserved parameter filling bits; the step of filling the dynamic scheduling parameters into the intermediate representation of the operator to obtain a list of queryable operators includes: filling the dynamic scheduling parameters into the reserved parameter filling bits corresponding to the intermediate representation of the operator to obtain a list of queryable operators.

[0059] The operator intermediate representation is a static description structure obtained after decomposing the model structure and configuration parameters of the model to be evaluated in step 101. It is used to describe the sequence of operators involved in the inference task performed by the model to be evaluated and the static intrinsic parameters of each operator. In addition to static intrinsic parameters such as operator name, operator type, stage, input and output shape, local dimension after tensor parallelization, and operator attributes, the operator intermediate representation also includes reserved parameter padding bits. Reserved parameter padding bits are symbolic variables or empty slots reserved in advance in the operator intermediate representation for dynamic parameters that depend on the actual scheduling rounds. These dynamic parameters cannot be assigned specific values ​​during model decomposition and can only be determined after obtaining specific business request data and completing scheduling.

[0060] The dynamic scheduling parameters generated in each round of scheduling in step 102 are filled into the corresponding reserved parameter filling positions in the operator intermediate representation. Specifically, the dynamic scheduling parameters include at least the batch size of this round, the input sequence length of each service request in this round, and the key-value cache length of each service request in this round. The reserved parameter filling positions in the operator intermediate representation include at least the batch size placeholder, the input sequence length placeholder, and the key-value cache length placeholder. During filling, the batch size from the dynamic scheduling parameters of this round is filled into the batch size placeholder of all operator instances related to this round of scheduling in the operator intermediate representation, the input sequence length of each service request in this round is filled into the corresponding input sequence length placeholder, and the key-value cache length of each service request in this round is filled into the corresponding key-value cache length placeholder.

[0061] For the FlashAttention operator, the query length (q_len) in the dynamic scheduling parameters also needs to be filled into the query length placeholder corresponding to the FlashAttention operator in the intermediate representation of the operator, the key length (kv_len) needs to be filled into the key length placeholder, and the variable-length batch cumulative index (cu_seqlens_q) needs to be filled into the corresponding cumulative index placeholder.

[0062] After the population is complete, all reserved parameter bits in the operator intermediate representation that were originally determined only at runtime are assigned specific values. This transforms the operator intermediate representation from a static description structure that only describes the model's static structure and static inherent parameter information and whose performance cannot be directly queried into a queryable operator list containing complete runtime parameter information that can be directly used to query the operator performance repository. Each round of scheduling corresponds to a fully populated queryable operator list, and the queryable operator lists from all rounds are aggregated for use in subsequent steps to query operator performance.

[0063] Through the above population operation, it can be found that each operator instance in the operator list carries complete parameter information, including static intrinsic parameters and populated dynamic runtime parameters, providing a complete index key for querying the operator performance repository in subsequent steps.

[0064] This embodiment decouples the construction of the intermediate operator representation from the generation of dynamic scheduling parameters by pre-setting reserved parameter filling positions in the intermediate operator representation. This allows the intermediate operator representation to be generated independently during the model decomposition stage, without waiting for the acquisition of business request data and scheduling results. Simultaneously, it reserves explicit interface positions for subsequent dynamic parameter filling, achieving the separation and flexible combination of static model description and dynamic runtime parameters. After obtaining the dynamic scheduling parameters, by filling the corresponding reserved parameter filling positions, the static intermediate operator representation can be quickly transformed into a queryable list of operators carrying complete runtime information. This transformation process does not require re-decomposition of the model or regeneration of operator sequences, improving the execution efficiency of the simulation process.

[0065] In another embodiment of this disclosure, scheduling the service request data includes: after each round of scheduling is completed, obtaining the total inference time of that round; advancing the simulation timeline according to the total time; generating new service requests on the advanced timeline according to the request arrival rate, and adding the new service requests to the service request data to be scheduled for subsequent rounds of scheduling.

[0066] After each round of scheduling is completed, the selected business requests enter the inference execution phase. The runtime simulator queries the operator performance repository based on the list of queryable operators and accumulates the measured runtime of each operator to obtain the total inference time for that round. After obtaining the total inference time for that round, the scheduling simulator uses this total time as the time step to advance the simulation timeline.

[0067] For example, if the current simulation time is t=0 and the total time of the first round of inference is 1000 milliseconds, then the simulation timeline advances to t=1000 milliseconds; if the total time of the second round of inference is 70 milliseconds, then the simulation timeline advances further to t=1070 milliseconds, and so on.

[0068] After advancing the simulation timeline, new business requests are generated on the advanced timeline based on the request arrival rate. Specifically, the request arrival rate predetermines the average number of business requests arriving per unit time, for example, one request arriving on average every 100 milliseconds. When the simulation timeline advances from t=0 to t=1000 milliseconds, within this 1000-millisecond time window, the number of new requests is calculated according to the request arrival rate, and each new request is assigned attributes such as arrival time, input sequence length, and target token generation quantity, thus generating a corresponding business request instance.

[0069] New business requests are added to the business request data to be scheduled, for use in subsequent rounds of scheduling. After a new request is added, the waiting queue is updated, containing both existing requests that were not processed after the previous round of scheduling and incremental requests that have newly arrived within the current time window. Subsequently, the scheduling simulator triggers the next round of scheduling, selecting business requests from the updated waiting queue to participate in the next round of inference.

[0070] Through the above cyclical process, after each round of scheduling is completed, the simulation clock is advanced according to the actual time consumed in that round, and the waiting queue is dynamically updated according to the number of new requests accumulated during the time advancement, so that the simulation process can reproduce the complete dynamic behavior of requests arriving and queuing up over time in real business scenarios.

[0071] This embodiment obtains the total inference time for each round of scheduling and advances the simulation timeline accordingly, keeping the simulation clock's progression synchronized with the actual inference time. This avoids the problem of simulated load becoming disconnected from real computing power under a fixed time step approach. Simultaneously, new business requests are generated on the advanced timeline based on the request arrival rate and added to the waiting queue. This ensures that the request generation rate matches the request arrival rate, and the arrival time of new requests is dynamically adjusted according to the actual time spent in each round. This accurately reflects the dynamic coupling relationship between business load and system processing capacity, enabling the simulation process to accurately reproduce the complete dynamic behavior of request arrival, queuing, dynamic batching, and the continuous addition of new requests in the production environment.

[0072] refer to Figure 3 The architecture shown below will be explained with specific examples. The processing flow involves four main functional modules: operator decomposer, scheduling simulator, operator repository, and performance calculator. The modules are connected by data flow to realize a complete simulation process from user request input to performance prediction result output.

[0073] The user initiates a request, inputting server-side parameters into the operator decomposer and client-side load parameters into the scheduling simulator. The server-side parameters correspond to the model structure and configuration parameters in the embodiment, specifying the structural specifications and parallel strategy of the model to be evaluated; the client-side load parameters correspond to the request configuration parameters in the embodiment, describing the load characteristics of the business scenario to be simulated.

[0074] The operator decomposer decomposes the model to be evaluated layer by layer and operator by operator based on the server parameters, breaks down the complete inference process into an ordered sequence of operators, extracts the static intrinsic parameters of each operator, and constructs the intermediate representation of the operator.

[0075] The scheduling simulator receives client load parameters and generates a time-series distributed sequence of business requests on the simulated timeline based on request arrival rates, thus obtaining business request data. Combining maximum concurrency constraints and preset batch processing strategies, the simulator schedules the business request data round by round, simulating the request queuing and dynamic batching behavior of a real inference service. This generates dynamic scheduling parameters for each round of inference and aggregates them into a scheduling sequence. In dynamic scheduling mode, after each round of inference, the scheduling simulator advances the simulated timeline based on the total time consumed in that round, generates new business requests according to the request arrival rate and adds them to the waiting queue, continuously carrying out subsequent rounds of scheduling.

[0076] The dynamic scheduling parameters corresponding to each round are filled into the intermediate representation of the operator. The intermediate representation of the static operator is combined with the scheduling sequence information to form the operator call sequence (which can be used to query the operator list).

[0077] The operator repository receives a sequence of operator calls. For each operator instance in the sequence, it executes a query using the operator type and complete parameter combination as search conditions: if a completely matching operator configuration instance exists, the corresponding duration data is read; if no completely matching record exists, the nearest operator configuration instance with the smallest parameter value difference under the same operator type is selected, and the duration data corresponding to that instance is used as the estimation basis; the operator repository outputs the query results of each operator to the performance calculator.

[0078] The performance calculator receives the measured runtime of each operator from the operator repository. For each round of inference, it accumulates the measured runtime of all operators to obtain the total inference time for that round. Combining the total inference time of all rounds, the arrival time of each service request in the scheduling sequence, and the scheduling record and request completion time, it calculates various inference performance indicators of the model to be evaluated under the current client load parameters, generates performance prediction results, and returns the performance prediction results to the user.

[0079] Another aspect of this disclosure provides a model inference performance simulation apparatus, the apparatus comprising: The operator decomposition module is used to decompose the model to be evaluated according to the model structure and configuration parameters of the model to be evaluated, and obtain the intermediate operator representation. The intermediate operator representation is used to describe the operator sequence and the static intrinsic parameters of each operator involved in the execution of the inference task by the model to be evaluated. The scheduling module is used to acquire business request data, schedule the business request data, and generate dynamic scheduling parameters for each round of inference. The scheduling module is also used to fill the dynamic scheduling parameters into the intermediate representation of the operator to obtain a list of queryable operators; The query module is used to query the operator performance repository based on the list of queryable operators for each round of inference, and obtain the actual runtime corresponding to each operator in the list of queryable operators. The performance estimation module is used to determine the total time consumption of each round of inference based on the measured runtime corresponding to each operator. The performance estimation module is also used to determine the inference performance index of the model to be evaluated under the business request data based on the total time spent in all rounds of inference.

[0080] In another embodiment of this disclosure, the scheduling module is further configured to: Obtain request configuration parameters, including request arrival rate and maximum concurrency constraint; Based on the request arrival rate, a time-series distributed business request sequence is generated on the simulated time axis to obtain business request data; Based on the maximum concurrency constraint and the preset batch processing strategy, the business request data is scheduled round by round to determine the batch processing request combination for each round of inference and generate dynamic scheduling parameters corresponding to each round of inference. The dynamic scheduling parameters include batch size, length of input sequence for each request, and length of key-value cache.

[0081] In another possible embodiment of this disclosure, the warehouse creation module is used for: Obtain the hardware configuration information of the target hardware platform; Based on the model structure of the model to be evaluated, the model to be evaluated is decomposed to determine all operator types involved in the inference task performed by the model to be evaluated. For each operator type, different input dimensions and tensor parallel configurations are configured to obtain multiple operator configuration instances; Determine the test cases corresponding to each operator configuration instance; Run the test cases on the target hardware platform and collect the duration data corresponding to each operator configuration instance; By associating operator types, operator configuration instances, hardware configuration information, and corresponding duration data, an operator performance repository is constructed.

[0082] In another embodiment of this disclosure, the query module is further configured to: For each operator in the queryable operator list, search the operator performance repository to see if a matching operator configuration instance exists; If it exists, determine the actual runtime of the operator based on the duration data corresponding to the matching operator configuration instance; If it does not exist, then determine the nearest neighbor operator configuration instance with the smallest parameter value difference within the same operator type; Based on the duration data corresponding to the neighboring operator configuration instance, the actual measured runtime of the operator is determined.

[0083] In another embodiment of this disclosure, the intermediate representation of the operator further includes reserved parameter padding bits; the scheduling module is further configured to: Fill the middle of the operator with the dynamic scheduling parameters to represent the corresponding reserved parameter filling position, and obtain the list of queryable operators.

[0084] In another embodiment of this disclosure, the scheduling module is further configured to: After each round of scheduling is completed, obtain the total time spent on inference for that round; The simulation timeline is advanced based on the total time consumed; Based on the request arrival rate, new service requests are generated on the timeline after the process has been initiated, and these new service requests are added to the service request data to be scheduled for subsequent rounds of scheduling.

[0085] According to embodiments of this disclosure, this disclosure also provides an electronic device and a readable storage medium.

[0086] Figure 4 A schematic block diagram of an example electronic device that can be used to implement embodiments of the present disclosure 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 may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, 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 present disclosure described and / or claimed herein.

[0087] like Figure 4 As shown, device 800 includes a computing unit 801, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 802 or a computer program loaded from storage unit 808 into random access memory (RAM) 803. RAM 803 may also store various programs and data required for the operation of device 800. The computing unit 801, ROM 802, and RAM 803 are interconnected via bus 804. Input / output (I / O) interface 805 is also connected to bus 804.

[0088] Multiple components in device 800 are connected to I / O interface 805, including: input unit 806, such as keyboard, mouse, etc.; output unit 807, such as various types of monitors, speakers, etc.; storage unit 808, such as disk, optical disk, etc.; and communication unit 809, such as network card, modem, wireless transceiver, etc. Communication unit 809 allows device 800 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0089] The computing unit 801 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 801 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 computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 801 performs the various methods and processes described above, such as the model inference performance simulation method. For example, in some embodiments, the model inference performance simulation method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on device 800 via ROM 802 and / or communication unit 809. When the computer program is loaded into RAM 803 and executed by the computing unit 801, one or more steps of the model inference performance simulation method described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to perform the model inference performance simulation 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), system-on-a-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 transferring data and instructions to the storage system, the at least one input device, and the at least one output device.

[0091] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, 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 disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. 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 fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0093] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer 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 computer. 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 a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user 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., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.

[0095] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.

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

[0097] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this disclosure, "a plurality of" means two or more, unless otherwise explicitly specified.

[0098] The above description is merely a specific embodiment of this disclosure, but the scope of protection of this disclosure is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this disclosure should be included within the scope of protection of this disclosure. Therefore, the scope of protection of this disclosure should be determined by the scope of the claims.

Claims

1. A method for simulating model inference performance, characterized in that, The method includes: Based on the model structure and configuration parameters of the model to be evaluated, the model to be evaluated is decomposed to obtain an intermediate representation of operators. The intermediate representation of operators is used to describe the sequence of operators involved in the execution of the inference task by the model to be evaluated and the static intrinsic parameters of each operator. Obtain business request data, schedule the business request data, and generate dynamic scheduling parameters for each round of inference; The dynamic scheduling parameters are filled into the intermediate representation of the operator to obtain a list of queryable operators; For each round of inference, based on the list of queryable operators, query the operator performance repository to obtain the measured runtime corresponding to each operator in the list of queryable operators; The total time consumed for each round of inference is determined based on the measured runtime corresponding to each operator. Based on the total time spent in all rounds of inference, the inference performance metrics of the model to be evaluated under the business request data are determined.

2. The model inference performance simulation method according to claim 1, characterized in that, The process of acquiring business request data, scheduling the business request data, and generating dynamic scheduling parameters for each round of inference includes: Obtain request configuration parameters, including request arrival rate and maximum concurrency constraint; Based on the request arrival rate, a time-series distributed business request sequence is generated on the simulated time axis to obtain business request data; Based on the maximum concurrency constraint and the preset batch processing strategy, the business request data is scheduled round by round to determine the batch processing request combination for each round of inference and generate dynamic scheduling parameters corresponding to each round of inference. The dynamic scheduling parameters include batch size, length of input sequence for each request, and length of key-value cache.

3. The model inference performance simulation method according to claim 1, characterized in that, The method further includes: Obtain the hardware configuration information of the target hardware platform; Based on the model structure of the model to be evaluated, the model to be evaluated is decomposed to determine all operator types involved in the inference task performed by the model to be evaluated. For each operator type, different input dimensions and tensor parallel configurations are configured to obtain multiple operator configuration instances; Determine the test cases corresponding to each operator configuration instance; Run the test cases on the target hardware platform and collect the duration data corresponding to each operator configuration instance; By associating operator types, operator configuration instances, hardware configuration information, and corresponding duration data, an operator performance repository is constructed.

4. The model inference performance simulation method according to claim 3, characterized in that, The step of querying the operator performance repository based on the queryable operator list to obtain the measured runtime corresponding to each operator in the queryable operator list includes: For each operator in the queryable operator list, search the operator performance repository to see if a matching operator configuration instance exists; If it exists, determine the actual runtime of the operator based on the duration data corresponding to the matching operator configuration instance; If it does not exist, then determine the nearest neighbor operator configuration instance with the smallest parameter value difference within the same operator type; Based on the duration data corresponding to the neighboring operator configuration instance, the actual measured runtime of the operator is determined.

5. The model inference performance simulation method according to claim 1, characterized in that, The intermediate representation of the operator also includes reserved parameter padding bits; The step of filling the dynamic scheduling parameters into the intermediate representation of the operator to obtain a list of queryable operators includes: Fill the middle of the operator with the dynamic scheduling parameters to represent the corresponding reserved parameter filling position, and obtain the list of queryable operators.

6. The model inference performance simulation method according to claim 1, characterized in that, The inference performance metrics include at least one of the following: first token time, time per output token, end-to-end inference latency, and system throughput.

7. The model inference performance simulation method according to claim 2, characterized in that, The scheduling of the service request data includes: After each round of scheduling is completed, obtain the total time spent on inference for that round; The simulation timeline is advanced based on the total time consumed; Based on the request arrival rate, new service requests are generated on the timeline after the process has been initiated, and these new service requests are added to the service request data to be scheduled for subsequent rounds of scheduling.

8. A model inference performance simulation device, characterized in that, The device includes: The operator decomposition module is used to decompose the model to be evaluated according to the model structure and configuration parameters of the model to be evaluated, and obtain the intermediate operator representation. The intermediate operator representation is used to describe the operator sequence and the static intrinsic parameters of each operator involved in the execution of the inference task by the model to be evaluated. The scheduling module is used to acquire business request data, schedule the business request data, and generate dynamic scheduling parameters for each round of inference. The scheduling module is also used to fill the dynamic scheduling parameters into the intermediate representation of the operator to obtain a list of queryable operators; The query module is used to query the operator performance repository based on the list of queryable operators for each round of inference, and obtain the actual runtime corresponding to each operator in the list of queryable operators. The performance estimation module is used to determine the total time consumption of each round of inference based on the measured runtime corresponding to each operator. The performance estimation module is also used to determine the inference performance index of the model to be evaluated under the business request data based on the total time spent in all rounds of inference.

9. An electronic device, characterized in that, include: At least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the model inference performance simulation method according to any one of claims 1-7.

10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to execute the model inference performance simulation method according to any one of claims 1-7.