Model capability integrated management method and system and electronic equipment

Through configuration file parsing and abstract modular design, the scalability and compatibility problems caused by large model technology iterations are solved, the agile development and rapid iteration of large model parsing systems are realized, and the scalability and low cost of the system are improved. Codability.

CN118535478APending Publication Date: 2024-08-23CHONGQING ZHONGKE YUNCONG TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410760266.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-13
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

In the context of high-frequency iterations of large model technology, the scalability, compatibility, and rapid iteration capabilities of the model capability analysis system are challenged, resulting in cumbersome model training and integration testing, making it difficult to achieve agile development and rapid verification.

Method used

By initializing multiple models based on configuration file parsing results, determining the target model and inference method, and performing inference based on application requests, integrated management of model capabilities is achieved. Inference and models are highly abstracted and modularized, and support rapid access to new Inference model framework and model implementation.

Benefits of technology

It improves the scalability, compatibility and low code of the large model parsing capability system, simplifies testing complexity, enables free switching and comparative testing of multi-model reasoning architecture, and reduces development and maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118535478A
    Figure CN118535478A
Patent Text Reader

Abstract

The invention relates to the field of artificial intelligence, in particular to a model capability integrated management method and system and electronic equipment, and aims to solve or at least partially solve the problem of tedious test caused by lack of modular design of model training and iteration and reduce the expandability, compatibility, low code performance and rapid iteration capability of the system. According to the scheme, the method comprises the steps that based on a configuration file analysis result, an operation supporting condition and a reasoning mode corresponding to each model in multiple models are initialized; and based on the parameter information in the application request, determining an executed target model and a corresponding reasoning mode, and reasoning the application request to obtain a reasoning result. The comparison test of various models in one set of system can be realized through configuration modularization and specific module expandability, and the test complexity is reduced; and meanwhile, a new reasoning model framework and a new model implementation mode are quickly accessed, so that the expandability, compatibility, low code performance and quick iteration capability of the system are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence, and specifically provides a model capability integrated management method, system and electronic equipment. Background Art

[0002] Big model technology is developing rapidly. There are many types of big models in the open source community, and each artificial intelligence vendor has its own big models. The model training cycle is long, and multi-model AB comparison tests are often required for the same test case during integration testing; at the same time, model technology is updated and iterated quickly, including changes in model structure, word list optimization, token parsing method updates, etc. These high-frequency changes put forward strict requirements on the scalability, compatibility, low-code, and rapid iteration capabilities of systems that provide big model parsing capabilities.

[0003] How to achieve agile development of model capability analysis systems and fast, efficient integrated verification testing under the background of high-frequency iteration of big model technology is an important link and issue that needs to be optimized so that big models can be quickly promoted to terminals, form practical applications, and empower various industries.

[0004] Accordingly, the art needs a model capability integration management solution to solve the above technical problems. Summary of the invention

[0005] In order to overcome the above-mentioned defects, the present invention is proposed to provide a solution or at least partially solve the cumbersome testing caused by the lack of modular design in model training and iteration, and the reduced scalability, compatibility, low code and rapid iteration capabilities of the system that provides large model parsing capabilities.

[0006] In a first aspect, the present invention provides a model capability integration management method, comprising:

[0007] Based on the parsing results of the configuration files, the operation support conditions and reasoning methods corresponding to each of the multiple models are initialized;

[0008] Based on the parameter information in the application request, the target model to be executed and the reasoning method corresponding to the target model are determined, and the application request is reasoned based on the reasoning method to obtain the reasoning result.

[0009] In one embodiment, the configuration file parsing result includes at least one of the following: model type, model file path, device information that carries the model, prompt word template, tokenizer file path, reasoning method, and task types supported by the model.

[0010] In one embodiment, the model type includes at least one of the following: llama, bloom, qwen, baichuan; the model file path is used to find the corresponding model according to the model file path; the reasoning method includes at least one of the following: text generation inference, vllm, transformers, tensorrt-llm; the task type includes at least one of the following: text generation, text translation, text classification, text keyword extraction, text image, text video, text code.

