Multi-modal model training and scale deployment method and system
Through multimodal model training and scale deployment methods, the accuracy and compliance issues of instruction generation in scale deployment are solved, and more efficient model management and optimization are achieved.
Patent Information
- Application Number
- CN202411576753.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-06
- Publication Date
- 2025-02-25
AI Technical Summary
In large-scale deployment, direct deployment through infrastructure code tools can easily lead to deviations, reducing the accuracy and compliance of instruction generation.
Using multimodal model training and scale deployment methods, scale deployment instructions are generated and verified to ensure their accuracy and compliance through multi-source data collection, preprocessing, model architecture selection, training and scale deployment.
Improve the accuracy and compliance of large-scale deployment instructions, ensuring that the model is effectively managed and optimized from training to practical application stages.
Smart Images

Figure CN119513602A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of model training technology, and in particular to a method and system for multimodal model training and large-scale deployment. Background Art
[0002] Large-scale deployment usually refers to the deployment of technology or products on a larger scale, including the entire process of releasing, promoting, updating, testing, maintaining, migrating, and replacing products, components, or systems. In the field of cloud computing and information technology, large-scale deployment is a key step to ensure efficient and stable operation of services. It involves automated and standardized infrastructure management, as well as the ability to quickly build and expand complex environments. Large-scale deployment can help enterprises meet strict security and compliance requirements while improving governance capabilities and the efficiency of continuous integration / continuous delivery (CI / CD).
[0003] Large-scale deployment usually relies on advanced technologies and tools to achieve. For example, Terraform is a popular infrastructure as code tool that allows users to define and manage infrastructure through a declarative configuration language. Terraform Azurerm CAF Enterprise Scale is an open source project designed specifically for the Azure cloud environment. It uses Terraform for large-scale resource deployment and management to support enterprise-level large-scale deployment requirements. However, large-scale deployment directly through infrastructure code tools will result in deviations in large-scale deployment, thereby reducing the accuracy and compliance of large-scale deployment instruction generation. Summary of the invention
[0004] The purpose of the present invention is to provide a method and system for multimodal model training and large-scale deployment to solve the problems raised in the above background technology.
[0005] To achieve the above object, the present invention provides the following technical solution: a method for multimodal model training and large-scale deployment, comprising the following specific steps:
[0006] S1: Multi-source data collection: collect data for multimodal model fusion to ensure that the collected data is diverse, covering different topics, styles, and scenarios, and ensuring the generalization ability of the model;
[0007] S2: Data preprocessing: preprocessing the collected multi-source data to ensure the use of data for multimodal model training;
[0008] S3: Model architecture selection, using single-stream and multi-stream architectures to model and process data;
[0009] S4: Model training process, using data to adjust the parameters of the model so that the model can learn the patterns and rules in the data, and generate scale deployment instructions based on the rules obtained from model training;
[0010] S5: Multimodal model scale deployment method, applying the trained model to the production environment to handle actual tasks;
[0011] S6: Instruction verification and instruction output, verify the instructions generated by the scale deployment, and output correct and compliant scale deployment instructions.
[0012] Preferably, the data collected in S1 includes but is not limited to more than one of text, image, audio and video, and the sources of the text, image, audio and video collection include but are not limited to more than one of database, log file, sensor, social media, Internet webpage, API interface, and the collection method is as follows:
[0013] Crawler technology: Use web crawlers to automatically browse the Internet and extract structured and unstructured data from it. The crawlers are configured to follow specific data collection templates and manage access to multiple data sources through IP scheduling modules;
[0014] Direct database connection: query and extract data directly from relational databases through programming languages and database connection tools;
[0015] Log file reading: write scripts and use off-the-shelf log analysis tools to read server logs and application logs and extract useful information from them;
[0016] API calls: Using the API interfaces provided by legitimate and privacy-protected online services and applications to request data in accordance with the prescribed protocols and formats;
[0017] Sensor data collection: Collect real-time data through IoT devices, including temperature, humidity, and motion sensor readings;
[0018] Social Media Monitoring: Use legal and privacy-preserving social media monitoring tools to track and analyze user-generated content;
[0019] File transfer and download: Download data files from remote servers via FTP, SFTP, and other file transfer protocols;
[0020] Manual data entry: Data is entered manually by humans in the early stages of data collection and when data is obtained from non-digital sources.
[0021] Preferably, the data preprocessing in S2 includes text data processing, image data processing and audio data processing. The text data processing is to clean the text, remove special characters and punctuation marks, convert all letters to lowercase, and then perform lexical analysis. The image data processing is to adjust the image size to a uniform size. The audio data processing is to unify the audio sampling rate, for example, setting the sampling rate of all audio to 16kHz, extracting audio features, and performing normalization to normalize the pixel values to a specific range.
[0022] Preferably, the multi-stream architecture adopted in S3 designs encoders for different modalities respectively, and processes them through a feature interaction fusion mechanism. The single-stream structure processes the features of different modalities after splicing. The single-stream structure is a fusion architecture. The fusion architecture includes early fusion, late fusion and hybrid fusion. The early fusion fuses the data of different modalities in the early stage of the model, and directly splices the feature vectors of image and text as the input of the model. The late fusion is that the data of each modality is processed by an independent model respectively, and then the processed results are fused in the later stage of the model. The hybrid fusion combines the characteristics of early fusion and late fusion, and some modalities are fused in the early stage and some in the late stage.
[0023] Preferably, the model architecture selection in S3 also includes a self-attention mechanism, a masked language model, and parameter calculation of the model structure. The self-attention mechanism allows the model to focus on other words in the sentence while processing each word and understand the semantic connection between words. The formula for self-attention is:
[0024]
[0025] Where Q, K and V represent the query matrix, key matrix and value matrix respectively, d k Indicates the dimensions of the key matrix.
[0026] Preferably, the masked language model is a pre-training target that aims to predict the probability of masked words. During the pre-training process, the model attempts to restore the words in the sentence that are randomly replaced with special tags. The formula of the masked language model is:
[0027]
[0028] Where X is a given sequence, and a part of the mark is randomly masked to destroy it where C is the index set of the north masked markers in the sequence, is the sequence after a given mask in Under these conditions, the model predicts that the North mask marker Equal to the original mark X i The conditional probability of .
[0029] Preferably, the parameter calculation of the model structure involves the parameters of the input embedding layer, the multi-head self-attention layer, the feedforward network layer, the normalization layer and the output layer. The parameter amount of the model can be calculated by the following formula:
[0030] Parameter quantity = 2VH + 4LH 2 +3LHH′+2LH+H+VH
[0031] Where V represents the vocabulary size, H represents the dimension of the hidden layer, L represents the number of layers, and H′ represents the internal dimension of the feedforward network.
[0032] Preferably, the S4 model training process includes two stages: pre-training and fine-tuning. The purpose of the pre-training is to integrate information from different modalities and learn multimodal world knowledge. In this stage, the model usually uses large-scale text pairing data. The pre-training data can be divided into coarse-grained and fine-grained datasets. The coarse-grained datasets usually come from the Internet, and the fine-grained datasets are generated by using a large multimodal model. The fine-tuning stage includes feature alignment, instruction fine-tuning and alignment fine-tuning. In the pre-training stage of feature alignment, the model needs to map features of different modalities into a unified semantic space, which involves training a learnable bridge layer to achieve effective alignment between modalities. The purpose of the instruction fine-tuning stage is to teach the model to understand user instructions and complete specified tasks. In this stage, the model is trained using instruction formatted datasets, which contain clear task instructions and corresponding input-output pairs. Alignment fine-tuning refers to further optimizing the model, which involves fine-tuning the model using task-specific datasets.
[0033] Preferably, the multimodal model scale deployment method in S5 includes hardware environment preparation, model deployment framework selection and deployment process. The hardware environment preparation is to select appropriate computing devices according to the scale and complexity of the model. For small multimodal models, ordinary GPU servers are used, such as servers equipped with NVIDIA GeForce series GPUs. For large-scale multimodal models, data center-level GPU clusters are used. Storage resources are to ensure that there is enough storage space to store model weights, training data and intermediate results, and high-speed solid-state drives are used to increase data reading speed. For large-scale data, a distributed storage system is used. The model deployment framework selection is to select one of TensorFlow Serving, TorchServe and a specific scenario framework to deploy the multimodal model. TensorFlow Serving provides a convenient model deployment interface, supports multi-version model management and efficient model reasoning, TorchServe is a deployment framework designed specifically for PyTorch models, and the specific scenario framework is to deploy multimodal models in edge computing scenarios. Consider using TensorFlow Lite and PyTorch Mobile lightweight framework, a specific scenario framework compresses and optimizes the model to adapt to the computing and storage limitations of edge devices. The deployment process includes model conversion, deployment configuration, performance optimization and monitoring.
[0034] The present invention also provides a multimodal model training and large-scale deployment system, including a data acquisition system, a data processing system, a model training system, a large-scale deployment system and a hardware maintenance system. The data processing system is used to process the data collected by the data acquisition system, the model training system is used to perform model training on the data of the data processing system, the large-scale deployment system is used to generate instructions according to the model training system, and the hardware maintenance system is used to provide hardware equipment for the operation of the data acquisition system, the data processing system, the model training system and the large-scale deployment system.
[0035] Technical effects and advantages of the present invention:
[0036] The present invention utilizes a method for multimodal model training and large-scale deployment. By establishing and training a multimodal model, multimodal model training and large-scale deployment form a complete system, which are used in conjunction with each other to ensure that the model can be effectively managed and optimized at each stage from training to practical application, thereby improving the accuracy and compliance of large-scale deployment instruction generation. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 It is a flowchart of the present invention. DETAILED DESCRIPTION
[0038] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0039] The present invention provides Figure 1 A method and system for multimodal model training and scale deployment shown includes the following specific steps:
[0040] S1: Multi-source data collection: collect data for multimodal model fusion to ensure that the collected data is diverse, covering different topics, styles, and scenarios, and ensuring the generalization ability of the model;
[0041] S2: Data preprocessing: preprocessing the collected multi-source data to ensure the use of data for multimodal model training;
[0042] S3: Model architecture selection, using single-stream and multi-stream architectures to model and process data;
[0043] S4: Model training process, using data to adjust the parameters of the model so that the model can learn the patterns and rules in the data, and generate scale deployment instructions based on the rules obtained from model training;
[0044] S5: Multimodal model scale deployment method, applying the trained model to the production environment to handle actual tasks;
[0045] S6: Instruction verification and instruction output, verify the instructions generated by scale deployment, and output correct and compliant scale deployment instructions. Scale deployment instruction verification is to verify the model training in reverse through model training to ensure the correctness and accuracy of scale deployment instructions.
[0046] Furthermore, the data collected in S1 includes but is not limited to one or more of text, image, audio and video. The sources of text, image, audio and video collection include but are not limited to one or more of database, log file, sensor, social media, Internet webpage, API interface, and the collection method is as follows:
[0047] Crawler technology: Use web crawlers to automatically browse the Internet and extract structured and unstructured data from it. The crawlers are configured to follow specific data collection templates and manage access to multiple data sources through IP scheduling modules;
[0048] Direct database connection: query and extract data directly from relational databases through programming languages and database connection tools;
[0049] Log file reading: write scripts and use off-the-shelf log analysis tools to read server logs and application logs and extract useful information from them;
[0050] API calls: Using the API interfaces provided by legitimate and privacy-protected online services and applications to request data in accordance with the prescribed protocols and formats;
[0051] Sensor data collection: Collecting real-time data through IoT devices. This data includes sensor readings such as temperature, humidity, motion, etc.
[0052] Social Media Monitoring: Use legal and privacy-preserving social media monitoring tools to track and analyze user-generated content;
[0053] File transfer and download: Download data files from remote servers via FTP, SFTP, and other file transfer protocols;
[0054] Manual data entry: In the early stages of data collection and when obtaining data from non-digital sources, data is manually entered. When collecting data using crawler technology, direct database connection, log file reading, API calls, sensor data collection, social media monitoring, file transfer and download, and manual data entry methods, the legality of data collection and privacy protection must be ensured.
[0055] Specifically, the data preprocessing in S2 includes text data processing, image data processing and audio data processing. Text data processing is to clean the text, remove special characters and punctuation marks, convert all letters to lowercase, and then perform lexical analysis, such as segmenting the text into words or tags. Tools such as NLTK (for English) or jieba (for Chinese) can be used. Image data processing is to adjust the image size to a uniform size, such as adjusting all images to 224x224 pixels. 224x224 pixels is the standard input size of many models. Audio data processing is to unify the sampling rate of audio, such as setting the sampling rate of all audio to 16kHz, and extracting audio features, such as extracting features such as Mel Frequency Cepstral Coefficients (MFCC), and performing normalization to normalize pixel values to a specific range.
[0056] Furthermore, S3 adopts a multi-stream architecture to design encoders for different modalities, and processes them through a feature interaction fusion mechanism. The single-stream structure processes the features of different modalities after splicing. The single-stream structure is a fusion architecture. The fusion architecture includes early fusion, late fusion and hybrid fusion. Early fusion fuses data from different modalities in the early stage of the model, and directly splices the feature vectors of images and texts as the input of the model. It means that data from different sources are directly merged into a unified feature vector at the input layer of the model. This method can be performed before model training by eliminating the correlation between different sensors or fusing data in a lower-dimensional common space. The advantage of early fusion is that it can make full use of information from multiple data sources, but the disadvantage is that a large amount of data needs to be deducted from the modality to form a common point before fusion, and it may increase the difficulty of synchronizing timestamps of different modalities. Late fusion is that the data of each modality is processed by an independent model and then used in the model. In the later stage of the model, the processed results are fused, which means that feature extraction and processing are performed on data of different modalities respectively, and then the respective prediction results are fused in the prediction stage. This method usually adopts rules such as weighted average and voting mechanism to determine how to finally combine the outputs of each independently trained model. The advantage of late fusion is that the independence of each information source can be retained, and the asynchrony of data can be simply handled, but the modal correlation at the feature level may be ignored. Hybrid fusion combines the characteristics of early fusion and late fusion. Some modalities are fused early and some are fused late, allowing data fusion at different stages of model training. This method can be integrated at the feature level or the decision level to utilize information at different levels. Hybrid fusion attempts to increase the complexity of the model structure and the difficulty of training while combining the advantages of both. There is no definite relationship between the advantages and disadvantages of different fusion methods. Under different experimental conditions, different fusion methods can be tried to obtain better fusion results.
[0057] In particular, the model architecture selection in S3 also includes the self-attention mechanism, the masked language model, and the parameter calculation of the model structure. The self-attention mechanism allows the model to focus on other words in the sentence while processing each word and understand the semantic connection between words. The formula for self-attention is:
[0058]
[0059] Where Q, K and V represent the query matrix, key matrix and value matrix respectively, d krepresents the dimension of the key matrix. The masked language model is a pre-training target that aims to predict the probability of masked words. During the pre-training process, the model attempts to restore words in the sentence that are randomly replaced with special tags. The self-attention mechanism is particularly suitable for tasks that require understanding long-distance dependencies because it can effectively capture the relationship within the sequence, and its computational complexity does not increase linearly with the increase of sequence length. The formula of the masked language model is:
[0060]
[0061] Where X is a given sequence, and a part of the mark is randomly masked to destroy it where C is the index set of the north masked markers in the sequence, is the sequence after a given mask in Under these conditions, the model predicts that the North mask marker Equal to the original mark X i The model accepts a partially masked text sequence as input. The goal of the model is to predict the original words at these masked positions. This pre-training method forces the model to not only understand the words in the context, but also learn to predict the missing information, thereby capturing the rich relationship between words. Since the model is bidirectional during pre-training, it can use the contextual information on the left and right sides for prediction, which is in contrast to the traditional unidirectional language model. The parameter calculation of the model structure involves the parameters of the input embedding layer, multi-head self-attention layer, feedforward network layer, normalization layer, and output layer. The parameter amount of the model can be calculated by the following formula:
[0062] Parameter quantity = 2VH + 4LH 2 +3LHH′+2LH+H+VH
[0063] Where V represents the vocabulary size, H represents the dimension of the hidden layer, L represents the number of layers, and H′ represents the internal dimension of the feedforward network.
[0064] Furthermore, the S4 model training process includes two stages: pre-training and fine-tuning. The purpose of pre-training is to integrate information from different modalities and learn multimodal world knowledge. In this stage, the model usually uses large-scale text pairing data, such as image caption data, to align features of different modalities through methods such as autoregressive prediction. Pre-training data can be divided into coarse-grained and fine-grained datasets. Coarse-grained datasets usually come from the Internet, with short and potentially noisy descriptions, while fine-grained datasets are generated by using a large multimodal model. The fine-tuning stage includes feature alignment, instruction fine-tuning, and alignment fine-tuning. Feature alignment In the pre-training stage, the model needs to map features of different modalities to a unified The purpose of the instruction fine-tuning phase is to teach the model to better understand user instructions and complete specified tasks. In this phase, the model is trained using instruction formatted datasets that contain clear task instructions and corresponding input-output pairs. Instruction fine-tuning helps improve the model's generalization ability and ability to follow complex instructions. Alignment fine-tuning refers to further optimizing the model to make it perform better on specific tasks. It involves fine-tuning the model using task-specific datasets to improve the performance of the model in practical applications.
[0065] Furthermore, the multimodal model scale deployment method in S5 includes hardware environment preparation, model deployment framework selection and deployment process. Hardware environment preparation is to select appropriate computing devices according to the scale and complexity of the model. For small multimodal models, ordinary GPU servers are used, such as servers equipped with NVIDIA GeForce series GPUs. For large-scale multimodal models, data center-level GPU clusters are used. Storage resources are to ensure that there is enough storage space to store model weights, training data and intermediate results. High-speed solid-state drives are used to increase data reading speed. For large-scale data, distributed storage systems are used. Model deployment framework selection is to choose one of TensorFlow Serving, TorchServe and specific scenario frameworks to deploy multimodal models. TensorFlow Serving provides a convenient model deployment interface, supports multi-version model management and efficient model reasoning. TorchServe is a deployment framework designed specifically for PyTorch models. It is simple, easy to use and highly scalable. The specific scenario framework is to deploy multimodal models in edge computing scenarios. Consider using TensorFlow Lite and PyTorch Mobile lightweight framework, specific scenario framework compresses and optimizes the model to adapt to the computing and storage limitations of edge devices. The deployment process includes model conversion, deployment configuration, performance optimization and monitoring. Model conversion is to convert the trained multimodal model into a format suitable for the deployment framework. For example, convert the PyTorch model to ONNX format for deployment in the TensorFlow Serving framework. Deployment configuration is to configure the relevant parameters of the model in the deployment framework, such as model path, input and output format, batch size, etc., set the service interface of the model, such as defining a RESTful API or gRPC interface so that external applications can call the model's reasoning service, performance optimization and monitoring. During the deployment process, the reasoning performance of the model is optimized. Quantization technology can be used to reduce the size of the model and increase the reasoning speed. A monitoring system is established to monitor the performance indicators of the model in real time, such as reasoning latency, throughput, etc. If performance degradation is found, the deployment parameters can be adjusted in time or the model can be optimized.
[0066] The present invention also provides a multimodal model training and large-scale deployment system, including a data acquisition system, a data processing system, a model training system, a large-scale deployment system and a hardware maintenance system. The data processing system is used to process the data collected by the data acquisition system, the model training system is used to perform model training on the data of the data processing system, the large-scale deployment system is used to generate instructions according to the model training system, and the hardware maintenance system is used to provide hardware equipment for the operation of the data acquisition system, the data processing system, the model training system and the large-scale deployment system.
[0067] Finally, it should be noted that the above is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, it is still possible for those skilled in the art to modify the technical solutions described in the aforementioned embodiments or to make equivalent substitutions for some of the technical features therein. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for multimodal model training and scale deployment, characterized in that: The specific steps include: S1: Multi-source data collection: collect data for multimodal model fusion to ensure that the collected data is diverse, covering different topics, styles, and scenarios, and ensuring the generalization ability of the model; S2: Data preprocessing: preprocessing the collected multi-source data to ensure the use of data for multimodal model training; S3: Model architecture selection, using single-stream and multi-stream architectures to model and process data; S4: Model training process, using data to adjust the parameters of the model so that the model can learn the patterns and rules in the data, and generate scale deployment instructions based on the rules obtained from model training; S5: Multimodal model scale deployment method, applying the trained model to the production environment to handle actual tasks; S6: Instruction verification and instruction output, verify the instructions generated by the scale deployment, and output correct and compliant scale deployment instructions.
2. The method for multimodal model training and scale deployment according to claim 1, characterized in that: The data collected in S1 includes but is not limited to one or more of text, image, audio and video. The sources of text, image, audio and video collection include but are not limited to one or more of database, log file, sensor, social media, Internet webpage, API interface, and the collection method is as follows: Crawler technology: Use web crawlers to automatically browse the Internet and extract structured and unstructured data from it. The crawlers are configured to follow specific data collection templates and manage access to multiple data sources through IP scheduling modules; Direct database connection: query and extract data directly from relational databases through programming languages and database connection tools; Log file reading: write scripts and use off-the-shelf log analysis tools to read server logs and application logs and extract useful information from them; API calls: Using the API interfaces provided by legitimate and privacy-protected online services and applications to request data in accordance with the prescribed protocols and formats; Sensor data collection: Collect real-time data through IoT devices, including temperature, humidity, and motion sensor readings; Social Media Monitoring: Use legal and privacy-preserving social media monitoring tools to track and analyze user-generated content; File transfer and download: Download data files from remote servers via FTP, SFTP, and other file transfer protocols; Manual data entry: Data is entered manually by humans in the early stages of data collection and when data is obtained from non-digital sources.
3. The method for multimodal model training and scale deployment according to claim 1, characterized in that: The data preprocessing in S2 includes text data processing, image data processing and audio data processing. The text data processing is to clean the text, remove special characters and punctuation marks, convert all letters to lowercase, and then perform lexical analysis. The image data processing is to adjust the image size to a uniform size. The audio data processing is to unify the sampling rate of the audio, for example, setting the sampling rate of all audio to 16kHz, extracting audio features, and performing normalization processing to normalize the pixel values to a specific range.
4. The method for multimodal model training and scale deployment according to claim 1, characterized in that: The multi-stream architecture adopted in S3 is to design encoders for different modalities respectively, and process them through the feature interaction fusion mechanism. The single-stream structure is to process the features of different modalities after splicing. The single-stream structure is a fusion architecture. The fusion architecture includes early fusion, late fusion and hybrid fusion. The early fusion fuses the data of different modalities in the early stage of the model, and directly splices the feature vectors of image and text as the input of the model. The late fusion is that the data of each modality is processed by an independent model respectively, and then the processed results are fused in the later stage of the model. The hybrid fusion combines the characteristics of early fusion and late fusion, and some modalities are fused in the early stage and some in the late stage.
5. The method for multimodal model training and scale deployment according to claim 4, characterized in that: The model architecture selection in S3 also includes the self-attention mechanism, the masked language model, and the parameter calculation of the model structure. The self-attention mechanism allows the model to focus on other words in the sentence while processing each word and understand the semantic connection between words. The formula for self-attention is: Where Q, K and V represent the query matrix, key matrix and value matrix respectively, d k Indicates the dimensions of the key matrix.
6. A method for multimodal model training and scale deployment according to claim 5, characterized in that: The masked language model is a pre-training target that aims to predict the probability of masked words. During the pre-training process, the model attempts to restore the words in the sentence that are randomly replaced with special tags. The formula of the masked language model is: Where X is a given sequence, and a part of the mark is randomly masked to destroy it where C is the index set of the north masked markers in the sequence, is the sequence after a given mask in Under these conditions, the model predicts that the North mask marker Equal to the original mark X i The conditional probability of .
7. The method for multimodal model training and scale deployment according to claim 5, characterized in that: The parameter calculation of the model structure involves the parameters of the input embedding layer, multi-head self-attention layer, feedforward network layer, normalization layer and output layer. The parameter quantity of the model can be calculated by the following formula: Parameter quantity = 2VH + 4LH 2 +3LHH′+2LH+H+VH Where V represents the vocabulary size, H represents the dimension of the hidden layer, L represents the number of layers, and H′ represents the internal dimension of the feedforward network.
8. The method for multimodal model training and scale deployment according to claim 1, characterized in that: The S4 model training process includes two stages: pre-training and fine-tuning. The purpose of the pre-training is to integrate information from different modalities and learn multimodal world knowledge. In this stage, the model usually uses large-scale text pairing data. The pre-training data can be divided into coarse-grained and fine-grained datasets. The coarse-grained datasets usually come from the Internet, and the fine-grained datasets are generated by using a large multimodal model. The fine-tuning stage includes feature alignment, instruction fine-tuning and alignment fine-tuning. In the pre-training stage of feature alignment, the model needs to map features of different modalities into a unified semantic space, which involves training a learnable bridge layer to achieve effective alignment between modalities. The purpose of the instruction fine-tuning stage is to teach the model to understand user instructions and complete specified tasks. In this stage, the model is trained using instruction formatted datasets, which contain clear task instructions and corresponding input-output pairs. Alignment fine-tuning refers to further optimizing the model, which involves fine-tuning the model using task-specific datasets.
9. The method for multimodal model training and scale deployment according to claim 1, characterized in that: The multimodal model scale deployment method in S5 includes hardware environment preparation, model deployment framework selection and deployment process. The hardware environment preparation is to select appropriate computing devices according to the scale and complexity of the model. For small multimodal models, ordinary GPU servers are used, such as servers equipped with NVIDIA GeForce series GPUs. For large-scale multimodal models, data center-level GPU clusters are used. Storage resources are to ensure that there is enough storage space to store model weights, training data and intermediate results. High-speed solid-state drives are used to increase data reading speed. For large-scale data, distributed storage systems are used. The model deployment framework selection is to select one of TensorFlow Serving, TorchServe and a specific scenario framework to deploy multimodal models. TensorFlow Serving provides a convenient model deployment interface, supports multi-version model management and efficient model reasoning, TorchServe is a deployment framework designed specifically for PyTorch models, and the specific scenario framework is to deploy multimodal models in edge computing scenarios. Consider using TensorFlow Lite and PyTorch Mobile lightweight framework, a specific scenario framework compresses and optimizes the model to adapt to the computing and storage limitations of edge devices. The deployment process includes model conversion, deployment configuration, performance optimization and monitoring.
10. A multimodal model training and scale deployment system, characterized in that: It includes a data acquisition system, a data processing system, a model training system, a large-scale deployment system and a hardware maintenance system. The data processing system is used to process the data collected by the data acquisition system, the model training system is used to perform model training on the data of the data processing system, the large-scale deployment system is used to generate instructions according to the model training system, and the hardware maintenance system is used to provide hardware equipment for the operation of the data acquisition system, the data processing system, the model training system and the large-scale deployment system.
Citation Information
Cited By
Training method and apparatus for multi-modal large model
WO2026179596A1