Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 0f80f7c

Browse files
committedOct 10, 2024·
warning
1 parent f480fe0 commit 0f80f7c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed
 

‎optimum/exporters/openvino/convert.py

+7
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
_torch_version,
4242
_transformers_version,
4343
compare_versions,
44+
is_tokenizers_version,
4445
is_transformers_version,
4546
)
4647
from optimum.utils import DEFAULT_DUMMY_SHAPES, is_diffusers_available
@@ -730,6 +731,12 @@ def export_tokenizer(
730731
except ModuleNotFoundError:
731732
return
732733

734+
if is_tokenizers_version(">", "0.19"):
735+
logger.warning(
736+
"Exporting tokenizers to OpenVINO is not supported for tokenizers version > 0.19. "
737+
"Please downgrade to tokenizers version <= 0.19 to export tokenizers to OpenVINO."
738+
)
739+
733740
if not isinstance(output, Path):
734741
output = Path(output)
735742

0 commit comments

Comments
 (0)
Please sign in to comment.