Machine learning model training method, task processing method, text generation method, information processing method based on machine learning model and model training platform
By introducing the screening module into the large model, the problem that the large model cannot effectively supervise the quality of the generated results is solved, and the quality of the generated results can be controlled and improved.
Patent Information
- Application Number
- CN202410319821.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-19
- Publication Date
- 2025-09-26
AI Technical Summary
Large models cannot effectively supervise the quality of generated results when predicting the next word or character, resulting in poor quality of generated results.
Introducing a screening module into the large model enables it to have both generation and quality assessment capabilities. The screening module is used to perform quality screening on feature data, making the quality of the generated results controllable.
The quality of the generated results is controlled, the quality of the generated results is improved, and the increase in the amount of calculation is avoided.
Smart Images

Figure CN120706494A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of this specification relate to the field of computer technology, and in particular to a machine learning model training method, a task processing method, a text generation method, an information processing method based on a machine learning model, and a model training platform. Background Art
[0002] With the rapid development of artificial intelligence and natural language processing technologies, big models have become a hot research area in recent years. Big models refer to neural network models based on deep learning. By training on large-scale corpora, big models can predict the next likely word or character.
[0003] However, when predicting the next possible word or character, the large model cannot effectively supervise the quality of the prediction results, and thus cannot control the quality of the generated results, resulting in poor quality of the generated results. Summary of the Invention
[0004] In view of this, embodiments of this specification provide a machine learning model training method. One or more embodiments of this specification also involve a task processing method, a text generation method, an information processing method based on a machine learning model, a model training platform, a machine learning model training device, a task processing device, a text generation device, an information processing device based on a machine learning model, a computing device, a computer-readable storage medium, and a computer program product to address technical deficiencies in the prior art.
[0005] According to a first aspect of the embodiments of this specification, a machine learning model training method is provided, comprising:
[0006] Obtaining a machine learning model to be trained and training data for a target task, wherein the machine learning model includes a feature processing module, a screening module, and a prediction module, the machine learning model is pre-configured with model parameters, the screening module is connected to the feature processing module, and the prediction module is connected to the feature processing module and the screening module, respectively;
[0007] Input the training data into the feature processing module to obtain training features;
[0008] Input the training features into the screening module for quality screening to obtain training feature screening information;
[0009] Input the training features and the training feature screening information into the prediction module to obtain the training prediction results;
[0010] Based on the training prediction results, the model parameters of the machine learning model are adjusted to obtain the trained target model.
[0011] According to a second aspect of the embodiments of this specification, a task processing method is provided, including:
[0012] Get the task data of the target task;
[0013] Input the task data into the target model corresponding to the target task, and obtain the feature data output by the feature processing module in the target model, wherein the target model includes a feature processing module, a screening module and a prediction module, the screening module is connected to the feature processing module, and the prediction module is connected to the feature processing module and the screening module respectively;
[0014] Inputting the feature data into the screening module for quality screening to obtain feature screening information;
[0015] The feature data and feature screening information are input into the prediction module to obtain the target results.
[0016] According to a third aspect of the embodiments of this specification, a text generation method is provided, comprising:
[0017] Get the task data of the text generation task;
[0018] Inputting the task data into the text generation model to obtain feature data output by a feature processing module in the text generation model, wherein the text generation model includes a feature processing module, a screening module, and a prediction module, the screening module is connected to the feature processing module, and the prediction module is connected to the feature processing module and the screening module respectively;
[0019] Inputting the feature data into the screening module for quality screening to obtain feature screening information;
[0020] The feature data and feature screening information are input into the prediction module to obtain the target text.
[0021] According to a fourth aspect of the embodiments of this specification, there is provided an information processing method based on a machine learning model, comprising:
[0022] receiving a task generation request, wherein the task generation request includes request information;
[0023] Based on the request information, a target model is obtained, wherein the target model includes a feature processing module, a screening module, and a prediction module. The screening module is connected to the feature processing module, and the prediction module is connected to the feature processing module and the screening module respectively. The screening module is used to perform quality screening on the feature data output by the feature processing module to obtain feature screening information. The prediction module is used to obtain a generation result based on the feature data output by the feature processing module and the feature screening information output by the screening module.
[0024] Based on the target model, task information is generated, wherein the task information is used to perform the target task.
[0025] According to a fifth aspect of the embodiments of this specification, there is provided a model training platform, comprising a request interface unit and a model unit;
[0026] A request interface unit, configured to receive a model training request, wherein the model training request includes request information;
[0027] A model unit is used to prepare a machine learning model to be trained and training data for a target task based on request information, wherein the machine learning model includes a feature processing module, a screening module and a prediction module, the machine learning model is pre-configured with model parameters, the screening module is connected to the feature processing module, and the prediction module is connected to the feature processing module and the screening module respectively; the training data is input into the feature processing module to obtain training features; the training features are input into the screening module for quality screening to obtain training feature screening information; the training features and the training feature screening information are input into the prediction module to obtain training prediction results; based on the training prediction results, the model parameters of the machine learning model are adjusted to obtain a trained target model.
[0028] According to a sixth aspect of the embodiments of this specification, a machine learning model training method is provided, including:
[0029] a first acquisition module configured to acquire a machine learning model to be trained and training data for a target task, wherein the machine learning model includes a feature processing module, a screening module, and a prediction module, the machine learning model is pre-configured with model parameters, the screening module is connected to the feature processing module, and the prediction module is connected to the feature processing module and the screening module, respectively;
[0030] A first input module is configured to input training data into the feature processing module to obtain training features;
[0031] The second input module is configured to input the training features into the screening module for quality screening to obtain training feature screening information;
[0032] a third input module, configured to input the training features and the training feature screening information into the prediction module to obtain a training prediction result;
[0033] The adjustment module is configured to adjust the model parameters of the machine learning model based on the training prediction results to obtain a trained target model.
[0034] According to a seventh aspect of the embodiments of this specification, a task processing method is provided, including:
[0035] A second acquisition module is configured to acquire task data of a target task;
[0036] a fourth input module configured to input task data into a target model corresponding to the target task, and obtain feature data output by a feature processing module in the target model, wherein the target model includes a feature processing module, a screening module, and a prediction module, the screening module is connected to the feature processing module, and the prediction module is connected to the feature processing module and the screening module respectively;
[0037] a fifth input module, configured to input the feature data into the screening module for quality screening to obtain feature screening information;
[0038] The sixth input module is configured to input the feature data and feature screening information into the prediction module to obtain the target result.
[0039] According to an eighth aspect of the embodiments of this specification, a text generation method is provided, comprising:
[0040] A third acquisition module is configured to acquire task data of the text generation task;
[0041] a seventh input module configured to input the task data into the text generation model and obtain feature data output by the feature processing module in the text generation model, wherein the text generation model includes a feature processing module, a screening module, and a prediction module, the screening module is connected to the feature processing module, and the prediction module is connected to the feature processing module and the screening module respectively;
[0042] An eighth input module is configured to input the feature data into the screening module for quality screening to obtain feature screening information;
[0043] The ninth input module is configured to input the feature data and feature screening information into the prediction module to obtain the target text.
[0044] According to a ninth aspect of the embodiments of this specification, there is provided an information processing method based on a machine learning model, comprising:
[0045] A first receiving module is configured to receive a task generation request, wherein the task generation request includes request information;
[0046] a fourth acquisition module configured to acquire a target model based on the request information, wherein the target model includes a feature processing module, a screening module, and a prediction module, the screening module being connected to the feature processing module, the prediction module being connected to the feature processing module and the screening module, respectively, the screening module being configured to perform quality screening on feature data output by the feature processing module to obtain feature screening information, and the prediction module being configured to obtain a generation result based on the feature data output by the feature processing module and the feature screening information output by the screening module;
[0047] The generation module is configured to generate task information based on the target model, wherein the task information is used to execute the target task.
[0048] According to a tenth aspect of the embodiments of this specification, a computing device is provided, including:
[0049] memory and processor;
[0050] The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions. When the computer programs / instructions are executed by the processor, the steps of the method provided in the first aspect, the second aspect, the third aspect, or the fourth aspect are implemented.
[0051] According to the eleventh aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores a computer program / instruction, which, when executed by a processor, implements the steps of the method provided in the first aspect, second aspect, third aspect, or fourth aspect above.
[0052] According to the twelfth aspect of the embodiments of this specification, a computer program product is provided, comprising a computer program / instruction, which, when executed by a processor, implements the steps of the method provided in the first aspect, second aspect, third aspect, or fourth aspect above.
[0053] The machine learning model training method provided by one embodiment of the present specification includes: obtaining the training data of the machine learning model to be trained and the target task, wherein the machine learning model includes a feature processing module, a screening module and a prediction module, the machine learning model is pre-configured with model parameters, the screening module is connected to the feature processing module, and the prediction module is connected to the feature processing module and the screening module respectively; inputting the training data into the feature processing module to obtain training features; inputting the training features into the screening module for quality screening to obtain training feature screening information; inputting the training features and the training feature screening information into the prediction module to obtain training prediction results; based on the training prediction results, adjusting the model parameters of the machine learning model to obtain a trained target model. By integrating the screening module into the machine learning model, the machine learning model has both generation capabilities and quality assessment capabilities, thereby utilizing the feature screening information output by the screening module to achieve efficient generation and result screening, automatically achieving controllable quality of the generated results, and improving the quality of the generated results. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 This is a flowchart of a machine learning model training method provided by one embodiment of this specification;
[0055] Figure 2 This is a flowchart of a task processing method provided by one embodiment of this specification;
[0056] Figure 3This is a process flow chart of a task processing method provided by one embodiment of this specification;
[0057] Figure 4 is a flowchart of a text generation method provided by one embodiment of this specification;
[0058] Figure 5 This is a flowchart of an information processing method based on a machine learning model provided by one embodiment of this specification;
[0059] Figure 6 is a process flow chart of another task processing method provided by one embodiment of this specification;
[0060] Figure 7 This is a schematic diagram of the structure of a model training platform provided by one embodiment of this specification;
[0061] Figure 8 This is a schematic diagram of the structure of a machine learning model training device provided by one embodiment of this specification;
[0062] Figure 9 This is a structural diagram of a task processing device provided by one embodiment of this specification;
[0063] Figure 10 This is a structural diagram of a text generation device provided by an embodiment of this specification;
[0064] Figure 11 This is a schematic diagram of the structure of an information processing device based on a machine learning model provided by one embodiment of this specification;
[0065] Figure 12 This is a structural block diagram of a computing device provided by one embodiment of this specification. DETAILED DESCRIPTION
[0066] The following description sets forth many specific details to facilitate a thorough understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the scope of this specification. Therefore, this specification is not limited to the specific implementations disclosed below.
[0067] The terms used in one or more embodiments of this specification are for the purpose of describing specific embodiments only and are not intended to limit one or more embodiments of this specification. The singular forms "a," "the," and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.
[0068] It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0069] In addition, 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, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0070] In one or more embodiments of this specification, a large model refers to a deep learning model with large-scale model parameters, typically containing hundreds of millions, tens of billions, hundreds of billions, trillions, or even more than ten trillion model parameters. A large model can also be called a foundation model / foundation model (Foundation Model 1). The large model is pre-trained on a large-scale unlabeled corpus to produce a pre-trained model with more than 100 million parameters. This model can adapt to a wide range of downstream tasks and has good generalization capabilities, such as a large-scale language model (LLM, Large Language Model 1) and a multi-modal pre-training model (multi-modal pre-training model 1).
[0071] In actual applications, large models only require a small number of samples to fine-tune the pre-trained model and can be applied to different tasks. Large models can be widely used in natural language processing (NLP), computer vision and other fields. Specifically, they can be applied to computer vision tasks such as visual question answering (VQA), image description (IC), image generation, as well as natural language processing tasks such as text-based sentiment classification, text summary generation, and machine translation. The main application scenarios of large models include digital assistants, intelligent robots, search, online education, office software, e-commerce, intelligent design, etc.
[0072] First, the terms involved in one or more embodiments of this specification are explained.
[0073] Value scoring model: refers to a deep learning model used to evaluate or score the relative value and quality of certain data fragments or entire segments, and can perform quality scoring on given data.
[0074] Convolutional Neural Networks (CNN) model: a multi-layer deep learning model with forward propagation and backpropagation, and a convolution kernel (filter) for processing feature data.
[0075] Recurrent Neural Network (RNN) model: A recursive deep learning model that processes vector representations recursively and connects intermediate layers in a chain-like manner.
[0076] Long Short-Term Memory (LSTM) model: A deep learning model that has the ability to memorize both long-term and short-term information and has a convolutional filter for processing feature data.
[0077] Deep Self-Attention Model (Transformer Model): A deep learning architecture based on the attention mechanism for processing sequence data such as natural language.
[0078] Bidirectional Encoder Representations from Transformers (BERT) is a special Transformer model trained using a bidirectional Transformer encoder and large-scale unlabeled text data.
[0079] Supervised Fine-Tunning (SFT): A technique in machine learning, especially deep learning, that further learns and optimizes a pre-trained model for a specific task.
[0080] LoRA (Low-Rank Adaptation of Large Language Mode ls): is an efficient neural network training method that indirectly trains some dense layers in the neural network by optimizing the rank decomposition matrix of the dense layer changes during the adaptation process, while keeping the pre-trained weights unchanged, effectively reducing the cost of full parameter fine-tuning.
[0081] Tensor Processing Unit (TPU): Optimized for processing large-scale tensor operations, particularly in deep learning, such as neural network training and inference. Compared to general-purpose processors like CPUs or GPUs, TPUs offer higher performance and energy efficiency through a customized hardware architecture and instruction set. They excel at performing matrix multiplication, convolution, and other calculations commonly used in machine learning models.
[0082] Neural Processing Unit (NPU): An application-specific integrated circuit (ASIC) designed specifically for neural network algorithm computations, aiming to improve the efficiency and speed of running artificial intelligence applications. NPUs are particularly well-suited for executing complex neural network models, including but not limited to tasks such as image recognition, speech recognition, and natural language processing. Similar to TPUs, NPUs focus on providing highly parallel processing capabilities to achieve fast neural network computations and typically perform well in low-power environments. Consequently, they are often used in scenarios such as mobile devices, embedded systems, and data centers.
[0083] Application-Specific Integrated Circuit (ASIC): A custom chip designed and manufactured for a specific application. In an ASIC, the circuit design is fixed and cannot be changed; once manufactured, its functionality is permanently defined.
[0084] Field-Programmable Gate Array (FPGA): An integrated circuit with exceptional flexibility that allows users to reconfigure the internal logic structure to achieve different circuit functions after the device leaves the factory. An FPGA consists of a large number of programmable logic blocks, input and output units, embedded memory blocks, and other resources. By writing a design in a hardware description language (such as Verilog or VHDL) and compiling and configuring it using EDA tools, users can reprogram the FPGA multiple times in a short period of time to adapt to changing application requirements.
[0085] With the rapid development of artificial intelligence and natural language processing technologies, large models have become a hot research area in recent years. Large models refer to neural network models based on deep learning. Through training on large corpora, they can predict the next possible word or character. However, large models cannot effectively evaluate the quality of generated text, control the quality of generated text, or effectively select text, words, or characters during the generation process. Furthermore, using a separate model to monitor the quality of currently generated text significantly increases model deployment and inference costs.
[0086] To this end, the embodiments of this specification propose a solution for integrating the value scoring model into the large model, that is, adding a screening module to the large model so that the large model has both generation capability and quality assessment capability (scoring capability). Moreover, since the input of the screening module is the feature data originally generated during the reasoning process of the large model, and the amount of quality screening calculation in the screening module is very small, the efficient reasoning strategy proposed in the embodiments of this specification can realize real-time scoring, sorting and selection of the model generation sequence without increasing the amount of calculation, thereby achieving controllable quality of the generated text.
[0087] Specifically, an embodiment of this specification proposes a machine learning model training method, including: obtaining training data of a machine learning model to be trained and a target task, wherein the machine learning model includes a feature processing module, a screening module and a prediction module, the machine learning model is pre-configured with model parameters, the screening module is connected to the feature processing module, and the prediction module is connected to the feature processing module and the screening module, respectively; inputting the training data into the feature processing module to obtain training features; inputting the training features into the screening module for quality screening to obtain training feature screening information; inputting the training features and the training feature screening information into the prediction module to obtain training prediction results; based on the training prediction results, adjusting the model parameters of the machine learning model to obtain a trained target model.
[0088] In this specification, a machine learning model training method is provided. This specification also involves a task processing method, a text generation method, an information processing method based on a machine learning model, a model training platform, a machine learning model training device, a task processing device, a text generation device, an information processing device based on a machine learning model, a computing device, a computer-readable storage medium and a computer program product, which are described in detail one by one in the following embodiments.
[0089] See also Figure 1 , Figure 1 A flowchart of a machine learning model training method provided by one embodiment of this specification is shown, which specifically includes the following steps:
[0090] Step 102: Obtain the machine learning model to be trained and the training data of the target task, wherein the machine learning model includes a feature processing module, a screening module and a prediction module, the machine learning model is pre-configured with model parameters, the screening module is connected to the feature processing module, and the prediction module is connected to the feature processing module and the screening module respectively.
[0091] Specifically, the machine learning model to be trained can process data of different modalities, such as image data, audio data, text data, etc. There are many target tasks, such as generation tasks, classification tasks, etc.
[0092] Taking generation tasks as an example, there are many types of generation tasks, such as summary generation, translation generation, and answer generation. If the target task is a generation task, the cluster learning model to be trained is a generation model. A generation model is a deep learning model with generation capabilities used to implement generation tasks. Based on the modality of the data processed by the generation model, generation models include but are not limited to image generation models, text generation models, and video generation models. Based on model type, generation models include but are not limited to CNN models, RNN models, LSTM models, Transformer models, and BERT models.
[0093] The training data of the target task is the processing object of the model training process. The training process of the target model is supervised training, that is, the training data carries the actual training results. The actual training results are the generation targets of the target model, and the training prediction results are the prediction results of the target model. There are many ways to obtain the training data of the target task, and the specific selection is based on the actual situation. The embodiments of this specification do not impose any restrictions on this. In the first possible implementation method of this specification, the training data of the target task can be read from other data acquisition devices or databases. In the second possible implementation method of this specification, the training data of the target task sent by the terminal device can be received. In the third possible implementation method of this specification, sample data of the target task can be obtained, and the sample data can be sampled and quality evaluated to obtain training data.
[0094] It should be noted that the machine learning model to be trained can be an untrained original machine learning model. In this case, when the model parameters of the machine learning model are adjusted using the training data of the target task, the parameters of the feature processing module, the screening module, and the prediction module are adjusted. The machine learning model to be trained can also be a machine learning model trained based on the sample data of the target task. In this case, considering that the amount of computation required to train the target model is very large, when fine-tuning the machine learning model trained based on the sample data of the target task based on the training data, the LoRA method can be used to improve computational efficiency. That is, when adjusting the model parameters of the machine learning model using the training data of the target task, the parameters of the screening module are adjusted. In addition, LoRA also retrains the model's generative capabilities, that is, it plays a dual role in generating solutions and evaluating them.
[0095] In an optional embodiment of the present specification, the training data includes positive training data and negative training data; the training data for obtaining the target task includes:
[0096] Get sample data for the target task;
[0097] Use the machine learning model to sample sample data to obtain training data;
[0098] The training data is quality evaluated and divided into positive training data and negative training data according to the quality evaluation results.
[0099] It should be noted that there are many ways to obtain sample data for the target task, and the specific selection depends on the actual situation. The embodiments of this specification do not impose any restrictions on this. In the first possible implementation method of this specification, the sample data of the target task can be read from other data acquisition devices or databases. In the second possible implementation method of this specification, the sample data of the target task sent by the terminal device can be received. The methods of sampling sample data using a machine learning model include but are not limited to random seed sampling strategies, top-k sampling strategies, top-p sampling strategies, and the like.
[0100] In practical applications, there are multiple ways to evaluate the quality of training data, and the specific method to be used depends on the actual situation. This specification does not impose any restrictions on this. In one possible implementation of this specification, the training data can be input into a data evaluation model to obtain a quality evaluation result of the training data. In another possible implementation of this specification, the training data can be compared with the sample data to obtain a quality evaluation result of the training data.
[0101] Furthermore, training data with quality evaluation results greater than a preset evaluation threshold can be determined as positive training data, and training data with quality evaluation results less than or equal to the preset evaluation threshold can be determined as negative training data. Based on the training prediction results, when adjusting the model parameters of the machine learning model, classification loss can be calculated for the positive training data and negative training data respectively, and the machine learning model can be trained based on the calculated positive classification loss and negative classification loss.
[0102] Applying the solutions of the embodiments of this specification, sample data for a target task is obtained; the sample data is sampled using a machine learning model to obtain training data; the training data is quality-assessed and, based on the quality-assessment results, the training data is divided into positive training data and negative training data. By dividing the training data into positive training data and negative training data, the machine learning model can be trained, thereby improving its accuracy.
[0103] In an optional embodiment of this specification, the step of obtaining a machine learning model to be trained includes:
[0104] Obtaining sample data of an original machine learning model and a target task, wherein the original machine learning model includes a feature processing module, a screening module, and a prediction module, the original machine learning model is pre-configured with model parameters, the screening module is connected to the feature processing module, and the prediction module is connected to the feature processing module and the screening module respectively;
[0105] Input the sample data into the feature processing module to obtain sample features;
[0106] Input the sample characteristics into the screening module for quality screening to obtain sample characteristic screening information;
[0107] Input the sample characteristics and sample characteristic screening information into the prediction module to obtain the sample prediction results;
[0108] Based on the sample prediction results, the feature processing module, screening module and prediction module are trained to obtain the machine learning model to be trained.
[0109] Specifically, the sample data is the processing object of the original machine learning model. The training process of the original machine learning model is supervised training, that is, the sample data carries the sample real results. The sample real results are the generation targets of the original machine learning model, and the sample prediction results are the prediction results of the original machine learning model. The sample data can be sample task data or sample instruction data (correct solutions).
[0110] By applying the solution of the embodiments of this specification, the model parameters of the original machine learning model are adjusted according to the sample prediction results and the actual sample results until the preset sample stopping conditions are reached, and the machine learning model to be trained that has completed training is obtained. By continuously adjusting the model parameters of the original machine learning model when the preset sample stopping conditions are not met, the machine learning model to be trained that is finally obtained can be made more accurate.
[0111] In an optional embodiment of this specification, the above-mentioned obtaining of the original machine learning model includes:
[0112] Get target model parameters;
[0113] Based on the target model parameters, construct feature processing module, prediction module and screening module;
[0114] Connect the screening module with the feature processing module, and connect the prediction module with the feature processing module and the screening module respectively to obtain the original machine learning model.
[0115] Specifically, the target model parameters are the configuration information parameters required to build and run the original machine learning model, covering multiple dimensions from model architecture, weight data to hyperparameter settings during training and hardware resource management, such as architecture parameters, model weight parameters, model hyperparameters, and resource parameters.
[0116] Specifically, architectural parameters include: layer depth (such as the number of layers in the feature processing module and the filtering module): This directly affects the required computing resources (such as the amount of GPU memory, the number of logic units in the FPGA or ASIC, etc.) and possible latency; network layer type (convolutional layer, pooling layer, fully connected layer, etc.) and its configuration (such as convolution kernel size, stride, padding, etc.): Different layer structures and configurations correspond to different types of parallel computing requirements, which is crucial for hardware design. For example, large-scale parallel computing capabilities are extremely important for convolutional layers, while pooling layers have high requirements for memory bandwidth.
[0117] Model weight parameters include: Storage requirements: Model weights need to be stored in hardware. For example, in embedded systems, they may be stored in ROM or Flash. In high-performance computing platforms, they may need to occupy the storage space of GPU video memory or TPU tensor cores. Accelerated computing: For weight data, hardware accelerators such as GPUs, TPUs, ASICs, or FPGAs typically optimize the speed of weight reading and matrix operations, reducing the time overhead of accessing main memory.
[0118] Model hyperparameters include: Computing resource allocation: Hyperparameters such as learning rate and batch size affect hardware resource utilization during training, such as determining GPU / CPU core utilization, memory usage, and I / O operation frequency. Energy consumption control: In power-sensitive embedded scenarios, selecting appropriate hyperparameters helps balance computing performance and energy consumption, such as by adjusting model complexity to accommodate limited hardware computing power.
[0119] Resource parameters include: Quantization strategy: To meet low power or high efficiency requirements, the hardware may need to perform model quantization. In this case, the target model parameters also include the number of quantization bits (such as 8-bit quantization) and the quantization method, which will affect hardware design and execution efficiency. Tensor processor configuration: In AI chip units such as TPUs, the target model parameters may also involve how to efficiently map to the layout and pipeline scheduling mechanism of the tensor core.
[0120] It should be noted that the target model parameters obtained may only include feature processing parameters, prediction parameters and screening parameters. Since the feature processing module and the generation model can be modules in the reference model, the target model parameters obtained may include model parameters and screening parameters of the reference model, wherein the reference model includes a feature processing module and a prediction module. There are many ways to construct a feature processing module, a prediction module and a screening module based on the target model parameters, and the specific selection is made according to the actual situation. The embodiments of this specification do not impose any restrictions on this. In one possible implementation of this specification, the feature processing module can be directly constructed based on the feature processing parameters, the prediction module can be constructed based on the prediction parameters, and the screening module can be constructed based on the screening parameters. In another possible implementation of this specification, since the feature processing module and the prediction module can be existing modules in the reference model, the feature processing module and the prediction module can be constructed based on the reference model, and the initial parameters of the feature processing module and the prediction module can be set according to the model parameters of the reference model.
[0121] In practical applications, there are multiple ways to obtain target model parameters, and the specific method is selected according to the actual situation. The embodiments of this specification do not impose any restrictions on this. In one possible implementation of this specification, the target model parameters can be received from a terminal device. In another possible implementation of this specification, the target model parameters can be read from other data acquisition devices or databases.
[0122] Applying the solution of the embodiments of this specification, target model parameters are obtained; based on the target model parameters, a feature processing module, a prediction module, and a screening module are constructed; the screening module is connected to the feature processing module, and the prediction module is connected to the feature processing module and the screening module, respectively, to obtain the original machine learning model. The screening module is integrated into the original machine learning model, giving the original machine learning model both generation and quality assessment capabilities. The feature screening information output by the screening module is then utilized to achieve efficient generation and result screening, automatically achieving controllable quality of the generated results and improving the quality of the generated results.
[0123] In an optional embodiment of this specification, the above-mentioned obtaining of target model parameters includes:
[0124] Obtaining model parameters and screening parameters of a reference model, wherein the reference model includes a feature processing module and a prediction module;
[0125] Based on the target model parameters, construct feature processing module, prediction module and screening module, including:
[0126] Based on the reference model, a feature processing module and a prediction module are constructed, and the initial parameters of the feature processing module and the prediction module are set according to the model parameters of the reference model;
[0127] Based on the screening parameters, a screening module is constructed and the parameters of the screening module are initialized.
[0128] Specifically, a reference model is a pre-trained model with general processing capabilities. It can be a large pre-trained model or a deep learning model that processes the input data of the task. Reference models are typically built based on various deep neural network architectures such as CNN, RNN, and Transformer models. They are pre-trained on large-scale public datasets and have model weight parameters of a certain quality.
[0129] The model parameters of a reference model are the model weights learned during training. They store the knowledge and patterns learned from pre-training data, determine how the model maps inputs to outputs, and determine the performance and capabilities of the model in solving specific problems. Model parameters include, but are not limited to, convolutional kernel weights, fully connected layer weight matrices, bias terms, and other hyperparameters.
[0130] The filtering parameters are the initial weight parameters set for the filtering module when building the original machine learning model. When building the feature processing module based on the reference model, the filtering parameters can be manually set or randomly generated, and there is no limitation here.
[0131] Initial parameters are the initial weights set for the feature processing and prediction modules when building the original machine learning model. When building feature processing and prediction modules based on a reference model, these initial parameters can be derived from the model parameters of the corresponding parts of the reference model, thereby leveraging the feature representation capabilities already learned by the reference model.
[0132] Using the solutions of the embodiments of this specification, model parameters and screening parameters of a reference model are obtained. The reference model includes a feature processing module and a prediction module. Based on the reference model, the feature processing module and the prediction module are constructed, and their initial parameters are set according to the model parameters of the reference model. By directly utilizing the model parameters of the reference model, the construction time of the feature processing module, the prediction module, and the screening module is shortened.
[0133] Step 104: Input the training data into the feature processing module to obtain training features.
[0134] Specifically, the feature processing module is a module with feature processing capabilities that performs feature processing operations such as feature extraction and conversion on input data to obtain feature data represented by abstract features. The feature processing module includes but is not limited to encoding layers, decoding layers, convolution layers, pooling layers, and normalization layers. The feature data output by the feature processing layer is the feature data obtained through feature processing at different layers, and is generally expressed in the form of feature vectors (feature sequences, feature matrices).
[0135] Step 106: Input the training features into the screening module for quality screening to obtain training feature screening information.
[0136] Specifically, the screening module is a module with quality screening capabilities. The screening module can be constructed based on a value scoring model; therefore, quality screening capabilities can also be understood as quality scoring capabilities. The screening module can perform a quality score on the input feature data, thereby determining the quality index corresponding to each feature data. For example, feature data A corresponds to quality index A of 0.8, while feature data B corresponds to quality index B of 0.6.
[0137] Feature screening information is information generated by quality screening of training features. This information can be a quality indicator for each training feature or the order in which the training features are quality screened. This information can be used to select high-quality feature information, thereby improving the quality of the generated results.
[0138] In practical applications, the value scoring model can be directly obtained and integrated into the machine learning model as a screening module. Furthermore, due to the large number of parameters and complex structure of the value scoring model, the amount of calculation is relatively large. Therefore, the screening module can be constructed based only on the linear layer and the activation layer to reduce the amount of inference calculation. That is, the screening module includes a linear layer and an activation layer, the linear layer is connected to the feature processing module, the activation layer is connected to the linear layer, and the prediction module is connected to the activation layer; the training features are input into the screening module for quality screening to obtain training feature screening information, including:
[0139] Input the training features into the linear layer for linear transformation to obtain the training linear feature data;
[0140] The training linear feature data is input into the activation layer for quality screening to obtain the training feature screening information.
[0141] It's important to note that the linear layer, also known as the fully connected layer, implements a linear transformation from input vectors to output vectors. For each neuron in the neural network, it performs a weighted summation of the input features and adds a bias term to produce a linear combination. The primary function of the linear layer is to spatially map the input data, capturing the linear relationships between input features through a learned weight matrix.
[0142] The activation layer includes an activation function, which is applied to the output of each neuron, performing a nonlinear transformation on the linear layer's output. The activation function maps data from the original feature space to a new feature space, thereby extracting higher-level abstract features. Common activation functions include the rectified linear unit (ReLU) and the sigmoid function. The main purpose of the activation function is to increase the model's expressive power and its ability to learn nonlinear features.
[0143] It should be noted that when training features are input into the linear layer for linear transformation, the input training features can be spatially mapped, and the linear relationship between the training features can be captured through the learned weight matrix to obtain training linear feature data. Furthermore, since linear models cannot handle complex data distributions and patterns, and activation functions enable models to represent arbitrarily complex nonlinear relationships, training linear feature data can be input into the activation layer. In the activation layer, the activation function can map the training linear feature data to a new feature space to obtain feature screening information.
[0144] By applying the solution of the embodiments of this specification, since the screening module includes a linear layer and an activation layer, the combination of the linear layer and the activation layer can enable the model to effectively approximate complex functional relationships and improve the generalization ability of the model. Moreover, since the computational complexity of the linear layer and the activation layer is very small, the joint decoding of the machine learning model and the value scoring model can be achieved without increasing the computational complexity, and the real-time scoring, sorting and selection of the machine learning model in the generated sequence can be achieved, thereby achieving controllable quality of the generated results.
[0145] Step 108: Input the training features and the training feature screening information into the prediction module to obtain the training prediction results.
[0146] Specifically, the prediction module (Generator) is used to predict the probability distribution of feature data for the next time step based on feature data (such as characters or tokens) generated before the current time step and the encoded context information. The target model uses an autoregressive approach to predict each character, meaning that each prediction relies on previously predicted results and combines the encoded global context information to gradually generate new results until the terminator is generated.
[0147] Step 110: Based on the training prediction results, adjust the model parameters of the machine learning model to obtain a trained target model.
[0148] In practical applications, when training a machine learning model based on the training prediction results, the training loss value can be calculated according to the training prediction results and the actual training results, the model parameters of the machine learning model can be adjusted according to the training loss value, and the step of inputting the training data into the feature processing module to obtain the training features is returned to execute until the preset training stop condition is reached to obtain the target model for training. Among them, there are many functions for calculating the training loss value according to the training prediction results and the actual training results, such as the cross entropy loss function, the L1 norm loss function, the L2 norm loss function, the KL divergence (Ku ll back-Leib ler divergence), etc., which are selected according to the actual situation, and the embodiments of this specification do not impose any restrictions on this. The preset training stop conditions include but are not limited to the training loss value being less than or equal to the preset training threshold and the number of training iterations reaching the preset number of training iterations, wherein the preset training threshold and the preset number of training iterations are selected according to the actual situation, and the embodiments of this specification do not impose any restrictions on this.
[0149] In one possible implementation of this specification, after calculating the training loss value, the training loss value can be compared with a preset training threshold. Specifically, if the training loss value is greater than the preset training threshold, it indicates that the difference between the training prediction result and the actual training result is large, and the generation capability of the machine learning model is poor. In this case, the model parameters of the machine learning model can be adjusted, and the machine learning model can be trained again until the training loss value is less than or equal to the preset training threshold, indicating that the difference between the training prediction result and the actual training result is small, and the preset training stop condition is met, thereby obtaining a target model that has completed training.
[0150] In another possible implementation of this specification, in addition to comparing the training loss value with a preset training threshold, the number of training iterations may also be used to determine whether the current machine learning model has been trained. Specifically, if the training loss value is greater than the preset training threshold, the model parameters of the machine learning model are adjusted, and the machine learning model continues to be trained until the preset number of training iterations is reached, at which point iterations are stopped to obtain a trained target model.
[0151] By applying the solution of the embodiments of this specification, the model parameters of the machine learning model are adjusted according to the training prediction results and the actual training results until the preset training stop conditions are reached, and the target model that has completed the training is obtained. By continuously adjusting the model parameters of the machine learning model when the preset training stop conditions are not met, the final target model can be made more accurate.
[0152] In an optional embodiment of the present specification, the above-mentioned adjusting the model parameters of the machine learning model based on the training prediction results to obtain the trained target model includes:
[0153] Based on the training prediction results, the parameters of the screening module are adjusted to obtain the trained target model.
[0154] By applying the solution of the embodiments of this specification, the parameters of the screening module are adjusted based on the training prediction results, which effectively reduces the cost of fine-tuning all parameters and makes the screening module more accurate.
[0155] See also Figure 2 , Figure 2 A flowchart of a task processing method provided by an embodiment of this specification is shown, which specifically includes the following steps:
[0156] Step 202: Obtain task data of the target task.
[0157] In one or more embodiments of this specification, during task processing, task data of a target task may be acquired, and then the task data may be processed using a target model corresponding to the target task to obtain a target result.
[0158] Specifically, task data refers to the processing object of the task processing process, that is, the data processed by the target model. Task data can be data of different models, such as image data, audio data, text data, etc.
[0159] In practical applications, there are multiple ways to obtain task data for a target task, and the method to be used depends on the actual situation. This specification does not impose any restrictions on this method. In one possible implementation of this specification, the task data for the target task sent by a terminal device can be received. In another possible implementation of this specification, the task data for the target task can be read from other data acquisition devices or databases.
[0160] Step 204: Input the task data into the target model corresponding to the target task, and obtain the feature data output by the feature processing module in the target model, wherein the target model includes a feature processing module, a screening module and a prediction module, the screening module is connected to the feature processing module, and the prediction module is connected to the feature processing module and the screening module respectively.
[0161] In one or more embodiments of this specification, after obtaining the task data of the target task, the task data may be input into a target model corresponding to the target task to obtain feature data output by a feature processing module in the target model.
[0162] Specifically, the target model can be obtained by training the machine learning model to be trained based on the training data. When training the machine learning model to be trained based on the training data, the LoRA fine-tuning method can be used for training, that is, the module parameters of the feature processing module and the prediction module in the machine learning model to be trained are frozen, and only the module parameters of the screening module are adjusted. The machine learning model to be trained is obtained by training the original machine learning model with all parameters based on the sample data. The feature data output by the feature processing layer is the feature data obtained by feature processing at different layers, and is generally expressed in the form of a feature vector (feature sequence, feature matrix).
[0163] Step 206: Input the feature data into the screening module for quality screening to obtain feature screening information.
[0164] Step 208: Input the feature data and feature screening information into the prediction module to obtain the target result.
[0165] It should be noted that the implementation of steps 204 to 208 is the same as the implementation of steps 104 to 108 described above, and will not be described in detail in this embodiment of the specification.
[0166] By applying the solution of the embodiment of this specification, since the screening module is integrated into the target model, the target model has both generation capability and quality assessment capability. Therefore, during the task processing, the target model can utilize the feature screening information output by the screening module to achieve efficient generation and result screening, automatically realize controllable quality of the generated results, and improve the quality of the generated results.
[0167] In actual applications, there are many ways to input feature data and feature screening information into the prediction module to obtain the target result. The specific method is selected according to the actual situation, and the embodiments of this specification do not impose any restrictions on this.
[0168] In one possible implementation of this specification, inputting the feature data and feature screening information into the prediction module to obtain the target result may include the following steps:
[0169] In the prediction module, candidate results are generated based on the feature data, and the candidate results are screened based on the feature screening information to obtain the target result.
[0170] Specifically, the candidate result refers to the feature data generated before the current time step (the first step is the start symbol <s>) and the encoded context vector to predict the probability distribution of the feature data of the next time step.
[0171] For example, assuming that the decoding width is 1 (the number of sequences ultimately generated), the candidate width is 2 (the preferred number that can be selected at each step), the feature data of the current time step is "technique / ability", and the feature screening information is "technique = 0.9, ability = 0.3". In the prediction module, the candidate results generated based on the feature data of "technique / ability" include "will / positive (generated based on technique); will / can (generated based on ability)". Since the feature screening information is "technique = 0.9, ability = 0.3", it means that the quality of "ability" is poor. At this time, the feature data "ability" can be discarded, and the feature data "technique" can be retained, and the candidate result "will / positive" corresponding to the feature data "technique" is determined as the target result.
[0172] Using the solutions of the embodiments of this specification, the prediction module generates candidate results based on feature data, and then filters these candidate results based on feature filtering information to obtain the target result. By utilizing this feature filtering information, the generated sequences can be scored, sorted, and selected in real time during the generative model processing process, ensuring that the quality of the generated results is controllable and improving the quality of the generated results.
[0173] In another possible implementation of this specification, inputting the feature data and feature screening information into the prediction module to obtain the target result may include the following steps:
[0174] In the prediction module, the feature data is screened according to the feature screening information to obtain target feature data, and the target result is generated based on the target feature data.
[0175] Specifically, the target feature data is feature data with higher quality selected from the feature data according to the feature screening information.
[0176] For example, assuming the decoding width is 1 (the number of sequences ultimately generated), the candidate width is 2 (the number of optimal sequences that can be selected at each step), the feature data of the current time step is "technique / ability", and the feature screening information is "technique = 0.9, ability = 0.3". In the prediction module, since the feature screening information is "technique = 0.9, ability = 0.3", it indicates that the quality of "ability" is poor. At this time, the feature data "ability" can be discarded, and the feature data "technique" can be determined as the target feature data. Moreover, the feature data of the next time step is predicted and generated based on the target feature data "technique", and the target result "will / positive" is obtained.
[0177] In the prediction module, the feature data is filtered based on the feature filtering information to obtain target feature data, and the target result is generated based on the target feature data. Because the feature data is first filtered using the feature filtering information, the next step of prediction generation is not required for unselected feature data. Only the target feature data is used for the next step of prediction generation, which reduces the computational effort and improves task processing efficiency.
[0178] In an optional embodiment of the present specification, after inputting the feature data and feature screening information into the prediction module and obtaining the target result, the following steps may be further included:
[0179] When the target result does not include the terminator, the process returns to the step of inputting the task data into the target model corresponding to the target task and obtaining the feature data output by the feature processing module in the target model, until the target result includes the terminator, thereby obtaining the updated target result.
[0180] It should be noted that when the target model predicts the next word or character, the input source sequence (source language sentence or text to be processed) is converted into tokens (including vocabulary and special symbols such as start symbol <s>), and the embedding layer maps the tokens into vector representations. These vector identifiers are processed by the encoding layer (such as the self-attention mechanism layer of the Transformer) to generate a context-dependent hidden state representation of the source sequence, which contains information about the entire source sequence. Then, the decoding layer extracts the hidden state from the special <s>Symbol, convert it into vector form as the initial hidden state of the decoder. If there is an encoder-decoder attention mechanism, the initial hidden state of the decoding layer may also be combined with the context vector generated in the last step of the encoding layer. Then, enter the screening module and prediction module for iterative decoding and prediction. Specifically, in the generation process of each step, the screening module can score the quality of the feature data generated before the current time step, obtain feature screening information, and input the feature screening information into the prediction module. The prediction module can, under the constraints of the feature screening information, predict the hidden state of the current moment and the word generated at the previous moment (in the first step, it is <s>) to predict the probability distribution of the next word, which represents the probability of generating all possible words in the current state. According to this probability distribution, the word with the highest probability is selected as the prediction result of the current step, or a sampling strategy is used to select words. Then, the above steps are recursively executed, that is, the word predicted in the previous step is used as the input of the next round of decoding, and the state of the decoding layer is updated. This process will continue until the model predicts the terminal symbol <eos>, indicating that the generation is completed and the complete result sequence is obtained.
[0181] Applying the solution of the embodiments of this specification, if the target result does not include a terminator, the process returns to the step of inputting the task data into the target model corresponding to the target task and obtaining the feature data output by the feature processing module in the target model until the target result includes a terminator, thereby obtaining an updated target result. Through this iterative process, the target model can predict all feature data word by word, forming a complete result sequence. Furthermore, by utilizing the feature screening information output by the screening module, efficient generation and result screening are achieved, automatically achieving controllable quality of the generated results and improving the quality of the generated results.
[0182] See also Figure 3 , Figure 3 FIG. 1 shows a process flow chart of a task processing method provided by an embodiment of the present specification, such as Figure 3 As shown, the task data of the target task is obtained; the task data is input into the target model corresponding to the target task for inference to obtain the target result. Among them, the target model is constructed by adding a screening module (V) to the last layer of the standard large model. The structure of the screening module is a combination of a linear layer and an activation layer. Except for the screening module, the structure of the target model is consistent with the large model, that is, it includes a feature processing module and a prediction module (G). Among them, the feature processing module includes an encoder (Transformer-Eecoder) and a decoder (Transformer-Decoder). Transformer-Decoder includes multiple decoding layers. As shown Figure 3 As shown in Figure 1, the specific reasoning process of the target model (mode l) is as follows:
[0183] Assume that the current decoding width (beam_width) is 1, the candidate width (cand idate_width) is 2, and the time step (step) is 1 to N, where N is a positive integer, starting from the start symbol. <s>Make a prediction. Assume that the current time step is step 4, and the result (pre-text) is "AI technology / ability", where "skill / ability" are two optional feature data at the same time step; in step 5, the prediction module generates "AI technology (will / positive) / ability (will / can)", where "will / positive" are two optional feature data corresponding to "skill" at the next time step, and "will / can" are two optional feature data corresponding to "ability" at the next time step; at the same time, the screening module scores the "AI technology" and "AI skills" generated in step 4, and obtains feature screening information such as "AI technology = 0.9, AI skills = 0.3". Because "AI technology" scores higher, the target result obtained in step 5 is "AI technology will / positive", and so on [in step 6, the prediction module generates "AI technology will (will / want) / positive (towards / in)", and iterates the previous two steps until the model predicts the terminator. <eos>, the iteration ends and the final target result is obtained. The pseudo code corresponding to the above steps is as follows:
[0184]
[0185] By applying the solution of the embodiments of this specification, through training data design and optimization of training methods, the value scoring model is integrated into the large model (such as Qwen, Code L l ama) as a screening module, so that the large model is both a generation model and a quality assessment model, and by designing an efficient reasoning strategy, the joint decoding of the large model and the value scoring model is realized without increasing the amount of calculation, and the large model is used to achieve real-time scoring, sorting and selection of the generated sequence, so that the quality of the generated results can be controlled.
[0186] In an optional embodiment of the present specification, after inputting the feature data and feature screening information into the prediction module and obtaining the target result, the following steps may be further included:
[0187] Mark the key information in the target results;
[0188] Feedback target results to front-end users.
[0189] Specifically, key information is related to the modality of the target result. If the target result is text, key information is key text information such as keywords, key sentences, and keywords. If the target result is an image, key information is visual key points (such as eyes, eyebrows, corners of the mouth, etc. in the image). Taking the key information as the key information in the text as an example, the key information in the text refers to facts, data, concepts, sentences or words that can highlight the theme of the text, convey the core idea, support the author's point of view, or describe the essence of the event. Key information helps to quickly understand the main idea of the text, grasp the structure of the article, answer related questions, and make effective decisions or extract information.
[0190] In practical applications, taking the key information as key text information as an example, when marking the key information in the target result, the key text information can be bolded, highlighted, italicized, etc. Taking the key information as a key visual point as an example, a background color, border, etc. can be added to the key visual point.
[0191] By applying the solution of the embodiment of this specification, key information in the target result is marked; the target result is fed back to the front-end user so that the front-end user can view the result, thereby improving the user experience.
[0192] In an optional embodiment of the present specification, the screening module includes a linear layer and an activation layer, the linear layer is connected to the feature processing module, the activation layer is connected to the linear layer, and the prediction module is connected to the activation layer; the feature data is input into the screening module for quality screening to obtain feature screening information, including:
[0193] Input the feature data into the linear layer for linear transformation to obtain linear feature data;
[0194] The linear feature data is input into the activation layer for quality screening to obtain feature screening information.
[0195] It should be noted that the implementation method of "inputting feature data into the linear layer for linear transformation to obtain linear feature data; inputting the linear feature data into the activation layer for quality screening to obtain feature screening information" is the same as the above-mentioned implementation method of "inputting training features into the linear layer for linear transformation to obtain training linear feature data; inputting the training linear feature data into the activation layer for quality screening to obtain training feature screening information", and will not be repeated in the embodiments of this specification.
[0196] By applying the solution of the embodiments of this specification, since the screening module includes a linear layer and an activation layer, the combination of the linear layer and the activation layer can enable the model to effectively approximate complex functional relationships and improve the generalization ability of the model. Moreover, since the computational complexity of the linear layer and the activation layer is very small, the joint decoding of the target model and the value scoring model can be achieved without increasing the computational complexity, and the real-time scoring, sorting and selection of the target model in the generated sequence can be achieved, thereby achieving controllable quality of the generated results.
[0197] In an optional embodiment of the present specification, after feeding back the target result to the front-end user, the following steps may also be included:
[0198] Receive key feedback information sent by the front-end user regarding key information in the target result, wherein the key feedback information is feedback information provided by the front-end user regarding the key information based on the task information of the target task;
[0199] Input key feedback information, task data and target results into the target model to obtain the adjusted feature data output by the feature processing module in the target model;
[0200] Inputting the adjustment feature data into the screening module for quality screening to obtain adjustment feature screening information;
[0201] The adjusted feature data and the adjusted feature screening information are input into the prediction module to obtain the adjusted target result.
[0202] Specifically, key feedback information is the interactive information returned by the front-end user after receiving the target result and evaluating, correcting, or adjusting the key information annotated in the target result based on the task information. Key feedback information includes but is not limited to the modified key information and the quality evaluation of the key information. Through key feedback information, the system can obtain the user's judgment on whether the key information meets expectations or needs, and optimize the model output results accordingly. For example, a user may find that the keywords annotated by the model are inaccurate, so they manually adjust the keywords and submit them to the system.
[0203] Adjusted feature data is the updated feature data obtained by re-inputting key feedback information, task data, and target results into the target model after receiving key feedback information and processing it through each feature processing layer. Adjusted feature screening information is the new feature screening information generated after quality screening by the screening module based on the key feedback information provided by the user using the adjusted feature data.
[0204] Applying the solution of the embodiment of this specification, receiving key feedback information sent by the front-end user for the key information in the target result, wherein the key feedback information is the information provided by the front-end user for feedback on the key information based on the task information of the target task; inputting the key feedback information, task data and target result into the target model to obtain the adjusted feature data output by the feature processing module in the target model; inputting the adjusted feature data into the screening module for quality screening to obtain the adjusted feature screening information; inputting the adjusted feature data and the adjusted feature screening information into the prediction module to obtain the adjusted target result. By further screening and generating the adjusted feature data, the system can produce more accurate generation results that meet user needs, which not only reflects the human-computer interactivity of the model, but also improves the adaptability and flexibility of the model.
[0205] In an optional embodiment of the present specification, after feeding back the target result to the front-end user, the following steps may also be included:
[0206] Receive editing information sent by front-end users regarding key information in target results;
[0207] The target result is edited according to the editing information to obtain the edited target result.
[0208] Specifically, editing information is used to describe the user's editing needs for key information, including but not limited to translation needs, synonym replacement needs, and interpretation needs.
[0209] For example, assuming the key information is "diligent and conscientious" and the editing information is "Please explain the meaning of the key information", based on the editing information, add the interpretation "Diligent and conscientious is used to describe a person's attitude towards work or tasks, always maintaining vigilance and awe. It is often used to praise people's meticulous and conscientious spirit at work" near the key information in the target result.
[0210] Using the solution of the embodiments of this specification, a front-end user receives editing information regarding key information in a target result; based on the editing information, the target result is edited to obtain an edited target result. By editing the target result based on the editing information sent by the front-end user, human-computer interaction is enhanced, and the adaptability and flexibility of the model are improved.
[0211] In an optional embodiment of the present specification, after inputting the feature data and feature screening information into the prediction module and obtaining the target result, the following steps may be further included:
[0212] Feedback target results to front-end users;
[0213] Receive result feedback information sent by the front-end user, wherein the result feedback information is information provided by the front-end user regarding the target result;
[0214] Construct sample task data based on result feedback information;
[0215] The target model is trained based on sample task data.
[0216] Specifically, result feedback refers to the front-end user's subjective evaluation and demand information regarding the content, quality, or completion of the target result, reflecting their true feelings and expectations regarding the target result. Result feedback can include instructions for correcting the target result, an evaluation of satisfaction with the target result, or other detailed descriptions that can help improve the model output.
[0217] In actual applications, after receiving the result feedback information sent by the front-end user, if the result feedback information is accurate sample task data, the model parameters of the target model can be directly adjusted using the sample task data. If the result feedback information is the optimization field of the model, such as the XXX field, the sample task data of the XXX field can be obtained, and the model parameters of the target model can be adjusted using the sample task data of the XXX field. Among them, the process of training the target model based on the sample task data is the same as the training process of the above-mentioned target model, and the embodiments of this specification will not be repeated.
[0218] Using the solutions in the embodiments of this specification, the target result is fed back to the front-end user; the result feedback information sent by the front-end user is received, where the result feedback information is information provided by the front-end user regarding the target result; sample task data is constructed based on the result feedback information; and the target model is trained based on the sample task data. By collecting and utilizing the result feedback information, the system can continuously optimize the performance of the target model to more accurately meet the actual needs of the user and improve the quality and accuracy of the final target result.
[0219] The following combined Figure 4 , taking the application of the task processing method provided in this specification in the text generation scenario as an example, the task processing method is further explained. Figure 4 , Figure 4 A flowchart of a text generation method provided by an embodiment of this specification is shown, which specifically includes the following steps:
[0220] Step 402: Obtain task data for the text generation task.
[0221] Step 404: Input the task data into the text generation model to obtain feature data output by the feature processing module in the text generation model, wherein the text generation model includes a feature processing module, a screening module and a prediction module, the screening module is connected to the feature processing module, and the prediction module is connected to the feature processing module and the screening module respectively.
[0222] Step 406: Input the feature data into the screening module for quality screening to obtain feature screening information.
[0223] Step 408: Input the feature data and feature screening information into the prediction module to obtain the target text.
[0224] It should be noted that the implementation of steps 402 to 408 is the same as the implementation of steps 202 to 208 described above, and will not be described in detail in this embodiment of the specification.
[0225] By applying the solution of the embodiments of this specification, by integrating the screening module into the text generation model, the text generation model has both text generation capabilities and quality assessment capabilities, thereby utilizing the feature screening information output by the screening module to achieve efficient text generation and result screening, automatically achieving controllable quality of the text generation results, and improving the quality of the text generation results.
[0226] See also Figure 5 , Figure 5 A flowchart of an information processing method based on a machine learning model provided by an embodiment of this specification is shown, which specifically includes the following steps:
[0227] Step 502: Receive a task generation request, wherein the task generation request includes request information.
[0228] Specifically, the information processing method based on the machine learning model can be applied to terminal devices or to model training platforms. The task generation request is used to request the generation of task information for the target task. The task generation request usually includes the task type, the expected output format, and the request information. For example, when the user selects the "code completion" function on the front-end interface of the model training platform and uploads the code data, a task generation request can be constructed. The task generation request includes information such as the code data, the task type (i.e., code completion), and the language type of the code data. The request information refers to the parameters or descriptive information related to the target task carried in the task generation request. The request information includes but is not limited to the task scenario identifier of the target task, the task model identifier, or the model training data of the target task.
[0229] Step 504: Based on the request information, obtain the target model, wherein the target model includes a feature processing module, a screening module and a prediction module, the screening module is connected to the feature processing module, and the prediction module is connected to the feature processing module and the screening module respectively, the screening module is used to perform quality screening on the feature data output by the feature processing module to obtain feature screening information, and the prediction module is used to generate results based on the feature data output by the feature processing module and the feature screening information output by the screening module.
[0230] In an optional embodiment of the present specification, the request information includes a task scenario identifier of the target task, or a task model identifier; and obtaining the target model based on the request information may include the following steps:
[0231] Based on the task scenario identifier, a target scenario template is determined from a plurality of preset scenario templates, and based on the target scenario template, a target model is searched from a model library, wherein the model library stores a plurality of machine learning models; or
[0232] Based on the task model identifier, the target model is searched from the model library.
[0233] Specifically, the task scenario identifier refers to a unique or specific label used to distinguish different generated task application scenarios, which represents the environment or requirements of a certain type of specific task. In the embodiment of this specification, the task scenario identifier is part of the request information, and the model training platform can select a suitable target scenario template from a series of preset scenario templates based on the task scenario identifier to perform the target task. For example, if the task scenario identifier is "text translation", it means that the terminal device wants to translate the uploaded text, then the text translation scenario template can be selected based on the task scenario identifier.
[0234] Preset scenario templates are predefined standard configuration scenario templates for different task application scenarios. Each template contains information such as the machine learning model, parameter settings, and processing flow that matches the scenario. The model training platform stores a series of preset scenario templates to quickly respond to different types of task generation requests. Different templates correspond to different task types and processing flows, ensuring that the platform can automatically obtain the model and configuration that best suits the current task requirements based on the task scenario identifier. For example, the preset scenario templates may include a template specifically for legal document processing, which includes a pre-trained legal model and processing flow.
[0235] The target scenario template is a specific scenario template determined by the task scenario identifier. When parsing a task generation request, the model training platform locates the corresponding target scenario template based on the task scenario identifier and selects the corresponding target model and other related configuration information from the model library based on the target scenario template. For example, if the task scenario identifier is "Financial Report Analysis," the target scenario template contains the financial report analysis model and related configuration parameters applicable to the financial report analysis scenario.
[0236] The model library is a centralized repository for machine learning models that have been trained and optimized to solve different tasks. On the model training platform, the model library stores a large number of machine learning models, including but not limited to models for various task types, such as text classification, text translation, and text analysis. Each model may include a feature processing module, a prediction module, and a screening module to meet complex and diverse task requirements. For example, the model library may contain multiple versions of text analysis models, such as those for financial data and social data. Therefore, the required model can be accurately extracted from the model library based on the task scenario identifier or task model identifier in the task request.
[0237] For example, suppose a user selects the "text summarization" function through the front-end interface of an e-commerce application. The application then sends a task generation request to the model training platform. The request contains the task scenario identifier "text summarization." Upon receiving this task generation request, the model training platform identifies the task scenario identifier as "text summarization." Based on a series of preset scenario templates, the model training platform finds a target scenario template that matches "text summarization." This target scenario template is pre-configured with a specific generation model and parameter settings suitable for text summarization. Based on the target scenario template, the model training platform retrieves the corresponding pre-trained text summarization model from the model library and loads the relevant parameters and configuration files. Based on the information in the target scenario template, the model training platform generates task information, including but not limited to details such as the model address, input data processing method, and output result specifications, so that the terminal device can correctly call and execute the text summarization task.
[0238] Using the solutions of the embodiments of this specification, based on the task scenario identifier, a target scenario template is determined from multiple preset scenario templates. Based on the target scenario template, a target model is searched from a model library that stores multiple machine learning models. Alternatively, based on the task model identifier, the target model is searched from the model library. By integrating predefined task scenario templates with model library resources, a flexible, efficient, and standardized task processing mechanism is achieved.
[0239] In another optional embodiment of the present specification, in addition to selecting a pre-trained target model from a model library, the target model can also be obtained by targeted training based on sample data. That is, the request information includes sample data of the target task; the above-mentioned acquisition of the target model based on the request information may include the following steps:
[0240] Based on the sample data, the original machine learning model corresponding to the target task is trained to obtain the machine learning model to be trained;
[0241] Using the machine learning model to be trained to sample sample data to obtain training data;
[0242] Based on the training data, the machine learning model to be trained is trained to obtain a target model that has completed the training.
[0243] It should be noted that the implementation method of "based on the sample data, training the original machine learning model corresponding to the target task to obtain the machine learning model to be trained" is the same as the training method of the above-mentioned machine learning model to be trained; the above-mentioned "using the machine learning model to be trained to sample the sample data to obtain training data; based on the training data, training the machine learning model to be trained to obtain the target model that has completed the training" is the same as the training method of the above-mentioned target model, and will not be repeated in the embodiments of this specification.
[0244] By applying the solution of the embodiments of this specification, the accuracy of the machine learning model to be trained is guaranteed by performing full-parameter training on the original machine learning model corresponding to the target task based on sample data. Furthermore, the screening module in the machine learning model to be trained is trained using the training data obtained by sampling the sample data, which effectively reduces the cost of fine-tuning all parameters and further improves the accuracy of the target model on the basis of reducing the training cost of the target model.
[0245] Step 506: Generate task information based on the target model, where the task information is used to execute the target task.
[0246] Specifically, task information is information generated by the model training platform after parsing the received task generation request. It contains all the specific operation instructions and configuration items required to perform the target task, so that the terminal device or other server-side components can correctly use the target model to process data. Task information usually includes the determined target model and its parameter configuration, the processing method of the input data, the specifications of the expected output results, as well as the intermediate steps and other auxiliary information that may be involved. For example, in a text summary extraction task, the task information may include details such as the selected summary extraction model address, the storage location of the input text, the target path of the output summary, and other environmental configurations required for the model to run. This information enables the terminal device to correctly load the model and execute the task on a local or remote server.
[0247] The solution of the embodiments of this specification receives a task generation request; based on the request information, obtains a target model; and generates task information based on the target model. Through the model training platform, task information for executing the target task is generated. This ensures the quality and efficiency of task processing while reducing system deployment and operation and maintenance costs, providing users with convenient and efficient task processing services.
[0248] See also Figure 6 , Figure 6 A flowchart of another task processing method provided by an embodiment of this specification is shown, which specifically includes:
[0249] First, use the sample data to fine-tune all parameters of the pre-trained large model (such as Qwen, Code L l ama) to obtain the task / instruction large model (SFT LLM). Then use the task / instruction large model to sample the sample data to generate new training data, and use manual or model evaluation or keyword comparison matching methods to evaluate the quality of the sampled new training data, so as to divide the training data into positive training data (correct solutions) and negative training data (incorrect solutions). The positive training data and negative training data are used to further fine-tune the task / instruction large model using LoRA to obtain the target generation model (SFT / Va l ue LLM). The loss of the two training stages of the specific model can be calculated by the following formula (1):
[0250] L=min[-logp(s + |q)-logp(y + |(q,s + ))-logp(y - |(q,s - ))] (1)
[0251] Where L is the total loss of the two training stages; min represents the minimum function; -logp(s + |q) represents the traditional generation loss for fine-tuning all parameters of the pre-trained large model using sample data; -logp(y + |(q,s + ))-logp(y - |(q,s - ) represents the classification loss calculated for each token of positive training data and negative training data; q represents sample data; s + represents positive training data; s - Represents negative training data; y is a binary vector whose length is equal to the number of tokens in s. The label of each token is determined by the positive or negative nature of the training data, that is, y + =1,y - =0.
[0252] By applying the solution of the embodiments of this specification, through training data design and optimization of training methods, the value scoring model is integrated into the large model as a screening module, so that the large model is both a generation model and a quality assessment model. By designing an efficient reasoning strategy, the joint decoding of the large model and the value scoring model is achieved without increasing the amount of calculation, and the large model can be used for real-time scoring, sorting and selection of the generated sequence, so that the quality of the generated results can be controlled.
[0253] See also Figure 7 , Figure 7 1 shows a schematic diagram of the structure of a model training platform provided by an embodiment of this specification, the model training platform includes a request interface unit 702 and a model unit 704;
[0254] The request interface unit 702 is configured to receive a model training request, wherein the model training request includes request information;
[0255] Model unit 704 is used to obtain the machine learning model to be trained and the training data of the target task based on the request information, wherein the machine learning model includes a feature processing module, a screening module and a prediction module, the machine learning model is pre-configured with model parameters, the screening module is connected to the feature processing module, and the prediction module is connected to the feature processing module and the screening module respectively; the training data is input into the feature processing module to obtain training features; the training features are input into the screening module for quality screening to obtain training feature screening information; the training features and the training feature screening information are input into the prediction module to obtain training prediction results; based on the training prediction results, the model parameters of the machine learning model are adjusted to obtain the trained target model.
[0256] It should be noted that the processing method of the request interface unit and the model unit is the same as the training method of the above-mentioned target model, and will not be repeated in the embodiments of this specification.
[0257] In an optional embodiment of this specification, the above-mentioned model training platform further includes a model library;
[0258] The model unit is also used to store the trained target model in the model library.
[0259] It should be noted that the model unit obtains the machine learning model to be trained and the training data of the target task based on the request information. After the machine learning model to be trained is trained with the training data to obtain the target model, the trained target model can be stored in the model library, so that the target model can be directly obtained from the model library later without repeated training. Among them, the method of obtaining the target model from the model library can refer to the above-mentioned "based on the task scenario identification, determining the target scene template from multiple preset scene templates, and based on the target scene template, searching for the target model from the model library, wherein the model library stores multiple machine learning models; or, based on the task model identification, searching for the target model from the model library" implementation method, which will not be repeated in the embodiments of this specification.
[0260] Corresponding to the above-mentioned machine learning model training method embodiment, this specification also provides a machine learning model training device embodiment, Figure 8 A structural diagram of a machine learning model training device provided by an embodiment of this specification is shown.
[0261] like Figure 8 As shown, the device includes:
[0262] a first acquisition module 802 configured to acquire a machine learning model to be trained and training data for a target task, wherein the machine learning model includes a feature processing module, a screening module, and a prediction module, the machine learning model is pre-configured with model parameters, the screening module is connected to the feature processing module, and the prediction module is connected to the feature processing module and the screening module, respectively;
[0263] A first input module 804 is configured to input training data into the feature processing module to obtain training features;
[0264] The second input module 806 is configured to input the training features into the screening module for quality screening to obtain training feature screening information;
[0265] The third input module 808 is configured to input the training features and the training feature screening information into the prediction module to obtain the training prediction results;
[0266] The adjustment module 810 is configured to adjust the model parameters of the machine learning model based on the training prediction results to obtain a trained target model.
[0267] Optionally, the screening module includes a linear layer and an activation layer, the linear layer is connected to the feature processing module, the activation layer is connected to the linear layer, and the prediction module is connected to the activation layer; the second input module 806 is further configured to input the training features into the linear layer for linear transformation to obtain training linear feature data; the training linear feature data is input into the activation layer for quality screening to obtain training feature screening information.
[0268] Optionally, the training data includes positive training data and negative training data; the first acquisition module 802 is further configured to obtain sample data of the target task; sample the sample data using a machine learning model to obtain training data; perform quality assessment on the training data, and divide the training data into positive training data and negative training data based on the quality assessment results.
[0269] Optionally, the first acquisition module 802 is further configured to acquire sample data of the original machine learning model and the target task, wherein the original machine learning model includes a feature processing module, a screening module and a prediction module, the original machine learning model is pre-configured with model parameters, the screening module is connected to the feature processing module, and the prediction module is connected to the feature processing module and the screening module, respectively; the sample data is input into the feature processing module to obtain sample features; the sample features are input into the screening module for quality screening to obtain sample feature screening information; the sample features and the sample feature screening information are input into the prediction module to obtain sample prediction results; based on the sample prediction results, the feature processing module, the screening module and the prediction module are trained to obtain the machine learning model to be trained.
[0270] Optionally, the adjustment module 810 is further configured to adjust parameters of the screening module based on the training prediction results to obtain a trained target model.
[0271] Optionally, the first acquisition module 802 is further configured to obtain target model parameters; based on the target model parameters, construct a feature processing module, a prediction module and a screening module; connect the screening module with the feature processing module, and connect the prediction module with the feature processing module and the screening module respectively to obtain the original machine learning model.
[0272] Optionally, the first acquisition module 802 is further configured to obtain model parameters and screening parameters of a reference model, wherein the reference model includes a feature processing module and a prediction module; based on the reference model, construct the feature processing module and the prediction module, and set the initial parameters of the feature processing module and the prediction module according to the model parameters of the reference model; based on the screening parameters, construct the screening module, and initialize the parameters of the screening module.
[0273] By applying the solution of the embodiments of this specification, by integrating the screening module into the machine learning model, the machine learning model has both generation and quality assessment capabilities, thereby utilizing the feature screening information output by the screening module to achieve efficient generation and result screening, automatically achieving controllable quality of the generated results, and improving the quality of the generated results.
[0274] The above is a schematic scheme of a machine learning model training device of this embodiment. It should be noted that the technical scheme of the machine learning model training device and the technical scheme of the machine learning model training method described above are based on the same concept. For details not described in detail in the technical scheme of the machine learning model training device, please refer to the description of the technical scheme of the machine learning model training method described above.
[0275] Corresponding to the above-mentioned task processing method embodiment, this specification also provides a task processing device embodiment, Figure 9 FIG1 shows a schematic diagram of the structure of a task processing device provided by an embodiment of this specification. Figure 9 As shown, the device includes:
[0276] The second acquisition module 902 is configured to acquire task data of the target task;
[0277] a fourth input module 904 configured to input task data into a target model corresponding to the target task, and obtain feature data output by a feature processing module in the target model, wherein the target model includes a feature processing module, a screening module, and a prediction module, wherein the screening module is connected to the feature processing module, and the prediction module is connected to the feature processing module and the screening module, respectively;
[0278] The fifth input module 906 is configured to input the feature data into the screening module for quality screening to obtain feature screening information;
[0279] The sixth input module 908 is configured to input the feature data and feature screening information into the prediction module to obtain the target result.
[0280] Optionally, the sixth input module 908 is further configured to generate candidate results according to the feature data in the prediction module, and filter the candidate results according to the feature filtering information to obtain the target result.
[0281] Optionally, the sixth input module 908 is further configured to filter the feature data according to the feature filtering information in the prediction module to obtain target feature data, and generate a target result according to the target feature data.
[0282] Optionally, the device also includes: an execution module, configured to return to the step of inputting the task data into the target model corresponding to the target task and obtaining the feature data output by the feature processing module in the target model when the target result does not include a terminator, until the target result includes a terminator, and obtains an updated target result.
[0283] Optionally, the screening module includes a linear layer and an activation layer, the linear layer is connected to the feature processing module, the activation layer is connected to the linear layer, and the prediction module is connected to the activation layer; the fifth input module 906 is further configured to input the feature data into the linear layer for linear transformation to obtain linear feature data; input the linear feature data into the activation layer for quality screening to obtain feature screening information.
[0284] Optionally, the device further includes: a labeling module configured to label key information in the target result; and feed back the target result to a front-end user.
[0285] Optionally, the device also includes: a second receiving module, configured to receive key feedback information sent by the front-end user regarding key information in the target result, wherein the key feedback information is information provided by the front-end user for feedback on the key information based on the task information of the target task; inputting the key feedback information, task data and target result into the target model to obtain the adjusted feature data output by the feature processing module in the target model; inputting the adjusted feature data into the screening module for quality screening to obtain adjusted feature screening information; inputting the adjusted feature data and the adjusted feature screening information into the prediction module to obtain the adjusted target result.
[0286] Optionally, the device further includes: a third receiving module configured to receive editing information sent by a front-end user for key information in the target result; and edit the target result according to the editing information to obtain an edited target result.
[0287] Optionally, the device also includes: a fourth receiving module, configured to feed back the target result to the front-end user; receive result feedback information sent by the front-end user, wherein the result feedback information is information provided by the front-end user on the target result; construct sample task data based on the result feedback information; and train the target model based on the sample task data.
[0288] By applying the solution of the embodiment of this specification, since the screening module is integrated into the target model, the target model has both generation capability and quality assessment capability. Therefore, during the task processing, the target model can utilize the feature screening information output by the screening module to achieve efficient generation and result screening, automatically realize controllable quality of the generated results, and improve the quality of the generated results.
[0289] The above is a schematic scheme of a task processing device of this embodiment. It should be noted that the technical scheme of the task processing device and the technical scheme of the task processing method described above are of the same concept. For details not described in detail in the technical scheme of the task processing device, please refer to the description of the technical scheme of the task processing method described above.
[0290] Corresponding to the above text generation method embodiment, this specification also provides a text generation device embodiment, Figure 10 FIG. 1 shows a schematic diagram of a text generation device provided by an embodiment of this specification. Figure 10 As shown, the device includes:
[0291] The third acquisition module 1002 is configured to acquire task data of the text generation task;
[0292] a seventh input module 1004 configured to input task data into the text generation model and obtain feature data output by a feature processing module in the text generation model, wherein the text generation model includes a feature processing module, a screening module, and a prediction module, wherein the screening module is connected to the feature processing module, and the prediction module is connected to the feature processing module and the screening module, respectively;
[0293] An eighth input module 1006 is configured to input the feature data into the screening module for quality screening to obtain feature screening information;
[0294] The ninth input module 1008 is configured to input the feature data and feature screening information into the prediction module to obtain the target text.
[0295] By applying the solution of the embodiments of this specification, by integrating the screening module into the text generation model, the text generation model has both text generation capabilities and quality assessment capabilities, thereby utilizing the feature screening information output by the screening module to achieve efficient text generation and result screening, automatically achieving controllable quality of the text generation results, and improving the quality of the text generation results.
[0296] The above is a schematic diagram of a text generation device according to this embodiment. It should be noted that the technical solution of the text generation device and the technical solution of the above-mentioned text generation method are based on the same concept. For details not described in detail in the technical solution of the text generation device, please refer to the description of the technical solution of the above-mentioned text generation method.
[0297] Corresponding to the above-mentioned information processing method embodiment based on machine learning model, this specification also provides an information processing device embodiment based on machine learning model, Figure 11 FIG1 shows a schematic diagram of the structure of an information processing device based on a machine learning model provided by an embodiment of this specification. Figure 11 As shown, the device includes:
[0298] A first receiving module 1102 is configured to receive a task generation request, wherein the task generation request includes request information;
[0299] A fourth acquisition module 1104 is configured to acquire a target model based on the request information, wherein the target model includes a feature processing module, a screening module, and a prediction module, wherein the screening module is connected to the feature processing module, and the prediction module is connected to the feature processing module and the screening module, respectively. The screening module is configured to perform quality screening on feature data output by the feature processing module to obtain feature screening information, and the prediction module is configured to generate a result based on the feature data output by the feature processing module and the feature screening information output by the screening module.
[0300] The generating module 1106 is configured to generate task information based on the target model, wherein the task information is used to execute the target task.
[0301] Optionally, the request information includes a task scenario identifier of the target task, or a task model identifier; the fourth acquisition module 1104 is further configured to determine a target scene template from multiple preset scene templates based on the task scenario identifier, and search for a target model from a model library based on the target scene template, wherein the model library stores multiple machine learning models; or, search for a target model from the model library based on the task model identifier.
[0302] Optionally, the request information includes sample data of the target task; the fourth acquisition module 1104 is further configured to train the original machine learning model corresponding to the target task based on the sample data to obtain the machine learning model to be trained; use the machine learning model to be trained to sample the sample data to obtain training data; based on the training data, train the machine learning model to be trained to obtain the target model that has completed the training.
[0303] The solution of the embodiments of this specification receives a task generation request; based on the request information, obtains a target model; and generates task information based on the target model. Through the model training platform, task information for executing the target task is generated. This ensures the quality and efficiency of task processing while reducing system deployment and operation and maintenance costs, providing users with convenient and efficient task processing services.
[0304] The above is a schematic diagram of an information processing device based on a machine learning model according to this embodiment. It should be noted that the technical solution of the information processing device based on a machine learning model and the technical solution of the information processing method based on a machine learning model are based on the same concept. For details not described in detail in the technical solution of the information processing device based on a machine learning model, please refer to the description of the technical solution of the information processing method based on a machine learning model.
[0305] Figure 12 12 shows a block diagram of a computing device according to an embodiment of the present disclosure. Components of the computing device 1200 include, but are not limited to, a memory 1210 and a processor 1220. The processor 1220 is connected to the memory 1210 via a bus 1230, and a database 1250 is used to store data.
[0306] The computing device 1200 also includes an access device 1240 that enables the computing device 1200 to communicate via one or more networks 1260. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 1240 may include one or more of any type of network interface, wired or wireless (e.g., a network interface card (NIC)), such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a World Wide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and the like.
[0307] In one embodiment of the present specification, the above components of the computing device 1200 and Figure 12 Other components not shown in the figure may also be connected to each other, for example, via a bus. Figure 12 The computing device structure block diagram shown is for illustrative purposes only and is not intended to limit the scope of this specification. Those skilled in the art may add or replace other components as needed.
[0308] Computing device 1200 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook computer, etc.), a mobile phone (e.g., a smartphone), a wearable computing device (e.g., a smartwatch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or a personal computer (PC). Computing device 1200 may also be a mobile or stationary server.
[0309] Among them, processor 1220 is used to execute computer programs / instructions, which, when executed by the processor, implement the steps of the above-mentioned machine learning model training method or task processing method or text generation method or information processing method based on the machine learning model.
[0310] The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of this computing device is based on the same concept as the technical schemes of the aforementioned machine learning model training method, task processing method, text generation method, and information processing method based on a machine learning model. For details not described in detail in the technical scheme of the computing device, please refer to the description of the technical schemes of the aforementioned machine learning model training method, task processing method, text generation method, or information processing method based on a machine learning model.
[0311] One embodiment of the present specification also provides a computer-readable storage medium storing a computer program / instruction, which, when executed by a processor, implements the steps of the above-mentioned machine learning model training method or task processing method or text generation method or information processing method based on a machine learning model.
[0312] The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of this storage medium is based on the same concept as the technical schemes of the aforementioned machine learning model training method, task processing method, text generation method, and information processing method based on a machine learning model. For details not described in detail in the technical scheme of the storage medium, please refer to the description of the technical schemes of the aforementioned machine learning model training method, task processing method, text generation method, or information processing method based on a machine learning model.
[0313] One embodiment of this specification also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the above-mentioned machine learning model training method or task processing method or text generation method or information processing method based on a machine learning model.
[0314] The above is a schematic scheme of a computer program product of this embodiment. It should be noted that the technical scheme of this computer program product is based on the same concept as the technical schemes of the aforementioned machine learning model training method, task processing method, text generation method, and information processing method based on a machine learning model. For details not described in detail in the technical scheme of the computer program product, please refer to the description of the technical schemes of the aforementioned machine learning model training method, task processing method, text generation method, or information processing method based on a machine learning model.
[0315] The foregoing description of this specification describes specific embodiments. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that described in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or the sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0316] The computer instructions include computer program codes, which may be in source code form, object code form, executable files, or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal, and software distribution medium. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0317] It should be noted that for the aforementioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of this specification are not limited by the order of the actions described, because according to the embodiments of this specification, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of this specification.
[0318] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0319] The preferred embodiments disclosed above are intended only to help illustrate this specification. The optional embodiments do not exhaustively describe all details, nor do they limit the invention to the specific embodiments described. Obviously, many modifications and variations can be made based on the content of the embodiments of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the embodiments of this specification, so that those skilled in the art can better understand and utilize this specification. This specification is limited only by the claims and their full scope and equivalents.< / eos> < / s> < / eos> < / s> < / s> < / s> < / s>
Claims
1. A machine learning model training method, comprising: Obtaining a machine learning model to be trained and training data for a target task, wherein the machine learning model includes a feature processing module, a screening module, and a prediction module, the machine learning model is pre-configured with model parameters, the screening module is connected to the feature processing module, and the prediction module is connected to the feature processing module and the screening module, respectively; Inputting the training data into the feature processing module to obtain training features; Inputting the training features into the screening module for quality screening to obtain training feature screening information; Inputting the training features and the training feature screening information into the prediction module to obtain a training prediction result; Based on the training prediction results, the model parameters of the machine learning model are adjusted to obtain a trained target model.
2. The method according to claim 1, wherein the screening module comprises a linear layer and an activation layer, the linear layer is connected to the feature processing module, the activation layer is connected to the linear layer, and the prediction module is connected to the activation layer; The step of inputting the training features into the screening module for quality screening to obtain training feature screening information includes: Inputting the training features into the linear layer for linear transformation to obtain training linear feature data; The training linear feature data is input into the activation layer for quality screening to obtain training feature screening information.
3. The method according to claim 1, wherein the training data comprises positive training data and negative training data; The step of obtaining training data for a target task includes: Get sample data for the target task; Sampling the sample data using the machine learning model to obtain training data; The training data is quality evaluated, and the training data is divided into the positive training data and the negative training data according to the quality evaluation result.
4. The method according to claim 1, wherein obtaining the machine learning model to be trained comprises: Obtaining sample data of an original machine learning model and a target task, wherein the original machine learning model includes a feature processing module, a screening module, and a prediction module, the original machine learning model is pre-configured with model parameters, the screening module is connected to the feature processing module, and the prediction module is connected to the feature processing module and the screening module respectively; Inputting the sample data into the feature processing module to obtain sample features; Inputting the sample characteristics into the screening module for quality screening to obtain sample characteristic screening information; Inputting the sample characteristics and the sample characteristic screening information into the prediction module to obtain a sample prediction result; Based on the sample prediction results, the feature processing module, the screening module and the prediction module are trained to obtain the machine learning model to be trained.
5. The method according to claim 1, wherein adjusting the model parameters of the machine learning model based on the training prediction results to obtain a trained target model comprises: Based on the training prediction results, the parameters of the screening module are adjusted to obtain a trained target model.
6. The method according to claim 4, wherein obtaining the original machine learning model comprises: Get target model parameters; Based on the target model parameters, construct a feature processing module, a prediction module and a screening module; The screening module is connected to the feature processing module, and the prediction module is connected to the feature processing module and the screening module respectively to obtain an original machine learning model.
7. The method according to claim 6, wherein obtaining target model parameters comprises: Obtaining model parameters and screening parameters of a reference model, wherein the reference model includes a feature processing module and a prediction module; The feature processing module, prediction module and screening module are constructed based on the target model parameters, including: Based on the reference model, construct a feature processing module and a prediction module, and set initial parameters of the feature processing module and the prediction module according to model parameters of the reference model; Based on the screening parameters, a screening module is constructed, and parameters of the screening module are initialized.
8. A task processing method, comprising: Get the task data of the target task; Inputting the task data into a target model corresponding to the target task, and obtaining feature data output by a feature processing module in the target model, wherein the target model includes a feature processing module, a screening module, and a prediction module, the screening module is connected to the feature processing module, and the prediction module is connected to the feature processing module and the screening module respectively; Inputting the characteristic data into the screening module for quality screening to obtain characteristic screening information; The feature data and the feature screening information are input into the prediction module to obtain a target result.
9. The method according to claim 8, wherein inputting the feature data and the feature screening information into the prediction module to obtain a target result comprises: In the prediction module, candidate results are generated according to the feature data, and the candidate results are screened according to the feature screening information to obtain the target result.
10. The method according to claim 8, wherein inputting the feature data and the feature screening information into the prediction module to obtain a target result comprises: In the prediction module, the feature data is screened according to the feature screening information to obtain target feature data, and a target result is generated according to the target feature data.
11. The method according to claim 8, further comprising: after inputting the feature data and the feature screening information into the prediction module and obtaining a target result; In the case that the target result does not include the terminator, return to the step of inputting the task data into the target model corresponding to the target task and obtaining the feature data output by the feature processing module in the target model until the target result includes the terminator, thereby obtaining the updated target result.
12. The method according to claim 8, wherein the screening module comprises a linear layer and an activation layer, the linear layer is connected to the feature processing module, the activation layer is connected to the linear layer, and the prediction module is connected to the activation layer; The step of inputting the characteristic data into the screening module for quality screening to obtain characteristic screening information includes: Inputting the feature data into the linear layer for linear transformation to obtain linear feature data; The linear feature data is input into the activation layer for quality screening to obtain the feature screening information.
13. The method according to any one of claims 8 to 12, further comprising: after inputting the feature data and the feature screening information into the prediction module to obtain a target result; Marking key information in the target result; Feedback the target results to the front-end user.
14. The method according to claim 13, further comprising: after feeding back the target result to the front-end user: receiving key feedback information sent by the front-end user regarding the key information in the target result, wherein the key feedback information is feedback information provided by the front-end user regarding the key information based on task information of the target task; Inputting the key feedback information, the task data and the target result into the target model to obtain the adjusted feature data output by the feature processing module in the target model; Inputting the adjustment feature data into the screening module for quality screening to obtain adjustment feature screening information; The adjusted feature data and the adjusted feature screening information are input into the prediction module to obtain an adjusted target result.
15. The method according to claim 13, further comprising: after feeding back the target result to the front-end user: receiving editing information sent by the front-end user with respect to the key information in the target result; The target result is edited according to the editing information to obtain an edited target result.
16. The method according to any one of claims 8 to 12, further comprising: after inputting the feature data and the feature screening information into the prediction module to obtain a target result; Feedback the target results to front-end users; receiving result feedback information sent by the front-end user, wherein the result feedback information is information provided by the front-end user regarding the target result; Constructing sample task data based on the result feedback information; The target model is trained based on the sample task data.
17. A text generation method comprising: Get the task data of the text generation task; Inputting the task data into a text generation model to obtain feature data output by a feature processing module in the text generation model, wherein the text generation model includes a feature processing module, a screening module, and a prediction module, the screening module is connected to the feature processing module, and the prediction module is connected to the feature processing module and the screening module respectively; Inputting the characteristic data into the screening module for quality screening to obtain characteristic screening information; The feature data and the feature screening information are input into the prediction module to obtain the target text.
18. An information processing method based on a machine learning model, comprising: receiving a task generation request, wherein the task generation request includes request information; Based on the request information, a target model is obtained, wherein the target model includes a feature processing module, a screening module, and a prediction module, the screening module is connected to the feature processing module, the prediction module is connected to the feature processing module and the screening module respectively, the screening module is used to perform quality screening on feature data output by the feature processing module to obtain feature screening information, and the prediction module is used to obtain a generation result based on the feature data output by the feature processing module and the feature screening information output by the screening module; Based on the target model, task information is generated, wherein the task information is used to perform the target task.
19. The method according to claim 18, wherein the request information includes a task scenario identifier of the target task, or a task model identifier; The acquiring of the target model based on the request information includes: Based on the task scenario identifier, a target scenario template is determined from a plurality of preset scenario templates, and based on the target scenario template, a target model is searched from a model library, wherein the model library stores a plurality of machine learning models; or Based on the task model identifier, a target model is searched from the model library.
20. The method according to claim 19, wherein the request information includes sample data of the target task; The acquiring of the target model based on the request information includes: Based on the sample data, the original machine learning model corresponding to the target task is trained to obtain a machine learning model to be trained; Sampling the sample data using the machine learning model to be trained to obtain training data; Based on the training data, the machine learning model to be trained is trained to obtain a target model that has completed the training.
21. A model training platform, comprising a request interface unit and a model unit; The request interface unit is used to receive a model training request, wherein: The model training request includes request information; The model unit is used to obtain the machine learning model to be trained and the training data of the target task based on the request information, wherein the machine learning model includes a feature processing module, a screening module and a prediction module, the machine learning model is pre-configured with model parameters, the screening module is connected to the feature processing module, and the prediction module is connected to the feature processing module and the screening module respectively; the training data is input into the feature processing module to obtain training features; the training features are input into the screening module for quality screening to obtain training feature screening information; the training features and the training feature screening information are input into the prediction module to obtain training prediction results; based on the training prediction results, the model parameters of the machine learning model are adjusted to obtain a trained target model.
22. The model training platform according to claim 21, further comprising a model library; The model unit is further used to store the trained target model in the model library.
23. A computing device comprising: memory and processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions. When the computer program / instructions are executed by the processor, the steps of the method described in any one of claims 1 to 7 or any one of claims 8 to 16 or claim 17 or any one of claims 18 to 20 are implemented.
24. A computer-readable storage medium storing a computer program / instruction, which, when executed by a processor, implements the steps of the method described in any one of claims 1 to 7 or any one of claims 8 to 16 or claim 17 or any one of claims 18 to 20.
25. A computer program product comprising a computer program / instructions, which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 7 or any one of claims 8 to 16 or claim 17 or any one of claims 18 to 20.