Avoid 8-bit training optimizer on XPU - #10213
Conversation
Normalize Studio bitsandbytes 8-bit optimizer choices to adamw_torch on XPU before VRAM sizing and worker spawn. This avoids the late optimizer.step crash path while preserving the existing CUDA defaults. Closes unslothai#10021
818a350 to
8a9113d
Compare
for more information, see https://pre-commit.ci
|
Confirmed studio/backend/core/training/training.py still passes adamw_8bit straight through to the worker and to the VRAM coordination path, so this does fix the XPU step crash. Will get this reviewed. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Thanks for this. The normalization and the route-level placement are right: putting the swap before One gap, which I pushed a follow-up commit for (4ecbfd0): The follow-up renames the set to Out of scope for this PR, but noting it for a follow-up: |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
adamw_torchon Intel XPUstudio/backend/tests/test_anthropic_messages.pyCloses #10021
Test verification (RED -> GREEN)
origin/mainwith only the new tests applied: XPU optimizer tests fail becauseadamw_8bit,paged-adamw-8bit, andadamw_bnb_8bitstay unnormalized, and the route still passesadamw_8bitinto backend/VRAM coordination (20260902_issue_10021_BASE_RED.log).20260902_issue_10021_REVERT_RED.log).2 passed, 14 warnings, 3 subtests passed.84 passed, 15 warnings, 84 subtests passed.ruff check studio/backend/core/training/training.py studio/backend/routes/training.py studio/backend/tests/test_gpu_selection.py studio/backend/tests/test_anthropic_messages.py: all checks passed.git diff --check origin/main -- studio/backend/core/training/training.py studio/backend/routes/training.py studio/backend/tests/test_gpu_selection.py studio/backend/tests/test_anthropic_messages.py: clean.Full local validation suite
run-ci.shreplayed onorigin/mainand final commit.82 passed, 15 warnings, 81 subtests passed; ruff passed; diff-check clean (20260902_issue_10021_BASELINE_RUN_CI.log).84 passed, 15 warnings, 84 subtests passed; ruff passed; diff-check clean (20260902_issue_10021_FINAL_RUN_CI.log).Remote check notes
7d9415867ad22c9bb4ac1f0ec44f6fbc96bb0eb8.workflow-trigger lint (pull_request_target / cache-poisoning)andRepo tests (CPU)fail ontests/security/test_scan_packages.py::test_context_dependent_unsloth_zoo_findings_are_digest_pinned; the exact test also fails on cleanorigin/mainwith the sameunsloth_zoo/compiler.pydigest mismatch.(Python 3.13)failed remotely becausetest_a_cold_health_call_answers_inside_the_launcher_deadlinemeasured 2.02s against a 2.0s budget; the same test passes locally on Python 3.12 and Python 3.13, and this PR does not change that health path.Review gates
OCR_PEER_RESULT=PASS.PRCHECK_RESULT=PASS.FINAL_REVIEW_RESULT=PASS.