PyTorch

by PyTorch Foundation (Linux Foundation)

Open-source Python library for building and training neural networks with GPU-accelerated tensors, now governed by the Linux Foundation's PyTorch Foundation.

framework-libraryopen-sourcepythonself-hostedenterprise

At a Glance

Type

Frameworks and libraries

Pricing

FreeFree and open source under a BSD-3-Clause-style licence (per the GitHub LICENSE file); no paid tiers on pytorch.org.

Best For

Writing and training custom neural networks in Python, then deploying via torch.export or LibTorch (C++) or a cloud ML platform such as SageMaker or Azure ML (TorchServe is archived, limited-maintenance only).

Platforms

Python, Java, CLI, Linux, macOS, Windows, Docker

Founded

2022

Free Tier

Available

Licence

Open Source

Key Features

Pros & Cons

Strengths

  • Free, BSD-3-Clause-style licensed, with source and ~103,500 GitHub stars on the official repo (checked 2026-09-29)
  • Vendor-neutral governance since September 2022 under the Linux Foundation's PyTorch Foundation, backed by AMD, AWS, Google Cloud, Meta, Microsoft Azure and Nvidia
  • Homepage case study: Amazon Advertising cut inference costs 71% using PyTorch, TorchServe and AWS Inferentia
  • Supported across major clouds: AWS SageMaker, Google Cloud Deep Learning VM, Azure Machine Learning and Alibaba Cloud PAI

Limitations

  • Python-first library: LibTorch (C++) and Java bindings exist but are a separate, less-documented deployment path.
  • GPU wheels are pinned to specific CUDA/ROCm versions, so the pip command must be re-selected per target machine.
  • No vendor-hosted inference API from the PyTorch Foundation itself; serving at scale means self-hosting or using a cloud partner.

Integrations

AWS SageMakerAWS Deep Learning ContainersAWS Deep Learning AMIsGoogle Cloud Deep Learning VMAzure Machine LearningAzure FunctionsAlibaba Cloud PAILightning Studios (lightning.ai)CaptumPyTorch Geometricskorch

What it is

PyTorch is an open-source Python library for building and training neural networks, with GPU-accelerated tensor operations and automatic differentiation. It also ships a C++ distribution (LibTorch) and Java bindings, selectable from the same install page. The project is governed by the PyTorch Foundation, a vendor-neutral body hosted by the Linux Foundation since September 2022; its governing board includes AMD, AWS, Google Cloud, Meta, Microsoft Azure and Nvidia, and the Foundation also stewards related projects such as vLLM, DeepSpeed, Ray, Helion and Safetensors.

Interface and dependencies

Install with pip3 install torch torchvision torchaudio (choosing a CPU-only or CUDA 11.8/12.6/12.8 build); the pytorch.org selector currently offers Pip, LibTorch or Source only — there is no official Conda channel, though conda-forge community builds remain available for those who want conda. The current stable release requires Python 3.10 or later. Training code is standard Python plus torch.nn, torch.optim and the torch.distributed backend for multi-GPU or multi-node runs. TorchScript is deprecated as of PyTorch 2.10 in favor of torch.export, and TorchServe's GitHub repo was archived in August 2025 and is now in limited maintenance with no further updates or security patches. Official Deep Learning Containers and AMIs are published for AWS, Google Cloud and Azure.

Real use and limits

A developer training a computer-vision or NLP model writes it directly in Python against torch.nn, debugs in eager mode with normal Python tooling, then exports via torch.export (the current recommended path now that TorchScript is deprecated) or self-hosts serving, keeping in mind that TorchServe is archived and no longer actively maintained. GPU builds are tied to a specific CUDA or ROCm version, so the install command has to be reselected per target machine rather than being a single universal package. There is no managed inference endpoint from the PyTorch Foundation itself: running models at scale means self-hosting or going through a cloud partner such as AWS SageMaker or Azure Machine Learning.

Frequently Asked Questions

Is PyTorch free to use commercially?
Yes. The GitHub repository's LICENSE file gives it a BSD-3-Clause-style licence, which permits commercial use, modification and redistribution.

Last updated on