Model generation method, storage medium and electronic device

By introducing a callback/processing component mechanism during the training of large-scale language models, the implementation process of the target model is split and extended, solving the problem of high framework usage difficulty in multi-machine and multi-GPU training scenarios, and achieving more efficient model generation and adaptation.

CN117114057BActive Publication Date: 2026-05-12HANGZHOU ALICLOUD FEITIAN INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HANGZHOU ALICLOUD FEITIAN INFORMATION TECH CO LTD
Filing Date
2023-08-17
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

In the training process of large-scale language models in existing technologies, the training framework for multi-machine and multi-GPU training scenarios is difficult to use and has high switching costs, lacking effective solutions.

Method used

By introducing a callback/processing component mechanism into the model generation method, the implementation process of the target model is split and extended to the implementation process of the initial model. The target model is generated using multiple callback and processing components, which can be adapted to various types of distributed training frameworks, reducing the difficulty of using training frameworks and the cost of switching.

Benefits of technology

It improves the adaptability of the target model in multi-machine, multi-GPU training scenarios, reduces the difficulty of using the framework and the cost of switching during training, and improves the flexibility and maintainability of the model generation process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117114057B_ABST
    Figure CN117114057B_ABST
Patent Text Reader

Abstract

The application discloses a model generation method, a storage medium and an electronic device. The method comprises the following steps: obtaining model requirement information; selecting a plurality of callback components to be used and a plurality of processing components to be expanded based on the model requirement information, wherein the plurality of callback components are used to split an implementation process of a target model, the plurality of processing components are used to extend the implementation process of the target model to an implementation process of an initial model, and the implementation process of the target model comprises at least one of a training process of the target model and an inference process of the target model; and generating the target model by using the plurality of callback components and the plurality of processing components. The application solves the technical problems of difficulty in using a training framework and high switching cost in the training process of the model generation method provided in the related art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of computer technology and artificial intelligence technology, and more specifically, to a model generation method, a storage medium, and an electronic device. Background Technology

[0002] Training large-scale language models (LLMs) typically requires multiple GPUs to work together, making the training process more complex than training on a single GPU and prone to crashing or interrupting. To address this, several low-level training frameworks have been developed for multi-machine, multi-GPU training scenarios, including DeepSpeed, Megatron, Distributed Data Parallel (DDP), and Fully Sharded Data Parallel (FSDP). However, these existing training frameworks differ significantly in their usage, making them difficult to use during model training and requiring costly framework switching.

[0003] There is currently no effective solution to the above problems. Summary of the Invention

[0004] This application provides a model generation method, storage medium, and electronic device to at least solve the technical problems of high difficulty in using the training framework and high switching costs in the training process of the model generation methods provided in the related art.

[0005] According to one aspect of the embodiments of this application, a model generation method is provided, comprising: obtaining model requirement information, wherein the model requirement information is used to determine the implementation requirements of a target model corresponding to a target application scenario based on the implementation process of a pre-built initial model, the implementation process of the initial model including at least one of the following: the training process of the initial model and the inference process of the initial model, and the implementation requirements of the target model including at least one of the following: the training requirements of the target model and the inference requirements of the target model; selecting multiple callback components to be used and multiple processing components to be extended based on the model requirement information, wherein the multiple callback components are used to split the implementation process of the target model, and the multiple processing components are used to extend the implementation process of the target model to the implementation process of the initial model, the implementation process of the target model including at least one of the following: the training process of the target model and the inference process of the target model; and generating a target model using the multiple callback components and the multiple processing components.

[0006] According to another aspect of the embodiments of this application, a model generation method is also provided, comprising: obtaining model requirement information through a first processing component, wherein the first processing component is used to provide the implementation requirements of a target model, the model requirement information being determined based on the implementation process of an initial model, the implementation requirements of the target model including at least one of the following: training requirements of the target model, inference requirements of the target model, and the implementation process of the initial model including at least one of the following: training process of the initial model, inference process of the initial model; selecting multiple callback components to be used and multiple second processing components to be extended based on the model requirement information, wherein the multiple callback components are used to split the implementation process of the target model, and the multiple second processing components are used to extend the implementation process of the target model to the implementation process of the initial model, the implementation process of the target model including at least one of the following: training process of the target model, inference process of the target model; inheriting multiple second processing components using a multi-machine, multi-card approach, and extending the implementation processes corresponding to the multiple callback components to the implementation process of the initial model respectively, thereby generating a target model.

[0007] According to another aspect of the embodiments of this application, a model generation method is also provided, comprising: obtaining model requirement information, wherein the model requirement information is used to determine the implementation requirements of an e-commerce large model corresponding to an e-commerce application scenario based on the implementation process of a general large model, the general large model being a basic model common to multiple application scenarios, the implementation process of the general large model including at least one of the following: a training process of the general large model, an inference process of the general large model, and the implementation requirements of the e-commerce large model including at least one of the following: training requirements of the e-commerce large model, and inference requirements of the e-commerce large model; selecting multiple callback components to be used and multiple processing components to be extended based on the model requirement information, wherein the multiple callback components are used to split the implementation process of the e-commerce large model, and the multiple processing components are used to extend the implementation process of the e-commerce large model to the implementation process of the general large model; and generating an e-commerce large model using the multiple callback components and the multiple processing components.

[0008] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored program, wherein, when the program is executed, it controls the device where the computer-readable storage medium is located to execute any of the above-described model generation methods.

[0009] According to another aspect of the embodiments of this application, an electronic device is also provided, including: a processor; and a memory connected to the processor, configured to provide the processor with instructions for processing the following steps: obtaining model requirement information, wherein the model requirement information is used to determine the implementation requirements of a target model corresponding to a target application scenario based on the implementation process of a pre-built initial model, the implementation process of the initial model including at least one of the following: the initial model training process, the initial model inference process, and the implementation requirements of the target model including at least one of the following: the target model training requirements, the target model inference requirements; selecting multiple callback components to be used and multiple processing components to be extended based on the model requirement information, wherein the multiple callback components are used to split the implementation process of the target model, and the multiple processing components are used to extend the implementation process of the target model to the implementation process of the initial model, the implementation process of the target model including at least one of the following: the target model training process, the target model inference process; and generating a target model using the multiple callback components and the multiple processing components.

[0010] In this embodiment of the application, model requirement information is obtained, wherein the model requirement information is used to determine the implementation requirements of the target model corresponding to the target application scenario based on the implementation process of the pre-built initial model. The implementation process of the initial model includes at least one of the following: the training process of the initial model and the inference process of the initial model. The implementation requirements of the target model include at least one of the following: the training requirements of the target model and the inference requirements of the target model. Further, multiple callback components to be used and multiple processing components to be extended are selected based on the model requirement information. The multiple callback components are used to split the implementation process of the target model, and the multiple processing components are used to extend the implementation process of the target model to the implementation process of the initial model. The implementation process of the target model includes at least one of the following: the training process of the target model and the inference process of the target model. On this basis, the target model is generated using the multiple callback components and the multiple processing components. Therefore, this application achieves the goal of generating the target model corresponding to the target application scenario through a callback / processing mechanism based on the model requirement information corresponding to the implementation process of the pre-built initial model. This achieves the technical effect of reducing the adaptability of the model generation process to multi-machine and multi-card training scenarios, reducing the difficulty of using the training framework and the switching cost during model training, and thus solving the technical problems of the high difficulty of using the training framework and the high switching cost of the model generation methods provided in related technologies.

[0011] It is worth noting that the general description above and the detailed description that follow are merely for illustrative purposes and do not constitute a limitation on this application. Attached Figure Description

[0012] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0013] Figure 1 This is a schematic diagram illustrating the application scenario of the model generation method in this application;

[0014] Figure 2 This is a schematic diagram of a model generation method according to Embodiment 1 of this application;

[0015] Figure 3 This is a schematic diagram illustrating an optional method of registering multiple callback components and determining multiple processing components using a trainer, according to Embodiment 1 of this application;

[0016] Figure 4 This is a schematic diagram of a model generation method according to Embodiment 2 of this application;

[0017] Figure 5 This is a schematic diagram of a model generation method according to Embodiment 3 of this application;

[0018] Figure 6 This is a schematic diagram of a model generation apparatus according to Embodiment 4 of this application;

[0019] Figure 7 This is a schematic diagram of an optional model generation apparatus according to Embodiment 4 of this application;

[0020] Figure 8 This is a schematic diagram of another optional model generation apparatus according to Embodiment 4 of this application;

[0021] Figure 9 This is a schematic diagram of another model generation apparatus according to Embodiment 4 of this application;

[0022] Figure 10 This is a schematic diagram of the structure of another model generation device according to Embodiment 4 of this application;

[0023] Figure 11 This is a structural block diagram of a computer terminal according to Embodiment 5 of this application. Detailed Implementation

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

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

[0026] The technical solution provided in this application is mainly implemented using large-scale model technology. Here, "large-scale model" refers to a deep learning model with a massive number of parameters, typically containing hundreds of millions, tens of billions, hundreds of billions, trillions, or even tens of trillions of parameters. Large-scale models can also be called foundation models. They are pre-trained using large-scale unlabeled corpora to produce pre-trained models with hundreds of millions of parameters. Such models can adapt to a wide range of downstream tasks and have good generalization ability. Examples include Large Language Models (LLMs) and multi-modal pre-training models.

[0027] It's important to note that in practical applications, large models can be fine-tuned using a small number of samples after pre-training, allowing them to be applied to various tasks. For example, large models can be widely used in Natural Language Processing (NLP) and computer vision, specifically in computer vision tasks such as Visual Question Answering (VQA), Image Captioning (IC), and Image Generation, as well as in NLP tasks such as text-based sentiment classification, text summarization, and machine translation. Therefore, the main application scenarios for large models include, but are not limited to, digital assistants, intelligent robots, search, online education, office software, e-commerce, and intelligent design.

