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
c7d6975d
Unverified
Commit
c7d6975d
authored
Sep 13, 2023
by
flybird11111
Committed by
GitHub
Sep 13, 2023
Browse files
[shardformer] fix GPT2DoubleHeadsModel (#4703)
parent
068372a7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
colossalai/shardformer/modeling/gpt2.py
colossalai/shardformer/modeling/gpt2.py
+1
-1
No files found.
colossalai/shardformer/modeling/gpt2.py
View file @
c7d6975d
...
...
@@ -94,9 +94,9 @@ class GPT2PipelineForwards:
if
hidden_states
is
None
:
raise
ValueError
(
"hidden_states shouldn't be None for stages other than the first stage."
)
input_shape
=
hidden_states
.
size
()[:
-
1
]
batch_size
=
input_shape
[
0
]
device
=
hidden_states
.
device
hidden_states
=
hidden_states
.
view
((
-
1
,)
+
hidden_states
.
shape
[
-
2
:])
batch_size
=
hidden_states
.
shape
[
0
]
# GPT2Attention mask.
if
attention_mask
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