Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
MayDomine committed Apr 25, 2024
1 parent 8ef00c5 commit 227d9c6
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ Before you can use BMTrain, you need to initialize it at the beginning of your c
import bmtrain as bmt
bmt.init_distributed(
seed=0,
zero_level=3, # support 2 and 3 now
# ...
)
```
Expand Down Expand Up @@ -120,9 +119,9 @@ class MyModule(bmt.DistributedModule): # changed here
super().__init__()
self.param = bmt.DistributedParameter(torch.empty(1024)) # changed here
self.module_list = torch.nn.ModuleList([
bmt.Block(SomeTransformerBlock()), # changed here
bmt.Block(SomeTransformerBlock()), # changed here
bmt.Block(SomeTransformerBlock()) # changed here
bmt.Block(SomeTransformerBlock(), zero_level=3), # changed here, support 2 and 3 now
bmt.Block(SomeTransformerBlock(), zero_level=3), # changed here, support 2 and 3 now
bmt.Block(SomeTransformerBlock(), zero_level=3) # changed here, support 2 and 3 now
])

def forward(self):
Expand Down

0 comments on commit 227d9c6

Please sign in to comment.