Skip to content

Commit 3400755

Browse files
committed
Fixes byteorder check and removes unrequested exclusion tests
Updates the byteorder check in the conversion script to be more robust. Removes the "tests" directory from the pyright exclude list.
1 parent a5c74dd commit 3400755

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

examples/convert_legacy_llama.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1308,7 +1308,7 @@ def do_dump_model(model_plus: ModelPlus) -> None:
13081308

13091309
def main(args_in: list[str] | None = None) -> None:
13101310
output_choices = ["f32", "f16"]
1311-
if np.uint32(1) == np.uint32(1).newbyteorder("<"):
1311+
if np.uint32(1) == np.uint32(1).view(np.dtype(np.uint32).newbyteorder("<")):
13121312
# We currently only support Q8_0 output on little endian systems.
13131313
output_choices.append("q8_0")
13141314
parser = argparse.ArgumentParser(description="Convert a LLaMA model to a GGML compatible file")

pyrightconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,5 @@
2222
],
2323
"exclude": [
2424
"tools/mtmd/legacy-models",
25-
"tests"
2625
]
2726
}

0 commit comments

Comments
 (0)