NVIDIA / TransformerEngine

A library for accelerating Transformer models on NVIDIA GPUs, including using 8-bit floating point (FP8) precision on Hopper and Ada GPUs, to provide better performance with lower memory utilization in both training and inference.
https://docs.nvidia.com/deeplearning/transformer-engine/user-guide/index.html
Apache License 2.0
1.82k stars 305 forks source link

Could TransformerEngine work with Deepspeed Zero w/ offloading? #762

Open leiwen83 opened 5 months ago

leiwen83 commented 5 months ago

Hi,

Since it is common to use with deepspeed zero w/ offloading when training large LLM, does TE currently support in this mode?

Currently deepspeed support is just unittest as refered by TE's readme: https://github.com/microsoft/DeepSpeed/pull/3731

Thx~

sbhavani commented 2 weeks ago

@leiwen83 I'd recommend using https://github.com/huggingface/accelerate/tree/main/benchmarks/fp8 which has an example with DS ZeRO 1-3 support. Please let us know if it's missing any features.