paper-with-me

Papers

Using Python for Model Inference in Deep Learning

2021-04-01 · Zachary DeVito, Jason Ansel, Will Constable, Michael Suo, Ailing Zhang, Kim Hazelwood

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.

📄 PDF Abstract BibTeX arXiv:2104.00254

Code (0)

등록된 구현이 없습니다.

Tasks

Deep LearningmodelModel extraction

Similar Papers 제목 키워드 기반

CausalML: Python Package for Causal Machine Learning

2020-02-25 · Huigang Chen, Totte Harinen, Jeong-Yoon Lee, Mike Yung 외

CausalML is a Python implementation of algorithms related to causal inference and machine learning. Algorithms combining causal inference and machine learning have been a trending topic in recent years. This package trie…

BIG-bench Machine LearningCausal Inference

Continual Inference: A Library for Efficient Online Inference with Deep Neural Networks in PyTorch

2022-04-07 · Lukas Hedegaard, Alexandros Iosifidis

We present Continual Inference, a Python library for implementing Continual Inference Networks (CINs) in PyTorch, a class of Neural Networks designed specifically for efficient inference in both online and batch processi…

Practical programming research of Linear DML model based on the simplest Python code: From the standpoint of novice researchers

2025-02-22 · Shunxin Yao

This paper presents linear DML models for causal inference using the simplest Python code on a Jupyter notebook based on an Anaconda platform and compares the performance of different DML models. The results show that cu…

Causal Inference

TypyBench: Evaluating LLM Type Inference for Untyped Python Repositories

2025-07-28 · Honghua Dong, Jiacheng Yang, Xun Deng, Yuhe Jiang 외 arxiv

Type inference for dynamic languages like Python is a persistent challenge in software engineering. While large language models (LLMs) have shown promise in code understanding, their type inference capabilities remain un…

PyMarian: Fast Neural Machine Translation and Evaluation in Python

2024-08-15 · Thamme Gowda, Roman Grundkiewicz, Elijah Rippeth, Matt Post 외

The deep learning language of choice these days is Python; measured by factors such as available libraries and technical support, it is hard to beat. At the same time, software written in lower-level programming language…

Machine TranslationNMTTranslation