[0028] First, some nouns or terms that appear in the description of the embodiments of this application shall be interpreted as follows.

[0029] Training process: The process by which a model generates a new model by updating its parameters through input from the dataset and backpropagation.

[0030] Reasoning process: The process by which the model, in a real-world scenario, takes in data and produces corresponding outputs.

[0031] Large Language Model (LLM): refers to an artificial intelligence model that possesses a certain degree of general-purpose capabilities.

[0032] Multi-machine, multi-GPU training: The process of using multiple nodes and multiple GPUs for joint training during LLM training.

[0033] To address the need for adapting to multi-machine, multi-GPU training scenarios and various training frameworks during LLM training, related technologies offer an accelerator (Huggingface accelerator) as a multi-machine, multi-GPU training solution. While it possesses relatively pure and easy-to-use LLM training abstraction capabilities, its drawbacks include: the accelerator's code is close to procedural programming, with numerous if-else structures, simplifying readability but reducing maintainability. Integrating new underlying frameworks requires significant code modifications, making it difficult to maintain. Furthermore, related technologies also provide a plugin (Torch-Lightning Plugin) to integrate multiple multi-machine, multi-GPU underlying frameworks in LLM training; however, its drawbacks include: complex plugin code architecture, poor readability, and difficult maintenance.

[0034] Addressing the issues of high usage difficulty and high switching costs associated with the underlying LLM training frameworks proposed in related technologies, the technical solution provided in this application adds a pluggable process based on an interface / processor (Hook / Processor) mechanism to the ModelScope trainer. This enables the LLM training process to adapt to various types of distributed training frameworks and multi-machine, multi-GPU training scenarios, thereby reducing the usage difficulty and switching costs of training frameworks during model training.

[0035] Example 1

[0036] According to an embodiment of this application, a model generation method is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0037] Considering the large number of model parameters in large models and the limited computing resources of mobile terminals, the model generation method provided in this application can be applied to, for example, Figure 1 The application scenarios shown are not limited to these. In, for example... Figure 1 In the application scenario shown, the large model is deployed on server 10. Server 10 can connect to one or more client devices 20 via a local area network (LAN), wide area network (WAN), internet connection, or other types of data network. These client devices 20 may include, but are not limited to, smartphones, tablets, laptops, PDAs, personal computers, smart home devices, and in-vehicle devices. Client devices 20 can interact with users through a graphical user interface to access the large model, thereby implementing the method provided in this embodiment.

[0038] Under the aforementioned operating environment, this application provides the following: Figure 2 The model generation method shown. Figure 2 This is a flowchart of a model generation method according to Embodiment 1 of this application, as follows: Figure 2 As shown, the model generation method includes:

[0039] Step S21: Obtain model requirement information, wherein the model requirement information is used to determine the implementation requirements of the target model corresponding to the target application scenario based on the implementation process of the pre-built initial model. The implementation process of the initial model includes at least one of the following: the training process of the initial model and the inference process of the initial model. The implementation requirements of the target model include at least one of the following: the training requirements of the target model and the inference requirements of the target model.

[0040] Step S22: Select multiple callback components to be used and multiple processing components to be expanded based on model requirement information. The multiple callback components are used to split the implementation process of the target model, and the multiple processing components are used to extend the implementation process of the target model to the implementation process of the initial model. The implementation process of the target model includes at least one of the following: the training process of the target model and the inference process of the target model.

[0041] Step S23: Generate the target model using multiple callback components and multiple processing components.

[0042] The aforementioned model requirements can be the training or inference requirements corresponding to the target model to be generated, obtained by customizing a pre-built initial model. This initial model can be a large-scale language model generated through a pre-built multi-machine, multi-GPU training framework. The implementation process of the initial model can be the overall training process of a pre-built general-purpose large-scale language model. For example, in application scenarios, the aforementioned model requirements can be determined by the processor of the multi-machine, multi-GPU training framework (such as DeepSpeedProcessor).

[0043] The model generation method provided in this application embodiment can be used to generate target models for target application scenarios. For example, the target application scenario may be a scenario involving large-scale language models in fields such as e-commerce, education, healthcare, conferences, social networks, financial products, logistics, and navigation. The target model is a large-scale language model generated for the aforementioned target application scenario based on customized training or inference requirements.

[0044] During the generation of the target model for the target application scenario, the aforementioned callback components can break down the implementation process of the target model into multiple sub-processes. For example, these callback components are multiple Hook components in the Hook / Processor mechanism. During the training or inference process of the target model, the aforementioned processing components can extend the implementation process of the target model to the implementation process of the initial model. For example, these processing components are multiple Processor components in the Hook / Processor mechanism.

[0045] Furthermore, the target model is generated using the aforementioned multiple callback components and multiple processing components. In other words, compared to related technologies, this application decomposes the implementation process of the target model and uses a callback / processing mechanism for the multiple sub-processes obtained from this decomposition to extend the implementation process of the target model to the implementation process of a pre-built initial model. Therefore, the technical solution for generating the target model provided by this application enables the training or inference process of the target model to adapt to various types of distributed underlying frameworks, adapt to multi-machine, multi-GPU training scenarios, and reduce the difficulty of using the underlying framework and the switching cost during the training or inference process of the target model.

[0046] In this embodiment of the application, model requirement information is obtained, wherein the model requirement information is used to determine the implementation requirements of the target model corresponding to the target application scenario based on the implementation process of the pre-built initial model. The implementation process of the initial model includes at least one of the following: the training process of the initial model and the inference process of the initial model. The implementation requirements of the target model include at least one of the following: the training requirements of the target model and the inference requirements of the target model. Further, multiple callback components to be used and multiple processing components to be extended are selected based on the model requirement information. The multiple callback components are used to split the implementation process of the target model, and the multiple processing components are used to extend the implementation process of the target model to the implementation process of the initial model. The implementation process of the target model includes at least one of the following: the training process of the target model and the inference process of the target model. On this basis, the target model is generated using the multiple callback components and the multiple processing components. Therefore, this application achieves the goal of generating the target model corresponding to the target application scenario through a callback / processing mechanism based on the model requirement information corresponding to the implementation process of the pre-built initial model. This achieves the technical effect of reducing the adaptability of the model generation process to multi-machine and multi-card training scenarios, reducing the difficulty of using the training framework and the switching cost during model training, and thus solving the technical problems of the high difficulty of using the training framework and the high switching cost of the model generation methods provided in related technologies.

[0047] In this embodiment of the application, the system consisting of a client device and a server can perform the following steps: the client device sends model requirement information to the server, the server performs the steps corresponding to the model generation method, selects multiple callback components to be used and multiple processing components to be expanded based on the model requirement information, and then uses the multiple callback components and multiple processing components to generate the target model, and returns the target model to the client (or provides the client with an interface for using the target model).

[0048] Specifically, the client determines the model requirement information corresponding to the target application scenario based on the implementation process of the pre-built initial model to determine the implementation requirements of the target model. The implementation process of the initial model includes at least one of the following: the training process of the initial model and the inference process of the initial model. The implementation requirements of the target model include at least one of the following: the training requirements of the target model and the inference requirements of the target model.

[0049] Specifically, the server selects multiple callback components to split the implementation process of the target model, and multiple processing components to extend the implementation process of the target model to the implementation process of the initial model. The aforementioned multiple callback components and multiple processing components will be used in the training or inference process of the target model.

[0050] It should be noted that, provided that the client device's operating resources can meet the deployment and operation conditions of the large model, the embodiments of this application can be performed on the client device.

[0051] In an optional embodiment, step S21 involves obtaining model requirement information, including the following method steps:

[0052] Step S211: Determine the implementation mode of the target model, wherein the implementation mode is used to select the implementation category of the target model, and the implementation category includes at least one of the following: training category, inference category;

[0053] Step S212: Obtain model requirement information based on implementation mode.

[0054] The model generation method provided in this application can be applied to the training and inference processes of the target model. Based on this, the implementation mode of the target model is determined according to the specific model generation requirements in the application scenario (i.e., used for the training process, the inference process, or both).

[0055] Furthermore, based on the training category in the implementation mode, the training requirements of the target model in the model requirement information are obtained; based on the inference category in the implementation mode, the inference requirements of the target model in the model requirement information are obtained.

[0056] In an optional embodiment, step S22 involves selecting multiple callback components to be used and multiple processing components to be expanded based on model requirement information, including the following method steps:

[0057] Step S221: Based on the model requirement information, determine the implementation device corresponding to the implementation mode;

[0058] Step S222 involves registering multiple callback components for the device.

[0059] Step S223: Based on the number and type of multiple callback components, determine the multiple processing components corresponding to the multiple callback components.

[0060] In the above optional embodiments, based on the model requirement information, the implementation device and the component information to be registered by the implementation device are determined, wherein the component information includes the callback component type and the number of callback components. Based on the component information, multiple callback components are registered by the implementation device, thereby determining multiple processing components to be used by the multiple callback components.

[0061] It is easy to understand that, through the technical solutions embodied in steps S221 to S223 above, this application adds a callback / processing mechanism to the implementation device, making it easier to adapt the implementation process of the target model to various types of distributed underlying frameworks.

[0062] In an optional embodiment, the implementation modes include a training mode and an inference mode. In step S221, based on the model requirement information, the implementation device corresponding to the implementation mode is determined, including the following method steps:

[0063] Step S2211: In response to the model requirement information being the model training requirement information, determine the trainer corresponding to the training mode;

[0064] Step S2212: In response to the model requirement information being the model inference requirement information, determine the inferencer corresponding to the inference mode.

[0065] In the above optional embodiments, the implementation device corresponding to the above implementation mode may include: a trainer corresponding to the training category and an inferencer corresponding to the inference category.