[0011] In one embodiment, based on the parsing result of the configuration file, the process of initializing the operation support conditions corresponding to each model in the multiple models is as follows:

[0012] Based on the tokenizer file path, read the file to complete the initialization of the model token generation method, the initialization of the model input preprocessing method, and the initialization of the model output post-processing method.

[0013] In one embodiment, if the operation support conditions are lacking, the encapsulation and integration of the corresponding operation support conditions are completed through the interface defined by the model abstraction layer in the model capability integration system.

[0014] In one embodiment, based on the parsing result of the configuration file, the process of initializing the reasoning mode corresponding to each model in the multiple models is as follows:

[0015] Based on the model file path, the corresponding model weight file is read to load the model and complete the initialization of the model reasoning method.

[0016] In one embodiment, if the reasoning method is lacking, the encapsulation and integration of the corresponding reasoning method is completed through the reasoning interface defined by the model reasoning abstraction layer in the model capability integration system.

[0017] In a second aspect, the present invention provides a model capability integrated management system, including: an initialization module, a reasoning module;

[0018] in,

[0019] The initialization module is used to initialize the operation support conditions and reasoning methods corresponding to each model in the multiple models based on the parsing result of the configuration file;

[0020] The reasoning module is used to determine the target model to be executed and the reasoning method corresponding to the target model based on the parameter information in the application request, and to reason the application request based on the reasoning method to obtain the reasoning result.

[0021] In a third aspect, an electronic device is provided, comprising a processor and a memory, wherein the memory stores a program, and when the processor executes the program, the model capability integration management method described in any one of the technical solutions of the above method is implemented.

[0022] In a fourth aspect, a readable storage medium is provided, storing a program, which, when executed, implements the model capability integration management method described in any one of the technical solutions of the above method.

[0023] The above one or more technical solutions of the present invention have at least one or more of the following

[0024] Beneficial effects:

[0025] The technical solution of the present invention is as follows: based on the results of configuration file parsing, the operating support conditions and reasoning methods corresponding to each model in multiple models are initialized; based on the parameter information in the application request, the target model to be executed and the reasoning method corresponding to the target model are determined, and the application request is reasoned based on the reasoning method to obtain the reasoning result.

[0026] The above solution makes reasoning and modeling highly abstract and modular, and can quickly access new reasoning model frameworks and new model implementation methods, completely decoupling capability expansion from other functions, and improving the scalability, compatibility, low-code, and rapid iteration capabilities of systems that provide large model parsing capabilities. After development is completed, the system can freely switch between multiple model reasoning architectures and conduct comparative tests on multiple models simply by configuring modules. By configuring modularization and specific modules, comparative tests of multiple models in a system can be achieved, reducing the complexity of testing. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] The disclosure of the present invention will become more easily understood with reference to the accompanying drawings. It is easy for those skilled in the art to understand that these drawings are only for illustrative purposes and are not intended to limit the scope of protection of the present invention. In addition, similar numbers in the figures are used to represent similar components, among which:

[0028] Figure 1 is a flowchart of main steps of a model capability integration management method according to an embodiment of the present invention;

[0029] Figure 2 is a flowchart of main steps of a model capability integration management method according to an embodiment of the present invention;

[0030] Figure 3 It is a schematic diagram of the main structural block diagram of a model capability integrated management system according to an embodiment of the present invention. DETAILED DESCRIPTION

[0031] Some embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood by those skilled in the art that these embodiments are only used to explain the technical principles of the present invention and are not intended to limit the protection scope of the present invention.

[0032] In the description of the present invention, "module" and "processor" may include hardware, software or a combination of the two. A module may include hardware circuits, various suitable sensors, communication ports, and memories, and may also include software parts, such as program codes, or a combination of software and hardware. The processor may be a central processing unit, a microprocessor, an image processor, a digital signal processor, or any other suitable processor. The processor has data and / or signal processing functions. The processor may be implemented in software, hardware, or a combination of the two. Non-temporary computer-readable storage media include any suitable medium that can store program codes, such as a magnetic disk, a hard disk, an optical disk, a flash memory, a read-only memory, a random access memory, and the like. The term "A and / or B" means all possible combinations of A and B, such as only A, only B, or A and B. The term "at least one A or B" or "at least one of A and B" has a similar meaning to "A and / or B", and may include only A, only B, or A and B. The singular terms "one" and "the" may also include plural forms.

