-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
178 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
[project] | ||
name = "ov_tokenizer" | ||
version = "0.0.1" | ||
description = "Convert tokenizers into OpenVINO models" | ||
requires-python = ">=3.8" | ||
authors = [ | ||
{ name = "OpenVINO Developers", email = "[email protected]" }, | ||
] | ||
classifiers = [ | ||
'Programming Language :: Python :: 3.8', | ||
'Programming Language :: Python :: 3.9', | ||
'Programming Language :: Python :: 3.10', | ||
'Programming Language :: Python :: 3.11', | ||
] | ||
|
||
dependencies = [ | ||
"openvino>=2023.1", | ||
"numpy" | ||
] | ||
|
||
[project.optional-dependencies] | ||
dev = [ | ||
"black", | ||
"ruff", | ||
"pytest", | ||
] | ||
transformers = [ | ||
"transformers[sentencepiece]" | ||
] | ||
all = [ | ||
"ov_tokenizer[dev,transformers]" | ||
] | ||
|
||
|
||
[tool.black] | ||
line-length = 119 | ||
target-versions = ["py38", "py39", "py310", "py311", "py312"] | ||
|
||
|
||
[tool.ruff] | ||
ignore = ["C901", "E501", "E741", "W605"] | ||
select = ["C", "E", "F", "I", "W"] | ||
line-length = 119 | ||
|
||
[tool.ruff.per-file-ignores] | ||
"__init__.py" = ["F401"] | ||
"ov_tokenizer/hf_parser.py" = ["F821"] | ||
|
||
[tool.ruff.isort] | ||
lines-after-imports = 2 | ||
|
||
[build-system] | ||
requires = [ | ||
"setuptools>=42", | ||
"scikit-build~=0.17.0", | ||
"cmake>=3.14" | ||
] | ||
build-backend = "setuptools.build_meta" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from skbuild import setup | ||
from skbuild import constants | ||
|
||
setup( | ||
packages=["ov_tokenizer"], | ||
package_dir={"": "user_ie_extensions/tokenizer/python"}, | ||
cmake_install_dir="user_ie_extensions/tokenizer/python/ov_tokenizer/libs", | ||
cmake_args=['-DCUSTOM_OPERATIONS:STRING=tokenizer', | ||
'-DBUILD_FAST_TOKENIZERS=OFF'] | ||
) | ||
|
||
# When building extension modules `cmake_install_dir` should always be set to the | ||
# location of the package you are building extension modules for. | ||
# Specifying the installation directory in the CMakeLists subtley breaks the relative | ||
# paths in the helloTargets.cmake file to all of the library components. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.