[0066] The following explanation uses the training process as an example to illustrate the model generation method provided in this application. The method of registering multiple callback components and determining multiple processing components using the trainer is as follows: Figure 3 As shown. This trainer can be used in the training process to generate target models for target application scenarios.

[0067] In an optional embodiment, step S222 involves registering multiple callback components by implementing the device, including the following method steps:

[0068] Step S2221: In response to the model requirement information, which is the model training requirement information, register multiple training callback components through the trainer;

[0069] Step S2222: In response to the model requirement information, which is the model inference requirement information, register multiple inference callback components through the inferencer.

[0070] Still as Figure 3 As shown, in one application scenario, based on the model training requirement information, the training process of the target model is divided into three sub-processes to be split. To this end, the first training callback component, the second training callback component, and the third training callback component corresponding to the three sub-processes are registered through the trainer. The component types of the first training callback component, the second training callback component, and the third training callback component are determined by the model training requirement information. Furthermore, the above component types can be pre-defined during the implementation process of building the initial model.

[0071] Similarly, in another application scenario, multiple inference callback components are registered using the inferencer based on model inference requirement information. The registration logic for the inference callback components can refer to the registration logic for the training callback components, and will not be elaborated here.

[0072] In an optional embodiment, in step S223, based on the number and type of multiple callback components, multiple processing components corresponding to the multiple callback components are determined, including the following method steps:

[0073] Step S2231: In response to the model requirement information being the model training requirement information, based on the number and type of multiple training callback components, determine the multiple training processing components corresponding to the multiple training callback components.

[0074] Step S2232: In response to the model requirement information being model inference requirement information, based on the number and type of multiple inference callback components, determine the multiple inference processing components corresponding to the multiple inference callback components.

[0075] Still as Figure 3 As shown, based on the model training requirements, the first training processing component corresponding to the first training callback component is determined according to the component type of the first callback component; the second training processing component corresponding to the second training callback component is determined according to the component type of the second training callback component; and the third training processing component corresponding to the third training callback component is determined according to the component type of the third training callback component. The processing actions corresponding to the first, second, and third training processing components can be determined based on the component type of the corresponding training callback component, or they can be determined based on predefined processing rules during the initial model construction process.

[0076] Similarly, in another application scenario, based on model inference requirements and the number and type of multiple inference callback components, multiple inference processing components corresponding to multiple inference callback components are determined. The logic for determining multiple inference processing components can refer to the registration logic for multiple training processing components, and will not be elaborated here.

[0077] In an optional embodiment, step S23 involves generating a target model using multiple callback components and multiple processing components, including the following method steps:

[0078] Step S231: The implementation process of the target model is split into multiple callback components;

[0079] Step S232: Inherit multiple processing components using a multi-machine, multi-card approach, and extend the implementation process of each callback component to the implementation process of the initial model to generate the target model.

[0080] Taking the implementation process as the training process as an example, the training process of the target model is split into the first training callback component, the second training callback component, and the third training callback component. Then, in the training, the first training processing component, the second training processing component, and the third training processing component are inherited in a multi-machine and multi-card manner. The training process corresponding to the first training processing action, the second training processing action, and the third training processing action is extended to the training process of the initial model in order to train the target model.

[0081] It is easy to understand that by extending the processing of the corresponding processing component (such as Processor) of the callback component (such as Hook) registered by the trainer or inferencer to the existing model implementation process (training process or inference process) through the above-described model generation process provided in the embodiments of this application, a pluggable mechanism is proposed. The processing of the corresponding processing component can be inserted into the existing model implementation process through the above-described trainer or inferencer, or the registration of the above-described callback component can be turned off through the above-described trainer or inferencer, thereby removing the processing of the corresponding processing component from the existing model implementation process.

[0082] The following example, taking the implementation process as a specific implementation method when the training process is implemented, further illustrates the scenario where the above trainer inserts the training process corresponding to the training processing component into the training process of an existing model.

[0083] like Figure 3 As shown, the trainer declares the following training callback components to be registered:

[0084] The first training callback component, LrSchedulerHook, is used to call back and determine the learning rate (Lr) decay training process.

[0085] The second training callback component, CheckpointHook, is used to call back and determine the training process corresponding to the checkpoint.

[0086] The third training callback component, OptimizerHook, is used to call back and determine the optimizer training process.

[0087] Furthermore, the trainer uses a callback module to determine multiple callback nodes, such as Figure 3The callback nodes 1 through 6 are shown below. For example: callback node 1 represents "before_run()"; callback node 2 represents "before_train_epoch()"; callback node 3 represents "before_train_iteration()"; callback node 4 represents "after_train_iteration()"; callback node 5 represents "after_train_epoch()"; and callback node 6 represents "after_run()".

[0088] It should be noted that during the training process, 1 epoch means training once using all the samples in the training set. Each training session uses batchsize samples from the training set (i.e., determines the number of samples for one training session). 1 iteration means training once using batchsize samples.

[0089] Furthermore, such as Figure 3 As shown, the first training callback component LrSchedulerHook is registered, and its callback trigger nodes include: callback node 1, callback node 2, and callback node 4. Then, the first training processing component LrSchedulerProcessor corresponding to the first training callback component LrSchedulerHook is determined. The corresponding first training process includes: initializing the learning rate scheduler (LrScheduler) step by step. For example, the processing actions corresponding to the first training process include: Initialize_Lr_Scheduler() and Step().

[0090] Furthermore, such as Figure 3 As shown, a second training callback component, CheckpointHook, is registered, with callback trigger nodes including: callback node 1, callback node 2, callback node 4, and callback node 6. Then, a second training processing component, CheckpointProcessor, is determined, and the corresponding second training process includes: preparing output, saving save points, deleting save points, and loading save points. For example, the processing actions corresponding to the second training process include: Prepare_output(), save_checkpoints(), remove_checkpoints(), and load_checkpoints().

[0091] Furthermore, such as Figure 3As shown, the third training callback component OptimizerHook is registered, and its callback trigger nodes include: callback node 1, callback node 3, and callback node 4; then, the third training processing component OptimizerProcessor is determined, and the corresponding third training process includes: initializing the optimizer, forward propagation, and backward propagation. For example, the processing actions corresponding to the third training process include: Initialize_Optimizer(), Backward(), and before_Foreward().

[0092] In addition, such as Figure 3 As shown, a fourth training processing component, DeepSpeedProcessor, can also be defined to customize the aforementioned training process. For example, the fourth training processing component, DeepSpeedProcessor, can define the processing actions to be executed and their order as: Initialize_Lr_Scheduler(), Step(), Initialize_Optimizer(), Backward(), Prepare_output(), save_checkpoints(), remove_checkpoints(), and load_checkpoints(). Then, the fourth training processing component is extended to the first training processing component, LrSchedulerProcessor, the second training processing component, CheckpointProcessor, and the third training processing component, OptimizerProcessor. In other words, the aforementioned fourth training processing component can be used to obtain model requirement information.

[0093] It should be noted that the aforementioned callback nodes are pre-defined process locations for adding a pluggable callback / processor mechanism.

[0094] In summary, based on the following Figure 3 The illustrated process shows that the three training callback components registered by the trainer work together to achieve backpropagation and save point storage during the training of the target model. By adopting a multi-machine, multi-GPU approach to inherit the above three training processing components, the first, second, and third training processes can be extended to the training process of the initial model.

[0095] Furthermore, the technical concepts provided in this application can not only be applied to multiple LLMs of ModelScope, but can also be further abstracted into an independent training framework for application in user-defined training processes, and can also be extended to inference processes.

[0096] In specific application scenarios, the implementation process of the initial model to be inserted can be customized according to the actual needs of the training or inference process, which is highly flexible and scalable.

[0097] It is readily understood that the model generation method provided in this application implements polymorphic inheritance through a Hook / Processor mechanism. Compared with the code that often uses if-else statements in related technologies, the code is concise, readable, and maintainable. Furthermore, the model generation method provided in this application avoids the use of dynamic patch code, facilitating the understanding of the specific implementation mechanism during static reading and enhancing readability. Moreover, through the pluggable implementation based on the Hook / Processor mechanism, the model generation method provided in this application can be dynamically extended to support various types of LLM distributed training frameworks.

[0098] In one alternative embodiment, a graphical user interface is provided via an electronic device, the content displayed by the graphical user interface at least partially comprising a model generation scene, and the model generation method further includes the following method steps:

[0099] Step S241: In response to the first touch operation applied to the graphical user interface, determine the implementation mode of the target model, wherein the implementation mode includes: training mode and inference mode;

[0100] Step S242: In response to the second touch operation applied to the graphical user interface, obtain the model requirement information corresponding to the implementation mode and the dataset corresponding to the implementation mode, wherein the dataset includes: training dataset and inference dataset;

[0101] Step S243: In response to the third touch operation applied to the graphical user interface, select multiple callback components and multiple processing components based on the model requirement information, split the implementation process of the target model into multiple callback components, and inherit multiple processing components in a multi-machine, multi-card manner, and extend the implementation process corresponding to the multiple callback components to the implementation process of the initial model, so as to generate the target model using the dataset.

[0102] In the above optional embodiments, the electronic device can be a terminal device or a cloud device; the electronic device can be a standalone device or a distributed cluster device. The graphical user interface displaying the model generation scenario can be provided by the model designer or the service developer. The above model generation scenario is the generation scenario of the target model in the target application scenario.

[0103] The first touch operation described above is used to support user-defined training and inference modes corresponding to the target model generation process. The second touch operation described above is used to support user-defined input of the implementation requirements of the target model and to specify the dataset to be used. The third touch operation described above is used to trigger the target model generation process.

[0104] It should be noted that the first, second, and third touch operations described above can all be operations performed by a user touching the display screen of the terminal device with their finger and interacting with the terminal device. These touch operations can include single-point touch and multi-point touch, where each touch point can be interacted with by clicking, long-pressing, pressing hard, or swiping. The first, second, and third touch operations can also be implemented using input devices such as a mouse or keyboard.

