np.int16 no longer used

This commit is contained in:
Sigbjørn Skjæret 2024-06-14 13:32:48 +02:00 committed by GitHub
parent 069369f3fe
commit 225ec48fe5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -296,7 +296,7 @@ class Model:
if self.ftype != gguf.LlamaFileType.ALL_F32 and extra_f16 and not extra_f32:
if self.ftype == gguf.LlamaFileType.MOSTLY_BF16:
data = gguf.truncate_bf16(data) if old_dtype == torch.bfloat16 else gguf.quantize_bf16(data)
assert data.dtype in (np.int16, np.uint16)
assert data.dtype == np.uint16
data_qtype = gguf.GGMLQuantizationType.BF16
elif self.ftype == gguf.LlamaFileType.MOSTLY_Q8_0 and gguf.can_quantize_to_q8_0(data):