[0033] The main innovative features of the present invention are:

[0034] A model capability integrated management system is proposed. The system includes: interface module, configuration module, configuration parsing module, service management module, model reasoning abstract layer, model reasoning extension module, model implementation abstract layer, model implementation extension module, and common method module.

[0035] Interface module: The interface module mainly defines the API interface that can be called by external applications. According to actual business needs, this module defines interfaces such as text generation, text translation, text classification, and text keyword extraction;

[0036] Configuration parsing module: This module records all configurable parameters required by system services in the form of json files; defines the data structure of parameter parsing and the corresponding function interface; developers incrementally maintain json files according to parameter specifications, thereby realizing the expansion of system multi-reasoning frameworks, different types of models, different model capabilities, and specific tasks that rely on different models;

[0037] Service management module: This module manages the start and stop of system services, processes requests from external applications received by the interface module, and calls specific model implementation modules and reasoning modules to complete capability calculation, assembly of request results, and responses from external applications;

[0038] Model reasoning abstraction layer: Combined with the characteristics of the current mainstream large model reasoning framework, a set of concise model reasoning interfaces are abstracted; mainly including initialization interface and business processing interface; the initialization interface is the abstraction of model reasoning environment setting, model file loading, resource pre-allocation and other functions; the business processing interface completes the abstraction of the large model's reasoning calculation based on the data passed in by the user;

[0039] Model reasoning extension module: In this module, developers can encapsulate and integrate specific reasoning methods according to the reasoning interface defined by the model reasoning abstract layer, thereby expanding the system's ability to parse large models. Due to the existence of the abstract layer, the expansion of model parsing capabilities is completely decoupled from other modules of the system, and developers only need to focus on the characteristics of the specific reasoning framework.

[0040] Model implementation abstraction layer: different types of large models, models trained for different business needs, input prompt preprocessing methods, output result postprocessing methods may be different, in order to be compatible with multiple types of models; this module mainly provides interface abstraction for model reasoning input data preprocessing and reasoning result postprocessing; contains two abstract interfaces: input data preprocessing interface and output result postprocessing interface;

[0041] Model implementation extension module: This module is mainly used by developers to implement the extension of specific model operation according to the data preprocessing and result post-processing methods of the large model to be connected; also due to the existence of the model abstraction layer, the extension of the specific model implementation module is completely decoupled from other modules of the system;

[0042] Public method module: This module provides some systematic functional interfaces shared by other modules of the entire system, such as system logs, file management, etc.

[0043] By configuring modules and abstracting model reasoning, the free switching and comparative testing of multi-model reasoning architectures can be quickly realized; by configuring modularization and abstracting module realization, it is possible to expand the comparative testing of multiple models in a system and provide a variety of analytical capabilities; through modular design, the agility of large model capability analysis system development is achieved. After the initial version is developed, only a small amount of code is needed to complete the incremental update of the system's large model capabilities for subsequent system updates. Assembling the above modules will eventually form a system with good scalability, rich model analysis capabilities, low maintenance costs, and conducive to rapid iteration and stable large model capability analysis.

[0044] The present invention has the following advantages:

[0045] 1. Strong scalability, which is mainly reflected in the differences in model reasoning methods. By abstracting the model reasoning module, new model reasoning methods can be quickly expanded. In addition, for models with different structures and different implementations, the abstraction of model implementation can quickly and conveniently expand the access to new model implementations.

[0046] 2. Low code. After the initial version of the system is developed, if a new large model is subsequently connected, and the structure of the new large model remains unchanged, the reasoning method remains unchanged, and the vocabulary remains unchanged, only new configuration is needed to complete the connection of the new large model capability. If the new large model has changes in the above implementation, only incremental code additions are needed in the model reasoning extension module and the model implementation extension module to implement it.

