Skip to main content

Transformer Engine

PyPI release Documentation License

Quick start | User guide | PyTorch API | JAX API | Examples | Releases

What is Transformer Engine?

Transformer Engine (TE) is an NVIDIA library for accelerating Transformer model training on NVIDIA GPUs. It combines optimized building blocks and fused kernels with automatic mixed-precision-style APIs for PyTorch and JAX, so low-precision training can be adopted without rewriting a training stack.

Transformer Engine manages the scaling factors, amax histories, and quantization metadata required by low-precision recipes. Its modules cover attention, linear layers, normalization, Mixture-of-Experts (MoE), and communication operations used in large-scale distributed training.

Highlights

  • FP8 training on NVIDIA Hopper, Ada, Blackwell, and Rubin GPUs.

  • MXFP8 and NVFP4 training on NVIDIA Blackwell GPUs.

  • Optimized attention, GEMM, normalization, quantization, and fused Transformer and MoE modules.

  • PyTorch and JAX APIs with autocast-style contexts and configurable low-precision recipes.

  • Support for tensor, sequence, context, and EP, including communication overlap.

  • FP16 and BF16 optimizations on NVIDIA Ampere architecture GPUs and later.

News

See the project updates archive for earlier news.

Quick start

Install the latest stable release for your framework:

# PyTorch
pip install --no-build-isolation "transformer_engine[pytorch]"

# JAX
pip install --no-build-isolation "transformer_engine[jax]"

For a ready-to-run environment, use an NVIDIA NGC framework container. Replace <YY.MM> with a container release listed in the NVIDIA Deep Learning Frameworks Support Matrix.

docker run --gpus all -it --rm nvcr.io/nvidia/pytorch:<YY.MM>-py3
docker run --gpus all -it --rm nvcr.io/nvidia/jax:<YY.MM>-py3

Continue with the PyTorch and JAX getting started guide. For prerequisites, source builds, environment variables, and troubleshooting, see the installation guide.

Integrations

Transformer Engine has been integrated with popular LLM frameworks such as:

See Ecosystem and historical integrations for additional community integrations and projects that have worked with Transformer Engine.

Contributing

We welcome contributions to Transformer Engine! To contribute to Transformer Engine and make pull requests, follow the guidelines outlined in the CONTRIBUTING.rst guide.

Technical deep dives

See Resources for the complete collection of papers and recorded talks.

Metadata

Release files for transformer-engine-cu12 2.21.0

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

Built distributions (wheels)

Table of built distributions (wheels) for transformer-engine-cu12 2.21.0
File Interpreter ABI Platform Actions
transformer_engine_cu12-2.21.0-py3-none-manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.28+ x86-64 Details for transformer_engine_cu12-2.21.0-py3-none-manylinux_2_28_x86_64.whl
transformer_engine_cu12-2.21.0-py3-none-manylinux_2_28_aarch64.whl Python 3 none Linux glibc 2.28+ ARM64 Details for transformer_engine_cu12-2.21.0-py3-none-manylinux_2_28_aarch64.whl

Total release size: 1.4 GB

Release files / transformer_engine_cu12-2.21.0-py3-none-manylinux_2_28_x86_64.whl

Download URL transformer_engine_cu12-2.21.0-py3-none-manylinux_2_28_x86_64.whl
Size 681.8 MB
Tags Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
9d6405abb7689d39ed49475f7fb67eae06c2a23fa193f3fcb50060ddb3da8f93
BLAKE2b-256 checksum
How to use checksums
673e39fffb84827358b4260239de8062e3abf02d9c580fb3f5d196ebf176e6cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / transformer_engine_cu12-2.21.0-py3-none-manylinux_2_28_aarch64.whl

Download URL transformer_engine_cu12-2.21.0-py3-none-manylinux_2_28_aarch64.whl
Size 681.8 MB
Tags Linux glibc 2.28+ ARM64 Python 3
SHA-256 checksum
How to use checksums
7aba32647cceaafb3f5df7862acf839eda51fa29d62e37de0b0a462a732460ea
BLAKE2b-256 checksum
How to use checksums
9ba399e936be1d170d7b0a2feace39018dc47c7d26ed6c50a75cb03e0c5c7e65
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Security for transformer-engine-cu12 2.21.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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

2.21.0 This release

2 release files No 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