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
d9dc993f
"git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "f54d82cace511b48a2ad5d32ac83abef5a49ee13"
Unverified
Commit
d9dc993f
authored
Mar 28, 2024
by
Minseo Kang
Committed by
GitHub
Mar 28, 2024
Browse files
Fix typo in T5Block error message (#29881)
parent
a25037be
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
5 deletions
+5
-5
src/transformers/models/mt5/modeling_mt5.py
src/transformers/models/mt5/modeling_mt5.py
+1
-1
src/transformers/models/pop2piano/modeling_pop2piano.py
src/transformers/models/pop2piano/modeling_pop2piano.py
+1
-1
src/transformers/models/t5/modeling_t5.py
src/transformers/models/t5/modeling_t5.py
+1
-1
src/transformers/models/t5/modeling_tf_t5.py
src/transformers/models/t5/modeling_tf_t5.py
+1
-1
src/transformers/models/udop/modeling_udop.py
src/transformers/models/udop/modeling_udop.py
+1
-1
No files found.
src/transformers/models/mt5/modeling_mt5.py
View file @
d9dc993f
...
@@ -552,7 +552,7 @@ class MT5Block(nn.Module):
...
@@ -552,7 +552,7 @@ class MT5Block(nn.Module):
if
len
(
past_key_value
)
!=
expected_num_past_key_values
:
if
len
(
past_key_value
)
!=
expected_num_past_key_values
:
raise
ValueError
(
raise
ValueError
(
f
"There should be
{
expected_num_past_key_values
}
past states. "
f
"There should be
{
expected_num_past_key_values
}
past states. "
f
"
{
'2 (
past / key
) for cross attention. '
if
expected_num_past_key_values
==
4
else
''
}
"
f
"
{
'2 (
key / value
) for cross attention. '
if
expected_num_past_key_values
==
4
else
''
}
"
f
"Got
{
len
(
past_key_value
)
}
past key / value states"
f
"Got
{
len
(
past_key_value
)
}
past key / value states"
)
)
...
...
src/transformers/models/pop2piano/modeling_pop2piano.py
View file @
d9dc993f
...
@@ -587,7 +587,7 @@ class Pop2PianoBlock(nn.Module):
...
@@ -587,7 +587,7 @@ class Pop2PianoBlock(nn.Module):
if
len
(
past_key_value
)
!=
expected_num_past_key_values
:
if
len
(
past_key_value
)
!=
expected_num_past_key_values
:
raise
ValueError
(
raise
ValueError
(
f
"There should be
{
expected_num_past_key_values
}
past states. "
f
"There should be
{
expected_num_past_key_values
}
past states. "
f
"
{
'2 (
past / key
) for cross attention. '
if
expected_num_past_key_values
==
4
else
''
}
"
f
"
{
'2 (
key / value
) for cross attention. '
if
expected_num_past_key_values
==
4
else
''
}
"
f
"Got
{
len
(
past_key_value
)
}
past key / value states"
f
"Got
{
len
(
past_key_value
)
}
past key / value states"
)
)
...
...
src/transformers/models/t5/modeling_t5.py
View file @
d9dc993f
...
@@ -677,7 +677,7 @@ class T5Block(nn.Module):
...
@@ -677,7 +677,7 @@ class T5Block(nn.Module):
if
len
(
past_key_value
)
!=
expected_num_past_key_values
:
if
len
(
past_key_value
)
!=
expected_num_past_key_values
:
raise
ValueError
(
raise
ValueError
(
f
"There should be
{
expected_num_past_key_values
}
past states. "
f
"There should be
{
expected_num_past_key_values
}
past states. "
f
"
{
'2 (
past / key
) for cross attention. '
if
expected_num_past_key_values
==
4
else
''
}
"
f
"
{
'2 (
key / value
) for cross attention. '
if
expected_num_past_key_values
==
4
else
''
}
"
f
"Got
{
len
(
past_key_value
)
}
past key / value states"
f
"Got
{
len
(
past_key_value
)
}
past key / value states"
)
)
...
...
src/transformers/models/t5/modeling_tf_t5.py
View file @
d9dc993f
...
@@ -624,7 +624,7 @@ class TFT5Block(keras.layers.Layer):
...
@@ -624,7 +624,7 @@ class TFT5Block(keras.layers.Layer):
if
len
(
past_key_value
)
!=
expected_num_past_key_values
:
if
len
(
past_key_value
)
!=
expected_num_past_key_values
:
raise
ValueError
(
raise
ValueError
(
f
"There should be
{
expected_num_past_key_values
}
past states. "
f
"There should be
{
expected_num_past_key_values
}
past states. "
f
"
{
'2 (
past / key
) for cross attention'
if
expected_num_past_key_values
==
4
else
''
}
. "
f
"
{
'2 (
key / value
) for cross attention'
if
expected_num_past_key_values
==
4
else
''
}
. "
f
"Got
{
len
(
past_key_value
)
}
past key / value states"
f
"Got
{
len
(
past_key_value
)
}
past key / value states"
)
)
...
...
src/transformers/models/udop/modeling_udop.py
View file @
d9dc993f
...
@@ -940,7 +940,7 @@ class UdopBlock(nn.Module):
...
@@ -940,7 +940,7 @@ class UdopBlock(nn.Module):
if
len
(
past_key_value
)
!=
expected_num_past_key_values
:
if
len
(
past_key_value
)
!=
expected_num_past_key_values
:
raise
ValueError
(
raise
ValueError
(
f
"There should be
{
expected_num_past_key_values
}
past states. "
f
"There should be
{
expected_num_past_key_values
}
past states. "
f
"
{
'2 (
past / key
) for cross attention. '
if
expected_num_past_key_values
==
4
else
''
}
"
f
"
{
'2 (
key / value
) for cross attention. '
if
expected_num_past_key_values
==
4
else
''
}
"
f
"Got
{
len
(
past_key_value
)
}
past key / value states"
f
"Got
{
len
(
past_key_value
)
}
past key / value states"
)
)
...
...
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