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
text-generation-inference
Commits
9179605e
Unverified
Commit
9179605e
authored
Oct 19, 2023
by
Mario928
Committed by
GitHub
Oct 19, 2023
Browse files
Fix: Replace view() with reshape() in neox_modeling.py to resolve RuntimeError (#1155)
parent
7402a355
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
server/text_generation_server/models/custom_modeling/neox_modeling.py
...generation_server/models/custom_modeling/neox_modeling.py
+2
-2
No files found.
server/text_generation_server/models/custom_modeling/neox_modeling.py
View file @
9179605e
...
...
@@ -283,10 +283,10 @@ class GPTNeoXAttention(nn.Module):
batch_size
,
num_attention_heads
,
query_length
,
attn_head_size
=
query
.
size
()
key_length
=
key
.
size
(
-
2
)
query
=
query
.
view
(
query
=
query
.
reshape
(
batch_size
*
num_attention_heads
,
query_length
,
attn_head_size
)
key
=
key
.
view
(
batch_size
*
num_attention_heads
,
key_length
,
attn_head_size
)
key
=
key
.
reshape
(
batch_size
*
num_attention_heads
,
key_length
,
attn_head_size
)
attn_scores
=
torch
.
zeros
(
1
,
dtype
=
query
.
dtype
,
...
...
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