Skip to content

Commit 57e0a55

Browse files
authored
Ensure is initialized for SD (deepspeedai#2534)
1 parent 2110552 commit 57e0a55

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

deepspeed/inference/engine.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ def __init__(self, model, config):
102102

103103
if isinstance(self.module, torch.nn.Module):
104104
moe, _ = has_moe_layers(self.module)
105+
else:
106+
moe = False
105107

106108
if moe and dist.get_world_size() > 1:
107109
self._create_ep_parallel_group(config.moe.moe_experts)

0 commit comments

Comments
 (0)