Skip to content

Commit

Permalink
move decoder_merge import
Browse files Browse the repository at this point in the history
  • Loading branch information
eaidova committed Dec 4, 2024
1 parent 7680b3e commit d5ceb67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion optimum/exporters/onnx/model_configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
from packaging import version
from transformers.utils import is_tf_available

from ...onnx import merge_decoders
from ...utils import (
DEFAULT_DUMMY_SHAPES,
BloomDummyPastKeyValuesGenerator,
Expand Down Expand Up @@ -1875,6 +1874,7 @@ def post_process_exported_models(
decoder_with_past_path = Path(path, onnx_files_subpaths[3])
decoder_merged_path = Path(path, ONNX_DECODER_MERGED_NAME + ".onnx")
try:
from ...onnx import merge_decoders
# The decoder with past does not output the cross attention past key values as they are constant,
# hence the need for strict=False
merge_decoders(
Expand Down

0 comments on commit d5ceb67

Please sign in to comment.