Skip to main content

Taylor Mode Autodiff in PyTorch

This library provides a PyTorch implementation of Taylor mode automatic differentiation, a generalization of forward mode to higher-order derivatives. It is similar to JAX's Taylor mode (jax.experimental.jet).

The repository also hosts the Python functionality+experiments and LaTeX source for our NeurIPS 2025 paper "Collapsing Taylor Mode Automatic Differentiation", which allows to further accelerate Taylor mode for many practical differential operators.

Operator coverage is still growing, so please help us improve the package by providing feedback, filing issues, and opening pull requests.

Taylor mode propagates the jet of an input curve through a function to obtain the jet of the output curve

Getting Started

Installation

pip install jet-for-pytorch

Quickstart

Compute the third-order derivative of a scalar function with jet:

from torch import tensor, ones_like, zeros_like
from jet import jet

f = lambda x: x**4  # f'''(x) = 24 * x

x = tensor(2.0)
f_jet = jet(f, (x,))  # (x₀, x₁, x₂, x₃) ↦ (f₀, f₁, f₂, f₃)

# x₀ = x, x₁ = 1, x₂ = x₃ = 0 ⇒ f₃ = f'''(x)
f0, f1, f2, f3 = f_jet((x, ones_like(x), zeros_like(x), zeros_like(x)))

assert f3.allclose(24 * x)  # third derivative matches by hand

For the full list of supported operators, see the supported operations section of the introductory tutorial.

Examples

See the documentation.

Citing

If you find the jet package useful for your research, consider citing

@inproceedings{dangel2025collapsing,
  title =        {Collapsing Taylor Mode Automatic Differentiation},
  author =       {Felix Dangel and Tim Siebert and Marius Zeinhofer and Andrea
                  Walther},
  year =         2025,
  booktitle =    {Advances in Neural Information Processing Systems (NeurIPS)},
}

Metadata

Release files for jet-for-pytorch 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jet-for-pytorch 1.0.0
File Size Uploaded Provenance Actions
jet_for_pytorch-1.0.0.tar.gz 6.4 MB With provenance Details for jet_for_pytorch-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for jet-for-pytorch 1.0.0
File Interpreter ABI Platform Actions
jet_for_pytorch-1.0.0-py3-none-any.whl Python 3 none any Details for jet_for_pytorch-1.0.0-py3-none-any.whl

Total release size: 9.1 MB

Release files / jet_for_pytorch-1.0.0.tar.gz

Download URL jet_for_pytorch-1.0.0.tar.gz
Size 6.4 MB
Tags Source
SHA-256 checksum
How to use checksums
2ece4e257951abe63970f7e71c80b32c21051428ac27b04feb2a807c0a67204a
BLAKE2b-256 checksum
How to use checksums
6d97fb5d34a84202a5ed589ee65e375ece8e42c01d5b5c9b46ff4fa7bb93227e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 12, 2026.

Transparency log

Release files / jet_for_pytorch-1.0.0-py3-none-any.whl

Download URL jet_for_pytorch-1.0.0-py3-none-any.whl
Size 2.7 MB
Tags Python 3
SHA-256 checksum
How to use checksums
d36b0fe323717acd4208e99194a7e2e316bc013f5c8c480560bef56848bc09d7
BLAKE2b-256 checksum
How to use checksums
06151ec3404d8ff98b6251027c6787133eba9f17bddb72a72171479a98c38ed5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 12, 2026.

Transparency log

Security for jet-for-pytorch 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for jet_for_pytorch-1.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 12, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page