Skip to content

Commit

Permalink
build autoawq and auto-gptq from source
Browse files Browse the repository at this point in the history
  • Loading branch information
baptistecolle committed Aug 1, 2024
1 parent c45aecd commit bacfc98
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ If you would like to work on any of the open Issues:
For a better development experience, we recommend using isolated docker containers to run tests:

```bash
make build_docker_cpu
make run_docker_cpu
make install_cli_cpu_pytorch_extras
make build_cpu_image
make run_cpu_container
make install_cli_cpu_pytorch
make test_cli_cpu_pytorch
```

Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
PWD := $(shell pwd)
USER_ID := $(shell id -u)
GROUP_ID := $(shell id -g)
TORCH_VERSION := 2.3.1

quality:
ruff check .
Expand All @@ -23,7 +24,7 @@ build_cpu_image:
docker build --build-arg IMAGE=optimum-benchmark:latest-cpu --build-arg USER_ID=$(USER_ID) --build-arg GROUP_ID=$(GROUP_ID) -t optimum-benchmark:latest-cpu docker/unroot

build_cuda_image:
docker build -t optimum-benchmark:latest-cuda docker/cuda
docker build --build-arg TORCH_VERSION=$(TORCH_VERSION) -t optimum-benchmark:latest-cuda docker/cuda
docker build --build-arg IMAGE=optimum-benchmark:latest-cuda --build-arg USER_ID=$(USER_ID) --build-arg GROUP_ID=$(GROUP_ID) -t optimum-benchmark:latest-cuda docker/unroot

build_cuda_ort_image:
Expand Down
2 changes: 1 addition & 1 deletion docker/cuda/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
python3.10 python3-pip python3.10-dev && \
apt-get clean && rm -rf /var/lib/apt/lists/* && \
update-alternatives --install /usr/bin/python python /usr/bin/python3.10 1 && \
pip install --no-cache-dir --upgrade pip setuptools wheel
pip install --no-cache-dir --upgrade pip setuptools wheel requests

# Install PyTorch
ARG TORCH_CUDA=cu121
Expand Down
10 changes: 6 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,10 @@
AUTOAWQ = "autoawq@https://github.com/casper-hansen/AutoAWQ/releases/download/v0.2.1/autoawq-0.2.1+rocm571-cp310-cp310-linux_x86_64.whl"
AUTOGPTQ = "auto-gptq@https://huggingface.github.io/autogptq-index/whl/rocm573/auto-gptq/auto_gptq-0.7.1%2Brocm5.7.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl"
else:
AUTOAWQ = "autoawq==0.2.1"
AUTOGPTQ = "auto-gptq==0.7.1"
AUTOAWQ = "autoawq@git+https://github.com/casper-hansen/AutoAWQ.git"
AUTOAWQ_KERNELS = "autoawq-kernels@git+https://github.com/casper-hansen/AutoAWQ_kernels.git"

AUTOGPTQ = "auto-gptq@git+https://github.com/PanQiWei/AutoGPTQ.git"

EXTRAS_REQUIRE = {
"quality": ["ruff"],
Expand All @@ -79,7 +81,7 @@
"py-txi": ["py-txi"],
"vllm": ["vllm"],
# optional dependencies
"autoawq": [AUTOAWQ],
"autoawq": [AUTOAWQ_KERNELS, AUTOAWQ],
"auto-gptq": ["optimum", AUTOGPTQ],
"sentence-transformers": ["sentence-transformers"],
"bitsandbytes": ["bitsandbytes"],
Expand Down Expand Up @@ -112,7 +114,7 @@
"License :: OSI Approved :: Apache Software License",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
],
keywords="benchmaek, transformers, quantization, pruning, optimization, training, inference, onnx, onnx runtime, intel, "
keywords="benchmark, transformers, quantization, pruning, optimization, training, inference, onnx, onnx runtime, intel, "
"habana, graphcore, neural compressor, ipex, ipu, hpu, llm-swarm, py-txi, vllm, auto-gptq, autoawq, "
"sentence-transformers, bitsandbytes, codecarbon, flash-attn, deepspeed, diffusers, timm, peft",
long_description=open("README.md", "r", encoding="utf-8").read(),
Expand Down

0 comments on commit bacfc98

Please sign in to comment.