Skip to content

Commit

Permalink
Update PyTorch to 2.4.1
Browse files Browse the repository at this point in the history
This change the default PyTorch 2.4.1.
Intel Gaudi (HPU) remains on Intel fork of PyTorch 2.3.1.

Fixes instructlab/instructlab#2437

Signed-off-by: Fabien Dupont <[email protected]>
  • Loading branch information
fabiendupont committed Oct 22, 2024
1 parent 7b7894b commit f9f0531
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 4 deletions.
7 changes: 5 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,11 @@ package-dir = { "" = "src" }

[tool.setuptools.dynamic]
dependencies = { file = ["requirements.txt"] }
optional-dependencies.cuda = { file = ["requirements-cuda.txt"] }
optional-dependencies.rocm = { file = ["requirements-rocm.txt"] }
optional-dependencies.cpu = { file = ["requirements/cpu.txt"] }
optional-dependencies.cuda = { file = ["requirements/cuda.txt"] }
optional-dependencies.hpu = { file = ["requirements/hpu.txt"] }
optional-dependencies.mps = { file = ["requirements/mps.txt"] }
optional-dependencies.rocm = { file = ["requirements/rocm.txt"] }

[tool.setuptools.packages.find]
where = ["src"]
Expand Down
1 change: 0 additions & 1 deletion requirements-rocm.txt

This file was deleted.

2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pyyaml
py-cpuinfo
# we set this to be above 0a0 so that it doesn't
# replace custom pytorch images with the 2.3.0
torch>=2.3.0a0
torch>=2.3.0,<2.5.0
transformers>=4.41.2
accelerate>=0.34.2
datasets>=2.15.0
Expand Down
1 change: 1 addition & 0 deletions requirements/cpu.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Extra dependencies for CPU-only
1 change: 1 addition & 0 deletions requirements-cuda.txt → requirements/cuda.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# Extra dependencies for NVIDIA CUDA
flash-attn>=2.4.0
bitsandbytes>=0.43.1
12 changes: 12 additions & 0 deletions requirements/hpu.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# # Extra dependencies for Intel Gaudi / Habana Labs HPU devices
# Habana Labs 1.17.1 has PyTorch 2.3.1a0+gitxxx pre-release
torch>=2.3.1a0,<2.4.0
# Habana Labs frameworks
habana-torch-plugin>=1.17.1
habana_gpu_migration>=1.17.1
# additional Habana Labs packages (installed, but not used)
#habana-media-loader
#habana-pyhlml
#habana_quantization_toolkit
#habana-torch-dataloader
1 change: 1 addition & 0 deletions requirements/mps.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Extra dependencies for Apple MPS (Metal Performance Shaders)
2 changes: 2 additions & 0 deletions requirements/rocm.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Extra dependencies for AMD ROCm
flash-attn>=2.6.2,<2.7.0

0 comments on commit f9f0531

Please sign in to comment.