Skip to content

Commit

Permalink
fix import bug when ipex is available but sentence_transformers is no…
Browse files Browse the repository at this point in the history
…t; add `accelerate` dependency to run with XPU

Signed-off-by: Liu, Kaixuan <[email protected]>
  • Loading branch information
kaixuanliu committed Dec 17, 2024
1 parent 9c4bccc commit e1d9fd5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions optimum/intel/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"IPEXModel",
]
else:
_import_structure["utils.dummy_ipex_objects"] = []
_import_structure["ipex"] = [
"IPEXModelForCausalLM",
"IPEXModelForSequenceClassification",
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"nncf": ["nncf>=2.14.0"],
"openvino": ["nncf>=2.14.0", "openvino>=2024.5.0", "openvino-tokenizers>=2024.5.0"],
"neural-compressor": ["neural-compressor[pt]>3.0", "accelerate", "transformers<4.46"],
"ipex": ["intel-extension-for-pytorch>=2.4", "transformers>4.45,<4.47"],
"ipex": ["intel-extension-for-pytorch>=2.4", "transformers>4.45,<4.47", "accelerate"],
"diffusers": ["diffusers"],
"quality": QUALITY_REQUIRE,
"tests": TESTS_REQUIRE,
Expand Down

0 comments on commit e1d9fd5

Please sign in to comment.