[0105] Through the above steps S241 to S242, this application embodiment provides a visual interactive method to implement the model generation method. This visual interactive method can provide the model generation scenario to the user more intuitively, so that the user can more conveniently customize the model generation requirements and generate the target model.

[0106] In one alternative embodiment, a graphical user interface is provided via an electronic device, the content displayed by the graphical user interface at least partially including a command response scenario, and the model generation method further includes the following method steps:

[0107] Step S251: Display the command input box and the question categories and question examples corresponding to the target application scenario in the graphical user interface. The question categories and question examples are used to prompt how to ask questions in the command input box.

[0108] Step S252: In response to the fourth touch operation applied to the graphical user interface, obtain the question information entered in the instruction input box based on the question category and question example;

[0109] Step S253: In response to the fifth touch operation applied to the graphical user interface, provide the answer information corresponding to the question within the graphical user interface.

[0110] In the above optional embodiments, the electronic device can be a terminal device or a cloud device, and the electronic device can be a standalone device or a distributed cluster device. The above command response scenario can be a question-and-answer scenario corresponding to the above target application scenario. The above graphical user interface displaying the command response scenario can be provided by the designer or service developer of the target model under the target application scenario.

[0111] In one application scenario, the graphical user interface (GUI) further includes a command input box, question categories, and question examples. The command input box supports users in initiating questions. Furthermore, the fourth touch operation can be a user inputting content in the command input box based on prompts from the question category and question examples, or a user selecting and confirming the question information from multiple candidate question categories and multiple candidate question examples.

[0112] For example, the above question categories can be multiple preset candidate question categories, including: writing emails, writing short essays, writing outlines, etc. The above question examples can include multiple preset question examples for each of the multiple candidate question categories, such as: "Please provide an introduction to writing emails for XX", "Please explain the rules for writing short essays for XX", etc.

[0113] After the electronic device receives the question information entered by the user in the command input box, upon detecting the aforementioned fifth touch operation, it uses the target model generated in the target application scenario according to the embodiments of this application to generate answer information corresponding to the question information, and then feeds the answer information back to the graphical user interface. The aforementioned fifth touch operation can be a touch operation for submitting question information.

[0114] Through the above steps S251 to S252, this application embodiment provides a visual interactive method to answer user questions using a target model. This visual interactive method can combine the target model generation method in the target application scenario to provide users with an intuitive question and answer tool, enabling users to conveniently use the dynamically generated target model to obtain more accurate answer information.

[0115] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation portals are provided for users to choose to authorize or refuse.

[0116] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0117] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, they can also be implemented by hardware. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as read-only memory (ROM), random access memory (RAM), magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0118] Example 2

[0119] In the operating environment as described in Example 1, this application provides as follows: Figure 4 Another model generation method is shown. Figure 4 This is a flowchart of a model generation method according to Embodiment 2 of this application, as follows: Figure 4 As shown, the model generation method includes:

[0120] Step S41: Obtain model requirement information through the first processing component, wherein the first processing component is used to provide the implementation requirements of the target model. The model requirement information is determined based on the implementation process of the initial model. The implementation requirements of the target model include at least one of the following: the training requirements of the target model and the inference requirements of the target model. The implementation process of the initial model includes at least one of the following: the training process of the initial model and the inference process of the initial model.

[0121] Step S42: Select multiple callback components to be used and multiple second processing components to be extended based on model requirement information. The multiple callback components are used to split the implementation process of the target model, and the multiple second processing components are used to extend the implementation process of the target model to the implementation process of the initial model. The implementation process of the target model includes at least one of the following: the training process of the target model and the inference process of the target model.

[0122] Step S43: Inherit multiple second processing components using a multi-machine, multi-card approach, and extend the implementation process of each callback component to the implementation process of the initial model to generate the target model.

[0123] The aforementioned first processing component allows users to customize the implementation requirements of the target model by pre-constructing the implementation process of the initial model. The model requirement information can be the training or inference requirements corresponding to the target model to be generated in the target application scenario. The initial model can be a large-scale language model generated through a pre-constructed multi-machine, multi-GPU training framework. The implementation process of the initial model can be the overall training process of a pre-constructed general-purpose large-scale language model. For example, the aforementioned first processing component could be DeepSpeedProcessor.

[0124] The model generation method provided in this application embodiment can be used to generate target models for target application scenarios. For example, the target application scenario may be a scenario involving large-scale language models in fields such as e-commerce, education, healthcare, conferences, social networks, financial products, logistics, and navigation. The target model is a large-scale language model generated for the aforementioned target application scenario based on customized training or inference requirements.

[0125] In the process of generating a target model for a target application scenario, the aforementioned callback components can break down the implementation process of the target model into multiple sub-processes. For example, the aforementioned callback components are multiple Hook components in the Hook / Processor mechanism.

[0126] Furthermore, during the training or inference process of the target model, the above-mentioned multiple second processing components are inherited in a multi-machine, multi-card manner, and the implementation process corresponding to the multiple second processing components is extended to the implementation process of the initial model. For example, the above-mentioned multiple second processing components are LrSchedulerProcessor, CheckpointProcessor and OptimizerProcessor in the Hook / Processor mechanism.

[0127] In other words, compared with related technologies, this application decomposes the implementation process of the target model and uses a callback / processing mechanism for the multiple sub-processes obtained from the decomposition to extend the implementation process of the target model defined by multiple second processing components to the implementation process of a pre-built initial model. Therefore, the technical solution for generating the target model provided by this application enables the training or inference process of the target model to adapt to various types of distributed underlying frameworks, adapt to multi-machine, multi-GPU training scenarios, and reduce the difficulty of using the underlying framework and the switching cost during the training or inference process of the target model.

[0128] In this embodiment, model requirement information is obtained through a first processing component. The first processing component provides the implementation requirements of the target model. The model requirement information is determined based on the implementation process of the initial model. The implementation requirements of the target model include at least one of the following: training requirements of the target model and inference requirements of the target model. The implementation process of the initial model includes at least one of the following: training process of the initial model and inference process of the initial model. Further, multiple callback components to be used and multiple second processing components to be extended are selected based on the model requirement information. The multiple callback components are used to split the implementation process of the target model, and the multiple second processing components are used to extend the implementation process of the target model to the implementation process of the initial model. The implementation process of the target model includes at least one of the following: training process of the target model and inference process of the target model. On this basis, multiple second processing components are inherited in a multi-machine, multi-card manner, and the implementation processes corresponding to the multiple callback components are extended to the implementation process of the initial model to generate the target model. Therefore, this application achieves the goal of generating the target model corresponding to the target application scenario through a callback / processing mechanism based on the model requirement information corresponding to the implementation process of the pre-built initial model. This achieves the technical effect of reducing the adaptability of the model generation process to multi-machine and multi-card training scenarios, reducing the difficulty of using the training framework and the switching cost during model training, and thus solving the technical problems of the high difficulty of using the training framework and the high switching cost of the model generation methods provided in related technologies.

[0129] It should be noted that the preferred implementation of this embodiment can be found in the relevant description in Embodiment 1, and will not be repeated here.

[0130] Example 3

[0131] In the operating environment as described in Example 1, this application provides as follows: Figure 5 Another model generation method is shown. Figure 5 This is a flowchart of a model generation method according to Embodiment 3 of this application, as follows: Figure 5 As shown, the model generation method includes:

[0132] Step S51: Obtain model requirement information. The model requirement information is used to determine the implementation requirements of the e-commerce big model corresponding to the e-commerce application scenario based on the implementation process of the general big model. The general big model is a basic model that is common to multiple application scenarios. The implementation process of the general big model includes at least one of the following: the training process of the general big model and the inference process of the general big model. The implementation requirements of the e-commerce big model include at least one of the following: the training requirements of the e-commerce big model and the inference requirements of the e-commerce big model.

[0133] Step S52: Select multiple callback components to be used and multiple processing components to be extended based on the model requirement information. The multiple callback components are used to split the implementation process of the e-commerce big model, and the multiple processing components are used to extend the implementation process of the e-commerce big model to the implementation process of the general big model.

[0134] Step S53: Generate a large e-commerce model using multiple callback components and multiple processing components.

[0135] The aforementioned model requirements can be the training or inference requirements corresponding to the e-commerce large model to be generated, obtained through the process of building a general large model. This general large model can be generated using a pre-built multi-machine, multi-GPU training framework.

[0136] The model generation method provided in this application can be used to generate large-scale e-commerce models for e-commerce application scenarios. These large-scale e-commerce models are large-scale language models generated for the aforementioned e-commerce application scenarios based on customized training or inference requirements.

[0137] In the process of generating a large e-commerce model for e-commerce application scenarios, the aforementioned callback components can break down the implementation process of the large e-commerce model into multiple sub-processes. For example, these callback components are multiple Hook components in the Hook / Processor mechanism. During the training or inference process of the large e-commerce model, the aforementioned processing components can extend the implementation process of their respective processing components to the implementation process of a general large model. For example, these processing components are multiple Processor components in the Hook / Processor mechanism.

[0138] Furthermore, the aforementioned multiple callback components and multiple processing components are used to generate a large e-commerce model. In other words, compared to related technologies, this application breaks down the implementation process of the large e-commerce model and uses a callback / processing mechanism for the multiple sub-processes obtained from this breakdown, extending the implementation process of the multiple processing components to the implementation process of a general large model. Therefore, the technical solution for generating a large e-commerce model provided by this application enables the training or inference process of the large e-commerce model to adapt to various types of distributed underlying frameworks, adapt to multi-machine, multi-GPU training scenarios, and reduce the difficulty of using the underlying framework and the switching cost during the training or inference process of the large e-commerce model.

