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

[PT FE] Disable support for cuda GPTQ type, since it was never supported #27005

Merged
Merged
Changes from all commits
Commits
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
11 changes: 6 additions & 5 deletions src/bindings/python/src/openvino/frontend/pytorch/gptq.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def patched_forward_sym(self, *args, **kwargs):


# All the following AutoGPTQ's quant types are supposed to have the same weights packing schema
supported_quant_types = ['triton', 'exllama', 'cuda', 'exllamav2', 'cuda-old']
supported_quant_types = ['triton', 'exllama', 'exllamav2', 'cuda-old']


def patch_model(model):
Expand All @@ -116,11 +116,12 @@ def patch_model(model):
m.float() # enables tracing on CPU, applied for all modules
if hasattr(m, 'QUANT_TYPE'):
if m.QUANT_TYPE not in supported_quant_types:
raise ValueError(
f'Unsupported QUANT_TYPE == {m.QUANT_TYPE} is discovered for AutoGPTQ model, only the following types are supported: {supported_quant_types}')
raise ValueError(f'Unsupported QUANT_TYPE == {m.QUANT_TYPE} is discovered for '
'AutoGPTQ model, only the following types are supported: '
f'{supported_quant_types}')
if m.bits != 4:
raise ValueError(
f'Unsupported bits == {m.bits} is discovered in module {name} in AutoGPTQ model, only bits == 4 is supported.')
raise ValueError(f'Unsupported bits == {m.bits} is discovered in module {name} '
'in AutoGPTQ model, only bits == 4 is supported.')

int4_in_int32 = 8
groups = m.qzeros.shape[0]
Expand Down
Loading