Skip to content

Conversation

@Edenzzzz
Copy link
Collaborator

@Edenzzzz Edenzzzz commented Jun 3, 2025

The read speed of nvme SSDs is only a few GB/s, far slower than the 800GB/s on NVLink. This PR supports loading weights on one rank and broadcasting them to the node.
After this PR, text encoders will be offloaded (w/ layer-wise prefetch) to cpu by default using FSDP, because encoder tests will simply OOM on A40 without this.

Results on H100 and 14B model (Wan-AI/Wan2.1-T2V-14B-Diffusers)
python examples/inference/basic/basic.py

Method 2 GPUs 4 GPUs
From disk 16 s 21 s
Broadcast (sync) 14 s 15 s
Broadcast (async) 11 s 14 s

TODO

@Edenzzzz Edenzzzz changed the title Load weights from distributed [Feature] Load weights from distributed Jun 9, 2025
@jzhang38
Copy link
Collaborator

How is the performance so far?

@Edenzzzz
Copy link
Collaborator Author

Need to offload encoder for CIs to pass first

Copy link
Collaborator Author

@Edenzzzz Edenzzzz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's merge this to avoid more conflicts from get_local_torch_device

@Edenzzzz Edenzzzz requested a review from BrianChen1129 June 28, 2025 01:34
@BrianChen1129
Copy link
Collaborator

why the transformer test failed?

@Edenzzzz
Copy link
Collaborator Author

Edenzzzz commented Jun 28, 2025

#557 (comment) it failed a while ago

@Edenzzzz Edenzzzz merged commit c5155b2 into main Jun 28, 2025
11 of 13 checks passed
@Edenzzzz Edenzzzz deleted the dist_load branch June 28, 2025 03:52
@BrianChen1129
Copy link
Collaborator

#557 (comment) it failed a while ago

okay, then just merge

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.

4 participants