[0139] In this embodiment, model requirement information is obtained, which is used to determine the implementation requirements of the e-commerce large model corresponding to the e-commerce application scenario based on the implementation process of the general large model. The implementation process of the general large model includes at least one of the following: the training process of the general large model and the inference process of the general large model. The implementation requirements of the e-commerce large model include at least one of the following: the training requirements of the e-commerce large model and the inference requirements of the e-commerce large model. Further, multiple callback components to be used and multiple processing components to be extended are selected based on the model requirement information. The multiple callback components are used to decompose the implementation process of the e-commerce large model, and the multiple processing components are used to extend the implementation process of the e-commerce large model to the implementation process of the general large model. The implementation process of the e-commerce large model includes at least one of the following: the training process of the e-commerce large model and the inference process of the e-commerce large model. On this basis, the e-commerce large model is generated using the multiple callback components and the multiple processing components. Therefore, this application achieves the goal of generating e-commerce large models corresponding to e-commerce application scenarios through callback / processing mechanisms based on the model requirement information corresponding to the implementation process of a general large model. This achieves the technical effect of reducing the adaptability of the model generation process to multi-machine and multi-card training scenarios, reducing the difficulty of using the training framework and the switching cost during model training, and thus solving the technical problems of high difficulty of using the training framework and high switching cost in the model generation methods provided in related technologies.

[0140] In this embodiment of the application, the system consisting of a client device and a server can perform the following steps: the client device sends model requirement information to the server, the server performs the steps corresponding to the model generation method, selects multiple callback components to be used and multiple processing components to be expanded based on the model requirement information, and then uses the multiple callback components and multiple processing components to generate an e-commerce large model, and returns the e-commerce large model to the client (or provides the client with an interface for using the e-commerce large model).

[0141] Specifically, the client determines the model requirement information corresponding to the e-commerce application scenario based on the implementation process of the general large model to determine the implementation requirements of the e-commerce large model. The implementation process of the general large model includes at least one of the following: the training process of the general large model and the inference process of the general large model. The implementation requirements of the e-commerce large model include at least one of the following: the training requirements of the e-commerce large model and the inference requirements of the e-commerce large model.

[0142] Specifically, the server selects multiple callback components to break down the implementation process of the e-commerce big model, and multiple processing components to extend the implementation process of the e-commerce big model to the implementation process of a general big model. The aforementioned multiple callback components and multiple processing components will be used in the training or inference process of the e-commerce big model.

[0143] It should be noted that, provided that the client device's operating resources can meet the deployment and operation conditions of the large model, the embodiments of this application can be performed on the client device.

[0144] It should be noted that the preferred implementation of this embodiment can be found in the relevant descriptions in Embodiments 1 and 2, and will not be repeated here.

[0145] Example 4

[0146] According to an embodiment of this application, an apparatus embodiment for implementing the model generation method provided in Embodiment 1 above is also provided. Figure 6 This is a schematic diagram of a model generation apparatus according to Embodiment 4 of this application, as shown below. Figure 6 As shown, the device includes:

[0147] The acquisition module 601 is used to acquire model requirement information, wherein the model requirement information is used to determine the implementation requirements of the target model corresponding to the target application scenario based on the implementation process of the pre-built initial model. The implementation process of the initial model includes at least one of the following: the training process of the initial model and the inference process of the initial model. The implementation requirements of the target model include at least one of the following: the training requirements of the target model and the inference requirements of the target model.

[0148] The selection module 602 is used to select multiple callback components to be used and multiple processing components to be expanded based on model requirement information. The multiple callback components are used to split the implementation process of the target model, and the multiple processing components are used to extend the implementation process of the target model to the implementation process of the initial model. The implementation process of the target model includes at least one of the following: the training process of the target model and the inference process of the target model.

[0149] The generation module 603 is used to generate the target model using multiple callback components and multiple processing components.

[0150] Optionally, the acquisition module 601 is further configured to: determine the implementation mode of the target model, wherein the implementation mode is used to select the implementation category of the target model, and the implementation category includes at least one of the following: training category, inference category; and acquire model requirement information based on the implementation mode.

[0151] Optionally, the selection module 602 is further configured to: determine the implementation device corresponding to the implementation mode based on the model requirement information; register multiple callback components through the implementation device; and determine multiple processing components corresponding to the multiple callback components based on the number and type of the multiple callback components.

[0152] Optionally, the implementation modes include: training mode and inference mode. The selection module 602 is further configured to: determine the trainer corresponding to the training mode in response to model requirement information (model training requirement information); and determine the inferencer corresponding to the inference mode in response to model requirement information (model inference requirement information).

[0153] Optionally, the selection module 602 is further configured to: register multiple training callback components through the trainer in response to model requirement information (model training requirement information); and register multiple inference callback components through the inferencer in response to model requirement information (model inference requirement information).

[0154] Optionally, the selection module 602 is further configured to: in response to model requirement information (model training requirement information), determine multiple training processing components corresponding to multiple training callback components based on the number and type of multiple training callback components; and in response to model requirement information (model inference requirement information), determine multiple inference processing components corresponding to multiple inference callback components based on the number and type of multiple inference callback components.

[0155] Optionally, the above-mentioned generation module 603 is further used to: split the implementation process of the target model into multiple callback components;

[0156] Multiple processing components are inherited using a multi-machine, multi-card approach. The implementation processes of the multiple callback components are extended to the implementation process of the initial model to generate the target model.

[0157] Optionally, Figure 7 This is a schematic diagram of an optional model generation apparatus according to Embodiment 4 of this application, as shown below. Figure 7 As shown, an electronic device provides a graphical user interface (GUI), the content displayed by the GUI at least partially comprising a model-generated scene, the device including, in addition to Figure 6 In addition to all the modules shown, it also includes: a first response module 604, used to respond to a first touch operation applied to the graphical user interface, determine the implementation mode of the target model, wherein the implementation mode includes: training mode and inference mode; respond to a second touch operation applied to the graphical user interface, obtain the model requirement information corresponding to the implementation mode, and the dataset corresponding to the implementation mode, wherein the dataset includes: training dataset and inference dataset; respond to a third touch operation applied to the graphical user interface, select multiple callback components and multiple processing components based on the model requirement information, split the implementation process of the target model into multiple callback components, and inherit multiple processing components in a multi-machine, multi-card manner, respectively extending the implementation process corresponding to multiple callback components to the implementation process of the initial model, so as to generate the target model using the dataset.

[0158] Optionally, Figure 8This is a schematic diagram of another optional model generation apparatus according to Embodiment 4 of this application, as shown below. Figure 8 As shown, an electronic device provides a graphical user interface (GUI), the content displayed by the GUI at least partially including a command response scenario, the device including... Figure 7 In addition to all the modules shown, it also includes: a second response module 605, used to display the command input box and the question categories and question examples corresponding to the target application scenario in the graphical user interface, wherein the question categories and question examples are used to prompt how to ask a question in the command input box; responding to the fourth touch operation on the graphical user interface to obtain the question information entered in the command input box based on the question categories and question examples; and responding to the fifth touch operation on the graphical user interface to provide the answer information corresponding to the question information in the graphical user interface.

[0159] It should be noted that the acquisition module 601, selection module 602, and generation module 603 mentioned above correspond to steps S21 to S23 in Embodiment 1. The three modules and their corresponding steps implement the same instances and application scenarios, but are not limited to the content disclosed in Embodiment 1. It should be noted that the above modules or units can be hardware or software components stored in memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n). The above modules can also be part of a device and run in the computer terminal 10 provided in Embodiment 1.

[0160] In this embodiment, the acquisition module 601 acquires model requirement information, which is used to determine the implementation requirements of the target model corresponding to the target application scenario based on the implementation process of the pre-built initial model. The implementation process of the initial model includes at least one of the following: the training process of the initial model and the inference process of the initial model. The implementation requirements of the target model include at least one of the following: the training requirements of the target model and the inference requirements of the target model. Further, the selection module 602 selects multiple callback components to be used and multiple processing components to be extended based on the model requirement information. The multiple callback components are used to split the implementation process of the target model, and the multiple processing components are used to extend the implementation process of the target model to the implementation process of the initial model. The implementation process of the target model includes at least one of the following: the training process of the target model and the inference process of the target model. On this basis, the generation module 603 generates the target model using the multiple callback components and the multiple processing components. Therefore, this application achieves the goal of generating the target model corresponding to the target application scenario through a callback / processing mechanism based on the model requirement information corresponding to the implementation process of the pre-built initial model. This achieves the technical effect of reducing the adaptability of the model generation process to multi-machine and multi-card training scenarios, reducing the difficulty of using the training framework and the switching cost during model training, and thus solving the technical problems of the high difficulty of using the training framework and the high switching cost of the model generation methods provided in related technologies.

[0161] According to an embodiment of this application, another apparatus embodiment for implementing the model generation method in Embodiment 2 above is also provided. Figure 9 This is a schematic diagram of another model generation apparatus according to Embodiment 4 of this application, as shown below. Figure 9 As shown, the device includes:

[0162] The acquisition module 901 is used to acquire model requirement information through the first processing component, wherein the first processing component is used to provide the implementation requirements of the target model, the model requirement information is determined based on the implementation process of the initial model, the implementation requirements of the target model include at least one of the following: the training requirements of the target model, the inference requirements of the target model, and the implementation process of the initial model includes at least one of the following: the training process of the initial model, the inference process of the initial model.

[0163] The selection module 902 is used to select multiple callback components to be used and multiple second processing components to be extended based on model requirement information. The multiple callback components are used to split the implementation process of the target model, and the multiple second processing components are used to extend the implementation process of the target model to the implementation process of the initial model. The implementation process of the target model includes at least one of the following: the training process of the target model and the inference process of the target model.

[0164] The generation module 903 is used to inherit multiple second processing components in a multi-machine, multi-card manner, and extend the implementation process of the multiple callback components to the implementation process of the initial model to generate the target model.

