facebookresearch/fairseq

BF16 + FSDP

Open

#4.298 aberto em 22 de mar. de 2022

Ver no GitHub
 (0 comments) (2 reactions) (0 assignees)Python (6.224 forks)batch import
enhancementhelp wantedneeds triage

Métricas do repositório

Stars
 (29.107 stars)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

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.

Guia do colaborador