Skip to content

Commit a4d5112

Browse files
authored
builds for torch 2.7.0 (axolotl-ai-cloud#2552)
* builds for torch==2.7.0 * use xformers==0.0.29.post3 * no vllm support with torch 2.7 * update default, fix conditional * no xformers for 270 * no vllm on 2.7.0 for multigpu test too * remove deprecated verbose arg from scheduler * 2.7.0 tests on cpu
1 parent 0d691cc commit a4d5112

File tree

5 files changed

+35
-6
lines changed

5 files changed

+35
-6
lines changed

.github/workflows/main.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ jobs:
3131
pytorch: 2.6.0
3232
axolotl_extras: vllm
3333
is_latest: true
34+
- cuda: 126
35+
cuda_version: 12.6.3
36+
python_version: "3.11"
37+
pytorch: 2.7.0
38+
axolotl_extras: vllm
3439
runs-on: axolotl-gpu-runner
3540
steps:
3641
- name: Checkout
@@ -93,6 +98,11 @@ jobs:
9398
pytorch: 2.6.0
9499
axolotl_extras:
95100
is_latest: true
101+
- cuda: 126
102+
cuda_version: 12.6.3
103+
python_version: "3.11"
104+
pytorch: 2.7.0
105+
axolotl_extras:
96106
runs-on: axolotl-gpu-runner
97107
steps:
98108
- name: Checkout
@@ -138,7 +148,7 @@ jobs:
138148
- cuda: 124
139149
cuda_version: 12.4.1
140150
python_version: "3.11"
141-
pytorch: 2.4.1
151+
pytorch: 2.6.0
142152
axolotl_extras:
143153
runs-on: axolotl-gpu-runner
144154
steps:

.github/workflows/multi-gpu-e2e.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,13 @@ jobs:
4545
axolotl_extras: vllm
4646
num_gpus: 2
4747
nightly_build: "true"
48+
- cuda: 126
49+
cuda_version: 12.6.3
50+
python_version: "3.11"
51+
pytorch: 2.7.0
52+
axolotl_extras:
53+
num_gpus: 2
54+
nightly_build: "true"
4855
runs-on: [self-hosted, modal]
4956
timeout-minutes: 120
5057
steps:

.github/workflows/tests.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
max-parallel: 2
5050
matrix:
5151
python_version: ["3.11"]
52-
pytorch_version: ["2.4.1", "2.5.1", "2.6.0"]
52+
pytorch_version: ["2.4.1", "2.5.1", "2.6.0", "2.7.0"]
5353
timeout-minutes: 20
5454

5555
steps:
@@ -270,6 +270,12 @@ jobs:
270270
pytorch: 2.5.1
271271
num_gpus: 1
272272
axolotl_extras: vllm
273+
- cuda: 126
274+
cuda_version: 12.6.3
275+
python_version: "3.11"
276+
pytorch: 2.7.0
277+
num_gpus: 1
278+
axolotl_extras:
273279
steps:
274280
- name: Checkout
275281
uses: actions/checkout@v4

setup.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def parse_requirements(extras_require_map):
5151
try:
5252
torch_version = version("torch")
5353
except PackageNotFoundError:
54-
torch_version = "2.5.1"
54+
torch_version = "2.6.0" # default to torch 2.6
5555
_install_requires.append(f"torch=={torch_version}")
5656

5757
version_match = re.match(r"^(\d+)\.(\d+)(?:\.(\d+))?", torch_version)
@@ -64,9 +64,15 @@ def parse_requirements(extras_require_map):
6464
else:
6565
raise ValueError("Invalid version format")
6666

67-
if (major, minor) >= (2, 6):
67+
if (major, minor) >= (2, 7):
6868
_install_requires.pop(_install_requires.index(xformers_version))
69-
_install_requires.append("xformers==0.0.29.post2")
69+
# _install_requires.append("xformers==0.0.29.post3") # xformers seems to be hard pinned to 2.6.0
70+
extras_require_map["vllm"] = ["vllm==0.8.3"]
71+
elif (major, minor) >= (2, 6):
72+
_install_requires.pop(_install_requires.index(xformers_version))
73+
_install_requires.append(
74+
"xformers==0.0.29.post2"
75+
) # vllm needs post2 w torch 2.6
7076
extras_require_map["vllm"] = ["vllm==0.8.3"]
7177
elif (major, minor) >= (2, 5):
7278
_install_requires.pop(_install_requires.index(xformers_version))

src/axolotl/monkeypatch/relora.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ def __init__(
272272
self.warmup_steps = warmup_steps
273273
self.anneal_steps = anneal_steps
274274
self.min_lr_scale = min_lr_scale
275-
super().__init__(optimizer, inner_schedule.last_epoch, inner_schedule.verbose)
275+
super().__init__(optimizer, inner_schedule.last_epoch)
276276

277277
def get_lr(self) -> float:
278278
self.inner_schedule.last_epoch = self.last_epoch

0 commit comments

Comments
 (0)