[0165] It should be noted that the acquisition module 901, selection module 902, and generation module 903 mentioned above correspond to steps S41 to S43 in Embodiment 2. The three modules and their corresponding steps implement the same instances and application scenarios, but are not limited to the content disclosed in Embodiment 2. It should be noted that the above modules or units can be hardware or software components stored in memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n). The above modules can also be part of a device and run in the computer terminal 10 provided in Embodiment 1.

[0166] In this embodiment, an acquisition module 901 is used to acquire model requirement information through a first processing component. The first processing component provides the implementation requirements of the target model. The model requirement information is determined based on the implementation process of the initial model. The implementation requirements of the target model include at least one of the following: training requirements of the target model and inference requirements of the target model. The implementation process of the initial model includes at least one of the following: training process of the initial model and inference process of the initial model. Further, a selection module 902 selects multiple callback components to be used and multiple second processing components to be extended based on the model requirement information. The multiple callback components are used to split the implementation process of the target model, and the multiple second processing components are used to extend the implementation process of the target model to the implementation process of the initial model. The implementation process of the target model includes at least one of the following: training process of the target model and inference process of the target model. Based on this, a generation module 903 inherits multiple second processing components in a multi-machine, multi-card manner, and extends the implementation processes corresponding to the multiple callback components to the implementation process of the initial model to generate the target model. Therefore, this application achieves the goal of generating the target model corresponding to the target application scenario through a callback / processing mechanism based on the model requirement information corresponding to the implementation process of the pre-built initial model. This achieves the technical effect of reducing the adaptability of the model generation process to multi-machine and multi-card training scenarios, reducing the difficulty of using the training framework and the switching cost during model training, and thus solving the technical problems of the high difficulty of using the training framework and the high switching cost of the model generation methods provided in related technologies.

[0167] According to an embodiment of this application, another apparatus embodiment for implementing the model generation method in embodiment 3 above is also provided. Figure 10 This is a schematic diagram of the structure of another model generation device according to Embodiment 4 of this application, as shown below. Figure 10 As shown, the device includes:

[0168] The acquisition module 1001 is used to acquire model requirement information. The model requirement information is used to determine the implementation requirements of the e-commerce big model corresponding to the e-commerce application scenario based on the implementation process of the general big model. The general big model is a basic model that is common to multiple application scenarios. The implementation process of the general big model includes at least one of the following: the training process of the general big model and the inference process of the general big model. The implementation requirements of the e-commerce big model include at least one of the following: the training requirements of the e-commerce big model and the inference requirements of the e-commerce big model.

[0169] The selection module 1002 is used to select multiple callback components to be used and multiple processing components to be extended based on the model requirement information. The multiple callback components are used to decompose the implementation process of the e-commerce big model, and the multiple processing components are used to extend the implementation process of the e-commerce big model to the implementation process of the general big model.

[0170] Module 1003 is used to generate a large e-commerce model using multiple callback components and multiple processing components.

[0171] It should be noted that the acquisition module 1001, selection module 1002, and generation module 1003 mentioned above correspond to steps S51 to S53 in Embodiment 3. The three modules and their corresponding steps implement the same instances and application scenarios, but are not limited to the content disclosed in Embodiment 3. It should be noted that the above modules or units can be hardware or software components stored in memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n). The above modules can also be part of a device and run in the computer terminal 10 provided in Embodiment 1.

[0172] In this embodiment, the acquisition module 1001 acquires model requirement information, which is used to determine the implementation requirements of the e-commerce large model corresponding to the e-commerce application scenario based on the implementation process of the general large model. The implementation process of the general large model includes at least one of the following: the training process of the general large model and the inference process of the general large model. The implementation requirements of the e-commerce large model include at least one of the following: the training requirements of the e-commerce large model and the inference requirements of the e-commerce large model. Further, the selection module 1002 selects multiple callback components to be used and multiple processing components to be extended based on the model requirement information. The multiple callback components are used to split the implementation process of the e-commerce large model, and the multiple processing components are used to extend the implementation process of the e-commerce large model to the implementation process of the general large model. The implementation process of the e-commerce large model includes at least one of the following: the training process of the e-commerce large model and the inference process of the e-commerce large model. On this basis, the generation module 1003 generates the e-commerce large model using the multiple callback components and the multiple processing components. Therefore, this application achieves the goal of generating e-commerce large models corresponding to e-commerce application scenarios through callback / processing mechanisms based on the model requirement information corresponding to the implementation process of a general large model. This achieves the technical effect of reducing the adaptability of the model generation process to multi-machine and multi-card training scenarios, reducing the difficulty of using the training framework and the switching cost during model training, and thus solving the technical problems of high difficulty of using the training framework and high switching cost in the model generation methods provided in related technologies.

[0173] It should be noted that the preferred implementation of this embodiment can be found in the relevant descriptions in Embodiments 1, 2 and 3, and will not be repeated here.

[0174] Example 5

[0175] According to an embodiment of this application, a computer terminal is also provided. This computer terminal can be any computer terminal device in a group of computer terminals. Optionally, in this embodiment, the aforementioned computer terminal can also be replaced by a mobile terminal or other terminal device.

[0176] Optionally, in this embodiment, the computer terminal may be located in at least one of a plurality of network devices in a computer network.

[0177] In this embodiment, the computer terminal described above can execute program code for the following steps in the model generation method: obtaining model requirement information, wherein the model requirement information is used to determine the implementation requirements of the target model corresponding to the target application scenario based on the implementation process of the pre-built initial model, the implementation process of the initial model includes at least one of the following: the training process of the initial model, the inference process of the initial model, and the implementation requirements of the target model include at least one of the following: the training requirements of the target model, the inference requirements of the target model; selecting multiple callback components to be used and multiple processing components to be extended based on the model requirement information, wherein the multiple callback components are used to split the implementation process of the target model, and the multiple processing components are used to extend the implementation process of the target model to the implementation process of the initial model, the implementation process of the target model includes at least one of the following: the training process of the target model, the inference process of the target model; and generating the target model using the multiple callback components and the multiple processing components.

[0178] Optionally, Figure 11 This is a structural block diagram of a computer terminal according to Embodiment 5 of this application, as follows: Figure 11 As shown, the computer terminal 110 may include: one or more (only one is shown in the figure) processors 1102, memory 1104, memory controller 1106, and peripheral interface 1108, wherein the peripheral interface 1108 is connected to a radio frequency module, an audio module, and a display.

[0179] The memory 1104 can be used to store software programs and modules, such as the program instructions / modules corresponding to the model generation method and apparatus in this embodiment. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, thereby realizing the aforementioned model generation method. The memory 1104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 1104 may further include memory remotely located relative to the processor, and these remote memories can be connected to the computer terminal 110 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0180] The processor 1102 can invoke information and application programs stored in the memory via a transmission device to perform the following steps: obtaining model requirement information, wherein the model requirement information is used to determine the implementation requirements of the target model corresponding to the target application scenario based on the implementation process of a pre-built initial model, the implementation process of the initial model includes at least one of the following: the initial model training process, the initial model inference process, and the implementation requirements of the target model include at least one of the following: the target model training requirements, the target model inference requirements; selecting multiple callback components to be used and multiple processing components to be extended based on the model requirement information, wherein the multiple callback components are used to split the implementation process of the target model, and the multiple processing components are used to extend the implementation process of the target model to the implementation process of the initial model, the implementation process of the target model includes at least one of the following: the target model training process, the target model inference process; and generating the target model using the multiple callback components and the multiple processing components.

[0181] Optionally, the processor 1102 may also execute program code that performs the following steps: determining the implementation mode of the target model, wherein the implementation mode is used to select the implementation category of the target model, and the implementation category includes at least one of the following: training category, inference category; and obtaining model requirement information based on the implementation mode.

[0182] Optionally, the processor 1102 may also execute program code that performs the following steps: determining the implementation device corresponding to the implementation mode based on the model requirement information; registering multiple callback components through the implementation device; and determining multiple processing components corresponding to the multiple callback components based on the number and type of the multiple callback components.

[0183] Optionally, the processor 1102 may also execute program code that performs the following steps: in response to model requirement information, determines the trainer corresponding to the training mode; in response to model requirement information, determines the inferencer corresponding to the inference mode.

[0184] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: registering multiple training callback components through the trainer in response to model requirement information (model training requirement information); and registering multiple inference callback components through the inferencer in response to model requirement information (model inference requirement information).

[0185] Optionally, the processor 1102 may also execute program code that performs the following steps: in response to model requirement information (model training requirement information), determine multiple training processing components corresponding to multiple training callback components based on the number and type of multiple training callback components; in response to model requirement information (model inference requirement information), determine multiple inference processing components corresponding to multiple inference callback components based on the number and type of multiple inference callback components.

[0186] Optionally, the processor 1102 may also execute program code that performs the following steps: splitting the implementation process of the target model into multiple callback components; inheriting multiple processing components using a multi-machine, multi-card approach, and extending the implementation process corresponding to the multiple callback components to the implementation process of the initial model to generate the target model.

[0187] Optionally, the processor 1102 may also execute program code with the following steps: in response to a first touch operation applied to the graphical user interface, determining the implementation mode of the target model, wherein the implementation mode includes a training mode and an inference mode; in response to a second touch operation applied to the graphical user interface, obtaining model requirement information corresponding to the implementation mode and a dataset corresponding to the implementation mode, wherein the dataset includes a training dataset and an inference dataset; in response to a third touch operation applied to the graphical user interface, selecting multiple callback components and multiple processing components based on the model requirement information, splitting the implementation process of the target model into multiple callback components, and inheriting multiple processing components using a multi-machine, multi-card approach, extending the implementation process corresponding to the multiple callback components to the implementation process of the initial model, so as to generate the target model using the dataset.