[0047] 3. Rich reasoning capabilities. After the abstraction of the reasoning module is done, it is very convenient to expand the specific model reasoning method. The first version integrates as many current mainstream large model reasoning methods as possible (for example: text generation inference, vllm, transformers, tensorrt-llm); basically, it can meet the reasoning of most large models;

[0048] 4. Easy to use. The large models connected to the system are all managed through json file configuration. For models with different training batches of the same structure, you only need to add new configuration items to complete the access of model capabilities. In addition, the interface module of this system is highly integrated with the external interface, and the external http interface has good parameter hiding. The interface is extremely simple, which greatly facilitates the integrated development of specific applications that rely on large model capabilities.

[0049] The specific workflow of the present invention is as follows:

[0050] 1. The system reads the configuration file through the configuration parsing module. The configuration file defines the type of large model (for example: llama, bloom, qwen, baichuan), model file path, device information (index of GPU, NPU card), prompt word template, tokenizer file path, type of inference framework (for example: text generation inference, vllm, transformers, tensorrt-llm), task types supported by the model and other user configuration information; the system's configuration parsing module parses the file and verifies the parsing parameters; verifies that the parameters are correct and passes the parameters to the service management module;

[0051] 2. After receiving the parameters passed by the configuration parsing module, the service management module of the system searches for the specific implementation of the model that has been integrated into the system through the model implementation abstraction layer according to the large model type, reads the file according to the tokenizer file path, and completes the initialization of the model token generation method, the initialization of the model input preprocessing method, and the initialization of the model output post-processing method;

[0052] 3. The system fails to find the specific implementation of the model according to the model type in the configuration file. The developer needs to use the "model implementation extension module", that is, the specific implementation of the interface integration model of the abstract layer through the model of this system;

[0053] 4. The system searches for the large model reasoning method that has been integrated and implemented by the system through the model reasoning abstraction layer according to the reasoning type parameter, reads the model weight file according to the model file path, loads the specific model, completes the initialization of the model reasoning method, and starts the large model capability service provided by the system;

[0054] 5. The system fails to find a method for large model reasoning in the model reasoning abstraction layer based on the reasoning type parameter; the developer needs to encapsulate the specific reasoning method through the "model reasoning extension module", that is, through the model reasoning interface defined in the model reasoning abstraction layer, and register it in the system;

[0055] 6. After receiving the request from the external application, the interface module of the system parses and verifies the request parameters, and then encapsulates and transmits the request parameters to the service management module according to the request parameter planning defined by the service management module;

[0056] 7. The service management module of the system disassembles the parameters and distributes the prompt words in the parameters to the specific model implementation module responsible for the task (text classification, keyword extraction, translation, text generation, etc.) according to the task type of the request parameters to pre-process the input data;

[0057] 8. The specific model implementation module of the system sends the processed data into a specific reasoning framework to perform capability calculations;

[0058] 9. The output result calculated by the specific reasoning framework of the system is returned to the service management module after post-processing by the specific model implementation module;

[0059] 10. The service management module of the system encapsulates the output results of the model into a corresponding form according to the task type of the user request parameter, responds to the user request, and returns the final result.

[0060] Figure 1 FIG. 1 is a flow chart of main steps of a model capability integration management method according to an embodiment of the present invention. Figure 1 As shown, it mainly includes the following steps S20-S30:

[0061] Step S20, based on the parsing result of the configuration file, initializing the operation support conditions and reasoning methods corresponding to each of the multiple models;

[0062] In this implementation, the configuration file parsing result includes at least one of the following: model type, model file path, device information that hosts the model, prompt word template, tokenizer file path, reasoning method, and task types supported by the model.

[0063] In this embodiment, the model type includes at least one of the following: llama, bloom, qwen, baichuan; the model file path is used to find the corresponding model according to the model file path; the reasoning method includes at least one of the following: text generation inference, vllm, transformers, tensorrt-llm; the task type includes at least one of the following: text generation, text translation, text classification, text keyword extraction, text image, text video, text code.

