Model reasoning method, device, equipment, medium and program product
By loading history and target key-value matrices from the cache for reasoning in large language models, it solves the high overhead and long-time problems of reasoning in novel fields, and achieves fast and accurate reasoning in untouched fields.
Patent Information
- Application Number
- CN202410806956.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-20
- Publication Date
- 2024-09-03
AI Technical Summary
When inferring in novel or untrained fields, existing large-scale language models need to directly input background knowledge, resulting in high inference overhead, or need to build a knowledge base for retrieval, which increases the inference time.
Reasoning is performed by loading the historical key value matrix and target key value matrix corresponding to the current input from the cache. The target key value matrix is selected from the basic key value matrix and determined based on routing calculation, which reduces additional reasoning costs and avoids background knowledge prompts and knowledge base retrieval. .
It achieves accurate and fast reasoning for tasks in unexplored fields, reduces reasoning overhead and time, and avoids problems caused by background knowledge prompts and knowledge base retrieval.
Smart Images

Figure CN118586503A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a model reasoning method, device, equipment, medium and program product. Background Art
[0002] With the development of large language models, such as models based on the Transformer architecture, remarkable achievements have been made in handling text generation and understanding tasks. However, when these models involve novel or untrained fields, they often directly use background knowledge as prompts for model reasoning, but this method has a large reasoning overhead. In addition, there is also a retrieval enhancement method for reasoning, but this method requires additional construction of a knowledge base and the use of a retrieval algorithm to obtain relevant information, which greatly increases the reasoning time. Summary of the invention
[0003] The present invention provides a model reasoning method, device, equipment, medium and program product to solve the defects in the prior art.
[0004] The present invention provides a model reasoning method, comprising: Get the current input in the current scene; Based on the inference model, the historical key-value matrix corresponding to the current input and the target key-value matrix corresponding to the current input are loaded from the cache for inference to obtain a current inference result corresponding to the current input; The target key-value matrix is selected from the basic key-value matrix generated by the inference model through inference of the basic tasks in the target scenario, and the target scenario includes the current scenario.
[0005] According to a model inference method provided by the present invention, the target key-value matrix is determined based on the following steps: Performing routing calculation on the query vector corresponding to the current input and the routing weight corresponding to the current input to determine a routing result; Based on the routing result, the target key-value matrix is determined from the basic key-value matrix.
[0006] According to a model reasoning method provided by the present invention, performing routing calculation on the query vector corresponding to the current input and the routing weight corresponding to the current input to determine the routing result includes: Dividing the basic key-value matrix into blocks, and determining the routing weight based on the number of blocks of the basic key-value matrix; A matrix multiplication operation is performed on the query vector and the routing weight to obtain the routing result.
[0007] According to a model inference method provided by the present invention, the routing result is a vector having the same length as the number of blocks of the basic key-value matrix; Determining the target key-value matrix from the basic key-value matrix based on the routing result includes: Based on the size of each vector element in the routing result, the target key value matrix is determined from each block basic key value matrix.
[0008] According to a model inference method provided by the present invention, the inference model is trained based on the following steps: Storing the basic key-value matrix in a cache of a pre-trained model; The subject weights of the pre-trained model are frozen, and the routing weights of the pre-trained model are updated to obtain an inference model.
[0009] A model reasoning method provided by the present invention also includes: In the case of a new target scenario, the basic key-value matrix in the cache is updated and the routing weights of the inference model are retrained.
[0010] The present invention also provides a model reasoning device, comprising: Determine the unit, used to obtain the current input in the current scene; An inference unit, configured to load a historical key-value matrix corresponding to the current input and a target key-value matrix corresponding to the current input from a cache for inference based on an inference model, and obtain a current inference result corresponding to the current input; The target key-value matrix is selected from the basic key-value matrix generated by the inference model through inference of the basic tasks in the target scenario, and the target scenario includes the current scenario.
[0011] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the model inference method described above is implemented.
[0012] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the model reasoning methods described above.
[0013] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any of the above-mentioned model reasoning methods.
[0014] In the model reasoning method, apparatus, equipment, medium and program product provided by the present invention, a target key-value matrix is selected from a basic key-value matrix, that is, the target key-value matrix is a key-value matrix with a greater correlation with the current scene, so that the reasoning model adds the loading and calculation of a small amount of basic key-value matrices during reasoning, that is, a smaller additional reasoning cost is used to achieve accurate and fast reasoning of untouched domain tasks (i.e., current input), which can not only avoid the problem of high reasoning overhead caused by using background knowledge as prompt input, but also avoid the problem of increased reasoning time caused by building a knowledge base for retrieval. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0016] Figure 1 It is a flow chart of the model reasoning method provided by the present invention.
[0017] Figure 2 This is a schematic diagram of routing calculation provided by the present invention.
[0018] Figure 3 It is a structural schematic diagram of the model reasoning device provided by the present invention.
[0019] Figure 4 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0020] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0021] The attention mechanism in the Transformer model is usually implemented by calculating the corresponding query vector (q), key vector (k), and value vector (v) based on the input token. Then, q is used with the current key-value pair (k, v) and the previously cached key-value matrix (KVcache) to perform attention calculations to obtain the output token, and the output token is used as the new input. The above process is repeated until the inference is completed.
[0022] However, in order to make the model's reasoning effect better or solve domain problems that were not encountered during training, it is necessary to provide the model with additional information. For example, when asking the model a domain problem that was not encountered during training, the model may give a wrong answer. In order to get a better answer, it is usually chosen to input the background knowledge of the relevant field as a prompt together with the question, but the reasoning cost is usually large. In addition, there is also reasoning through retrieval enhancement, that is, using background knowledge as a knowledge base, searching during reasoning, and inputting relevant information together with the question, but this method will greatly increase the reasoning time.
[0023] To this end, the present invention provides a model reasoning method. Figure 1 It is a flow chart of the model reasoning method provided by the present invention, such as Figure 1 As shown, the method includes step 110 and step 120.
[0024] Step 110: Get the current input in the current scene; Step 120: Based on the inference model, the historical key-value matrix corresponding to the current input and the target key-value matrix corresponding to the current input are loaded from the cache for inference to obtain the current inference result corresponding to the current input; the historical key-value matrix can be understood as the key-value information (i.e., key vector and value vector) generated by the inference model during the previous inference, and the historical key-value matrix is stored in the cache.
[0025] Among them, the target key-value matrix is selected from the basic key-value matrix generated by the inference model through batch inference of the basic tasks in the target scenario, and the target scenario includes the current scenario.
[0026] Specifically, the current input refers to the input corresponding to the reasoning task in the current scenario. The reasoning task may include questions that need to be answered, text that needs to be classified, or other tasks that require the reasoning model to process. The current scenario can be understood as a domain scenario that the reasoning model has not encountered during the training process, and the reasoning task in the current scenario can be understood as a domain task that the reasoning model has not encountered.
[0027] In addition, the target scenario includes the current scenario, that is, the target scenario includes domain scenarios that the reasoning model has not encountered. Similarly, the basic tasks under the target scenario can be understood as including domain tasks that the reasoning model has not encountered, such as the basic tasks under the target scenario can be domain tasks in the encyclopedia.
[0028] Optionally, the basic tasks in the target scenario are input into the inference model, and the inference model infers the basic tasks to obtain the corresponding basic key-value matrix. Since the basic tasks are the tasks in the target scenario, the inferred basic key-value matrix contains relevant information of the target scenario.
[0029] Furthermore, the historical key-value matrix corresponding to the current input contains relevant information of historical reasoning, and the target key-value matrix is selected from the basic key-value matrix, which can be understood as the target key-value matrix being the key-value matrix with greater relevance to the current scenario. In other words, the reasoning model adds the loading and calculation of a small number of basic key-value matrices during reasoning, that is, using a smaller additional reasoning cost to achieve accurate and fast reasoning for untouched domain tasks, which can not only avoid the problem of high reasoning overhead caused by using background knowledge as prompt input, but also avoid the problem of increased reasoning time caused by building a knowledge base for retrieval.
[0030] Optionally, since the target key-value matrix occupies a large storage space, the target key-value matrix can be stored in the central processing unit (CPU) in advance. During inference, only part of the matrix needs to be loaded from the CPU to the computing unit for calculation, wherein the computing unit can be any one of a GPU (Graphics Processing Unit), a TPU (Tensor Processing Unit), an NPU (Neural Network Processing Unit), a DPU (Deep Learning Processing Unit), an APU (Accelerated Processing Unit), and a GPGPU (General-Purpose computing on Graphics Processing Unit). Since the memory cost of the CPU is lower than that of the computing unit, more target key-value matrices can be stored in the CPU memory at the same cost.
[0031] As an optional embodiment, the reasoning model can be a text generation model, and the current input can be determined based on the input text. The above-mentioned embodiment method is used to perform model reasoning to obtain the output text corresponding to the input text, which can not only reduce the reasoning overhead but also reduce the reasoning time.
[0032] In the model reasoning method provided by an embodiment of the present invention, a target key-value matrix is selected from a basic key-value matrix, that is, the target key-value matrix is a key-value matrix with a greater correlation with the current scenario, so that the reasoning model adds the loading and calculation of a small number of basic key-value matrices during reasoning, that is, a smaller additional reasoning cost is used to achieve accurate and fast reasoning for tasks in fields that have not been touched before, which not only avoids the problem of high reasoning overhead caused by using background knowledge as prompt input, but also avoids the problem of increased reasoning time caused by building a knowledge base for retrieval.
[0033] Based on the above embodiment, the target key-value matrix is determined based on the following steps: Perform routing calculation on the query vector corresponding to the current input and the routing weight corresponding to the current input to determine the routing result; based on the routing result, determine the target key-value matrix from the basic key-value matrix.
[0034] Specifically, the query vector can be generated based on the current input, and the routing weight is obtained by training the inference model. Usually, the routing weight can be a matrix, the number of rows of the matrix is the number of columns of the query vector, and the number of columns of the routing weight is the number of blocks of the basic key-value matrix.
[0035] Optionally, a matrix multiplication operation may be performed on the query vector and the routing weight to obtain a routing result, wherein the routing result may represent the correlation between each block basic key matrix and the query vector, and the higher the correlation, the greater the probability that the corresponding block basic key matrix is the target key matrix.
[0036] Based on any of the above embodiments, performing routing calculation on the query vector corresponding to the current input and the routing weight corresponding to the current input to determine the routing result includes: Divide the basic key-value matrix into blocks, and determine the routing weight based on the number of blocks of the basic key-value matrix; Perform matrix multiplication on the query vector and the routing weight to obtain the routing result.
[0037] Specifically, the basic key value matrix is divided into blocks, and the routing weight is determined based on the number of blocks of the basic key value matrix. Optionally, a corresponding sub-routing weight can be assigned to each block basic key value matrix, and the sub-routing weights of all block basic key value matrices constitute the routing weight. The query vector is matrix multiplied with the routing weight to obtain the routing result.
[0038] Based on any of the above embodiments, the routing result is a vector with the same length as the number of blocks of the basic key-value matrix; Based on the routing results, the target key-value matrix is determined from the basic key-value matrix, including: Based on the size of each vector element in the routing result, the target key value matrix is determined from the basic key value matrices of each block.
[0039] Specifically, a matrix multiplication operation is performed on the query vector and the routing weight to obtain a routing result, and the length of the vector corresponding to the routing result is the same as the number of blocks of the basic key-value matrix.
[0040] According to the size of each vector element in the routing result, the target key value matrix is determined from each block basic key value matrix. The larger the element value, the greater the correlation between the corresponding block basic key value matrix and the query vector, and the greater the probability of using the corresponding block basic key value matrix as the target key value matrix.
[0041] Figure 2 This is a schematic diagram of routing calculation provided by the present invention, such as Figure 2 As shown in the figure, q represents the query vector, Routingweight represents the routing weight, and KVcache num(16) represents the number of blocks of the basic key-value matrix, which is 16. For example, a 4k-long basic key-value matrix KVcache can be divided into 16 blocks of 256-long KVcaches. Hidden represents the number of columns of q, which is the same as the number of rows of Routing weight. The final routing result is a vector of size 1×16. Optionally, the vector elements can be sorted in descending order, and the block basic key-value matrix corresponding to the topk vector elements can be selected as the target key-value matrix.
[0042] Based on any of the above embodiments, the inference model is trained based on the following steps: Store the basic key-value matrix into the cache of the pre-trained model; Freeze the subject weights of the pre-trained model, update the routing weights of the pre-trained model, and obtain the inference model.
[0043] Specifically, the pre-trained model can be understood as a model trained based on the domain tasks corresponding to the existing scenarios. That is, the pre-trained model has not yet learned the ability to select the domain knowledge corresponding to the target scenario during the training process. The reasoning model is obtained by further training on the basis of the pre-trained model, and then the reasoning model learns the ability to select the domain knowledge corresponding to the target scenario.
[0044] In this regard, the embodiment of the present invention stores the basic key-value matrix in the cache of the pre-trained model, freezes the main weights of the pre-trained model (such as the weights of the backbone network), that is, sets the main weights to be non-trainable, so that these parameters will not be updated in the subsequent training process. At the same time, the routing weights of the pre-trained model are updated, that is, the routing weights are trained, so that the trained inference model can learn how to select the target key-value matrix with a high correlation with the query vector from the basic key-value matrices of each block, and ensure the inference effect of the inference model in the untouched field.
[0045] It can be seen that, based on the pre-trained model, the embodiment of the present invention only needs to train the routing weights, and the training cost is relatively low.
[0046] Based on any of the above embodiments, the method further includes: In the presence of a new target scenario, the basic key-value matrix in the cache is updated and the routing weights of the inference model are retrained.
[0047] Specifically, when there is a new target scenario, it indicates that the basic key-value matrix needs to be updated. For this purpose, the embodiment of the present invention uses the basic tasks of the new target scenario for inference to obtain a new basic key-value matrix, and updates the old basic key-value matrix in the cache based on the new basic key-value matrix. At the same time, the routing weights of the model are retrained using the method of the above embodiment, that is, the main weights are frozen and the routing weights are updated to achieve low-cost updating of the target scenario.
[0048] Based on any of the above embodiments, the present invention further provides a model reasoning method, the method comprising: Obtain the basic tasks in the target scenario, use the reasoning model to reason about the basic tasks, and save the basic key-value matrix generated during the reasoning process.
[0049] The basic key-value matrix is divided into blocks, and the routing weight is determined based on the divided basic key-value matrix. A matrix multiplication operation is performed on the query vector corresponding to the current input and the routing weight to obtain a routing result, which is a vector with the same length as the number of blocks of the basic key-value matrix.
[0050] Sort the vector elements in the routing results from large to small, and select the basic key-value matrix corresponding to the topk vector elements as the target key-value matrix.
[0051] Load the historical key-value matrix and use the target key-value matrix to perform model inference and obtain the inference result.
[0052] The inference model is trained based on the following steps: Store the basic key-value matrix into the cache of the pre-trained model; Freeze the subject weights of the pre-trained model, update the routing weights of the pre-trained model, and obtain the inference model.
[0053] The model reasoning device provided by the present invention is described below. The model reasoning device described below and the model reasoning method described above can be referenced to each other.
[0054] Based on any of the above embodiments, Figure 3 is a schematic diagram of the structure of the model reasoning device provided by the present invention, such as Figure 3 As shown, the device comprises: A determination unit 310 is used to obtain a current input in a current scene; The reasoning unit 320 is used to load the historical key-value matrix corresponding to the current input and the target key-value matrix corresponding to the current input from the cache for reasoning based on the reasoning model to obtain the current reasoning result corresponding to the current input; Among them, the target key-value matrix is selected from the basic key-value matrix generated by the inference model through batch inference of the basic tasks in the target scenario, and the target scenario includes the current scenario.
[0055] In the model reasoning device provided by the present invention, the target key-value matrix is selected from the basic key-value matrix, that is, the target key-value matrix is a key-value matrix with a greater correlation with the current scene, so that the reasoning model adds the loading and calculation of a small amount of basic key-value matrices during reasoning, that is, a smaller additional reasoning cost is used to achieve accurate and fast reasoning for tasks in fields that have not been touched before, which can not only avoid the problem of high reasoning overhead caused by using background knowledge as prompt input, but also avoid the problem of increased reasoning time caused by building a knowledge base for retrieval.
[0056] Based on any of the above embodiments, the target key-value matrix is determined based on the following steps: Perform routing calculation on the query vector corresponding to the current input and the routing weight corresponding to the current input to determine the routing result; based on the routing result, determine the target key-value matrix from the basic key-value matrix.
[0057] Based on any of the above embodiments, performing routing calculation on the query vector corresponding to the current input and the routing weight corresponding to the current input to determine the routing result includes: Divide the basic key-value matrix into blocks, and determine the routing weight based on the number of blocks of the basic key-value matrix; Perform matrix multiplication on the query vector and the routing weight to obtain the routing result.
[0058] Based on any of the above embodiments, the routing result is a vector with the same length as the number of blocks of the basic key-value matrix; Based on the routing results, the target key-value matrix is determined from the basic key-value matrix, including: Based on the size of each vector element in the routing result, the target key value matrix is determined from the basic key value matrices of each block.
[0059] Based on any of the above embodiments, the inference model is trained based on the following steps: Store the basic key-value matrix into the cache of the pre-trained model; Freeze the subject weights of the pre-trained model, update the routing weights of the pre-trained model, and obtain the inference model.
[0060] Based on any of the above embodiments, it also includes: In the presence of a new target scenario, the basic key-value matrix in the cache is updated and the routing weights of the inference model are retrained.
[0061] Figure 4 is a schematic diagram of the structure of the electronic device provided by the present invention, such as Figure 4As shown, the electronic device may include: a processor 410, a memory 420, a communications interface 430 and a communication bus 440, wherein the processor 410, the memory 420 and the communications interface 430 communicate with each other through the communication bus 440. The processor 410 may call the logic instructions in the memory 420 to execute the model reasoning method, which includes: Get the current input in the current scene; Based on the inference model, the historical key-value matrix corresponding to the current input and the target key-value matrix corresponding to the current input are loaded from the cache for inference to obtain a current inference result corresponding to the current input; The target key-value matrix is selected from basic key-value matrices generated by batch reasoning of basic tasks in a target scenario by the inference model, and the target scenario includes the current scenario.
[0062] In addition, the logic instructions in the above-mentioned memory 420 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0063] On the other hand, the present invention further provides a computer program product, the computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions, when the program instructions are executed by a computer, the computer can execute the model reasoning method provided by the above methods, the method comprising: Get the current input in the current scene; Based on the inference model, the historical key-value matrix corresponding to the current input and the target key-value matrix corresponding to the current input are loaded from the cache for inference to obtain a current inference result corresponding to the current input; The target key-value matrix is selected from basic key-value matrices generated by batch reasoning of basic tasks in a target scenario by the inference model, and the target scenario includes the current scenario.
[0064] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to perform the above-mentioned model reasoning method, the method comprising: Get the current input in the current scene; Based on the inference model, the historical key-value matrix corresponding to the current input and the target key-value matrix corresponding to the current input are loaded from the cache for inference to obtain a current inference result corresponding to the current input; The target key-value matrix is selected from basic key-value matrices generated by batch reasoning of basic tasks in a target scenario by the inference model, and the target scenario includes the current scenario.
[0065] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0066] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0067] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A model reasoning method, It is characterized in that include: Get the current input in the current scene; Based on the inference model, the historical key-value matrix corresponding to the current input and the target key-value matrix corresponding to the current input are loaded from the cache for inference to obtain a current inference result corresponding to the current input; The target key-value matrix is selected from basic key-value matrices generated by batch reasoning of basic tasks in a target scenario by the inference model, and the target scenario includes the current scenario.
2. The model reasoning method according to claim 1, It is characterized in that The target key-value matrix is determined based on the following steps: Performing routing calculation on the query vector corresponding to the current input and the routing weight corresponding to the current input to determine a routing result; Based on the routing result, the target key-value matrix is determined from the basic key-value matrix.
3. The model reasoning method according to claim 2, It is characterized in that The performing routing calculation on the query vector corresponding to the current input and the routing weight corresponding to the current input to determine the routing result includes: Dividing the basic key-value matrix into blocks, and determining the routing weight based on the number of blocks of the basic key-value matrix; A matrix multiplication operation is performed on the query vector and the routing weight to obtain the routing result.
4. The model reasoning method according to claim 3, It is characterized in that The routing result is a vector having the same length as the number of blocks of the basic key-value matrix; Determining the target key-value matrix from the basic key-value matrix based on the routing result includes: Based on the size of each vector element in the routing result, the target key value matrix is determined from each block basic key value matrix.
5. The model reasoning method according to any one of claims 1 to 4, It is characterized in that The inference model is trained based on the following steps: Storing the basic key-value matrix in a cache of a pre-trained model; The subject weights of the pre-trained model are frozen, and the routing weights of the pre-trained model are updated to obtain an inference model.
6. The model reasoning method according to claim 5, It is characterized in that Also includes: In the case of a new target scenario, the basic key-value matrix in the cache is updated and the routing weights of the inference model are retrained.
7. A model reasoning device, It is characterized in that include: Determine the unit, used to obtain the current input in the current scene; An inference unit, configured to load a historical key-value matrix corresponding to the current input and a target key-value matrix corresponding to the current input from a cache for inference based on an inference model, and obtain a current inference result corresponding to the current input; The target key-value matrix is selected from basic key-value matrices generated by batch reasoning of basic tasks in a target scenario by the inference model, and the target scenario includes the current scenario.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, the model reasoning method according to any one of claims 1 to 6 is implemented.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the model reasoning method according to any one of claims 1 to 6 is implemented.
10. A computer program product comprising a computer program, It is characterized in that When the computer program is executed by a processor, the model reasoning method according to any one of claims 1 to 6 is implemented.
Citation Information
Cited By
Data processing method based on improved large language model reasoning operation framework
CN119002831A
Model reasoning method and device, storage medium and computer equipment
CN119578547A
