-
Notifications
You must be signed in to change notification settings - Fork 84
/
setup.py
33 lines (30 loc) · 1 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
import sys
from setuptools import setup
from torch.utils.cpp_extension import BuildExtension, CUDAExtension
install_requires = []
with open("./requirements.txt", "r") as requirements_file:
reqs = [r.strip() for r in requirements_file.readlines()]
for r in reqs:
install_requires.append(r)
quant_cuda_module = CUDAExtension(
'alpaca_lora_4bit.quant_cuda',
sources=[
'src/alpaca_lora_4bit/quant_cuda/quant_cuda.cpp',
'src/alpaca_lora_4bit/quant_cuda/quant_cuda_kernel.cu'
])
setup(
name='alpaca_lora_4bit',
version='0.1.4',
description='Alpaca LoRA 4-bit',
package_dir={'alpaca_lora_4bit': 'src/alpaca_lora_4bit'},
packages=['alpaca_lora_4bit', 'alpaca_lora_4bit.monkeypatch', 'alpaca_lora_4bit.server', 'alpaca_lora_4bit.quant_cuda'],
install_requires=install_requires,
extras_require={
'triton': 'triton',
'dev': [
'pytest',
],
},
ext_modules=[quant_cuda_module],
cmdclass={'build_ext': BuildExtension},
)