Skip to content

Commit 70e573d

Browse files
committed
Merge branch 'main' into zhenyuan_enable_studio
Bring the Intel XPU Studio enablement up to date with main (post unslothai#5819) and resolve the four conflicts additively, keeping every non-XPU backend (NVIDIA CUDA, AMD ROCm, CPU, Apple MLX) byte-for-byte unchanged. - utils/hardware/hardware.py: re-apply the XPU points on top of main's refactor -- detect_hardware explicit-XPU hint, XPU as a supported selection backend (auto_select_gpu_ids, prepare_gpu_selection, get_device_map), ZE_AFFINITY_MASK visibility (_get_parent_visible_gpu_spec, get_visible_gpu_count, _backend_visible_devices_env, apply_gpu_ids), backend-aware clear_gpu_cache, package versions, per-device info, and the fork-after-Level-Zero-init guard. CUDA/ROCm/CPU/MLX paths are untouched. - core/training/trainer.py: route the three codec cache clears through the backend-aware clear_gpu_cache(); keep codec device as CUDA-or-CPU because the SNAC/Spark-TTS/OuteTTS codecs are not yet validated on XPU. - core/inference/llama_cpp.py: take main's Vulkan GGUF design verbatim; llama.cpp Intel inference (Vulkan) is decoupled from torch XPU training. - tests/test_gpu_selection.py: XPU is now a supported selection backend.
2 parents b3844e0 + 216a1fa commit 70e573d

1,678 files changed

Lines changed: 464127 additions & 38151 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitattributes

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,13 @@
11
# Normalize Python files to LF line endings
22
*.py text eol=lf
3+
4+
# Always check out shell scripts with LF endings. Without this rule a Windows
5+
# clone (core.autocrlf=true) rewrites them to CRLF, and the trailing \r breaks
6+
# them when run in WSL/Linux (e.g. `set -e` -> "set: Illegal option -").
7+
*.sh text eol=lf
8+
9+
# Normalize Studio frontend sources to LF. Scoped to the frontend tree (rather
10+
# than repo-wide *.ts/*.tsx/... rules) so the policy can't force LF on files
11+
# elsewhere. text=auto lets Git detect and leave binary assets (logos, fonts)
12+
# untouched while text files (.ts/.tsx/.json/.html/.svg/...) are stored as LF.
13+
studio/frontend/** text=auto eol=lf

.github/CODEOWNERS

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
/unsloth/models/rl_replacements.py @Datta0 @pluesclues @danielhanchen
77
/unsloth/trainer.py @danielhanchen
88
/unsloth/models/sentence_transformer.py @Etherll @danielhanchen
9-
/unsloth/save.py @rolandtannous @danielhanchen
9+
/unsloth/save.py @danielhanchen
1010
/unsloth/tokenizer_utils.py @mmathew23 @danielhanchen
11-
/unsloth/chat_templates.py @rolandtannous @danielhanchen
12-
/unsloth/ollama_template_mappers.py @rolandtannous @danielhanchen
11+
/unsloth/chat_templates.py @danielhanchen
12+
/unsloth/ollama_template_mappers.py @danielhanchen
1313
/unsloth/kernels/moe/*.py @Datta0
1414
/unsloth/import_fixes.py @danielhanchen
1515
/unsloth/device_type.py @danielhanchen
@@ -45,11 +45,18 @@
4545
/unsloth/utils/hf_hub.py @mmathew23
4646
/unsloth/utils/packing.py @mmathew23
4747

48-
/cli/ @rolandtannous @Manan17
49-
/studio/frontend/ @Shine1i @rolandtannous @Manan17
48+
/cli/ @Manan17
49+
/studio/frontend/ @Shine1i @Manan17
5050
/studio/frontend/public/ @Shine1i
51-
/studio/backend/ @rolandtannous
52-
/studio/backend/core/data_recipe/ @rolandtannous
53-
/studio/backend/tests/ @rolandtannous @danielhanchen
54-
/tests/ @rolandtannous @danielhanchen
55-
/scripts/ @rolandtannous @danielhanchen
51+
/studio/backend/
52+
/studio/backend/core/data_recipe/
53+
/studio/backend/tests/ @danielhanchen
54+
/tests/ @danielhanchen
55+
/scripts/ @danielhanchen
56+
57+
# Snapshot data for the notebook linter / Colab oracle. Drift in these
58+
# files changes the pin floor for every Unsloth notebook, so refreshes
59+
# must be reviewed by the notebook owners directly. CODEOWNERS later
60+
# wins, so this overrides the broader /scripts/ rule above.
61+
/scripts/data/colab_*.txt @danielhanchen @shimmyshimmer
62+
/scripts/data/colab_*.json @danielhanchen @shimmyshimmer

.github/dependabot.yml

Lines changed: 78 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,96 @@ updates:
55
directory: "/"
66
schedule:
77
interval: "weekly"
8+
cooldown:
9+
# github-actions refs are git tags / SHAs, not semver -- the
10+
# `semver-minor-days` / `semver-patch-days` knobs are rejected
11+
# by Dependabot's validator for this ecosystem. Only the
12+
# `default-days` floor applies.
13+
default-days: 7
814
groups:
915
actions:
1016
patterns: ["*"]
17+
actions-security:
18+
applies-to: security-updates
19+
patterns: ["*"]
1120

12-
- package-ecosystem: "bun"
13-
directory: "/studio/frontend"
21+
# Removed a stray `package-ecosystem: "bun"` entry for
22+
# /studio/frontend: that path has no bun.lock / bun.lockb, so
23+
# Dependabot's bun ecosystem silently no-ops on it. The actual
24+
# lockfile committed at /studio/frontend is package-lock.json
25+
# (npm), and the npm entry further below already catches
26+
# npm_and_yarn security advisories for that directory. Version
27+
# updates for /studio/frontend stay suppressed (open-pull-
28+
# requests-limit: 0 in that entry) -- security PRs flow through
29+
# regardless. Add a real bun entry IF and WHEN bun.lock lands.
30+
31+
- package-ecosystem: "npm"
32+
directory: "/studio/backend/core/data_recipe/oxc-validator"
1433
schedule:
1534
interval: "weekly"
35+
cooldown:
36+
default-days: 7
37+
semver-minor-days: 3
38+
semver-patch-days: 3
1639
groups:
17-
bun-frontend:
40+
npm-oxc-validator:
41+
patterns: ["*"]
42+
npm-oxc-validator-security:
43+
applies-to: security-updates
1844
patterns: ["*"]
1945

46+
# pip + cargo grouped weekly; the *-security siblings batch
47+
# advisories that would otherwise each open their own PR.
48+
- package-ecosystem: "pip"
49+
directory: "/"
50+
schedule:
51+
interval: "weekly"
52+
open-pull-requests-limit: 5
53+
cooldown:
54+
default-days: 7
55+
groups:
56+
python:
57+
patterns: ["*"]
58+
python-security:
59+
applies-to: security-updates
60+
patterns: ["*"]
61+
62+
- package-ecosystem: "cargo"
63+
directory: "/studio/src-tauri"
64+
schedule:
65+
interval: "weekly"
66+
cooldown:
67+
default-days: 7
68+
semver-minor-days: 3
69+
semver-patch-days: 3
70+
groups:
71+
cargo-tauri:
72+
patterns: ["*"]
73+
cargo-tauri-security:
74+
applies-to: security-updates
75+
patterns: ["*"]
76+
77+
# /studio/frontend npm dependencies. Version-update PRs are
78+
# deliberately suppressed (open-pull-requests-limit: 0) -- the
79+
# frontend dep tree is large, the lockfile is the authoritative
80+
# pin, and `min-release-age=7` in studio/frontend/.npmrc already
81+
# blocks fresh tarballs at install time. Security advisories
82+
# arrive via GitHub's npm_and_yarn channel and are NOT capped by
83+
# `open-pull-requests-limit` per Dependabot's documented
84+
# behaviour; they flow through this entry, group together, and
85+
# still respect the cooldown below so we never ingest a tarball
86+
# that was hot-published less than 3 days ago.
2087
- package-ecosystem: "npm"
21-
directory: "/studio/backend/core/data_recipe/oxc-validator"
88+
directory: "/studio/frontend"
2289
schedule:
2390
interval: "weekly"
91+
open-pull-requests-limit: 0
92+
cooldown:
93+
default-days: 7
94+
semver-minor-days: 3
95+
semver-patch-days: 3
2496
groups:
25-
npm-oxc-validator:
97+
npm-frontend-security:
98+
applies-to: security-updates
2699
patterns: ["*"]
27100
...

0 commit comments

Comments
 (0)