[0064] In this embodiment, based on the parsing result of the configuration file, the process of initializing the operation support conditions corresponding to each model in the multiple models is as follows:

[0065] Based on the tokenizer file path, read the file to complete the initialization of the model token generation method, the initialization of the model input preprocessing method, and the initialization of the model output post-processing method.

[0066] If the aforementioned operating support conditions are lacking, the encapsulation and integration of the corresponding operating support conditions are completed through the interface defined by the model implementation abstraction layer in the model capability integration system.

[0067] In this embodiment, based on the parsing result of the configuration file, the process of initializing the reasoning mode corresponding to each model in the multiple models is as follows:

[0068] Based on the model file path, the corresponding model weight file is read to load the model and complete the initialization of the model reasoning method.

[0069] If the reasoning method is lacking, the encapsulation and integration of the corresponding reasoning method is completed through the reasoning interface defined by the model reasoning abstraction layer in the model capability integration system.

[0070] S30, based on the parameter information in the application request, determine the target model to be executed and the reasoning method corresponding to the target model, and reason the application request based on the reasoning method to obtain the reasoning result.

[0071] The above solution makes reasoning and modeling highly abstract and modular, and can quickly access new reasoning model frameworks and new model implementation methods, completely decoupling capability expansion from other functions, and improving the scalability, compatibility, low-code, and rapid iteration capabilities of systems that provide large model parsing capabilities. After development is completed, the system can freely switch between multiple model reasoning architectures and conduct comparative tests on multiple models simply by configuring modules. By configuring modularization and specific modules, comparative tests of multiple models in a system can be achieved, reducing the complexity of testing.

[0072] Figure 2 FIG. 1 is a flow chart showing the main steps of a model capability integration management method according to an embodiment of the present invention. Figure 2 As shown, it mainly includes the following steps S201-S210:

[0073] S201, configuration analysis

[0074] Read the configuration file to obtain the type of the incoming large model (for example: llama, bloom, qwen, baichuan), model file path, device information (for example: gpu, npu card index), prompt word template, tokenizer file path, reasoning framework type (for example: vllm, transformers, tensorrt-llm), model supported task type (for example: "vincent graph", "vincent video") and other capability parsing service configuration information; perform parameter verification; encapsulate the parameters and pass them to the service management module; start the large model capability parsing service;

[0075] S202, Interface Analysis

[0076] The interface parsing module completes the interface parsing. After receiving the application request, the system parses the user parameters and encapsulates them according to the request parameter specification defined by the service management module and passes them to the service management module.

[0077] S203, Service Management

[0078] Completed by the service management module, the process is divided into: development phase and operation phase; in the development phase, the configuration is parsed and the process goes to S204. In the operation phase, the service management module disassembles the parameters and distributes the prompt words in the parameters to the specific model implementation module responsible for the task (text classification, keyword extraction, translation, text generation, etc.) according to the task type of the request parameters;

[0079] S204, model initialization

[0080] In the development phase, the service management module receives the parameters passed by the configuration file parsing module, and according to the large model type, passes it to the model implementation abstraction layer to find the specific model implementation that has been integrated into the system, reads the file according to the tokenizer file path, and completes the initialization of the model token generation method, the initialization of the model input preprocessing method, and the initialization of the model output post-processing method; if there is no implementation of the corresponding model type, go to S205;

[0081] S205, model implementation extension

[0082] During the development phase, developers need to integrate the specific implementation of the new model according to the interface of the abstract layer of the system model;

[0083] S206, reasoning initialization

[0084] According to the inference type parameter, the system searches for the large model inference method that has been integrated and implemented through the model inference abstraction layer. According to the model file path, the model weight file is read to load the specific model, and the model inference method is initialized. The large model capability service provided by the system is started. If the inference type is not set, go to S207.

[0085] S207, model reasoning extension

