Skip to content

Commit 36d3f00

Browse files
authored
requirements : fix PyTorch uint64 compatibility (#15134)
This commit addresses an issue with the convert_hf_to_gguf script which is currently failing with: ```console AttributeError: module 'torch' has no attribute 'uint64' ``` This occurred because safetensors expects torch.uint64 to be available in the public API, but PyTorch 2.2.x only provides limited support for unsigned types beyond uint8 it seems. The torch.uint64 dtype exists but is not exposed in the standard torch namespace (see pytorch/pytorch#58734). PyTorch 2.4.0 properly exposes torch.uint64 in the public API, resolving the compatibility issue with safetensors. This also required torchvision to updated to =0.19.0 for compatibility. Refs: https://huggingface.co/spaces/ggml-org/gguf-my-repo/discussions/186#68938de803e47d990aa087fb Refs: pytorch/pytorch#58734
1 parent 5fd160b commit 36d3f00

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

requirements/requirements-convert_hf_to_gguf.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ mistral-common>=1.8.3
22

33
-r ./requirements-convert_legacy_llama.txt
44
--extra-index-url https://download.pytorch.org/whl/cpu
5-
torch~=2.2.1; platform_machine != "s390x"
5+
torch~=2.4.0; platform_machine != "s390x"
66

77
# torch s390x packages can only be found from nightly builds
88
--extra-index-url https://download.pytorch.org/whl/nightly

tools/mtmd/requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
-r ../../requirements/requirements-convert_legacy_llama.txt
22
--extra-index-url https://download.pytorch.org/whl/cpu
33
pillow~=11.3.0
4-
torch~=2.2.1
5-
torchvision~=0.17.1
4+
torch~=2.4.0
5+
torchvision~=0.19.1

0 commit comments

Comments
 (0)