当前位置:网站首页>Reasoning speed of model
Reasoning speed of model
2022-07-27 06:58:00 【Mr_ health】
1. Four descriptions of model size

2. Amount of computation 、 The relationship between access quantity and reasoning speed
2.1 Calculate density
It can be seen from the above that both the amount of calculation and the amount of visits can affect the reasoning speed of the model , Then further define the calculation density as the calculated quantity divided by the visited quantity , as follows :

Computational density is used to reflect that a program is more computationally intensive , Or is it more intensive .
- Computing intensive programs :Compute bound
- Memory intensive procedures :Memory bound
2.2 Roofline Model
A procedure for evaluating in Hardware The mathematical model of the upper bound of the achievable performance .
The horizontal axis represents the calculated density , stay 2.1 We describe that each model has a computational density , That is to say, the horizontal axis represents the model . The vertical axis represents the calculation speed .
This mathematical model represents , Run a model on this hardware ( Give a calculated density ) The best computing speed that can be achieved .

You can see that this is a piecewise function :
- For memory intensive programs : Calculation speed = Calculate density × bandwidth , That is, it has a great relationship with the bandwidth of the hardware .
- For computationally intensive programs , Calculation speed = Peak calculation speed , That is, the computing power of hardware ( Peak calculation speed ) It matters a lot .
2.3 Speed of reasoning
stay 2.2 The calculation method of calculation speed is given in the part of , Knowing the calculation speed, we can calculate the reasoning speed , as follows

The calculation formula for memory access density is :
Amount of computation / Calculation speed = Amount of computation / ( Calculate density * bandwidth ) = Amount of computation /( Amount of computation * bandwidth / Visit the stock ) = Visit the stock / bandwidth
Here we don't distinguish programs like the above , Instead, it becomes an operator , Because there may be memory intensive operators in a model , There are also computationally intensive operators , Therefore, the reasoning speed is not as strict as the above formula , It's more complicated .
- Memory intensive operators :Concat、Eltwise Add、ReLU、MaxPooling……
- Computationally intensive operators :Conv、DeConv、FC、MatMul、LSTM……
边栏推荐
- FTX 基金会资助1500万帮助新冠疫苗临床实验,将影响全球公共卫生
- GoLand writes Go program
- 向日葵全面科普,为你的远程控制设备及时规避漏洞
- DNA修饰贵金属纳米颗粒|脱氧核糖核酸DNA修饰纳米金(科研级)
- Deepsort工作原理分析
- gin-vue-admin 使用docker容器中的数据库
- EasyCVR平台播放设备录像时,拖动时间轴播放无效是什么原因?
- The problem of torch loading custom models
- PSI | CSI and ROC | AUC and KS - memorandum
- FTX US推出FTX Stocks,向主流金融行业迈进
猜你喜欢

Redis' idea under windows is not connected

Boostrap

FTX Foundation funded 15million to help covid-19 clinical trials, which will affect global public health

Sunflower: don't worry when you encounter computer vulnerabilities, understand clearly and then judge sunflower: don't worry when you encounter computer vulnerabilities, understand clearly and then ju

Deepsort工作原理分析

DNA偶联PbSe量子点|近红外硒化铅PbSe量子点修饰脱氧核糖核酸DNA|PbSe-DNA QDs

EasyRecovery14数据恢复软件官方功能简介

ES6新特性(入门)

Esxi virtual machine starts, and the module "monitorloop" fails to power on

DNA(脱氧核糖核酸)供应|碳纳米管载核酸-DNA/RNA材料|DNA/RNA核酸修饰磁性纳米颗粒
随机推荐
EasyCVR平台播放设备录像时,拖动时间轴播放无效是什么原因?
多模态数据库 | 星环科技多模数据库ArgoDB“一库多用“,构建高性能湖仓集一体平台
Ancient art - make good use of long tail keywords
Alibaba cloud SMS authentication third-party interface (fast use)
NAT (network address translation)
Sunflower popularizes Science in an all-round way to avoid loopholes for your remote control equipment in time
2022年全球6家最具技术实力的的智能合约审计公司盘点
改善宝宝过敏就吃伊敏舒,azg与Aibeca爱楽倍佳携手守护中国宝宝成长
For redis under windows, it can only read but not write
Express receive request parameters
ES6的新特性(2)
Deepsort工作原理分析
How to make the minimum API bind the array in the query string
脱氧核糖核酸DNA改性近红外二区砷化镓GaAs量子点|GaAs-DNA QDs|DNA修饰GaAs量子点
Sok: the faults in our asrs: an overview of attacks against automatic speech recognition
Problems related to pytorch to onnx
Add virtual network card and configure OP route in win10
Linux安装Redis操作
Gin Vue admin uses the database in the docker container
关于ES6的新特性