当前位置:网站首页>What is the learning path for model deployment optimization?
What is the learning path for model deployment optimization?
2022-06-24 05:30:00 【Aceyclee】
The direction of model deployment optimization is actually quite broad . Complete the training from the model , Finally, deploy the model to the actual hardware , The whole process will involve many different levels of work , Each link has different requirements for technical points .
The deployment process can be roughly divided into the following steps :
One 、 Model transformation
After getting the model from the training framework , Convert to the corresponding model format according to the requirements . The choice of model format is usually based on the business side of the company SDK The needs of , Usually it is caffe A model or onnx Model , To facilitate the model to adapt between different frameworks .
The work of this link requires the corresponding training framework and caffe/onnx And so on .
frequently-used Pytorch and TensorFlow And other frameworks have very mature communities and corresponding blogs or tutorials ;caffe and onnx The model format also has many public documents for reference and learning .
Even if there is no article to refer to , Fortunately, both are open source , You can still find the answer by reading the source code and sample code .
Two 、 Model optimization
The model optimization here refers to the general optimization independent of the back end , Like constant folding 、 Arithmetic optimization 、 Dependency optimization 、 Function optimization 、 Operator fusion and model information simplification .
Some training frameworks will include some of the above optimization processes when the training model is exported , At the same time, if the model format is converted , Different IR The difference between representations may introduce some redundant or optimizable calculations , Therefore, some model optimization operations are usually carried out after model transformation .
The work of this phase requires the execution process of the calculation diagram 、 each op Calculation definition of 、 Have a certain understanding of the performance model of program operation , Only in this way can we know that if we optimize the model , How to ensure that the optimized model has better performance .
The deeper we get to know , The more potential performance of the model can be mined .
3、 ... and 、 The model of compression
Broadly speaking , Model compression is also part of model optimization . Model compression itself includes many methods , Like pruning 、 Distillation 、 Quantification and so on . The basic purpose of model compression is to obtain a smaller model , Reduce storage requirements while reducing the amount of Computing , In order to achieve the purpose of acceleration .
The work of this link requires the compression algorithm itself 、 Algorithm tasks and model structure design involved in the model 、 Have a certain understanding of the three aspects of the hardware platform computing process .
When the accuracy of the model decreases due to the model compression operation , Knowledge of model algorithms , Have a good understanding of the hardware calculation details of the model , In order to analyze the reasons for the decline in accuracy , And give targeted solutions .
More important for model compression is often engineering experience , Because when deploying the same model on different hardware back ends , Due to the difference of hardware calculation , The effect on accuracy is often different , This aspect can only be continuously improved by accumulating engineering experience .
OpenPPL It is also gradually opening up its own model compression tool chain , And the model algorithm mentioned above 、 Compression algorithm and hardware platform adaptation .
Four 、 Model deployment
Model deployment is the most complicated part of the whole process . In terms of Engineering , The main core task is model packaging 、 Model encryption , And carry on SDK encapsulation .
In an actual product , Multiple models are often used .
Model packaging refers to the pre-processing and post-processing involved in the model , And integrating multiple models , And add some other descriptive documents . The format of model packaging and the method of model encryption are specific SDK relevant . Skills and skills mainly involved in this link SDK Closer development .
In terms of function , The biggest impact on the final performance of the deployment is definitely SDK Back end libraries included in , That is, the inference base of the actual running model . Developing a high-performance inference base requires a wider range of skills , And professional .
The programming idea of parallel computing is universal on different platforms , But different hardware architectures have their own characteristics , The development ideas of inference base are also different , This requires a certain understanding of the architecture of the development backend .
Specific to the programming of different architectures , It is recommended to refer to the current open source reasoning libraries of major manufacturers for further study .
Try it :「 from 0 To 1, Use OpenPPL Achieve one AI Application of reasoning 」
Join us :「OpenPPL Recruitment !」
welcome star:「openppl-public/ppl.nn」
communication QQ Group :627853444, Group entry secret order OpenPPL
边栏推荐
- Analysis of PHP environment configuration
- What is a website domain name and why do you want to register a domain name
- What is domain name resolution? How much does domain name registration cost
- PTA 1041 seat number (15 points)
- PHP sizeof() function
- Error 0xc0000013, 0xc000007b, etc. due to the conflict between the CD-ROM drive letter and the drive letter in the business program path
- How can the website be broken by CC attack?
- What is an ECS? ECS、BCC、CVM...
- Bert series Roberta Albert erine detailed explanation and use learning notes
- [latest offer] 2-core 4G server is limited to 188 yuan, and it is in the process of being snapped up
猜你喜欢
Easy to understand JDBC tutorial - absolutely suitable for zero Foundation

Intensive learning and application of "glory of the king" to complete the application of 7 real worlds other than human players
What cloud native knowledge should programmers master?

How should we learn cloud native in 2022?
Learning routes and materials for cloud native O & M engineers

Answer questions! This article explains the automated testing framework in software testing from beginning to end

How does win10 turn off f1~f12 shortcut keys?
随机推荐
How Clickhouse queries imported data within a specified time period
What is a domain name? How to use a domain name?
What is a Chinese domain name? What are the types of Chinese domain names?
What functions can the IOT pole platform develop
Tencent cloud + community video [technology star push official] FAQ
[2021 techo youth cloud high-quality course replay, waiting for you to take away]
Resourcequota for detailed explanation of kubernetes resource constraints
Why should the domain name be filed? What materials are needed for the filing of enterprise domain names?
Oceanus practice - use of the Nepal graph connector in the graph database
What domain name is XYZ? How to register a domain name
How enterprises overcome the data security barrier with the imminent implementation of the new law | interview with think tank on industrial security concept
CLB health check principle and abnormal troubleshooting
What is domain name registration? Do you still need to purchase ECS after domain name registration?
What is an ECS? ECS、BCC、CVM...
The personal information protection law was formally reviewed and passed. What issues should enterprises pay attention to?
How unity runs code every few frames
[Tencent cloud] buy a cloud server, participate in a gift lottery, and give you an iPad worth 8000 yuan, Bose earphones, and a thousand yuan JD card!
Tamp the foundation, step into the cloud and rise to the original cloud Devops
How to register a free website domain name
What is the domain name of the website? What problems should be paid attention to when applying for a domain name