[0188] Optionally, the processor 1102 may also execute program code that performs the following steps: displaying a command input box and a question category and question example corresponding to the target application scenario within the graphical user interface, wherein the question category and question example are used to prompt how to ask a question in the command input box; responding to a fourth touch operation on the graphical user interface to obtain the question information entered in the command input box based on the question category and question example; and responding to a fifth touch operation on the graphical user interface to provide feedback on the answer information corresponding to the question information within the graphical user interface.

[0189] The processor 1102 can invoke information and application programs stored in the memory via a transmission device to perform the following steps: obtaining model requirement information through a first processing component, wherein the first processing component is used to provide the implementation requirements of the target model, the model requirement information is determined based on the implementation process of the initial model, the implementation requirements of the target model include at least one of the following: training requirements of the target model, inference requirements of the target model, and the implementation process of the initial model includes at least one of the following: training process of the initial model, inference process of the initial model; selecting multiple callback components to be used and multiple second processing components to be extended based on the model requirement information, wherein the multiple callback components are used to split the implementation process of the target model, and the multiple second processing components are used to extend the implementation process of the target model to the implementation process of the initial model, the implementation process of the target model includes at least one of the following: training process of the target model, inference process of the target model; inheriting multiple second processing components in a multi-machine, multi-card manner, and extending the implementation processes corresponding to the multiple callback components to the implementation process of the initial model respectively, thereby generating the target model.

[0190] The processor 1102 can invoke information and applications stored in the memory via a transmission device to perform the following steps: obtaining model requirement information, wherein the model requirement information is used to determine the implementation requirements of the e-commerce large model corresponding to the e-commerce application scenario based on the implementation process of the general large model, the general large model is a basic model common to multiple application scenarios, the implementation process of the general large model includes at least one of the following: the training process of the general large model, the inference process of the general large model, and the implementation requirements of the e-commerce large model include at least one of the following: the training requirements of the e-commerce large model, the inference requirements of the e-commerce large model; selecting multiple callback components to be used and multiple processing components to be extended based on the model requirement information, wherein the multiple callback components are used to decompose the implementation process of the e-commerce large model, and the multiple processing components are used to extend the implementation process of the e-commerce large model to the implementation process of the general large model; and generating the e-commerce large model using the multiple callback components and the multiple processing components.

[0191] This application provides a solution for a computer terminal to implement a model generation method. By acquiring model requirement information, which is used to determine the implementation requirements of a target model corresponding to a target application scenario based on the implementation process of a pre-built initial model, the implementation process of the initial model includes at least one of the following: the initial model's training process and the initial model's inference process. The implementation requirements of the target model include at least one of the following: the target model's training requirements and the target model's inference requirements. Further, based on the model requirement information, multiple callback components to be used and multiple processing components to be extended are selected. The multiple callback components are used to decompose the implementation process of the target model, and the multiple processing components are used to extend the implementation process of the target model to the implementation process of the initial model. The implementation process of the target model includes at least one of the following: the target model's training process and the target model's inference process. Based on this, the target model is generated using the multiple callback components and the multiple processing components. Therefore, this application achieves the goal of generating the target model corresponding to the target application scenario through a callback / processing mechanism based on the model requirement information corresponding to the implementation process of the pre-built initial model. This achieves the technical effect of reducing the adaptability of the model generation process to multi-machine and multi-card training scenarios, reducing the difficulty of using the training framework and the switching cost during model training, and thus solving the technical problems of the high difficulty of using the training framework and the high switching cost of the model generation methods provided in related technologies.

[0192] Those skilled in the art will understand that Figure 11 The structure shown is for illustrative purposes only. The computer terminal can also be a smartphone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, or a mobile Internet device (MID). Figure 11 This does not limit the structure of the aforementioned computer terminal. For example, computer terminal 110 may also include components that are more advanced than those described above. Figure 11 The more or fewer components shown (such as network interfaces, display devices, etc.), or having the same Figure 11 The different configurations shown.

[0193] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, ROM, RAM, disk or optical disk, etc.

[0194] Example 6

[0195] According to embodiments of this application, a computer-readable storage medium is also provided. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the model generation methods provided in Embodiments 1, 2, and 3.

[0196] Optionally, in this embodiment, the storage medium may be located in any computer terminal in a group of computer terminals in a computer network, or in any mobile terminal in a group of mobile terminals.

[0197] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: obtaining model requirement information, wherein the model requirement information is used to determine the implementation requirements of the target model corresponding to the target application scenario based on the implementation process of a pre-built initial model, the implementation process of the initial model includes at least one of the following: the training process of the initial model, the inference process of the initial model, and the implementation requirements of the target model include at least one of the following: the training requirements of the target model, the inference requirements of the target model; selecting multiple callback components to be used and multiple processing components to be extended based on the model requirement information, wherein the multiple callback components are used to split the implementation process of the target model, and the multiple processing components are used to extend the implementation process of the target model to the implementation process of the initial model, the implementation process of the target model includes at least one of the following: the training process of the target model, the inference process of the target model; and generating the target model using the multiple callback components and the multiple processing components.

[0198] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: determining the implementation mode of the target model, wherein the implementation mode is used to select the implementation category of the target model, and the implementation category includes at least one of the following: training category, inference category; obtaining model requirement information based on the implementation mode.

[0199] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: determining the implementation device corresponding to the implementation mode based on the model requirement information; registering multiple callback components through the implementation device; and determining multiple processing components corresponding to the multiple callback components based on the number and type of the multiple callback components.

[0200] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: determining the trainer corresponding to the training mode in response to model training requirement information; and determining the inferencer corresponding to the inference mode in response to model inference requirement information.

[0201] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: registering multiple training callback components through the trainer in response to model requirement information (model training requirement information); and registering multiple inference callback components through the inferencer in response to model requirement information (model inference requirement information).

[0202] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: in response to model requirement information (model training requirement information), determining multiple training processing components corresponding to multiple training callback components based on the number and type of multiple training callback components; in response to model requirement information (model inference requirement information), determining multiple inference processing components corresponding to multiple inference callback components based on the number and type of multiple inference callback components.

[0203] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: splitting the implementation process of the target model into multiple callback components; inheriting multiple processing components using a multi-machine, multi-card approach, and extending the implementation processes corresponding to the multiple callback components to the implementation process of the initial model to generate the target model.

[0204] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: in response to a first touch operation applied to the graphical user interface, determining the implementation mode of the target model, wherein the implementation mode includes a training mode and an inference mode; in response to a second touch operation applied to the graphical user interface, obtaining model requirement information corresponding to the implementation mode and a dataset corresponding to the implementation mode, wherein the dataset includes a training dataset and an inference dataset; in response to a third touch operation applied to the graphical user interface, selecting multiple callback components and multiple processing components based on the model requirement information, splitting the implementation process of the target model into multiple callback components, and inheriting multiple processing components using a multi-machine, multi-card approach, respectively extending the implementation process corresponding to the multiple callback components to the implementation process of the initial model, so as to generate the target model using the dataset.

[0205] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: displaying a command input box and a question category and question example corresponding to the target application scenario within a graphical user interface, wherein the question category and question example are used to prompt how to ask a question in the command input box; responding to a fourth touch operation on the graphical user interface to obtain the question information entered in the command input box based on the question category and question example; and responding to a fifth touch operation on the graphical user interface to provide the answer information corresponding to the question information within the graphical user interface.

[0206] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: obtaining model requirement information through a first processing component, wherein the first processing component is used to provide the implementation requirements of the target model, the model requirement information is determined based on the implementation process of the initial model, the implementation requirements of the target model include at least one of the following: training requirements of the target model, inference requirements of the target model, and the implementation process of the initial model includes at least one of the following: training process of the initial model, inference process of the initial model; selecting multiple callback components to be used and multiple second processing components to be extended based on the model requirement information, wherein the multiple callback components are used to split the implementation process of the target model, and the multiple second processing components are used to extend the implementation process of the target model to the implementation process of the initial model, the implementation process of the target model includes at least one of the following: training process of the target model, inference process of the target model; inheriting multiple second processing components in a multi-machine, multi-card manner, and extending the implementation processes corresponding to the multiple callback components to the implementation process of the initial model respectively, thereby generating the target model.

[0207] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: obtaining model requirement information, wherein the model requirement information is used to determine the implementation requirements of the e-commerce large model corresponding to the e-commerce application scenario based on the implementation process of the general large model, the general large model is a basic model common to multiple application scenarios, the implementation process of the general large model includes at least one of the following: the training process of the general large model, the inference process of the general large model, and the implementation requirements of the e-commerce large model include at least one of the following: the training requirements of the e-commerce large model, the inference requirements of the e-commerce large model; selecting multiple callback components to be used and multiple processing components to be extended based on the model requirement information, wherein the multiple callback components are used to split the implementation process of the e-commerce large model, and the multiple processing components are used to extend the implementation process of the e-commerce large model to the implementation process of the general large model; generating the e-commerce large model using the multiple callback components and the multiple processing components.

[0208] This application provides a solution for a computer-readable storage medium for implementing a model generation method. By acquiring model requirement information, which is used to determine the implementation requirements of a target model corresponding to a target application scenario based on the implementation process of a pre-built initial model, the implementation process of the initial model includes at least one of the following: the initial model's training process and the initial model's inference process. The implementation requirements of the target model include at least one of the following: the target model's training requirements and the target model's inference requirements. Further, based on the model requirement information, multiple callback components to be used and multiple processing components to be extended are selected. The multiple callback components are used to decompose the implementation process of the target model, and the multiple processing components are used to extend the implementation process of the target model to the implementation process of the initial model. The implementation process of the target model includes at least one of the following: the target model's training process and the target model's inference process. Based on this, the target model is generated using the multiple callback components and the multiple processing components. Therefore, this application achieves the goal of generating the target model corresponding to the target application scenario through a callback / processing mechanism based on the model requirement information corresponding to the implementation process of the pre-built initial model. This achieves the technical effect of reducing the adaptability of the model generation process to multi-machine and multi-card training scenarios, reducing the difficulty of using the training framework and the switching cost during model training, and thus solving the technical problems of the high difficulty of using the training framework and the high switching cost of the model generation methods provided in related technologies.

