Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build from source quantization packages #239

Merged
merged 50 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
bacfc98
build autoawq and auto-gptq from source
baptistecolle Aug 1, 2024
e996b89
install from source with unpinned torch
baptistecolle Aug 8, 2024
b58e904
Merge branch 'main' into fix-quantization-lib
baptistecolle Aug 12, 2024
0696ba4
try loading the kernels directly and provide a utility to install aut…
baptistecolle Aug 15, 2024
1353433
try loading the kernels directly and provide a utility to install aut…
baptistecolle Aug 15, 2024
f3058f1
udpate cli argument
baptistecolle Aug 15, 2024
342ddf1
add quanization lib to an install script
baptistecolle Aug 16, 2024
433670f
fix style
baptistecolle Aug 16, 2024
37f43f1
fix typos
baptistecolle Aug 16, 2024
db950d4
add install script
baptistecolle Aug 16, 2024
23bf7da
fix typo
baptistecolle Aug 16, 2024
6209987
update installation script
baptistecolle Aug 16, 2024
ffa5c99
build autoawq and auto-gptq from source
baptistecolle Aug 1, 2024
51834fa
install from source with unpinned torch
baptistecolle Aug 8, 2024
4854785
try loading the kernels directly and provide a utility to install aut…
baptistecolle Aug 15, 2024
1581df8
udpate cli argument
baptistecolle Aug 15, 2024
b272994
add quanization lib to an install script
baptistecolle Aug 16, 2024
1eee838
fix style
baptistecolle Aug 16, 2024
8f68fa4
fix typos
baptistecolle Aug 16, 2024
5aa6ecd
add install script
baptistecolle Aug 16, 2024
78b3ad7
fix typo
baptistecolle Aug 16, 2024
9bfb22f
update installation script
baptistecolle Aug 16, 2024
38e4cc9
Merge branch 'fix-quantization-lib' of https://github.com/huggingface…
IlyasMoutawwakil Aug 19, 2024
fd4992e
fix failing test
baptistecolle Aug 19, 2024
60b2bf2
Merge branch 'fix-quantization-lib' of https://github.com/huggingface…
baptistecolle Aug 19, 2024
e9f4e0e
fix failing test
baptistecolle Aug 19, 2024
e288159
fix failing test
baptistecolle Aug 19, 2024
72921e3
fix failing test
baptistecolle Aug 19, 2024
154ad41
fix auto-gptq install
baptistecolle Aug 20, 2024
aad635b
fix style
baptistecolle Aug 20, 2024
9e9e526
fix dockerfile
baptistecolle Aug 21, 2024
120acc7
update arch list
baptistecolle Aug 22, 2024
a50a5ef
Update torch arch list
baptistecolle Aug 22, 2024
dc8f763
Remove commented code
baptistecolle Aug 30, 2024
4958800
Update scripts/install_quantization_libs.py
IlyasMoutawwakil Aug 30, 2024
072c493
Update .github/workflows/test_cli_cuda_pytorch_single_gpu.yaml
IlyasMoutawwakil Aug 30, 2024
3545bc8
Update Makefile
IlyasMoutawwakil Aug 30, 2024
9103b39
Update scripts/install_quantization_libs.py
IlyasMoutawwakil Aug 30, 2024
08a5c42
Update scripts/install_quantization_libs.py
IlyasMoutawwakil Aug 30, 2024
32d8f9b
Update setup.py
IlyasMoutawwakil Aug 30, 2024
5bfb742
Update setup.py
IlyasMoutawwakil Aug 30, 2024
c562156
Update setup.py
IlyasMoutawwakil Aug 30, 2024
b62c8ca
add ninja
IlyasMoutawwakil Aug 30, 2024
3b5b5e2
fix is_cpu_only
IlyasMoutawwakil Aug 30, 2024
5991783
fix min compute capability for auto-gptq
IlyasMoutawwakil Aug 30, 2024
8a03ac0
Update .github/workflows/test_cli_cuda_pytorch_single_gpu.yaml
IlyasMoutawwakil Aug 30, 2024
f996973
Merge branch 'main' into fix-quantization-lib
IlyasMoutawwakil Aug 30, 2024
1b66595
fix
IlyasMoutawwakil Sep 4, 2024
459262b
Merge branch 'main' into fix-quantization-lib
IlyasMoutawwakil Sep 4, 2024
7d0faa8
rocm
IlyasMoutawwakil Sep 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
IlyasMoutawwakil marked this conversation as resolved.
Show resolved Hide resolved

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
IlyasMoutawwakil marked this conversation as resolved.
Show resolved Hide resolved
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"
IlyasMoutawwakil marked this conversation as resolved.
Show resolved Hide resolved

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