Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FSDP optimizations #194

Merged
merged 3 commits into from
Mar 7, 2025
Merged

FSDP optimizations #194

merged 3 commits into from
Mar 7, 2025

Conversation

epwalsh
Copy link
Member

@epwalsh epwalsh commented Mar 7, 2025

  • Improve FSDP settings for gradient accumulation. For example, with HSDP we delay the gradient all-reduce until the final micro-batch.
  • Always wrap the embeddings separately but don't unshard them in the backwards pass since embedding params aren't needed for the gradient computation.

@epwalsh epwalsh merged commit f52d11f into v2 Mar 7, 2025
14 checks passed
@epwalsh epwalsh deleted the epwalsh/v2-fsdp-optimizations branch March 7, 2025 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant