feat(weight_sync): Raiden weight synchronization with progressive memory reclamation - #1990
feat(weight_sync): Raiden weight synchronization with progressive memory reclamation#1990SurbhiJainUSC wants to merge 1 commit into
Conversation
| @@ -51,16 +61,41 @@ def local_ip() -> str: | |||
|
|
|||
|
|
|||
| def to_host_cpu_state(state: Any) -> Any: | |||
There was a problem hiding this comment.
Do you have any test results on this ? like some before/after screenshots to show the improvement.
There was a problem hiding this comment.
@khatwanimohit - do you have any results on this?
b147150 to
9ac8e95
Compare
| # exceeded node-level free memory (a kubelet eviction, not a cgroup | ||
| # OOM) even though no single container had crossed its own limit. | ||
| # Forcing a collection every few leaves keeps that pileup bounded. | ||
| if i % 4 == 3: |
There was a problem hiding this comment.
what much performance impact this has? every 4 leaves seem like a very aggressive gc schedule.
Also are we allocating all RAM (e.g. 960B per node for v7x)? curious why we see kubelet eviction, since RAM pressure should be mild right?
There was a problem hiding this comment.
gc.collect() takes ~1ms per invocation. For a model tree with ~100–200 tensor leaves, running gc.collect() every 4 leaves results in ~25–50 collections, adding only ~25–50ms across a weight-sync operation. We can relax this frequency of collection, if preferred.
|
Is this trying to unblock some urgent testing? If not, I think we should fix this by using FFI for the Pathways trainer for weights sync, instead of progressively deleting and garbage-collecting leaves one-by-one during staging. |
b06baf7 to
7bc14b1
Compare
7bc14b1 to
60ed91a
Compare
60ed91a to
5132f08
Compare
5132f08 to
be8e689
Compare
be8e689 to
f541b20
Compare
f541b20 to
313c9b5
Compare
313c9b5 to
1cc2b25
Compare
1cc2b25 to
e028bdd
Compare
e028bdd to
66025e3
Compare
66025e3 to
6078487
Compare
| src_metadata = [m for per_source in src_meta_lists for m in per_source] | ||
| dst_metadata = [m for per_dest in dst_meta_lists for m in per_dest] | ||
| src_metadata = [ | ||
| weight_sync.dict_to_metadata(m) |
There was a problem hiding this comment.
are we changing the obj type? how come we need to do explicit dict to metadata conversion now but not before? also is current unit test covering this?
This PR enhances the Raiden weight synchronization system with progressive host memory reclamation during parameter staging (preventing host OOMs on 30B+ MoE models), serializes per-source chunk transfers with retry backoff to prevent controller segfaults, and introduces a canonical
dict_to_metadatadeserializer for RPC workflows.Motivation & Problem Statement
transfer()call triggered native Raiden controller multi-scheduling crashes at runtime.RLVllmSampler) emit transport metadata as plain dictionary objects over RPC/IPC, requiring a robust deserializer to convert them into strongly-typedWorkUnitMetadatainstances.Checklist