convert : minor fixes for numpy 2.x (#23571)

This commit is contained in:
Sigbjørn Skjæret
2026-05-24 09:51:31 +02:00
committed by GitHub
parent 63248fc3e3
commit 5d246a792d
2 changed files with 3 additions and 1 deletions
+2 -1
View File
@@ -1308,7 +1308,8 @@ def do_dump_model(model_plus: ModelPlus) -> None:
def main(args_in: list[str] | None = None) -> None:
output_choices = ["f32", "f16"]
if np.uint32(1) == np.uint32(1).newbyteorder("<"):
dummy_val = np.uint32(1)
if dummy_val == dummy_val.view(dummy_val.dtype.newbyteorder("<")):
# We currently only support Q8_0 output on little endian systems.
output_choices.append("q8_0")
parser = argparse.ArgumentParser(description="Convert a LLaMA model to a GGML compatible file")