[0086] During the development phase, developers encapsulate specific reasoning methods according to the model reasoning interface defined by the model reasoning abstraction layer. After development is complete, the system will automatically register the new reasoning method.

[0087] S208, output inference results

[0088] After assembling the input data and the parameters required for model reasoning, call the specific reasoning framework to perform reasoning operations; install the streaming or non-streaming method to return the reasoning results to the specific model implementation module;

[0089] S209, post-processing of inference results

[0090] The inference result is post-processed by a specific model implementation module, and the post-processing result is output to the service management module; wherein the post-processing includes at least one of the following: decoding, text splicing, sensitive word filtering, and text truncation;

[0091] S210, request response returns

[0092] The service management module encapsulates the post-processing results into the final request response and returns it according to the task type and return form in the application request parameters.

[0093] In this embodiment, each element of a model capability integrated management system is modularized. The functions of each module are isolated. Specifically, the interface module focuses on processing specific business requests of applications; the configuration parsing module defines specific data structures to manage model types, model reasoning types, specific model parameters, device information, etc., and updates incrementally; the service management module focuses on the scheduling of parsing capabilities and the communication of interface modules; the model implementation extension module and the model reasoning extension module are responsible for calculation and data processing; making the entire system easy to use and maintain; and achieving agility in the development of large model capability parsing systems.

[0094] In addition, reasoning and models are highly abstracted and modularized; new model reasoning frameworks and new model implementation methods can be quickly connected; and capability expansion is completely decoupled from other functions.

[0095] After development is completed, the system can realize the free switching of multiple model reasoning architectures and multiple model comparison tests simply by configuring the module. Through configuration modularization and module extensibility, multiple models can be compared and tested in one system, and various analysis capabilities can be provided.

[0096] Figure 3 is a schematic diagram of the main structure block diagram of a model capability integrated management system according to an embodiment of the present invention. Figure 3 As shown, it includes: an initialization module 301, a reasoning module 302;

[0097] in,

[0098] The initialization module is used to initialize the operation support conditions and reasoning methods corresponding to each model in the multiple models based on the parsing result of the configuration file;

[0099] The reasoning module is used to determine the target model to be executed and the reasoning method corresponding to the target model based on the parameter information in the application request, and to reason the application request based on the reasoning method to obtain the reasoning result.

[0100] In some embodiments, one or more of the initialization module 301 and the reasoning module 302 may be combined into one module. In one implementation, the description of the specific implementation functions may refer to the steps in the above embodiment.

[0101] The above solution makes reasoning and modeling highly abstract and modular, and can quickly access new reasoning model frameworks and new model implementation methods, completely decoupling capability expansion from other functions, and improving the scalability, compatibility, low-code, and rapid iteration capabilities of systems that provide large model parsing capabilities. After development is completed, the system can freely switch between multiple model reasoning architectures and conduct comparative tests on multiple models simply by configuring modules. By configuring modularization and specific modules, comparative tests of multiple models in a system can be achieved, reducing the complexity of testing.

[0102] The above model capabilities are integrated into the management system for execution Figure 1 The model capability integration management method embodiment shown in the figure has similar technical principles, technical problems solved and technical effects produced. Technical personnel in this technical field can clearly understand that for the convenience and conciseness of description, the specific working process and related instructions of the model capability integration management system can refer to the contents described in the embodiment of the model capability integration management method, which will not be repeated here.

[0103] It is understood by those skilled in the art that the present invention implements all or part of the processes in the method of the above embodiment, and can also be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable storage medium may include: any entity or device, medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory, random access memory, electric carrier signal, telecommunication signal and software distribution medium that can carry the computer program code. It should be noted that the content contained in the computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable storage media do not include electric carrier signals and telecommunication signals.

[0104] Furthermore, the present invention also provides an electronic device, the electronic device includes a processor and a memory, the memory can be configured to store a program for executing the model capability integration management method of the above method embodiment, and the processor can be configured to execute the program in the memory, the program including but not limited to the program for executing the model capability integration management method of the above method embodiment. For ease of explanation, only the parts related to the embodiment of the present invention are shown. For specific technical details not disclosed, please refer to the method part of the embodiment of the present invention.

