Skip to content
Agents tracked: 506 Releases (7d): 634 Agent status: 4 with issuesSince last limit reset: Claude 15d · Codex 0d For AI agents: Markdown Updated Nov 26, 2026

PyTorch

Deep learning framework with tensors and dynamic neural networks with GPU support.

ML and data sciencePYPI

GitHubWebsite

1. License

License from PyPI license expression.

github.com/pytorch/pytorch

From the package registry and GitHub, checked daily. Tap a verdict to see its source.How we checkedReport an error

What PyTorch does

PyTorch's README pitches it as Python-first and imperative: each line executes when it is reached, and tape-based autograd lets a network change its behavior from one run to the next.

PyTorch popularity

81 / 100
Gid Score, #79 overall
12.5M
downloads a week, pypi
106K
GitHub stars
96
agent projects use it
PyTorch: downloads per weekPyPI, torch 12,456,633
PyTorch: GitHub starspytorch/pytorch 105,706

Gid Score measures public popularity and activity, not quality. How the Gid Score is calculated

How PyTorch is used

  • PyTorch is a dependency in 96 of the 6,258 public GitHub projects set up for AI coding agents that we scanned (5.9% of the 1,623 Python ones), #5 of 293 in ml and data science.
  • Counting the projects our scan samples by dependency (Solana 3,067, Ethereum and EVM 1,774, 3D and games 3,130, agent frameworks and SDKs 13,750), it appears in 1,057; those are left out of every share on this page.
  • Projects that use it most often also use NumPy (79.2%), Hugging Face Transformers (60.4%), pandas (56.2%).
  • It is more common in projects set up for OpenClaw (4.5%) than for Claude Code (1.4%).

By coding agent

46 projects, 1.4%
45 projects, 1.5%
36 projects, 1.5%
15 projects, 4.5%
7 projects, 1.5%
7 projects, 1.5%

Often used with

In 79.2% of its projects
In 60.4% of its projects
In 56.2% of its projects
In 53.1% of its projects
In 49.0% of its projects
In 46.9% of its projects
In 44.8% of its projects
In 41.7% of its projects

PyTorch in practice

Strengths

Each line runs when reached

The README says that when you execute a line of code, it gets executed, and that there is no 'asynchronous view of the world'. It says error messages and stack traces are straightforward to understand, because the stack trace points to exactly where your code was defined.

Network behavior can change per run

The maintainers write that PyTorch uses reverse-mode auto-differentiation, which they say lets you change how a network behaves 'arbitrarily with zero lag or overhead'. The README also notes that the technique is not unique to PyTorch.

Layers written in plain Python

The maintainers say PyTorch is built into Python rather than bound onto a C++ framework. The same section says you can write new neural network layers in Python itself and use packages such as Cython and Numba.

C/C++ layers with no wrapper code

For layers written in C/C++, the README describes an extension API with 'minimal boilerplate'. It links a tutorial and an example repo.

Watch out for

Building from source takes time and disk

A source build needs Python 3.10 or later, a compiler that fully supports C++20, at least 10 GB of free disk space, and 30-60 minutes for the first build. The README says later rebuilds are much faster.

ROCm builds are Linux-only

The build instructions say ROCm support for AMD GPUs works only on Linux. Intel GPU support covers Linux and Windows.

torch.distributed on Windows is a prototype

The Windows build notes call distributed package support on Windows a prototype feature that is subject to changes.

More about PyTorch

Agent Skills for it
  • pytorch-lightning: Deep learning framework (PyTorch Lightning / lightning package). Organize PyTorch code into LightningModules, configure Trainers for multi-G
  • pytorch-fsdp2: Adds PyTorch FSDP2 (fully_shard) to training scripts with correct init, sharding, mixed precision/offload config, and distributed checkpoint
  • torch-profiler-layer-track: Add verified layer-number guides and compact GPU display lanes to an existing Torch Profiler Chrome JSON trace. Use for L0/L1/... navigation

See all

Packages around it
  • numpy: Array computing
  • pandas: DataFrames
  • transformers: Pretrained models
  • scikit-learn: Classical ML
  • python-dotenv: Env config
  • requests: HTTP client
More in ML and data science

Alternatives

PyTorch This page

Apache-2.0 AND Apache-2.0 WITH LLVM-exception AND BSD-2-Clause AND BSD-3-Clause AND BSL-1.0 AND ISC AND MIT AND ZlibGid 8112.5M/wk

Compare PyTorch with another tool

Get started

Install it.

pip install torch

Rules for your agent

Paste into AGENTS.md or CLAUDE.md
## PyTorch
- Take the install command from the selector at https://pytorch.org/get-started/locally/ instead of writing one from memory. The command depends on OS, package and compute platform.
- The selector labels Stable as 2.7.0, while the latest GitHub release is v2.14.1. Confirm which version the command installs before pinning.
- The site says latest Stable PyTorch requires Python 3.10 or later. Check the project's Python version before installing.
- Use the Stable build unless the user asks for Preview. Preview builds are nightly and not fully tested and supported.
- For inference, move the model to its device and call `.eval()`, then run it inside `with torch.no_grad():`, as the Hub SSD example does.
- When building from source without a given GPU toolkit, export `USE_CUDA=0`, `USE_ROCM=0` or `USE_XPU=0` to disable that backend.

AgentGid articles about PyTorch

All guides