Skip to content

Commit

Permalink
oops
Browse files Browse the repository at this point in the history
  • Loading branch information
lucidrains committed Sep 10, 2023
1 parent 83d75b8 commit 52b5c8a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion assert.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def start(
cleanup()

if __name__ == '__main__':
world_size = 5
world_size = 8
num_experts = 8
batch_size = 2
batch_size_var_len = False
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
setup(
name = 'st-moe-pytorch',
packages = find_packages(exclude=[]),
version = '0.0.27',
version = '0.0.28',
license='MIT',
description = 'ST - Mixture of Experts - Pytorch',
author = 'Phil Wang',
Expand Down
2 changes: 1 addition & 1 deletion st_moe_pytorch/st_moe_pytorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ def forward(

assert divisible_by(world_size, num_experts), 'if number of machines is greater than number of experts, machines must be divisible by number of experts, so experts are evenly distributed'
num_experts_per_rank = 1
expert_start_index = rank // num_experts
expert_start_index = rank // (world_size // num_experts)

expert_slice = slice(expert_start_index, expert_start_index + num_experts_per_rank)
else:
Expand Down

0 comments on commit 52b5c8a

Please sign in to comment.