mlsanityData to 7 Oct 2026

Using Python for Model Inference in Deep Learning

arXiv 2104.00254 ↗First posted 1 Apr 2021cs.LGcited by 1

Not on the map. Why?

Abstract (arXiv)

Python has become the de-facto language for training deep neural networks, coupling a large suite of scientific computing libraries with efficient libraries for tensor computation such as PyTorch or TensorFlow. However, when models are used for inference they are typically extracted from Python as TensorFlow graphs or TorchScript programs in order to meet performance and packaging constraints. The extraction process can be time consuming, impeding fast prototyping. We show how it is possible to meet these performance and packaging constraints while performing inference in Python. In particular, we present a way of using multiple Python interpreters within a single process to achieve scalable inference and describe a new container format for models that contains both native Python code and data. This approach simplifies the model deployment story by eliminating the model extraction step, and makes it easier to integrate existing performance-enhancing Python libraries. We evaluate our design on a suite of popular PyTorch models on Github, showing how they can be packaged in our inference format, and comparing their performance to TorchScript. For larger models, our packaged Python models perform the same as TorchScript, and for smaller models where there is some Python overhead, our multi-interpreter approach ensures inference is still scalable.

Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Builds on 14 of its 39 references that are in the map. First posted on arXiv 1 Apr 2021.

Builds on

14 of 39 references.

References · 14

  1. 2017Attention Is All You Needcited by 59,932
  2. 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,160
  3. 2019Momentum Contrast for Unsupervised Visual Representation Learningcited by 7,482
  4. 2017Mask R-CNNcited by 7,259
  5. 2018YOLOv3: An Incremental Improvementcited by 2,652
  6. 2017Natural TTS Synthesis by Conditioning WaveNet on Mel Spectrogram Predictionscited by 800
  7. 2019Deep Learning Recommendation Model for Personalization and Recommendation Systemscited by 327
  8. 2015MXNet: A Flexible and Efficient Machine Learning Library for Heterogeneous Distributed Systemscited by 195
  9. 2020Background Matting: The World is Your Green Screencited by 104
  10. 2019Learning to Paint With Model-based Deep Reinforcement Learningcited by 70
  11. 2019Demucs: Deep Extractor for Music Sources with extra unlabeled data remixedcited by 53
  12. 2020Torch-Struct: Deep Structured Prediction Librarycited by 40
2 more
  1. 2020Deep Slow Motion Video Reconstruction with Hybrid Imaging Systemcited by 14
  2. 2018AutoGraph: Imperative-style Coding with Graph-based Performancecited by 9

Built on by

Cited by year

Citing papers per year: 2022: 1.

1 paper.