From cd50f9e51deced30e2312f075a3399dea15b43d0 Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Tue, 21 Jul 2026 02:44:55 -0700 Subject: [PATCH] pip: allow torch<2.12 and add amd/huggingfacenotorch extras The released torch>=2.4.0,<2.11.0 pin excludes the AMD 2.11.0+rocm wheel, so a follow-up pip resolve downgrades torch to 2.10.0 and breaks the ROCm install (#7275). Raise the ceiling to <2.12.0 so the ROCm 2.11 wheel is preserved, and add an amd extra (pulls huggingfacenotorch, no torch pin) plus a torch-free huggingfacenotorch extra so AMD users keep their ROCm torch. [pre-commit.ci skip] --- pyproject.toml | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 70a5d77a06..74c94fe24b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,7 +28,7 @@ dependencies = [ "unsloth_zoo>=2026.7.4", "wheel>=0.42.0", "packaging", - "torch>=2.4.0,<2.11.0", + "torch>=2.4.0,<2.12.0", "torchvision", "numpy", "tqdm", @@ -115,6 +115,31 @@ huggingface = [ "pyyaml", "nest-asyncio", ] +huggingfacenotorch = [ + "unsloth_zoo>=2026.7.4", + "wheel>=0.42.0", + "packaging", + "numpy", + "tqdm", + "psutil", + "tyro", + "protobuf", + "sentencepiece>=0.2.0", + "datasets>=3.4.1,!=4.0.*,!=4.1.0,<4.4.0", + "accelerate>=0.34.1", + "peft>=0.18.0,!=0.11.0", + "huggingface_hub>=0.34.0", + "hf_transfer", + "diffusers", + "transformers>=4.51.3,!=4.52.0,!=4.52.1,!=4.52.2,!=4.52.3,!=4.53.0,!=4.54.0,!=4.55.0,!=4.55.1,!=4.57.0,!=4.57.4,!=4.57.5,!=5.0.0,!=5.1.0,<=5.5.0", + "trl>=0.18.2,!=0.19.0,<=0.24.0", + "sentence-transformers", +] +amd = [ + "unsloth[huggingfacenotorch]", + "bitsandbytes>=0.49.1 ; ('linux' in sys_platform) and (platform_machine == 'AMD64' or platform_machine == 'x86_64' or platform_machine == 'aarch64')", + "bitsandbytes>=0.49.1 ; (sys_platform == 'win32') and (platform_machine == 'AMD64' or platform_machine == 'x86_64')", +] windows = [ "unsloth[huggingface]", "bitsandbytes>=0.45.5,!=0.46.0,!=0.48.0 ; (sys_platform == 'win32')",