From 3bdb9720a02f25947eb7ef0d2cc3d949be206a0f Mon Sep 17 00:00:00 2001 From: nemo Date: Fri, 30 Jan 2026 10:34:20 +0100 Subject: [PATCH 1/5] Fix two issues introduced in AutoGPTQ deprecation Merging PR #2932 introduced two bugs that lead to failing CPU and GPU pipelines. Firstly, a merge on main in the PR without a follow-up CI run re-introduced a deleted AutoGPTQ code branch which is now removed again. Secondly, gptqmodel seems, just like EETQ, to need a non-isolated build environment to find external dependencies like PyTorch to be installed correctly. As this was not present, the nightly slow CI wasn't run. --- docker/peft-gpu/Dockerfile | 5 ++++- src/peft/tuners/lora/gptq.py | 6 ------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/docker/peft-gpu/Dockerfile b/docker/peft-gpu/Dockerfile index 994c647523..0cc9512bdc 100644 --- a/docker/peft-gpu/Dockerfile +++ b/docker/peft-gpu/Dockerfile @@ -39,7 +39,10 @@ RUN apt-get update && \ RUN chsh -s /bin/bash SHELL ["/bin/bash", "-c"] -RUN conda run -n peft pip install --no-cache-dir bitsandbytes optimum gptqmodel +RUN conda run -n peft pip install --no-cache-dir bitsandbytes optimum + +# GPTQmodel doesn't find torch without build isolation +RUN conda run -n peft pip install --no-build-isolation gptqmodel RUN \ # Add eetq for quantization testing; needs to run without build isolation since the setup diff --git a/src/peft/tuners/lora/gptq.py b/src/peft/tuners/lora/gptq.py index 3101b4ff53..d210e7e45d 100644 --- a/src/peft/tuners/lora/gptq.py +++ b/src/peft/tuners/lora/gptq.py @@ -131,11 +131,5 @@ def dispatch_gptq( if isinstance(target_base_layer, BaseQuantLinear): new_module = GPTQLoraLinear(target, adapter_name, config=config, **kwargs) target.qweight = target_base_layer.qweight - else: - quant_linear = get_auto_gptq_quant_linear(cfg) - - if quant_linear is not None and isinstance(target_base_layer, quant_linear): - new_module = GPTQLoraLinear(target, adapter_name, config=config, **kwargs) - target.qweight = target_base_layer.qweight return new_module From 98f828ef7ead81b96fc1fbb7b11974c834e448ee Mon Sep 17 00:00:00 2001 From: nemo Date: Fri, 30 Jan 2026 10:39:45 +0100 Subject: [PATCH 2/5] Make sure that hf-doc-builder has requests Apparently `hf-doc-builder` doesn't expose its dependency to `requests` in the `setup.py` (it does in `pyproject.toml`). For some reason `requests` is not installed anymore (some other dependency removed it probably), so we're getting CI errors. --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index bc70515aeb..168b4e4aed 100644 --- a/setup.py +++ b/setup.py @@ -25,6 +25,7 @@ ] extras["docs_specific"] = [ "black", # doc-builder has an implicit dependency on Black, see huggingface/doc-builder#434 + "requests", # doc-builder has an implicit dependency on requests (setup.py doesn't mention it, pyproject does) "hf-doc-builder", ] extras["dev"] = extras["quality"] + extras["docs_specific"] From 8e9b5047cb10c036fcac51db1998245918e89a54 Mon Sep 17 00:00:00 2001 From: nemo Date: Fri, 30 Jan 2026 11:35:36 +0100 Subject: [PATCH 3/5] Fix docker build test The docker test build failed because of escaped values passed to the next task. Avoiding wrapping the value in an env variable fixes this issue. --- .github/workflows/test-docker-build.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/test-docker-build.yml b/.github/workflows/test-docker-build.yml index b13465caa5..0f05a0ad34 100644 --- a/.github/workflows/test-docker-build.yml +++ b/.github/workflows/test-docker-build.yml @@ -28,10 +28,8 @@ jobs: - name: Run step if only the files listed above change if: steps.changed-files.outputs.any_changed == 'true' id: set-matrix - env: - ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} run: | - echo "matrix=${ALL_CHANGED_FILES}" >> $GITHUB_OUTPUT + echo "matrix=${{ steps.changed-files.outputs.all_changed_files }}" >> $GITHUB_OUTPUT build_modified_files: needs: get_changed_files name: Build Docker images on modified files From 6c3ef865839a1ca5b0d48d93f0b2d35971ba220c Mon Sep 17 00:00:00 2001 From: nemo Date: Fri, 30 Jan 2026 12:26:48 +0100 Subject: [PATCH 4/5] Ignore DeprecationWarning for BPE as well --- pyproject.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 05e35c54c8..c1ed90e74f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,5 +52,7 @@ markers = [ filterwarnings = [ "error::DeprecationWarning:transformers", + # in sync with tests/conftest.py regarding BPE deprecation + "ignore:.*BPE.__init__ will not create from files anymore.*:DeprecationWarning:transformers", "error::FutureWarning:transformers", ] From 575877b8b8c956f0a80dae952d45be1a0e5f4dbe Mon Sep 17 00:00:00 2001 From: nemo Date: Fri, 30 Jan 2026 15:11:43 +0100 Subject: [PATCH 5/5] Re-introduce escaping through env vars Escaping the changed files is indeed relevant since it is a potential intruder controlled vector. --- .github/workflows/test-docker-build.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-docker-build.yml b/.github/workflows/test-docker-build.yml index 0f05a0ad34..88bf8a35d4 100644 --- a/.github/workflows/test-docker-build.yml +++ b/.github/workflows/test-docker-build.yml @@ -28,8 +28,10 @@ jobs: - name: Run step if only the files listed above change if: steps.changed-files.outputs.any_changed == 'true' id: set-matrix + env: + CHANGED_FILES: "${{ steps.changed-files.outputs.all_changed_files }}" run: | - echo "matrix=${{ steps.changed-files.outputs.all_changed_files }}" >> $GITHUB_OUTPUT + echo "matrix=$(echo ${CHANGED_FILES} | sed -e 's/\\\"/\"/g')" >> $GITHUB_OUTPUT build_modified_files: needs: get_changed_files name: Build Docker images on modified files