[0105] Furthermore, the present invention also provides a readable storage medium. In a readable storage medium embodiment according to the present invention, the readable storage medium can be configured to store a program for executing the model capability integration management method of the above-mentioned method embodiment, and the program can be loaded and run by the processor to implement the above-mentioned model capability integration management method. For ease of explanation, only the parts related to the embodiment of the present invention are shown. For specific technical details not disclosed, please refer to the method part of the embodiment of the present invention. The readable storage medium can be a storage device formed by various electronic devices. Optionally, the readable storage medium in the embodiment of the present invention is a non-temporary readable storage medium.

[0106] Further, it should be understood that since the setting of each module is only for illustrating the functional units of the system of the present invention, the physical devices corresponding to these modules can be the processor itself, or a part of the software in the processor, a part of the hardware, or a part of the combination of software and hardware. Therefore, the number of each module in the figure is only schematic.

[0107] Those skilled in the art will appreciate that the modules in the system may be adaptively split or merged. Such splitting or merging of specific modules will not cause the technical solution to deviate from the principle of the present invention, and therefore, the technical solutions after splitting or merging will fall within the protection scope of the present invention.

[0108] So far, the technical solutions of the present invention have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present invention is obviously not limited to these specific embodiments. Without departing from the principle of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present invention.

Claims

1. A model capability integration management method, characterized in that: include: Based on the parsing results of the configuration files, the operation support conditions and reasoning methods corresponding to each of the multiple models are initialized; Based on the parameter information in the application request, the target model to be executed and the reasoning method corresponding to the target model are determined, and the application request is reasoned based on the reasoning method to obtain the reasoning result.

2. The method according to claim 1, characterized in that The configuration file parsing result includes at least one of the following: model type, model file path, device information that hosts the model, prompt word template, tokenizer file path, reasoning method, and task types supported by the model.

3. The method according to claim 2, characterized in that The model type includes at least one of the following: llama, bloom, qwen, baichuan; the model file path is used to find the corresponding model according to the model file path; the reasoning method includes at least one of the following: text generation inference, vllm, transformers, tensorrt-llm; the task type includes at least one of the following: text generation, text translation, text classification, text keyword extraction, text image, text video, text code.

4. The method according to claim 3, characterized in that Based on the parsing results of the configuration file, the process of initializing the operating support conditions corresponding to each of the multiple models is as follows: Based on the tokenizer file path, read the file to complete the initialization of the model token generation method, the initialization of the model input preprocessing method, and the initialization of the model output post-processing method.

5. The method according to claim 4, characterized in that If the aforementioned operating support conditions are lacking, the encapsulation and integration of the corresponding operating support conditions are completed through the interface defined by the model implementation abstraction layer in the model capability integration system.

6. The method according to claim 3, characterized in that: Based on the parsing results of the configuration file, the process of initializing the inference method corresponding to each model in the multiple models is as follows: Based on the model file path, the corresponding model weight file is read to load the model and complete the initialization of the model reasoning method.

7. The method according to claim 6, characterized in that If the reasoning method is lacking, the encapsulation and integration of the corresponding reasoning method is completed through the reasoning interface defined by the model reasoning abstraction layer in the model capability integration system.

8. A model capability integrated management system, characterized in that: include: Initialization module, reasoning module; in, The initialization module is used to initialize the operation support conditions and reasoning methods corresponding to each model in the multiple models based on the parsing result of the configuration file; The reasoning module is used to determine the target model to be executed and the reasoning method corresponding to the target model based on the parameter information in the application request, and to reason the application request based on the reasoning method to obtain the reasoning result.

9. An electronic device comprising a processor and a memory, wherein the memory stores a program, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 7 is implemented.

10. A readable storage medium storing a program, characterized in that: When the program is executed, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Model testing system and method based on multi-chip computing equipment and related equipment

    CN121029631A

  • Model testing system, method, and related devices based on multi-chip computing devices

    CN121029631B