TurboTransformers: an efficient GPU serving system for transformer models

By Jiarui Fang, Yang Yu, Chen-liang Zhao, Jie Zhou. 2020

180 citations recorded by the source corpus.

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 are able to process on dimensions of sequence lengths in parallel, therefore leads 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. To solve the above challenges, this paper designed a transformer serving system called TurboTransformers, which consists of a computing runtime and a serving framework. 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, which are 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.

Subfields: Artificial Intelligence, Computer Vision and Pattern Recognition, ML Systems & Hardware

How researchers see this paper

The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.

In Artificial Intelligence

  1. Christopher R'e
  2. Ion Stoica
  3. Ce Zhang
  4. Joseph E. Gonzalez
  5. Tri Dao
  6. Percy Liang
  7. Yuandong Tian
  8. Lei Li

In Computer Vision and Pattern Recognition

  1. Luc Van Gool
  2. Christopher R'e
  3. Trevor Darrell
  4. Chunhua Shen
  5. Xiaogang Wang
  6. Andrew Zisserman
  7. Dacheng Tao
  8. Jitendra Malik

In ML Systems & Hardware

  1. Joseph E. Gonzalez
  2. Ion Stoica
  3. Yang You
  4. Percy Liang
  5. Ce Zhang
  6. Christopher R'e
  7. Zhao Song
  8. Xin Jin

Citations in the corpus