src/transformers/models/t5/configuration_t5.py/T5OnnxConfig/outputs
class T5OnnxConfig:    def outputs(self) -> Mapping[str, Mapping[int, str]]:
        common_outputs = super().outputs

        if "last_hidden_state" in common_outputs:
            common_outputs["last_hidden_state"] = {0: "batch", 1: "decoder_sequence"}

        if self.use_past:
            for i in range(self._config.num_layers):
                common_outputs[f"present.{i}.decoder.key"] = {0: "batch", 2: "decoder_sequence"}
                common_outputs[f"present.{i}.decoder.value"] = {0: "batch", 2: "decoder_sequence"}
                common_outputs[f"present.{i}.encoder.key"] = {0: "batch", 2: "encoder_sequence"}
                common_outputs[f"present.{i}.encoder.value"] = {0: "batch", 2: "encoder_sequence"}

        if self.task == "default":
            common_outputs["encoder_last_hidden_state"] = {0: "batch", 2: "encoder_sequence"}

        return common_outputs