Skip to content

Commit a344ba9

Browse files
Guang Yangguangy10
authored andcommitted
fix for older version of transformers
1 parent 678b159 commit a344ba9

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

install_dev.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def install_dep_from_source():
3434
"-m",
3535
"pip",
3636
"install",
37-
"git+https://github.com/huggingface/transformers@7f00b325f8140c4964e3e81e6af0e53f5b9a2592#egg=transformers",
37+
"git+https://github.com/huggingface/transformers@51f94ea06d19a6308c61bbb4dc97c40aabd12bad#egg=transformers", # v4.52.4
3838
]
3939
)
4040
subprocess.check_call(

optimum/exporters/executorch/integrations.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ def export(
104104
strict=strict if strict is not None else True,
105105
)
106106
else:
107+
# Path to use legacy API, static export only due to pinned transformers version
107108
from transformers.integrations.executorch import (
108109
convert_and_export_with_cache,
109110
)
@@ -114,7 +115,7 @@ def export(
114115
)
115116

116117
exported_program = convert_and_export_with_cache(
117-
self.model, example_input_ids, example_cache_position, dynamic_shapes, strict
118+
self.model, example_input_ids, example_cache_position
118119
)
119120

120121
return {"model": exported_program}

0 commit comments

Comments
 (0)