Skip to content

Commit

Permalink
raise atol for MT5OnnxConfig (#18560)
Browse files Browse the repository at this point in the history
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
  • Loading branch information
ydshieh and ydshieh authored Aug 10, 2022
1 parent f62cb83 commit 9a9a525
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/transformers/models/mt5/configuration_mt5.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,9 @@ def num_hidden_layers(self):
return self.num_layers


# Copied from transformers.models.t5.configuration_t5.T5OnnxConfig
class MT5OnnxConfig(OnnxSeq2SeqConfigWithPast):
@property
# Copied from transformers.models.t5.configuration_t5.T5OnnxConfig.inputs
def inputs(self) -> Mapping[str, Mapping[int, str]]:
common_inputs = {
"input_ids": {0: "batch", 1: "encoder_sequence"},
Expand All @@ -169,5 +169,10 @@ def inputs(self) -> Mapping[str, Mapping[int, str]]:
return common_inputs

@property
# Copied from transformers.models.t5.configuration_t5.T5OnnxConfig.default_onnx_opset
def default_onnx_opset(self) -> int:
return 13

@property
def atol_for_validation(self) -> float:
return 5e-4

0 comments on commit 9a9a525

Please sign in to comment.