Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ColossalAI
Commits
3fc8a204
Unverified
Commit
3fc8a204
authored
Apr 11, 2022
by
アマデウス
Committed by
GitHub
Apr 11, 2022
Browse files
[]Corrected 3d vocab parallel embedding (#707)
parent
ee112fe1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
colossalai/nn/layer/parallel_3d/layers.py
colossalai/nn/layer/parallel_3d/layers.py
+2
-2
No files found.
colossalai/nn/layer/parallel_3d/layers.py
View file @
3fc8a204
...
@@ -525,7 +525,7 @@ class VocabParallelClassifier3D(ParallelLayer):
...
@@ -525,7 +525,7 @@ class VocabParallelClassifier3D(ParallelLayer):
def
_set_tensor_parallel_attributes
(
self
)
->
None
:
def
_set_tensor_parallel_attributes
(
self
)
->
None
:
if
self
.
has_weight
:
if
self
.
has_weight
:
set_tensor_parallel_attribute_by_partition
(
self
.
weight
,
self
.
depth
**
2
)
set_tensor_parallel_attribute_by_partition
(
self
.
weight
,
self
.
depth
**
3
)
if
self
.
bias
is
not
None
:
if
self
.
bias
is
not
None
:
set_tensor_parallel_attribute_by_partition
(
self
.
bias
,
self
.
depth
)
set_tensor_parallel_attribute_by_partition
(
self
.
bias
,
self
.
depth
)
...
@@ -1048,7 +1048,7 @@ class VocabParallelEmbedding3D(torch.nn.Module):
...
@@ -1048,7 +1048,7 @@ class VocabParallelEmbedding3D(torch.nn.Module):
env
.
vocab_parallel
=
True
env
.
vocab_parallel
=
True
def
_set_tensor_parallel_attributes
(
self
):
def
_set_tensor_parallel_attributes
(
self
):
set_tensor_parallel_attribute_by_partition
(
self
.
weight
,
self
.
depth
**
2
)
set_tensor_parallel_attribute_by_partition
(
self
.
weight
,
self
.
depth
**
3
)
def
reset_parameters
(
self
,
weight_initializer
)
->
None
:
def
reset_parameters
(
self
,
weight_initializer
)
->
None
:
with
seed
(
ParallelMode
.
TENSOR
):
with
seed
(
ParallelMode
.
TENSOR
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment