facebookresearch/fairseq

BF16 + FSDP

Open

#4298 aperta il 22 mar 2022

Vedi su GitHub
 (0 commenti) (2 reazioni) (0 assegnatari)Python (6224 fork)batch import
enhancementhelp wantedneeds triage

Metriche repository

Star
 (29.107 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

🚀 Feature Request

Support BF16 with FSDP!

Motivation

Training with BF16 is usually more stable than fp16, which is very important when we want to train large models with FSDP. Additionally, many models (e.g. T5) are trained with BF16 and if we want to continue training them via Fairseq with mixed-precisio, using fp16 will result in NaNs.

Additional context

Currently FullyShardedDataParallel is not compatible with bf16 (as can be seen here). It will be really helpful to support it.

Guida contributor