BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News PyTorch 1.0 Announced for Research and Production AI Projects

PyTorch 1.0 Announced for Research and Production AI Projects

Leia em Português

This item in japanese

Bookmarks

In a recent blog post, Bill Jia, a vice president at Facebook, announced a new 1.0 version of PyTorch. PyTorch is an open source AI framework package for Python with Tensor computation, including strong GPU acceleration and Deep Neural Networks built on a tape-based autodiff system. The importance of this new release is the reduction in time required to move an AI-driven project from the research phase to production while improving the accuracy and performance of these applications. These improvements occur, in part, due to the hybrid front end that transitions between imperative and declarative execution modes.

A core strength of PyTorch is its imperative front end, which enables iterative prototyping and experimentation through its adaptable programming model. The first release of PyTorch occurred in early 2017 and has had more than 1.1 million downloads of the software package. Jia credits its popularity to:

Its speed, productivity, and ability to support cutting-edge AI models such as dynamic graphs quickly made it a popular and important development tool for AI researchers.

A well-known example of what is possible with PyTorch is the Unpaired Image-to-Image Translation using Cycle-Consistent Adversarial Networks project built by UC Berkeley computer scientists. This project enables the learning of image input and output mapping using a training set of aligned images. 

Image Source: https://junyanz.github.io/CycleGAN/

The current version of PyTorch has had some success and has provided flexibility for AI research, development and performance at production scale, but there have been some challenges. Jia explains:

Given its tight coupling to Python, we often need to translate the research code -- either training script or trained model -- to a graph mode representation in Caffe2 to run at production scale. Caffe2's graph-based executor allows developers to take advantage of state-of-the-art optimizations like graph transformations, efficient memory reuse, and tight hardware interface integration.

Alternatively, PyTorch 1.0 integrates the capabilities from Caffe2 and ONNX and combines it with PyTorch's ability to provide a seamless path from research prototyping to production deployment. By leveraging Caffe2, companies building dependencies on PyTorch can also expect support for greater scale and reliability. The PyTorch blog further explains the importance of using Caffe2:

Startups, large companies and anyone who wants to build a product around PyTorch have asked for production support. At Facebook (the largest stakeholder for PyTorch) we have Caffe2, which has been the production-ready platform, running in our datacenters and shipping to more than 1 billion phones spanning eight generations of iPhones and six generations of Android CPU architectures. It has server-optimized inference on Intel / ARM, TensorRT support, and all the necessary bits for production. Considering all this value locked-in to a platform that the PyTorch team works quite closely with, we decided to marry PyTorch and Caffe2 which gives the production-level readiness for PyTorch.

ONNX is an open format for representing deep learning models which can be exchanged across different AI frameworks. In PyTorch 1.0, ONNX is natively supported as the export model. It also provides an interface for accelerated runtimes and hardware specific libraries. Jia cites some of the benefits of this approach as: 

This gives developers full freedom to mix and match the best AI frameworks and tools without having to take on resource-intensive custom engineering.

The PyTorch project is expecting to release version 1.0 some time during Summer 2018 and pull requests can be viewed on their GitHup repo.

Rate this Article

Adoption
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

BT