PyTorch, the deep learning and AI software created by Facebook, has evolved into a mature framework. Machine learning engineers use it to create computer vision, conversational AI, and personalization and recommendation systems. Microsoft has partnered with Facebook to extend PyTorch to run in the cloud through the integration with Azure ML.
PyTorch at Facebook
PyTorch was born at Facebook in 2018 as a unified machine learning framework. It was created as a successor to Caffe2, one of the popular ML frameworks for building deep learning models. The researchers at Facebook borrowed the concepts from other popular frameworks such as Lua Torch, Chainer and HIPS Autograd to make PyTorch a robust toolkit. One of the goals of the project was to unify PyTorch’s research and production capabilities into a single framework.
By moving away from Caffe2 and standardizing in PyTorch, Facebook not only decreased the infrastructure and engineering burden associated with maintaining two entire systems but also built a unified framework that’s useful both internally and within the open source community.
PyTorch enabled ML engineers to deploy new AI models in minutes rather than weeks. According to Facebook, over 4,000 PyTorch models are running daily, with over 1700 inference models running in production.
Here are some interesting ways PyTorch is used by Facebook and Instagram developers:
- PyTorch Mobile, a compact ML framework for Android and iOS, powers Facebook’s AR experiences based on Oculus Quest and Portal devices. Mobile versions of Facebook, Instagram and Messenger rely on PyTorch to enhance user experience.
- PyTorch powers Instagram’s personalization and recommendation systems. An AI model suggests new content through Feeds, Stories, or Reels based on your taste.
- Person segmentation powered by Detectron2Go library, built with PyTorch, brings fancy features and filters such as changing hair color and adding animations to Instagram on mobile devices.
- Facebook AI Multimodal (FAIM), an internal library and SDK based on PyTorch, is used by AI engineers to identify hate speech and harmful content across images, text, comments, and other elements holistically. The model derives the overall context by analyzing the text and the associated image to classify a graphic such as a meme into neutral or harmful content.
- A variety of text-to-speech (TTS) functions, such as Facebook’s “how to pronounce your name” feature, are powered by PyTorch. Facebook is rolling out TTS models that sound more natural and realistic.
Microsoft Takes PyTorch to Desktop and Cloud
Microsoft partnered with Facebook to make PyTorch accessible to developers and enterprises. It made it easy for developers to run PyTorch models on Windows desktop PCs and Azure Cloud.
Microsoft’s consumer and enterprise services such as Bing and Azure Cognitive Services are built with models trained in PyTorch. The company has also contributed to open source projects such as PyTorch Profiler and DeepSpeed.
Open Neural Network Exchange (ONNX) is a portable and interoperable layer for deep learning models. Microsoft, one of the key contributors to the ONNX project, built tools to convert PyTorch models into ONNX that can run on Windows ML, the embedded runtime environment within the desktop OS.
More recently, Microsoft announced the PyTorch Enterprise Support Program, an initiative to deliver long-term support, prioritized troubleshooting, and integration with Azure solutions. With this, Azure became the first cloud platform to provide enterprise support for PyTorch.
PyTorch Enterprise Support gives confidence to enterprises to build and deploy models in PyTorch in the cloud. Microsoft commits to Long-term support (LTS), which ensures that a selected release of PyTorch will be covered under the commercial support agreement. Microsoft engineers will also provide technical support through troubleshooting and hotfixes. Azure ML, Microsoft’s ML platform in the cloud, is integrated with PyTorch and ONNX to deliver end-to-end training and inference capabilities.
Ecosystem Support and Adoption
PyTorch is one of the fastest-growing open source ML frameworks. With 50,000 stars and over 38000 commits, it’s one of the most active projects on GitHub.
AI hardware companies such as NVIDIA and Intel are optimizing PyTorch to run on their AI accelerators, including GPUs and FPGAs.
AstraZeneca, the global pharmaceutical giant, uses PyTorch to accelerate its drug discovery research. It’s also using Microsoft Azure ML to train and deploy models at scale.
Uber and Lyft are relying heavily on PyTorch for their autonomous vehicles. Blue River Technology, a subsidiary of John Deere, is building highly automated farming machines powered by AI and PyTorch.
Thanks to Facebook and Microsoft, PyTorch is on its way to becoming the preferred framework for building sophisticated AI models for the cloud, desktop and mobile.
Credit: Google News