Skip to content

Commit

Permalink
apply code style
Browse files Browse the repository at this point in the history
  • Loading branch information
eaidova committed Jun 6, 2024
1 parent c49522a commit 85d979a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions optimum/exporters/onnx/model_configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -646,8 +646,9 @@ def outputs(self) -> Dict[str, Dict[int, str]]:
if self.use_past:
# When exporting decoder models with use_cache=True, both the decoder without past and with past have the KV cache as an output.
for i in range(
self._normalized_config.encoder_num_layers
if self.task != "text-generation" else self._normalized_config.decoder_num_layers
self._normalized_config.encoder_num_layers
if self.task != "text-generation"
else self._normalized_config.decoder_num_layers
):
common_outputs[f"present.{i}.key"] = {0: "batch_size", 2: "past_sequence_length + sequence_length"}
common_outputs[f"present.{i}.value"] = {
Expand Down

0 comments on commit 85d979a

Please sign in to comment.