Skip to main content

Facebook launches PyTorch 1.4 with mobile customization and Java support

Facebook engineering director Lin Qiao onstage at PyTorch Dev Con 2019 in San Francisco, Calif.
Facebook engineering director Lin Qiao onstage at PyTorch Dev Con 2019 in San Francisco, Calif.
Image Credit: Khari Johnson / VentureBeat

Watch all the Transform 2020 sessions on-demand here.


Facebook released PyTorch 1.4 today with upgrades to audio, vision, and text libraries; customization to the mobile version of its deep learning framework; and limited support of the Java programming language. PyTorch is one of the most popular machine learning frameworks used by researchers and developers today.

In the latest version, developers can use fine-grain customization of build scripts with PyTorch Mobile. This is a way to optimize library sizes and greatly reduce the on-device footprint, and in early tests was able to generate a version of MobileNetV2 edge model up to 50% smaller.

PyTorch 1.4 also includes a framework for distributed model parallel training and Java support for PyTorch inference based on the PyTorch Mobile for Android interface, but at launch the experimental feature is only available for Linux and for inference. PyTorch currently supports Python and C++.

PyTorch Mobile for iOS and Android devices first became available last fall as part of the release of PyTorch 1.3, with speed gains coming from quantization, Google TPU support, and a JIT compiler upgrade. Tools like Captum for explainable machine learning and CryptTen, a tool for encrypted machine learning, were also released last fall at the annual PyTorch developer conference.


June 5th: The AI Audit in NYC

Join us next week in NYC to engage with top executive leaders, delving into strategies for auditing AI models to ensure fairness, optimal performance, and ethical compliance across diverse organizations. Secure your attendance for this exclusive invite-only event.


With 1.4, domain libraries are also getting an upgrade, such as torchvision, which is getting ONNX support for all models, and torchscriptable support for all models to make them easier to use in non-Python environments.

The torchaudio library upgrade comes with a number of new filters and an interactive speech recognition in experimentation, while the torchtext library will gain access to the enwik9 unsupervised learning data set.

Additional PyTorch features were introduced last month, such as the image and video classification framework PyTorch Elastic.