# pytorch/functorch

functorch is JAX-like composable function transforms for PyTorch.

Repository: https://github.com/pytorch/functorch
Canonical: https://ross.abutalabs.com/products/functorch
Homepage: https://pytorch.org/functorch/
Language: Jupyter Notebook
License: BSD-3-Clause
License Family: permissive
Topics: pytorch, hessians, gradients
Archived: true
Last push: 2025-08-21T00:53:01+00:00

## Health v2 (maintenance only)
Score: 10/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 37, release rhythm 8, longevity 100
- inputs: {"age_days": 1962, "days_push": 378, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: archived
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1434, forks 108 (observed 2026-08-28T04:04:43.309800+00:00)

## What it is
functorch is a library providing JAX-like composable function transforms (vmap, grad, vjp, jvp) for PyTorch, enabling efficient per-sample gradients, ensembles, and Jacobian/Hessian computation. Its APIs have been integrated into PyTorch 2.0 as torch.func, with the standalone package deprecated.

## Use cases
- compute per-sample gradients in pytorch
- run model ensembles efficiently on one machine
- compute jacobians and hessians of neural networks
- batch inner-loop tasks in MAML meta-learning
- vectorize functions over batches with vmap
- compose grad and vmap transforms like JAX

## When to choose
- you need composable vmap/grad transforms on PyTorch versions before 2.0
- you want JAX-style function transforms in an existing PyTorch codebase
- you need efficient per-sample gradients or batched Jacobians/Hessians

## When to avoid
- you are on PyTorch 2.0 or newer - use torch.func instead
- you want a standalone actively developed library - this is deprecated and merged into PyTorch
- you need transforms for frameworks other than PyTorch

## Facets
- artifact type: library
- maturity: maintenance
- function: machine-learning, deep-learning, math
- domain: machine-learning, deep-learning
- platform: python, cross-platform
- tags: pytorch, jax, autodiff, vmap, gradients, function-transforms, jacobians, hessians, algorithms, gpu

## Member repositories
- pytorch/functorch (main) score 10

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:43.309800+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:36:55.592627+00:00, confidence not recorded.
  - readme: https://github.com/pytorch/functorch (fetched 2026-08-28T04:04:43.309800+00:00, sha 3fd09aebb74a)
  - homepage: https://pytorch.org/functorch/ (fetched 2026-08-29T11:47:57.550191+00:00, sha b8f7eeeb1f28)
  - registry_pypi: https://pypi.org/pypi/functorch/json (fetched 2026-08-29T11:47:57.561373+00:00, sha 869e0069268c)
  - site_page: https://pytorch.org/functorch/stable (fetched 2026-08-29T11:47:57.559225+00:00, sha 770332190bba)
- Data as of 2026-08-30T08:39:29.467469+00:00.
