The transformer is the most critical algorithm innovation of the Nature Language Processing (NLP) field in recent years. Unlike the Recurrent Neural Network (RNN) models, Transformers can process on dimensions of sequence lengths in parallel, therefore leading to better accuracy on long sequences. However, efficient deployments of them for online services in data centers equipped with GPUs are not easy. First, more computation introduced by transformer structures makes it more challenging to meet the latency and throughput constraints of serving. Second, NLP tasks take in sentences of variable length. The variability of input dimensions brings a severe problem to efficient memory management and serving optimization. This paper designed a transformer serving system called TurboTransformers, which consists of a computing runtime and a serving framework to solve the above challenges. Three innovative features make it stand out from other similar works. An efficient parallel algorithm is proposed for GPU-based batch reduction operations, like Softmax and LayerNorm, major hot spots besides BLAS routines. A memory allocation algorithm, which better balances the memory footprint and allocation/free efficiency, is designed for variable-length input situations. A serving framework equipped with a new batch scheduler using dynamic programming achieves the optimal throughput on variable-length requests. The system can achieve the state-of-the-art transformer model serving performance on GPU platforms and can be seamlessly integrated into your PyTorch code with a few lines of code.


翻译:变压器是近年来自然语言处理(NLP)领域最关键的算法创新。 与经常性神经网络(NNN)模型不同, 变压器可以平行处理序列长度的维度, 从而导致长序列的准确性提高。 然而, 在配备 GPU 的数据中心, 高效地部署这些变压器进行在线服务并不容易。 首先, 变压器结构引入更多的计算方法, 更难以满足服务时间和吞吐量的限制。 第二, NLP任务在变长的句号中。 输入线的变异性给高效的记忆管理和服务优化带来严重问题。 本文设计了一个变压器服务系统, 名为 Turbo Transfrents, 由计算运行时间和解决上述挑战的服务框架组成。 三个创新功能使这些变压器在其他类似的工程中站点外。 为基于 GPPPPP 的批量削减操作提出了一种高效的平行算法, 它可以在BLAS 常规之外的主要热点中进行。 记忆分配算算法, 更好地平衡记忆足和分配/ 配置/ 分配算出一个可变压式的模型, 可以在可变压的系统上实现一个可变压式的系统格式化的系统上实现一个可变压式的版本。

0
下载
关闭预览

相关内容

最新《Transformers模型》教程,64页ppt
专知会员服务
274+阅读 · 2020年11月26日
专知会员服务
44+阅读 · 2020年10月31日
专知会员服务
15+阅读 · 2020年7月27日
Linux导论,Introduction to Linux,96页ppt
专知会员服务
75+阅读 · 2020年7月26日
【Google】多模态Transformer视频检索,Multi-modal Transformer
专知会员服务
101+阅读 · 2020年7月22日
【伯克利】再思考 Transformer中的Batch Normalization
专知会员服务
40+阅读 · 2020年3月21日
Transformer文本分类代码
专知会员服务
116+阅读 · 2020年2月3日
Stabilizing Transformers for Reinforcement Learning
专知会员服务
56+阅读 · 2019年10月17日
BERT/Transformer/迁移学习NLP资源大列表
专知
19+阅读 · 2019年6月9日
Hierarchically Structured Meta-learning
CreateAMind
23+阅读 · 2019年5月22日
AutoML与轻量模型大列表
专知
8+阅读 · 2019年4月29日
Call for Participation: Shared Tasks in NLPCC 2019
中国计算机学会
5+阅读 · 2019年3月22日
无监督元学习表示学习
CreateAMind
25+阅读 · 2019年1月4日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
15+阅读 · 2018年12月24日
强化学习族谱
CreateAMind
26+阅读 · 2017年8月2日
强化学习 cartpole_a3c
CreateAMind
9+阅读 · 2017年7月21日
Arxiv
0+阅读 · 2021年4月13日
Arxiv
22+阅读 · 2020年9月16日
Universal Transformers
Arxiv
5+阅读 · 2019年3月5日
The Evolved Transformer
Arxiv
5+阅读 · 2019年1月30日
VIP会员
相关VIP内容
最新《Transformers模型》教程,64页ppt
专知会员服务
274+阅读 · 2020年11月26日
专知会员服务
44+阅读 · 2020年10月31日
专知会员服务
15+阅读 · 2020年7月27日
Linux导论,Introduction to Linux,96页ppt
专知会员服务
75+阅读 · 2020年7月26日
【Google】多模态Transformer视频检索,Multi-modal Transformer
专知会员服务
101+阅读 · 2020年7月22日
【伯克利】再思考 Transformer中的Batch Normalization
专知会员服务
40+阅读 · 2020年3月21日
Transformer文本分类代码
专知会员服务
116+阅读 · 2020年2月3日
Stabilizing Transformers for Reinforcement Learning
专知会员服务
56+阅读 · 2019年10月17日
相关资讯
BERT/Transformer/迁移学习NLP资源大列表
专知
19+阅读 · 2019年6月9日
Hierarchically Structured Meta-learning
CreateAMind
23+阅读 · 2019年5月22日
AutoML与轻量模型大列表
专知
8+阅读 · 2019年4月29日
Call for Participation: Shared Tasks in NLPCC 2019
中国计算机学会
5+阅读 · 2019年3月22日
无监督元学习表示学习
CreateAMind
25+阅读 · 2019年1月4日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
15+阅读 · 2018年12月24日
强化学习族谱
CreateAMind
26+阅读 · 2017年8月2日
强化学习 cartpole_a3c
CreateAMind
9+阅读 · 2017年7月21日
相关论文
Arxiv
0+阅读 · 2021年4月13日
Arxiv
22+阅读 · 2020年9月16日
Universal Transformers
Arxiv
5+阅读 · 2019年3月5日
The Evolved Transformer
Arxiv
5+阅读 · 2019年1月30日
Top
微信扫码咨询专知VIP会员