Repository navigation
[spmd_types] Enable Kimi K3 backend - #4446
Conversation
[ghstack-poisoned]
ghstack-source-id: e757e71 Pull-Request: pytorch/torchtitan#4446
[ghstack-poisoned]
| # Kimi K3 only declares layouts for its MoE modules. Seed replicated | ||
| # layouts for the remaining decoder and vision parameters before the | ||
| # MoE declarations replace the expert parameters with sparse shards. | ||
| annotate_replicated_parameters(model, parallel_dims) |
There was a problem hiding this comment.
hmm, I would rather everything be declared explicitly, instead of having this fallback. Agents probably can automate this for you?
There was a problem hiding this comment.
i guess that's ok, but it's just going to declare all params as R, it only gets interesting when TP is involved? And I thought that was an upcoming PR
There was a problem hiding this comment.
oh, I see your point. I think we anyway needs TP for RL, but sure we can worry about it later.
| # Kimi K3 only declares layouts for its MoE modules. Seed replicated | ||
| # layouts for the remaining decoder and vision parameters before the | ||
| # MoE declarations replace the expert parameters with sparse shards. | ||
| annotate_replicated_parameters(model, parallel_dims) |
There was a problem hiding this comment.
oh, I see your point. I think we anyway needs TP for RL, but sure we can worry about it later.
|
Hi @pianpwk and @tianyu-l , noticed this SPMD backend enabled change for K3 and it might have broken the K3 debug flavor since the ViT part some are not included in sharding declaration Published a full SPMD PR: #4492 for K3 to both fix it and unblock further spmd sharding declaration changes, during implementing K3 CP and K3 TP/SP locally containing The
|
Stack from ghstack (oldest at bottom):