Transformer-engine

Latest version: v1.11.0

Safety actively analyzes 681775 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 3

1.11

Key Features and Enhancements

- [pyTorch] Added dtensor support for optimizers.
- [pyTorch] Added context parallel implementation with QKV all-to-all collectives.
- [pyTorch] Added support for CPU offloading when using FP8 attention.
- [pyTorch] Implemented padding and unpadding modules for FP8 that improve e2e performance of MoE models by ~2%.
- [C/pyTorch] Added support for permutation operations for MoE and exposed them in the C API.
- [pyTorch] Added support for RoPE when using FP8 attention.
- [pyTorch] Added support for FlashAttention-3.
- [JAX] Implemented context parallel fused attention using allgather and reduce-scatter collectives.

Fixed Issues

- [pyTorch] Fixed a crash in fused adam optimizer when master parameters are not set.
- [pyTorch] Fix a crash when using activation recompute with Python 3.10.
- [pyTorch] Made miscellaneous fixes in the logic to select the correct attention backend.

Known Issues in This Release

There are no known issues in this release.

Breaking Changes in This Release

There are no breaking changes in this release.

Deprecated Features

There are no deprecated features in this release.

1.10

Key Features and Enhancements

- [pyTorch] Added an option to use keyword arguments with CUDA graphs.
- [pyTorch] Implemented a new load-balanced offloading algorithm to utilize the CPU/GPU interconnect bandwidth to the maximum extent.
- [pyTorch] Added support for multi-latent attention.
- [pyTorch] Added additional documentation, scripts, and benchmarks for the attention backend.
- [pyTorch] Added context-parallel implementation with KV allgather for causal attention.
- [pyTorch] Added support for data type casting in the fused Adam kernel.
- [pyTorch] Added arguments for cumulative and maximum sequence lengths to the TransformerLayer and MultiheadAttention APIs.
- [pyTorch] Added support for padding mask in unfused backend for dot product attention.
- [pyTorch] Expanded operation support in the fusion API (transformer_engine.pytorch.ops).
- [pyTorch] Made several improvements to reduce the amount CPU overhead during execution.
- [PaddlePaddle] Added an option to run dot product attention deterministically.
- [JAX] Added support for non-deterministic algorithms in the CUDNN flash attention backend for improved performance.


Fixed Issues

- [pyTorch] Fixed miscellaneous bugs in communication-gemm overlap with userbuffers.
- [pyTorch] Removed an additional copy of weights stored when using CPU offloading.
- [pyTorch] Fixed a crash when running non-causal training with context parallelism.
- [pyTorch] Fixed the calculation of tensor parallel size when using MQA/GQA.
- [pyTorch] Fixed a crash when using context parallelism with the THD format.
- [pyTorch] Fixed a crash in CUDA graphs when skipping warm-up iterations.
- [pyTorch] Fixed a bug in TransformerLayer for the cross attention case where arguments were incorrectly propagated to DotProductAttention.
- [C] Hid arbitrary symbols exposed globally in the shared object in order to avoid symbol conflict errors, which could cause a crash during library loading and imports.

Known Issues in This Release

There are no known issues in this release.

Breaking Changes in This Release

There are no breaking changes in this release.

Deprecated Features

There are no deprecated features in this release.

1.9

Key Features and Enhancements

* [PyTorch] Added support for sliding window attention in the cuDNN backend.
* [PyTorch] Added an experimental torch.nn.Sequential style API for automatic operation based fusions.
* [C/PyTorch] Added support for bottom-right aligned diagonal causal mask.
* [C/PyTorch] Added support for grouped GEMM for MoE training.
* [JAX] Added support for THD attention format.
* [PaddlePaddle] Added support for CUDA graphs.
* [PaddlePaddle] Added support for PaddlePaddle versions >= 2.6.1.

Fixed Issues

* [PyTorch] Fixed incorrect outputs when handling non-contiguous input tensors.
* [PyTorch] Fixed a hang in the initialize_ub function during multi-node runs, along with miscellaneous improvements in communication-GEMM overlap with userbuffers.
* [PyTorch] Fixed convergence when using CPU offloading.
* [PyTorch] Fixed a crash that occurred when using MoE, when an expert receives 0 tokens.
* [JAX] Fixed a crash in newer JAX versions which restricted the output format of HLO lowering.
* [PaddlePaddle] Fixed a crash when using the standalone column parallel linear API.
* Fixed a numerical bug in the QGeLU activation.
* Fixed a compilation bug in the core library with CUDA 12.1.
* Fixed a bug selecting tuned RMSNorm kernels.
* Fixed performance overheads by reducing the number of calls to the CUDA driver.

