Transformer Engine is NVIDIA’s library for accelerating transformer models on modern NVIDIA GPUs, using 8-bit and 4-bit floating point (FP8 and FP4) precision on Hopper, Ada and Blackwell hardware to train and serve large models faster with less memory. It is the low-level engine behind much of the ecosystem’s low-precision training, integrated into frameworks such as Megatron-LM, NeMo and DeepSpeed. The repository has around 3,600 stars on GitHub and is Apache-2.0 licensed.
Transformer Engine provides drop-in accelerated modules โ linear layers, layer norms, attention and fused kernels โ for PyTorch and JAX, together with the recipes needed to keep low-precision training stable, such as per-tensor scaling and FP8 formats tuned per layer type. By doing matrix multiplications in FP8 or FP4 while keeping sensitive operations in higher precision, models can roughly double throughput and halve memory on supported GPUs without meaningful accuracy loss. The library handles the details of scaling-factor management and casts automatically, and exposes higher-level APIs so framework users can enable it with minimal code changes.
Transformer Engine is completely free and open source under the Apache-2.0 license. The real requirement is compatible NVIDIA GPU hardware to run it on.
ML engineers and framework developers training or serving large transformers who want the throughput of low-precision compute without hand-writing kernels or debugging numerical instability themselves.