We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 15d3989 commit e89dc5bCopy full SHA for e89dc5b
exllamav2/util.py
@@ -341,7 +341,7 @@ def unpack_4bit(packed: torch.Tensor):
341
342
m, n8 = packed.shape
343
n = n8 * 8
344
- assert packed.dtype in [torch.int32, torch.uint32]
+ assert packed.dtype in [torch.int32]
345
346
# packed = packed.view(torch.uint32)
347
unpacked = torch.empty((m, n), dtype = torch.uint8, device = packed.device)
@@ -366,5 +366,5 @@ def pack_4bit(unpacked: torch.Tensor):
366
packed = torch.zeros((m, n // 8), dtype = torch.int64, device = unpacked.device)
367
for i in range(8):
368
packed |= (unpacked[:, i::8].to(torch.int64) << (i * 4))
369
- packed = packed.to(torch.uint32)
370
- return packed.view(torch.int32)
+ packed = packed.to(torch.int32)
+ return packed
0 commit comments