Join us in Silicon Valley September 18-19 at the 2024 PyTorch Conference. Learn more.

PyTorch logo
Get Started

Choose Your Path: Install PyTorch Locally or Launch Instantly on Supported Cloud Platforms

Get started

Blog

Stay up-to-date on the latest news and technical topics from the PyTorch Foundation.

Read more

PyTorch 2.5

Featuring a new CuDNN backend for SDPA, improvements to TorchDynamo, regional compilation of torch.compile, and more.

Learn more

Membership Available

Become an integral part of the PyTorch Foundation, to build and shape the future of AI.

Join

Key Features &
Capabilities

See all Features
Production Ready

Transition seamlessly between eager and graph modes with TorchScript, and accelerate the path to production with TorchServe.

Distributed Training

Scalable distributed training and performance optimization in research and production is enabled by the torch.distributed backend.

Robust Ecosystem

A rich ecosystem of tools and libraries extends PyTorch and supports development in computer vision, NLP and more.

Cloud Support

PyTorch is well supported on major cloud platforms, providing frictionless development and easy scaling.

Install PyTorch

Select your preferences and run the install command. Stable represents the most currently tested and supported version of PyTorch. This should be suitable for many users. Preview is available if you want the latest, not fully tested and supported, builds that are generated nightly. Please ensure that you have met the prerequisites below (e.g., numpy), depending on your package manager. Anaconda is our recommended package manager since it installs all dependencies. You can also install previous versions of PyTorch. Note that LibTorch is only available for C++.

NOTE: Latest PyTorch requires Python 3.9 or later.

PyTorch Build
Your OS
Package
Language
Compute Platform
Run this Command:
PyTorch Build
Stable (1.13.0)
Preview (Nightly)
Your OS
Linux
Mac
Windows
Package
Conda
Pip
LibTorch
Source
Language
Python
C++ / Java
Compute Platform
CUDA 11.8
CUDA 12.1
CUDA 12.4
ROCm 5.2
CPU
Run this Command:
conda install pytorch torchvision -c pytorch

Previous versions of PyTorch

Quick Start With
Cloud Partners

Get up and running with PyTorch quickly through popular cloud platforms and machine learning services.

Companies & Universities
Using PyTorch

Reduce inference costs by 71% and drive scale out using PyTorch, TorchServe, and AWS Inferentia.

Learn More

Pushing the state of the art in NLP and Multi-task learning.

Learn More

Using PyTorch’s flexibility to efficiently research new algorithmic approaches.

Learn More

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources