diff --git a/examples/convert_legacy_llama.py b/examples/convert_legacy_llama.py index c4ec5c524e9..710cca96be1 100755 --- a/examples/convert_legacy_llama.py +++ b/examples/convert_legacy_llama.py @@ -1308,7 +1308,7 @@ 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("<"): + if np.uint32(1) == np.uint32(1).view(np.dtype(np.uint32).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") diff --git a/gguf-py/pyproject.toml b/gguf-py/pyproject.toml index bb9b86ace75..dcd6769ebae 100644 --- a/gguf-py/pyproject.toml +++ b/gguf-py/pyproject.toml @@ -19,7 +19,7 @@ classifiers = [ [tool.poetry.dependencies] python = ">=3.8" -numpy = ">=1.17" +numpy = ">=2.1" tqdm = ">=4.27" pyyaml = ">=5.1" sentencepiece = ">=0.1.98,<=0.2.0" diff --git a/pyproject.toml b/pyproject.toml index 3d71b055a8d..9e37dcc7a9a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,8 +15,8 @@ classifiers = [ ] [tool.poetry.dependencies] -python = ">=3.9" -numpy = "^1.25.0" +python = ">=3.10,<3.14" +numpy = "^2.1" sentencepiece = ">=0.1.98,<=0.2.0" transformers = ">=4.35.2,<5.0.0" protobuf = ">=4.21.0,<5.0.0" diff --git a/pyrightconfig.json b/pyrightconfig.json index 5320fe5864a..2f91e31ec2e 100644 --- a/pyrightconfig.json +++ b/pyrightconfig.json @@ -1,6 +1,6 @@ { "extraPaths": ["gguf-py"], - "pythonVersion": "3.9", + "pythonVersion": "3.10", "pythonPlatform": "All", "reportUnusedImport": "warning", "reportDuplicateImport": "error", @@ -11,7 +11,7 @@ { // TODO: make this version override work correctly "root": "gguf-py", - "pythonVersion": "3.8", + "pythonVersion": "3.10", }, { // uses match expressions in steps.py @@ -19,4 +19,7 @@ "pythonVersion": "3.10", }, ], - } + "exclude": [ + "tools/mtmd/legacy-models", + ] +} diff --git a/requirements/requirements-convert_hf_to_gguf.txt b/requirements/requirements-convert_hf_to_gguf.txt index 8cb9c354f01..d327a01fb15 100644 --- a/requirements/requirements-convert_hf_to_gguf.txt +++ b/requirements/requirements-convert_hf_to_gguf.txt @@ -1,3 +1,3 @@ -r ./requirements-convert_legacy_llama.txt --extra-index-url https://download.pytorch.org/whl/cpu -torch~=2.2.1 +torch>=2.5.1 diff --git a/requirements/requirements-convert_hf_to_gguf_update.txt b/requirements/requirements-convert_hf_to_gguf_update.txt index 8cb9c354f01..d327a01fb15 100644 --- a/requirements/requirements-convert_hf_to_gguf_update.txt +++ b/requirements/requirements-convert_hf_to_gguf_update.txt @@ -1,3 +1,3 @@ -r ./requirements-convert_legacy_llama.txt --extra-index-url https://download.pytorch.org/whl/cpu -torch~=2.2.1 +torch>=2.5.1 diff --git a/requirements/requirements-convert_legacy_llama.txt b/requirements/requirements-convert_legacy_llama.txt index 859204b27eb..c025e101226 100644 --- a/requirements/requirements-convert_legacy_llama.txt +++ b/requirements/requirements-convert_legacy_llama.txt @@ -1,4 +1,4 @@ -numpy~=1.26.4 +numpy>=2.1 sentencepiece~=0.2.0 transformers>=4.45.1,<5.0.0 gguf>=0.1.0 diff --git a/requirements/requirements-gguf_editor_gui.txt b/requirements/requirements-gguf_editor_gui.txt index 920dc7cf90b..7e4724253f7 100644 --- a/requirements/requirements-gguf_editor_gui.txt +++ b/requirements/requirements-gguf_editor_gui.txt @@ -1,3 +1,3 @@ -numpy~=1.26.4 +numpy>=2.1 PySide6~=6.9.0 gguf>=0.16.0 diff --git a/requirements/requirements-tool_bench.txt b/requirements/requirements-tool_bench.txt index b94521fc7fa..2959802ed27 100644 --- a/requirements/requirements-tool_bench.txt +++ b/requirements/requirements-tool_bench.txt @@ -2,11 +2,11 @@ aiohttp~=3.9.3 pytest~=8.3.3 huggingface_hub~=0.23.2 matplotlib~=3.10.0 -numpy~=1.26.4 +numpy>=2.1 openai~=1.55.3 pandas~=2.2.3 prometheus-client~=0.20.0 -requests~=2.32.3 +requests>=2.28.1 wget~=3.2 typer~=0.15.1 seaborn~=0.13.2 diff --git a/tools/mtmd/requirements.txt b/tools/mtmd/requirements.txt index cbcbf26c9b4..513f9dda513 100644 --- a/tools/mtmd/requirements.txt +++ b/tools/mtmd/requirements.txt @@ -1,5 +1,5 @@ -r ../../requirements/requirements-convert_legacy_llama.txt --extra-index-url https://download.pytorch.org/whl/cpu pillow~=10.2.0 -torch~=2.2.1 -torchvision~=0.17.1 +torch>=2.5 +torchvision>=0.20.1 diff --git a/tools/server/tests/requirements.txt b/tools/server/tests/requirements.txt index 15d024914e8..4fc3c75d36a 100644 --- a/tools/server/tests/requirements.txt +++ b/tools/server/tests/requirements.txt @@ -1,8 +1,8 @@ aiohttp~=3.9.3 pytest~=8.3.3 huggingface_hub~=0.23.2 -numpy~=1.26.4 +numpy>=2.1 openai~=1.55.3 prometheus-client~=0.20.0 -requests~=2.32.3 +requests>=2.28.1 wget~=3.2