[Multimodal] Automatically fallback to ViT DP when TP is unavailable (#49046)

Signed-off-by: Isotr0py <Isotr0py@outlook.com>
Co-authored-by: Roger Wang <hey@rogerw.io>
This commit is contained in:
Isotr0py
2026-07-18 14:41:04 -07:00
committed by GitHub
co-authored by Roger Wang
parent df362b2d6d
commit 9243e0124e
3 changed files with 17 additions and 5 deletions
+1 -1
View File
@@ -357,7 +357,7 @@ class MoonViTEncoderLayer(nn.Module):
attn_bias: bool = False,
):
super().__init__()
self.use_data_parallel = is_vit_use_data_parallel()
self.use_data_parallel = is_vit_use_data_parallel(num_heads)
self.num_heads = num_heads
self.hidden_dim = hidden_dim