optimum-intel

Форк
0
/
setup.py 
84 строки · 2.8 Кб
1
import re
2

3
from setuptools import find_namespace_packages, setup
4

5

6
# Ensure we match the version set in optimum/intel/version.py
7
try:
8
    filepath = "optimum/intel/version.py"
9
    with open(filepath) as version_file:
10
        (__version__,) = re.findall('__version__ = "(.*)"', version_file.read())
11
except Exception as error:
12
    assert False, "Error: Could not open '%s' due %s\n" % (filepath, error)
13

14
INSTALL_REQUIRE = [
15
    "torch>=1.11",
16
    "optimum~=1.17",
17
    "transformers>=4.36.0,<4.39.0",
18
    "datasets>=1.4.0",
19
    "sentencepiece",
20
    "scipy",
21
    "accelerate",  # transformers 4.29 require accelerate for PyTorch
22
]
23

24
TESTS_REQUIRE = [
25
    "pytest",
26
    "parameterized",
27
    "Pillow",
28
    "evaluate",
29
    "diffusers",
30
    "py-cpuinfo",
31
    "sacremoses",
32
    "torchaudio",
33
    "rjieba",
34
    "timm",
35
    "invisible-watermark>=0.2.0",
36
    "auto-gptq",
37
]
38

39
QUALITY_REQUIRE = ["black~=23.1", "ruff>=0.0.241"]
40

41
EXTRAS_REQUIRE = {
42
    "neural-compressor": ["neural-compressor>=2.2.0", "onnx", "onnxruntime<1.15.0"],
43
    "openvino": ["openvino>=2023.3", "onnx", "onnxruntime"],
44
    "openvino-tokenizers": ["openvino-tokenizers[transformers]"],
45
    "nncf": ["nncf>=2.8.1"],
46
    "ipex": ["intel-extension-for-pytorch", "onnx"],
47
    "diffusers": ["diffusers"],
48
    "quality": QUALITY_REQUIRE,
49
    "tests": TESTS_REQUIRE,
50
}
51

52
setup(
53
    name="optimum-intel",
54
    version=__version__,
55
    description="Optimum Library is an extension of the Hugging Face Transformers library, providing a framework to "
56
    "integrate third-party libraries from Hardware Partners and interface with their specific "
57
    "functionality.",
58
    long_description=open("README.md", "r", encoding="utf-8").read(),
59
    long_description_content_type="text/markdown",
60
    classifiers=[
61
        "Development Status :: 5 - Production/Stable",
62
        "License :: OSI Approved :: Apache Software License",
63
        "Intended Audience :: Developers",
64
        "Intended Audience :: Education",
65
        "Intended Audience :: Science/Research",
66
        "Operating System :: OS Independent",
67
        "Programming Language :: Python :: 3.8",
68
        "Programming Language :: Python :: 3.9",
69
        "Programming Language :: Python :: 3.10",
70
        "Programming Language :: Python :: 3.11",
71
        "Topic :: Scientific/Engineering :: Artificial Intelligence",
72
    ],
73
    keywords="transformers, quantization, pruning, knowledge distillation, optimization, training",
74
    url="https://www.intel.com",
75
    author="HuggingFace Inc. Special Ops Team",
76
    author_email="hardware@huggingface.co",
77
    license="Apache",
78
    packages=find_namespace_packages(include=["optimum*"]),
79
    install_requires=INSTALL_REQUIRE,
80
    extras_require=EXTRAS_REQUIRE,
81
    include_package_data=True,
82
    zip_safe=False,
83
    entry_points={"console_scripts": ["optimum-cli=optimum.commands.optimum_cli:main"]},
84
)
85

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.