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
ffd9a3cb
Unverified
Commit
ffd9a3cb
authored
Oct 11, 2023
by
littsk
Committed by
GitHub
Oct 11, 2023
Browse files
[hotfix] fix bug in sequence parallel test (#4887)
parent
fdec650b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
tests/test_shardformer/test_model/_utils.py
tests/test_shardformer/test_model/_utils.py
+1
-1
No files found.
tests/test_shardformer/test_model/_utils.py
View file @
ffd9a3cb
...
@@ -160,7 +160,7 @@ def run_forward_backward_with_hybrid_plugin(
...
@@ -160,7 +160,7 @@ def run_forward_backward_with_hybrid_plugin(
input_shape
=
data
[
"input_ids"
].
shape
input_shape
=
data
[
"input_ids"
].
shape
for
k
,
v
in
data
.
items
():
for
k
,
v
in
data
.
items
():
if
v
.
shape
==
input_shape
:
if
v
.
shape
==
input_shape
:
data
[
k
]
=
v
.
repeat
(
input_shape
[:
-
1
]
+
(
input_shape
[
-
1
]
*
times
,))
data
[
k
]
=
v
.
repeat
(
(
1
,
)
*
(
v
.
dim
()
-
1
)
+
(
times
,))
sharded_model
.
train
()
sharded_model
.
train
()
if
booster
.
plugin
.
stage_manager
is
not
None
:
if
booster
.
plugin
.
stage_manager
is
not
None
:
...
...
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