Update server/text_generation_server/layers/gptq/__init__.py

This commit is contained in:
Nicolas Patry 2024-10-18 17:55:36 +02:00 committed by GitHub
parent 8673bb050d
commit 0229c71b21
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -325,6 +325,7 @@ class GPTQWeightsLoader(WeightsLoader):
if g_idx is not None:
if (
not torch.equal(
# Remove g_idx[0] to adapt the check with TP>1.
(g_idx - g_idx[0]).cpu(),
torch.tensor(
[i // self.groupsize for i in range(g_idx.shape[0])],