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
chenpangpang
transformers
Commits
503e8c8b
Unverified
Commit
503e8c8b
authored
Apr 24, 2023
by
othertea
Committed by
GitHub
Apr 24, 2023
Browse files
fix ValueError message in LlamaAttention (#22966)
parent
6e329593
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/transformers/models/llama/modeling_llama.py
src/transformers/models/llama/modeling_llama.py
+1
-1
No files found.
src/transformers/models/llama/modeling_llama.py
View file @
503e8c8b
...
...
@@ -216,7 +216,7 @@ class LlamaAttention(nn.Module):
if
attn_weights
.
size
()
!=
(
bsz
,
self
.
num_heads
,
q_len
,
kv_seq_len
):
raise
ValueError
(
f
"Attention weights should be of size
{
(
bsz
*
self
.
num_heads
,
q_len
,
kv_seq_len
)
}
, but is"
f
"Attention weights should be of size
{
(
bsz
,
self
.
num_heads
,
q_len
,
kv_seq_len
)
}
, but is"
f
"
{
attn_weights
.
size
()
}
"
)
...
...
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