[0209] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0210] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0211] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.

[0212] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0213] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0214] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, ROM, RAM, portable hard drives, magnetic disks, or optical disks.

[0215] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A model generation method, characterized in that, include: Obtain model requirement information, wherein the model requirement information is used to determine the implementation requirements of the target model corresponding to the target application scenario based on the implementation process of the pre-built initial model, the implementation process of the initial model includes at least one of the following: the training process of the initial model, the inference process of the initial model, and the implementation requirements of the target model include at least one of the following: the training requirements of the target model, the inference requirements of the target model. Based on the model requirement information, multiple callback components to be used and multiple processing components to be expanded are selected. The multiple callback components are used to decompose the implementation process of the target model, and the multiple processing components are used to extend the implementation process of the target model to the implementation process of the initial model. The implementation process of the target model includes at least one of the following: the training process of the target model and the inference process of the target model. The target model is generated using the plurality of callback components and the plurality of processing components; A graphical user interface is provided via an electronic device, the content displayed by the graphical user interface at least partially comprising a model generation scene, the model generation method further comprising: In response to a first touch operation applied to the graphical user interface, the implementation mode of the target model is determined, wherein the implementation mode includes: a training mode and an inference mode; In response to a second touch operation applied to the graphical user interface, the system obtains the model requirement information corresponding to the implementation mode and the dataset corresponding to the implementation mode, wherein the dataset includes: a training dataset and an inference dataset; In response to a third touch operation applied to the graphical user interface, the plurality of callback components and the plurality of processing components are selected based on the model requirement information. The implementation process of the target model is split into the plurality of callback components, and the plurality of processing components are inherited in a multi-machine, multi-card manner. The implementation process corresponding to the plurality of callback components is extended to the implementation process of the initial model, so as to generate the target model using the dataset.

2. The model generation method according to claim 1, characterized in that, Obtaining the model requirement information includes: Determine the implementation mode of the target model, wherein the implementation mode is used to select the implementation category of the target model, and the implementation category includes at least one of the following: training category, inference category; The model requirement information is obtained based on the implementation mode.

3. The model generation method according to claim 2, characterized in that, Based on the model requirement information, the selected callback components to be used and the selected processing components to be expanded include: Based on the model requirement information, determine the implementation device corresponding to the implementation mode; The multiple callback components are registered through the aforementioned implementation device; Based on the number and type of the multiple callback components, determine the multiple processing components corresponding to the multiple callback components.

4. The model generation method according to claim 3, characterized in that, The implementation modes include: a training mode and an inference mode. Based on the model requirement information, the implementation devices corresponding to the implementation modes include: In response to the model requirement information being model training requirement information, the trainer corresponding to the training mode is determined; In response to the model requirement information being model inference requirement information, the inference engine corresponding to the inference mode is determined.

5. The model generation method according to claim 4, characterized in that, Registering the plurality of callback components through the implementation device includes: In response to the model requirement information, which is the model training requirement information, multiple training callback components are registered through the trainer; In response to the model requirement information, which is the model inference requirement information, multiple inference callback components are registered through the inferencer.

6. The model generation method according to claim 5, characterized in that, Based on the number and type of the multiple callback components, the multiple processing components corresponding to the multiple callback components are determined to include: In response to the model requirement information being the model training requirement information, multiple training processing components corresponding to the multiple training callback components are determined based on the number and type of the multiple training callback components. In response to the model requirement information being the model inference requirement information, multiple inference processing components corresponding to the multiple inference callback components are determined based on the number and type of the multiple inference callback components.

7. The model generation method according to claim 1, characterized in that, Generating the target model using the plurality of callback components and the plurality of processing components includes: The implementation process of the target model is broken down into the multiple callback components; The multiple processing components are inherited using a multi-machine, multi-card approach. The implementation processes corresponding to the multiple callback components are extended to the implementation process of the initial model to generate the target model.

8. The model generation method according to claim 1, characterized in that, The model generation method further includes providing a graphical user interface via an electronic device, wherein the content displayed by the graphical user interface at least partially includes a command response scenario, and the model generation method further includes: The graphical user interface displays a command input box and the question categories and question examples corresponding to the target application scenario. The question categories and question examples are used to prompt how to ask a question in the command input box. In response to a fourth touch operation applied to the graphical user interface, the system obtains the question information entered in the instruction input box based on the question category and the question example; In response to a fifth touch operation applied to the graphical user interface, the system provides feedback within the graphical user interface on the answer to the question.

9. A model generation method, characterized in that, include: The model requirement information is obtained through a first processing component, wherein the first processing component is used to provide the implementation requirements of the target model, the model requirement information is determined based on the implementation process of the initial model, and the implementation requirements of the target model include at least one of the following: the training requirements of the target model, the inference requirements of the target model, and the implementation process of the initial model includes at least one of the following: the training process of the initial model, the inference process of the initial model. Based on the model requirement information, multiple callback components to be used and multiple second processing components to be extended are selected. The multiple callback components are used to decompose the implementation process of the target model, and the multiple second processing components are used to extend the implementation process of the target model to the implementation process of the initial model. The implementation process of the target model includes at least one of the following: the training process of the target model and the inference process of the target model. The multiple second processing components are inherited using a multi-machine, multi-card approach. The implementation processes corresponding to the multiple callback components are extended to the implementation process of the initial model to generate the target model. A graphical user interface is provided via an electronic device, the content displayed by the graphical user interface at least partially comprising a model generation scene, the model generation method further comprising: In response to a first touch operation applied to the graphical user interface, the implementation mode of the target model is determined, wherein the implementation mode includes: a training mode and an inference mode; In response to a second touch operation applied to the graphical user interface, the system obtains the model requirement information corresponding to the implementation mode and the dataset corresponding to the implementation mode, wherein the dataset includes: a training dataset and an inference dataset; In response to a third touch operation applied to the graphical user interface, the plurality of callback components and the plurality of second processing components are selected based on the model requirement information. The implementation process of the target model is split into the plurality of callback components, and the plurality of second processing components are inherited in a multi-machine, multi-card manner. The implementation process corresponding to the plurality of callback components is extended to the implementation process of the initial model, so as to generate the target model using the dataset.

10. A model generation method, characterized in that, include: Obtain model requirement information, wherein the model requirement information is used to determine the implementation requirements of the e-commerce big model corresponding to the e-commerce application scenario based on the implementation process of the general big model. The general big model is a basic model common to multiple application scenarios. The implementation process of the general big model includes at least one of the following: the training process of the general big model and the inference process of the general big model. The implementation requirements of the e-commerce big model include at least one of the following: the training requirements of the e-commerce big model and the inference requirements of the e-commerce big model. Based on the model requirement information, multiple callback components to be used and multiple processing components to be extended are selected. The multiple callback components are used to decompose the implementation process of the e-commerce big model, and the multiple processing components are used to extend the implementation process of the e-commerce big model to the implementation process of the general big model. The e-commerce big model is generated using the multiple callback components and the multiple processing components; A graphical user interface is provided via an electronic device, the content displayed by the graphical user interface at least partially comprising a model generation scene, the model generation method further comprising: In response to a first touch operation applied to the graphical user interface, the implementation mode of the e-commerce big data model is determined, wherein the implementation mode includes: training mode and inference mode; In response to a second touch operation applied to the graphical user interface, the system obtains the model requirement information corresponding to the implementation mode and the dataset corresponding to the implementation mode, wherein the dataset includes: a training dataset and an inference dataset; In response to a third touch operation applied to the graphical user interface, the multiple callback components and multiple processing components are selected based on the model requirement information. The implementation process of the e-commerce big model is split into the multiple callback components, and the multiple processing components are inherited in a multi-machine, multi-card manner. The implementation process corresponding to the multiple callback components is extended to the implementation process of the general big model, so as to generate the e-commerce big model using the dataset.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored executable program, wherein, when the executable program is executed, it controls the device on which the storage medium is located to perform the model generation method according to any one of claims 1 to 10.

12. A model generation system, characterized in that, include: processor; A memory, connected to the processor, is used to provide the processor with instructions to perform the following processing steps: Obtain model requirement information, wherein the model requirement information is used to determine the implementation requirements of the target model corresponding to the target application scenario based on the implementation process of the pre-built initial model, the implementation process of the initial model includes at least one of the following: the training process of the initial model, the inference process of the initial model, and the implementation requirements of the target model include at least one of the following: the training requirements of the target model, the inference requirements of the target model. Based on the model requirement information, multiple callback components to be used and multiple processing components to be expanded are selected. The multiple callback components are used to decompose the implementation process of the target model, and the multiple processing components are used to extend the implementation process of the target model to the implementation process of the initial model. The implementation process of the target model includes at least one of the following: the training process of the target model and the inference process of the target model. The target model is generated using the plurality of callback components and the plurality of processing components; In response to a first touch operation applied to a graphical user interface, the implementation mode of the target model is determined, wherein the implementation mode includes: a training mode and an inference mode; In response to a second touch operation applied to the graphical user interface, the system obtains the model requirement information corresponding to the implementation mode and the dataset corresponding to the implementation mode, wherein the dataset includes: a training dataset and an inference dataset; In response to a third touch operation applied to the graphical user interface, the plurality of callback components and the plurality of processing components are selected based on the model requirement information. The implementation process of the target model is split into the plurality of callback components, and the plurality of processing components are inherited in a multi-machine, multi-card manner. The implementation process corresponding to the plurality of callback components is extended to the implementation process of the initial model, so as to generate the target model using the dataset.