Known Issues in This Release

There are no known issues in this release.

Breaking Changes in This Release

There are no breaking changes in this release.

Deprecated Features

There are no deprecated features in this release.

1.8

Key Features and Enhancements

- [pyTorch] Added a new argument, `softmax_scale`, to the `DotProductAttention` API.
- [pyTorch] Extended Transformer Engine’s pyTorch build to always compile with tensor parallelism (TP) communication overlap support, and to remove MPI dependency. Also exposed the APIs `initialize_ub` and `destroy_ub` for communication-gemm overlap configuration.
- [pyTorch] Improved documentation for the `DotProductAttention` API, including benchmarks and end-to-end test scripts.
- [pyTorch] Incorporated the Fused Adam and Fused SGD optimizers into Transformer Engine. They previously had to be installed from the GitHub repository https://github.com/NVIDIA/apex.

Fixed Issues

- [pyTorch] Made internal changes to reduce the amount of CPU overhead.
- [pyTorch] Fixed a crash that occured when using TorchDynamo with the `checkpoint` API.
- [pyTorch] Fixed an issue with loading an FP8 checkpoint when using FP8 attention.

Known Issues in This Release

There are no known issues in this release.

Breaking Changes in This Release

There are no breaking changes in this release.

Deprecated Features

There are no deprecated features in this release.

1.7

Key Features and Enhancements

- [JAX] Added support for SwiGLU, gated/non-gated ReLU, Quick GeLU, and squared ReLU activations.
- [pyTorch] Added support for attention bias and various QKV formats when using context parallelism.
- [pyTorch] Expanded the Linear API to handle zero input tokens for MoE-like use cases.
- [pyTorch] Added support for upstream AMP (`torch.amp.autocast`) in the checkpoint API.
- [pyTorch] Added squared-relu activation.
- [pyTorch] Updated flash-attention support to version 2.5.8.
- [paddle-paddle] Added support for gradient accumulation fusion.

Fixed Issues
- [pyTorch] Fixed an uninitialized TP group error that could occur when training with certain tensor parallel configs.
- [pyTorch] Fixed a bug that occured when loading a checkpoint with calibrated high-precision weights.
- [pyTorch] Improved the documentation for attention mask.
- [JAX] Fixed a bug with mismatching shapes of activations and corresponding sharding constraints.
- [JAX] Fixed an internal bug which caused an incorrect shape to be passed for Layernorm gradient.

Known Issues in This Release
There are no known issues in this release.

Breaking Changes in This Release
There are no breaking changes in this release.

Deprecated Features
There are no deprecated features in this release.

1.6

Key Features and Enhancements

- [pyTorch] Added a new `make_graphed_callables` API call for NVIDIA® CUDA® graph capture, including FP8 support.
- [pyTorch] Added beta support for two boolean arguments in the DelayedScaling FP8 recipe (`fp8_dpa` and `fp8_mha`) to support FP8 attention. Note that the API exposure of this feature may change in future releases.

Fixed Issues

- [pyTorch] Fixed a numerical issue with storing weights in FP8 via the `fp8_model_init` API call.
- [pyTorch] Fixed a bug that caused PyTorch modules to use excessive memory when training with frozen weights by storing unnecessary activations for the backward pass.
- [JAX] Fixed a bug that caused an incorrect shape to be passed for LayerNorm gradient.

Known Issues in This Release

These issues are unchanged from the previous release.

FlashAttention v2, which is a dependency of this release of Transformer Engine, has a known issue with excessive memory usage during installation (https://github.com/Dao-AILab/flash-attention/issues/358). You can work around this issue by setting the environment variable MAX_JOBS=1 during Transformer Engine installation.

[pyTorch] FlashAttention v2.1 changed the behavior of the causal mask when performing cross-attention (see https://github.com/Dao-AILab/flash-attention#21-change-behavior-of-causal-flag for reference). In order for Transformer Engine to keep consistent behavior between versions and backends, FlashAttention is disabled for this use case (cross attention with casual masking) when 2.1+ version of FlashAttention is installed.

Breaking Changes in This Release

There are no breaking changes in this release.

Deprecated Features

There are no deprecated features in this release.

Page 1 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.