Commit 45b896262 for llama.cpp
commit 45b8962622cd60fd84454822e4ceb8744eb6a875
Author: Ahmed Mohammed <ahmedm25085@gmail.com>
Date: Thu Dec 3 12:39:41 2026 -0500
gguf-py : allow F64 and integer tensors in gguf_convert_endian (#33575)
* gguf-py : allow F64 and integer tensors in gguf_convert_endian
Assisted-by: Claude
* gguf-py : move I8 to byteswap_tensors as noop, drop test
diff --git a/gguf-py/gguf/scripts/gguf_convert_endian.py b/gguf-py/gguf/scripts/gguf_convert_endian.py
index 7e8b2f1be..0b7545745 100755
--- a/gguf-py/gguf/scripts/gguf_convert_endian.py
+++ b/gguf-py/gguf/scripts/gguf_convert_endian.py
@@ -41,6 +41,7 @@ byteswap_tensors: dict[gguf.GGMLQuantizationType, tuple[tuple[int, type[np.unsig
gguf.GGMLQuantizationType.MXFP4: (), # noop
gguf.GGMLQuantizationType.NVFP4: (), # noop
gguf.GGMLQuantizationType.F8_E4M3: (), # noop
+ gguf.GGMLQuantizationType.I8: (), # noop
}
@@ -62,6 +63,10 @@ def convert_byteorder(reader: gguf.GGUFReader, args: argparse.Namespace) -> None
gguf.GGMLQuantizationType.F32,
gguf.GGMLQuantizationType.F16,
gguf.GGMLQuantizationType.BF16,
+ gguf.GGMLQuantizationType.F64,
+ gguf.GGMLQuantizationType.I16,
+ gguf.GGMLQuantizationType.I32,
+ gguf.GGMLQuantizationType.I64,
):
raise ValueError(f"Cannot handle type {tensor.tensor_type.name} for tensor {repr(tensor.name)}")
logger.info(f"* Preparing to convert from {file_endian} to {order}")