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

add sharded data parallel all gather time estimation #15

Merged
merged 3 commits into from
Nov 14, 2023
Merged

add sharded data parallel all gather time estimation #15

merged 3 commits into from
Nov 14, 2023

Conversation

cli99
Copy link
Owner

@cli99 cli99 commented Nov 13, 2023

When using fsdp shard_grad_op and full_shard, model weights are unsharded through allgather before being used for execution. This PR adds the time estimation of the all gather. If the all gather time > layer compute time, all gather time cannot be fully overlapped with compute. The time estimation relies on intra node and inter node memory bandwidth efficiency, which depends on the size of the data to transfer. 0.8 is a good estimation for data size > 128MB. for small data size, set the efficiency to a lower number.

@codecov-commenter
Copy link

Codecov Report

Attention: 6 lines in your changes are missing coverage. Please review.

Comparison is base (21d9fa3) 80.33% compared to head (60fc071) 80.64%.
Report is 2 commits behind head on main.

Files Patch % Lines
llm_analysis/analysis.py 88.23% 6 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #15      +/-   ##
==========================================
+ Coverage   80.33%   80.64%   +0.30%     
==========================================
  Files           8        8              
  Lines        1083     1121      +38     
==========================================
+ Hits          870      904      +34     
- Misses        213      217       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cli99 cli99 merged commit 3e842f6 into main Nov 14, 2023
2 checks passed
@cli99 cli99 deleted the comm branch November 14, 2023 03:41
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.

2 participants