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
9a9a525b
Unverified
Commit
9a9a525b
authored
Aug 10, 2022
by
Yih-Dar
Committed by
GitHub
Aug 10, 2022
Browse files
raise atol for MT5OnnxConfig (#18560)
Co-authored-by:
ydshieh
<
ydshieh@users.noreply.github.com
>
parent
f62cb831
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
src/transformers/models/mt5/configuration_mt5.py
src/transformers/models/mt5/configuration_mt5.py
+6
-1
No files found.
src/transformers/models/mt5/configuration_mt5.py
View file @
9a9a525b
...
@@ -147,9 +147,9 @@ class MT5Config(PretrainedConfig):
...
@@ -147,9 +147,9 @@ class MT5Config(PretrainedConfig):
return
self
.
num_layers
return
self
.
num_layers
# Copied from transformers.models.t5.configuration_t5.T5OnnxConfig
class
MT5OnnxConfig
(
OnnxSeq2SeqConfigWithPast
):
class
MT5OnnxConfig
(
OnnxSeq2SeqConfigWithPast
):
@
property
@
property
# Copied from transformers.models.t5.configuration_t5.T5OnnxConfig.inputs
def
inputs
(
self
)
->
Mapping
[
str
,
Mapping
[
int
,
str
]]:
def
inputs
(
self
)
->
Mapping
[
str
,
Mapping
[
int
,
str
]]:
common_inputs
=
{
common_inputs
=
{
"input_ids"
:
{
0
:
"batch"
,
1
:
"encoder_sequence"
},
"input_ids"
:
{
0
:
"batch"
,
1
:
"encoder_sequence"
},
...
@@ -169,5 +169,10 @@ class MT5OnnxConfig(OnnxSeq2SeqConfigWithPast):
...
@@ -169,5 +169,10 @@ class MT5OnnxConfig(OnnxSeq2SeqConfigWithPast):
return
common_inputs
return
common_inputs
@
property
@
property
# Copied from transformers.models.t5.configuration_t5.T5OnnxConfig.default_onnx_opset
def
default_onnx_opset
(
self
)
->
int
:
def
default_onnx_opset
(
self
)
->
int
:
return
13
return
13
@
property
def
atol_for_validation
(
self
)
->
float
:
return
5e-4
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