forked from marella/ctransformers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
67 lines (62 loc) · 2 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import os
kwargs = {}
if os.environ.get("CT_WHEEL") == "1":
from setuptools import setup
else:
from skbuild import setup
cmake_args = []
for key in ["CT_INSTRUCTIONS", "CT_CUBLAS", "CT_HIPBLAS", "CT_METAL"]:
value = os.environ.get(key)
if value:
cmake_args.append(f"-D{key}={value}")
if cmake_args:
kwargs["cmake_args"] = cmake_args
with open("README.md") as f:
long_description = f.read()
name = "ctransformers"
setup(
name=name,
version="0.2.27",
description="Python bindings for the Transformer models implemented in C/C++ using GGML library.",
long_description=long_description,
long_description_content_type="text/markdown",
author="Ravindra Marella",
author_email="[email protected]",
url="https://github.com/marella/{}".format(name),
license="MIT",
packages=[name, "ctransformers.gptq"],
package_data={name: ["lib/*/*.so", "lib/*/*.dll", "lib/*/*.dylib"]},
install_requires=[
"huggingface-hub",
"py-cpuinfo>=9.0.0,<10.0.0",
],
extras_require={
"cuda": [
"nvidia-cuda-runtime-cu12",
"nvidia-cublas-cu12",
],
"gptq": [
"exllama==0.1.0",
],
"tests": [
"pytest",
],
},
zip_safe=False,
classifiers=[
"Development Status :: 1 - Planning",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Mathematics",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Software Development",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
],
keywords="{} transformers ai llm".format(name),
**kwargs,
)