Skip to content

Commit

Permalink
Add limit_all_gathers=True (#346)
Browse files Browse the repository at this point in the history
Summary:
Adding rate limiter support. Per ankitade edward-io, this can provide up to 2x speedup for 10B parameter model.

Pull Request resolved: #346

Reviewed By: edward-io

Differential Revision: D40050254

Pulled By: rohan-varma

fbshipit-source-id: f1b3be78be7d1a8c580a9612fc813a62efeed540
  • Loading branch information
rohan-varma authored and facebook-github-bot committed Oct 4, 2022
1 parent 905cfbd commit 786f31b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions examples/flava/native/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ def create_model(self) -> torch.nn.Module:
FLAVATransformerWithoutEmbeddings,
},
),
limit_all_gathers=True,
)

print0(f"after FSDP {torch.cuda.memory_allocated()/1024**3:.3} GB")
Expand Down

0 comments on commit 786f31b

Please sign in to comment.