facebookresearch/fairseq

BF16 + FSDP

Open

#4 298 ouverte le 22 mars 2022

Voir sur GitHub
 (0 commentaires) (2 réactions) (0 assignés)Python (6 224 forks)batch import
enhancementhelp wantedneeds triage

Métriques du dépôt

Stars
 (29 107 stars)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

🚀 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.

Guide contributeur