You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-6Lines changed: 8 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,8 @@
28
28
</div>
29
29
30
30
## What's New
31
+
- 2024/02/26 **BMTrain**[1.0.0](https://github.com/OpenBMB/BMTrain/releases/tag/v1.0.0) released. Code refactoring and Tensor parallel support. See the detail in [update log](docs/UPDATE_1.0.0.md)
32
+
- 2023/08/17 **BMTrain**[0.2.3](https://github.com/OpenBMB/BMTrain/releases/tag/v0.2.3) released. See the [update log](docs/UPDATE_0.2.3.md).
31
33
- 2022/12/15 **BMTrain**[0.2.0](https://github.com/OpenBMB/BMTrain/releases/tag/0.2.0) released. See the [update log](docs/UPDATE_0.2.0.md).
32
34
- 2022/06/14 **BMTrain**[0.1.7](https://github.com/OpenBMB/BMTrain/releases/tag/0.1.7) released. ZeRO-2 optimization is supported!
33
35
- 2022/03/30 **BMTrain**[0.1.2](https://github.com/OpenBMB/BMTrain/releases/tag/0.1.2) released. Adapted to [OpenPrompt](https://github.com/thunlp/OpenPrompt)and [OpenDelta](https://github.com/thunlp/OpenDelta).
@@ -51,7 +53,7 @@ Our [documentation](https://bmtrain.readthedocs.io/en/latest/index.html) provide
51
53
52
54
- From pip (recommend) : ``pip install bmtrain``
53
55
54
-
- From source code: download the package and run ``python setup.py install``
56
+
- From source code: download the package and run ``pip install .``
55
57
56
58
Installing BMTrain may take a few to ten minutes, as it requires compiling the c/cuda source code at the time of installation.
57
59
We recommend compiling BMTrain directly in the training environment to avoid potential problems caused by the different environments.
@@ -68,7 +70,6 @@ Before you can use BMTrain, you need to initialize it at the beginning of your c
68
70
import bmtrain as bmt
69
71
bmt.init_distributed(
70
72
seed=0,
71
-
zero_level=3, # support 2 and 3 now
72
73
# ...
73
74
)
74
75
```
@@ -118,9 +119,9 @@ class MyModule(bmt.DistributedModule): # changed here
118
119
super().__init__()
119
120
self.param = bmt.DistributedParameter(torch.empty(1024)) # changed here
120
121
self.module_list = torch.nn.ModuleList([
121
-
bmt.Block(SomeTransformerBlock()), # changed here
122
-
bmt.Block(SomeTransformerBlock()), # changed here
123
-
bmt.Block(SomeTransformerBlock()) # changed here
122
+
bmt.Block(SomeTransformerBlock(), zero_level=3), # changed here, support 2 and 3 now
123
+
bmt.Block(SomeTransformerBlock(), zero_level=3), # changed here, support 2 and 3 now
124
+
bmt.Block(SomeTransformerBlock(), zero_level=3) # changed here, support 2 and 3 now
124
125
])
125
126
126
127
defforward(self):
@@ -181,7 +182,8 @@ class MyModule(bmt.DistributedModule):
0 commit comments