Fully deprecate AutoGPTQ for GPT-QModel#2385
Conversation
Signed-off-by: ZX-ModelCloud <[email protected]>
Signed-off-by: ZX-ModelCloud <[email protected]>
Signed-off-by: ZX-ModelCloud <[email protected]>
…nsformers. Signed-off-by: ZX-ModelCloud <[email protected]>
Signed-off-by: ZX-ModelCloud <[email protected]>
…arguments Signed-off-by: ZX-ModelCloud <[email protected]>
|
@SunMarc @BenjaminBossan This is the companion PR to both PEFT PR huggingface/peft#2917 and Transformer PR huggingface/transformers#41567. Also fixes a Transformer bug (latest changes broke Optimum) in 14d5cfe Major changes is kernel selection to gptqmodel is unified under new Related Optimum quantization CI tests passing. |
Signed-off-by: ZX-ModelCloud <[email protected]>
Signed-off-by: ZX-ModelCloud <[email protected]>
Signed-off-by: ZX-ModelCloud <[email protected]>
SunMarc
left a comment
There was a problem hiding this comment.
Thanks for updating the codebase and deprecating auto-gptq in optimum. Note that in the long term, we will probably not maintain this anymore and we should redirect users to appropriate lib like gptq-model. Feel free to update the docs to prompt users to direct use gptq-model.
In transformers, we only deal with quantizing ourselves if we can do it on the fly without calibration. gptq was one of the first method, so this is why it was supported through optimum but for example, we didn't do it for awq.
Signed-off-by: ZX-ModelCloud <[email protected]>
|
@IlyasMoutawwakil @SunMarc PR is now synced to Peft/Transformer pending Prs. Ready for final review for this portion. All relevant tests passing. |
Signed-off-by: ZX-ModelCloud <[email protected]>
|
Thanks ! can you please add GPTQModel to the gptq workflow: |
Signed-off-by: ZX-ModelCloud <[email protected]>
| def load_quantized_model( | ||
| model: nn.Module, | ||
| save_folder: str, | ||
| backend: BACKEND = BACKEND.AUTO, |
There was a problem hiding this comment.
BACKEND is only defined when GPTQModel is available which breaks this file when it isn't
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
Signed-off-by: ZX-ModelCloud <[email protected]>
| backend=BACKEND.EXLLAMA_V1, | ||
| backend=BACKEND.EXLLAMA_V2, |
There was a problem hiding this comment.
@IlyasMoutawwakil Note we change the ci to test exllama v2 kernel since GPT-QModel no longer compile Exallma v1 kernel by default due to a) save on whl size b) v2 is consistently faster so there is no reason to use v1 kernel. exllama v1 kernel is still compilable from gpt-qmodel src but for the sake or fast optimum ci (install from precompiled whl), we are moving away from exallma v1 tests.
There was a problem hiding this comment.
thanks for taking care of this !
| - name: Install dependencies | ||
| run: | | ||
| pip install --upgrade pip uv | ||
| uv pip install .[tests] | ||
| uv pip install gptqmodel --no-build-isolation |
There was a problem hiding this comment.
@Qubitium @ZX-ModelCloud is there anything that needs to be fixed in the installation process her ? it fails with :
× Failed to download and build `gptqmodel==5.4.2`
╰─▶ Package metadata version `5.4.2+cu128torch2.9` does not match `5.4.2`
from the wheel filename
There was a problem hiding this comment.
@Qubitium @ZX-ModelCloud is there anything that needs to be fixed in the installation process her ? it fails with :
× Failed to download and build `gptqmodel==5.4.2` ╰─▶ Package metadata version `5.4.2+cu128torch2.9` does not match `5.4.2` from the wheel filename
Please pin ci test to gptqmodel >= 5.6.10
There was a problem hiding this comment.
There is a bug in uv. We previously submitted and they fixed this meta match issue but now regressing in latest uv. Please use pin gptqmodel to 5.6.10 and avoid uv
There was a problem hiding this comment.
i pinned gptqmodel to 5.6.10, let's see if it works,
avoiding uv is kinda hard once you get used to its speedup gains 😅
There was a problem hiding this comment.
i pinned gptqmodel to 5.6.10, let's see if it works, avoiding uv is kinda hard once you get used to its speedup gains 😅
We will try to get this resolved with uv upstream (if we cannot resolve it on our end with setup.py hacks). Need to stick with pip for gptqmodel install for now. =(
There was a problem hiding this comment.
it worked now !
so gptqmodel needs to build the cuda/hip/sycl kernels from scratch at installation time ? did you consider using the kernels and kernel-builder libs ? would make the package more universal and solve most distribution issues.
|
@IlyasMoutawwakil We may have an internal issue. pip install "gptqmodel>=5.6.10" --no-build-isolation also failing with same meta data parsing error...checking |
IlyasMoutawwakil
left a comment
There was a problem hiding this comment.
LGTM ! thanks for simplifying this !
|
@IlyasMoutawwakil Once the wheels are done, you can trigger ci, and uv should install download the prebuilt wheel without having to build the full kernels. |
Co-authored-by: Ilyas Moutawwakil <[email protected]>
Remove autogptq clutter and autogptq related configs that are not worth adding backward compat. For reference, see - huggingface/transformers#41567 - huggingface/optimum#2385 * fix gptq test Signed-off-by: ZX-ModelCloud <[email protected]> * remove auto_gptq Signed-off-by: ZX-ModelCloud <[email protected]> * call hf_select_quant_linear_v2() Signed-off-by: ZX-ModelCloud <[email protected]> * remove auto_awq Signed-off-by: ZX-ModelCloud <[email protected]> * cleanup Signed-off-by: ZX-ModelCloud <[email protected]> * format Signed-off-by: ZX-ModelCloud <[email protected]> * fix PeftAwqGPUTests Signed-off-by: ZX-ModelCloud <[email protected]> * update GPTQMODEL_MINIMUM_VERSION to 5.6.0 Signed-off-by: ZX-ModelCloud <[email protected]> * update GPTQMODEL_MINIMUM_VERSION Signed-off-by: ZX-ModelCloud <[email protected]> * Update minimum version requirement for gptqmodel * style * call is_gptqmodel_available() Signed-off-by: ZX-ModelCloud <[email protected]> * call is_gptqmodel_available() Signed-off-by: ZX-ModelCloud <[email protected]> * Update minimum version for gptqmodel to 5.6.12 * When hf_device_map does not exist, infer the device_map Signed-off-by: ZX-ModelCloud <[email protected]> * cleanup Signed-off-by: ZX-ModelCloud <[email protected]> --------- Signed-off-by: ZX-ModelCloud <[email protected]> Co-authored-by: Qubitium-ModelCloud <[email protected]> Co-authored-by: githubnemo <[email protected]>
What does this PR do?
Remove autogptq clutter and autogptq related configs that are not worth adding backward compat.
See
transformers PR#41567
peft PR#2932
Before submitting
Who can review?