Skip to content
Snippets Groups Projects
Unverified Commit 10dc6eaf authored by Ethan Yang's avatar Ethan Yang Committed by GitHub
Browse files

[openvino embedding]avoid model compiling during saving (#12684)

* avoid model compiling during saving

* update the tool version

* update Decorator
parent 073442e5
No related branches found
No related tags found
No related merge requests found
...@@ -82,9 +82,8 @@ class OpenVINOEmbedding(BaseEmbedding): ...@@ -82,9 +82,8 @@ class OpenVINOEmbedding(BaseEmbedding):
def class_name(cls) -> str: def class_name(cls) -> str:
return "OpenVINOEmbedding" return "OpenVINOEmbedding"
@classmethod @staticmethod
def create_and_save_openvino_model( def create_and_save_openvino_model(
cls,
model_name_or_path: str, model_name_or_path: str,
output_path: str, output_path: str,
export_kwargs: Optional[dict] = None, export_kwargs: Optional[dict] = None,
...@@ -101,7 +100,7 @@ class OpenVINOEmbedding(BaseEmbedding): ...@@ -101,7 +100,7 @@ class OpenVINOEmbedding(BaseEmbedding):
export_kwargs = export_kwargs or {} export_kwargs = export_kwargs or {}
model = OVModelForFeatureExtraction.from_pretrained( model = OVModelForFeatureExtraction.from_pretrained(
model_name_or_path, export=True, **export_kwargs model_name_or_path, export=True, compile=False, **export_kwargs
) )
tokenizer = AutoTokenizer.from_pretrained(model_name_or_path) tokenizer = AutoTokenizer.from_pretrained(model_name_or_path)
......
...@@ -27,7 +27,7 @@ exclude = ["**/BUILD"] ...@@ -27,7 +27,7 @@ exclude = ["**/BUILD"]
license = "MIT" license = "MIT"
name = "llama-index-embeddings-openvino" name = "llama-index-embeddings-openvino"
readme = "README.md" readme = "README.md"
version = "0.1.5" version = "0.1.6"
[tool.poetry.dependencies] [tool.poetry.dependencies]
python = ">=3.8.1,<4.0" python = ">=3.8.1,<4.0"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment