Compare commits

...
Sign in to create a new pull request.

28 commits

Author SHA1 Message Date
pre-commit-ci[bot]
f5b3a673ee [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2026-03-27 14:45:14 +00:00
Daniel Han
27ec6e5af2 Bump minimum unsloth version to 2026.3.16 in install scripts
Update install.sh and install.ps1 to require unsloth>=2026.3.16,
matching the latest PyPI release.
2026-03-27 14:44:44 +00:00
Daniel Han
67678d2c29 Merge branch 'main' into pip 2026-03-27 07:24:42 -07:00
Daniel Han
e568000a92 Update pyproject.toml 2026-03-27 07:23:42 -07:00
Daniel Han
6700dd60f0 Merge branch 'main' into pip 2026-03-27 07:23:27 -07:00
Daniel Han
abf578327c Merge branch 'main' into pip 2026-03-27 03:35:13 -07:00
Daniel Han
a4ae80cd6a Merge branch 'main' into pip 2026-03-25 09:40:21 -07:00
Daniel Han
ec47b2984d Merge branch 'main' into pip 2026-03-25 09:38:41 -07:00
Daniel Han
d9d1a63397 Fix Colab huggingface-hub conflict, ensurepip fallback, bump to 2026.3.14
- Strip version constraints on Colab dep install
- Upgrade huggingface-hub>=1.0 if is_offline_mode is missing
- ensurepip fallback for uv venvs without pip
- Bump installer pins to 2026.3.14
2026-03-25 16:36:25 +00:00
Daniel Han
0bb6379aad Fix Colab huggingface-hub conflict and pip bootstrap on uv venvs
- colab.py / setup.sh: relax == pins to >= when installing studio.txt
  on Colab so huggingface-hub 0.36.2 does not clobber Colab's bundled
  version (which breaks transformers is_offline_mode import)
- install_python_stack.py: when uv is unavailable and pip is missing
  (uv-created venvs), bootstrap via ensurepip before attempting upgrade
- Bump version to 2026.3.14
2026-03-25 16:15:29 +00:00
Daniel Han
1c608e8ff7 Fix Colab dep install: relax == pins to >= to avoid breaking transformers
studio.txt pins huggingface-hub==0.36.2 and datasets==4.3.0 which
overwrite Colab's pre-installed versions and break its bundled
transformers (is_offline_mode was removed in newer huggingface-hub).

Relax == to >= in both colab.py and setup.sh Colab paths so pip keeps
existing compatible versions instead of force-upgrading.
2026-03-25 16:13:30 +00:00
Daniel Han
f9adf6834d Merge branch 'main' into pip 2026-03-25 09:04:26 -07:00
Daniel Han
1fd5853741 Merge branch 'main' into pip 2026-03-25 09:01:49 -07:00
Daniel Han
93a70fbe4e Merge branch 'main' into pip 2026-03-25 08:34:48 -07:00
Daniel Han
8b77451e75 Update pyproject.toml 2026-03-25 07:31:31 -07:00
Daniel Han
481f0618ff Merge branch 'main' into pip 2026-03-25 07:30:50 -07:00
Daniel Han
ddf6f6d1f9 fix(studio): remove litellm dep (quarantined on PyPI) (#4553)
litellm has been quarantined on PyPI due to a supply chain attack
in version 1.82.8 (malicious credential-stealing .pth file).
No versions are currently installable, which blocks
`unsloth studio setup` at step 8/11 (data-designer deps).

Remove litellm from the single-env data-designer requirements
so setup completes. litellm can be re-added once PyPI lifts the
quarantine.

Ref: https://github.com/BerriAI/litellm/issues/24512
2026-03-24 14:21:57 +00:00
Daniel Han
dddc9eac92 Merge branch 'main' into pip 2026-03-24 06:51:20 -07:00
Daniel Han
da81c94510 Merge branch 'main' into pip 2026-03-22 08:23:44 -07:00
Daniel Han
4c139503c1 Merge branch 'main' into pip 2026-03-22 06:14:40 -07:00
Daniel Han
9d1e3c38bc Merge branch 'main' into pip 2026-03-19 02:31:50 -07:00
Daniel Han
8bc26f4e1d Merge branch 'main' into pip 2026-03-18 11:13:18 -07:00
Daniel Han
044e67f5aa Merge branch 'main' into pip 2026-03-18 10:40:39 -07:00
Daniel Han
ba36c12240 Merge branch 'main' into pip 2026-03-18 09:10:55 -07:00
Daniel Han
0a5652281f Merge branch 'main' into pip 2026-03-18 08:33:28 -07:00
Daniel Han
bf63f79414 Merge branch 'main' into pip 2026-03-18 08:31:20 -07:00
Daniel Han
2973bea3d0 Merge branch 'main' into pip 2026-03-17 07:58:59 -07:00
Daniel Han
ddbbfe52cf Update pyproject.toml 2026-03-17 07:58:28 -07:00
107 changed files with 1633 additions and 1866 deletions

View file

@ -681,13 +681,13 @@ shell.Run cmd, 0, False
if ($SkipTorch) { if ($SkipTorch) {
# No-torch: install unsloth + unsloth-zoo with --no-deps, then # No-torch: install unsloth + unsloth-zoo with --no-deps, then
# runtime deps (typer, safetensors, transformers, etc.) with --no-deps. # runtime deps (typer, safetensors, transformers, etc.) with --no-deps.
uv pip install --python $VenvPython --no-deps --reinstall-package unsloth --reinstall-package unsloth-zoo "unsloth>=2026.3.14" unsloth-zoo uv pip install --python $VenvPython --no-deps --reinstall-package unsloth --reinstall-package unsloth-zoo "unsloth>=2026.3.16" unsloth-zoo
$NoTorchReq = Find-NoTorchRuntimeFile $NoTorchReq = Find-NoTorchRuntimeFile
if ($NoTorchReq) { if ($NoTorchReq) {
uv pip install --python $VenvPython --no-deps -r $NoTorchReq uv pip install --python $VenvPython --no-deps -r $NoTorchReq
} }
} else { } else {
uv pip install --python $VenvPython --reinstall-package unsloth --reinstall-package unsloth-zoo "unsloth>=2026.3.14" unsloth-zoo uv pip install --python $VenvPython --reinstall-package unsloth --reinstall-package unsloth-zoo "unsloth>=2026.3.16" unsloth-zoo
} }
if ($StudioLocalInstall) { if ($StudioLocalInstall) {
Write-Host "==> Overlaying local repo (editable)..." Write-Host "==> Overlaying local repo (editable)..."
@ -709,7 +709,7 @@ shell.Run cmd, 0, False
if ($SkipTorch) { if ($SkipTorch) {
# No-torch: install unsloth + unsloth-zoo with --no-deps, then # No-torch: install unsloth + unsloth-zoo with --no-deps, then
# runtime deps (typer, safetensors, transformers, etc.) with --no-deps. # runtime deps (typer, safetensors, transformers, etc.) with --no-deps.
uv pip install --python $VenvPython --no-deps --upgrade-package unsloth --upgrade-package unsloth-zoo "unsloth>=2026.3.14" unsloth-zoo uv pip install --python $VenvPython --no-deps --upgrade-package unsloth --upgrade-package unsloth-zoo "unsloth>=2026.3.16" unsloth-zoo
$NoTorchReq = Find-NoTorchRuntimeFile $NoTorchReq = Find-NoTorchRuntimeFile
if ($NoTorchReq) { if ($NoTorchReq) {
uv pip install --python $VenvPython --no-deps -r $NoTorchReq uv pip install --python $VenvPython --no-deps -r $NoTorchReq
@ -719,7 +719,7 @@ shell.Run cmd, 0, False
uv pip install --python $VenvPython -e $RepoRoot --no-deps uv pip install --python $VenvPython -e $RepoRoot --no-deps
} }
} elseif ($StudioLocalInstall) { } elseif ($StudioLocalInstall) {
uv pip install --python $VenvPython --upgrade-package unsloth "unsloth>=2026.3.14" unsloth-zoo uv pip install --python $VenvPython --upgrade-package unsloth "unsloth>=2026.3.16" unsloth-zoo
Write-Host "==> Overlaying local repo (editable)..." Write-Host "==> Overlaying local repo (editable)..."
uv pip install --python $VenvPython -e $RepoRoot --no-deps uv pip install --python $VenvPython -e $RepoRoot --no-deps
} else { } else {
@ -729,7 +729,7 @@ shell.Run cmd, 0, False
# Fallback: GPU detection failed to produce a URL -- let uv resolve torch # Fallback: GPU detection failed to produce a URL -- let uv resolve torch
Write-Host "==> Installing unsloth (this may take a few minutes)..." Write-Host "==> Installing unsloth (this may take a few minutes)..."
if ($StudioLocalInstall) { if ($StudioLocalInstall) {
uv pip install --python $VenvPython unsloth-zoo "unsloth>=2026.3.14" --torch-backend=auto uv pip install --python $VenvPython unsloth-zoo "unsloth>=2026.3.16" --torch-backend=auto
Write-Host "==> Overlaying local repo (editable)..." Write-Host "==> Overlaying local repo (editable)..."
uv pip install --python $VenvPython -e $RepoRoot --no-deps uv pip install --python $VenvPython -e $RepoRoot --no-deps
} else { } else {

View file

@ -968,7 +968,7 @@ if [ "$_MIGRATED" = true ]; then
# to prevent transitive torch resolution. # to prevent transitive torch resolution.
uv pip install --python "$_VENV_PY" --no-deps \ uv pip install --python "$_VENV_PY" --no-deps \
--reinstall-package unsloth --reinstall-package unsloth-zoo \ --reinstall-package unsloth --reinstall-package unsloth-zoo \
"unsloth>=2026.3.14" unsloth-zoo "unsloth>=2026.3.16" unsloth-zoo
_NO_TORCH_RT="$(_find_no_torch_runtime)" _NO_TORCH_RT="$(_find_no_torch_runtime)"
if [ -n "$_NO_TORCH_RT" ]; then if [ -n "$_NO_TORCH_RT" ]; then
uv pip install --python "$_VENV_PY" --no-deps -r "$_NO_TORCH_RT" uv pip install --python "$_VENV_PY" --no-deps -r "$_NO_TORCH_RT"
@ -976,7 +976,7 @@ if [ "$_MIGRATED" = true ]; then
else else
uv pip install --python "$_VENV_PY" \ uv pip install --python "$_VENV_PY" \
--reinstall-package unsloth --reinstall-package unsloth-zoo \ --reinstall-package unsloth --reinstall-package unsloth-zoo \
"unsloth>=2026.3.14" unsloth-zoo "unsloth>=2026.3.16" unsloth-zoo
fi fi
if [ "$STUDIO_LOCAL_INSTALL" = true ]; then if [ "$STUDIO_LOCAL_INSTALL" = true ]; then
echo "==> Overlaying local repo (editable)..." echo "==> Overlaying local repo (editable)..."
@ -998,7 +998,7 @@ elif [ -n "$TORCH_INDEX_URL" ]; then
# runtime deps (typer, safetensors, transformers, etc.) with --no-deps. # runtime deps (typer, safetensors, transformers, etc.) with --no-deps.
uv pip install --python "$_VENV_PY" --no-deps \ uv pip install --python "$_VENV_PY" --no-deps \
--upgrade-package unsloth --upgrade-package unsloth-zoo \ --upgrade-package unsloth --upgrade-package unsloth-zoo \
"unsloth>=2026.3.14" unsloth-zoo "unsloth>=2026.3.16" unsloth-zoo
_NO_TORCH_RT="$(_find_no_torch_runtime)" _NO_TORCH_RT="$(_find_no_torch_runtime)"
if [ -n "$_NO_TORCH_RT" ]; then if [ -n "$_NO_TORCH_RT" ]; then
uv pip install --python "$_VENV_PY" --no-deps -r "$_NO_TORCH_RT" uv pip install --python "$_VENV_PY" --no-deps -r "$_NO_TORCH_RT"
@ -1009,7 +1009,7 @@ elif [ -n "$TORCH_INDEX_URL" ]; then
fi fi
elif [ "$STUDIO_LOCAL_INSTALL" = true ]; then elif [ "$STUDIO_LOCAL_INSTALL" = true ]; then
uv pip install --python "$_VENV_PY" \ uv pip install --python "$_VENV_PY" \
--upgrade-package unsloth "unsloth>=2026.3.14" unsloth-zoo --upgrade-package unsloth "unsloth>=2026.3.16" unsloth-zoo
echo "==> Overlaying local repo (editable)..." echo "==> Overlaying local repo (editable)..."
uv pip install --python "$_VENV_PY" -e "$_REPO_ROOT" --no-deps uv pip install --python "$_VENV_PY" -e "$_REPO_ROOT" --no-deps
else else
@ -1020,7 +1020,7 @@ else
# Fallback: GPU detection failed to produce a URL -- let uv resolve torch # Fallback: GPU detection failed to produce a URL -- let uv resolve torch
echo "==> Installing unsloth (this may take a few minutes)..." echo "==> Installing unsloth (this may take a few minutes)..."
if [ "$STUDIO_LOCAL_INSTALL" = true ]; then if [ "$STUDIO_LOCAL_INSTALL" = true ]; then
uv pip install --python "$_VENV_PY" unsloth-zoo "unsloth>=2026.3.14" --torch-backend=auto uv pip install --python "$_VENV_PY" unsloth-zoo "unsloth>=2026.3.16" --torch-backend=auto
echo "==> Overlaying local repo (editable)..." echo "==> Overlaying local repo (editable)..."
uv pip install --python "$_VENV_PY" -e "$_REPO_ROOT" --no-deps uv pip install --python "$_VENV_PY" -e "$_REPO_ROOT" --no-deps
else else

View file

@ -25,6 +25,29 @@ classifiers = [
"Topic :: Scientific/Engineering :: Artificial Intelligence", "Topic :: Scientific/Engineering :: Artificial Intelligence",
] ]
dependencies = [ dependencies = [
"unsloth_zoo>=2026.3.6",
"wheel>=0.42.0",
"packaging",
"torch>=2.4.0,<2.11.0",
"torchvision",
"numpy",
"tqdm",
"psutil",
"tyro",
"protobuf",
"xformers>=0.0.27.post2 ; ('linux' in sys_platform or sys_platform == 'win32') and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"bitsandbytes>=0.45.5,!=0.46.0,!=0.48.0",
"triton>=3.0.0 ; ('linux' in sys_platform)",
"triton-windows ; (sys_platform == 'win32') and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"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.3.0",
"trl>=0.18.2,!=0.19.0,<=0.24.0",
"typer", "typer",
"pydantic", "pydantic",
"pyyaml", "pyyaml",
@ -61,14 +84,11 @@ studio = [
exclude = ["images*", "tests*", "kernels/moe*"] exclude = ["images*", "tests*", "kernels/moe*"]
[project.optional-dependencies] [project.optional-dependencies]
triton = [ huggingface = [
"triton>=3.0.0 ; ('linux' in sys_platform)", "unsloth_zoo>=2026.3.6",
"triton-windows ; (sys_platform == 'win32') and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
]
huggingfacenotorch = [
"wheel>=0.42.0", "wheel>=0.42.0",
"packaging", "packaging",
"torchvision",
"numpy", "numpy",
"tqdm", "tqdm",
"psutil", "psutil",
@ -83,257 +103,132 @@ huggingfacenotorch = [
"diffusers", "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.3.0", "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.3.0",
"trl>=0.18.2,!=0.19.0,<=0.24.0", "trl>=0.18.2,!=0.19.0,<=0.24.0",
"sentence-transformers", "typer",
] "pydantic",
huggingface = [ "pyyaml",
"unsloth[huggingfacenotorch]", "nest-asyncio",
"unsloth_zoo>=2026.3.6",
"torchvision",
"unsloth[triton]",
]
windows = [
"unsloth[huggingface]",
"bitsandbytes>=0.45.5,!=0.46.0,!=0.48.0 ; (sys_platform == 'win32')",
"xformers>=0.0.22.post7 ; (sys_platform == 'win32')",
] ]
base = [ base = [
"unsloth[huggingface]", "unsloth[huggingface]",
] ]
cu118only = [ cu118only = [
"xformers @ https://download.pytorch.org/whl/cu118/xformers-0.0.22.post7%2Bcu118-cp39-cp39-manylinux2014_x86_64.whl ; python_version=='3.9' and ('linux' in sys_platform)", "xformers==0.0.22.post7 ; ('linux' in sys_platform or sys_platform == 'win32') and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"xformers @ https://download.pytorch.org/whl/cu118/xformers-0.0.22.post7%2Bcu118-cp310-cp310-manylinux2014_x86_64.whl ; python_version=='3.10' and ('linux' in sys_platform)",
"xformers @ https://download.pytorch.org/whl/cu118/xformers-0.0.22.post7%2Bcu118-cp311-cp311-manylinux2014_x86_64.whl ; python_version=='3.11' and ('linux' in sys_platform)",
] ]
cu121only = [ cu121only = [
"xformers @ https://download.pytorch.org/whl/cu121/xformers-0.0.22.post7-cp39-cp39-manylinux2014_x86_64.whl ; python_version=='3.9' and ('linux' in sys_platform)", "xformers==0.0.22.post7 ; ('linux' in sys_platform or sys_platform == 'win32') and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"xformers @ https://download.pytorch.org/whl/cu121/xformers-0.0.22.post7-cp310-cp310-manylinux2014_x86_64.whl ; python_version=='3.10' and ('linux' in sys_platform)",
"xformers @ https://download.pytorch.org/whl/cu121/xformers-0.0.22.post7-cp311-cp311-manylinux2014_x86_64.whl ; python_version=='3.11' and ('linux' in sys_platform)",
] ]
cu118onlytorch211 = [ cu118onlytorch211 = [
"xformers @ https://download.pytorch.org/whl/cu118/xformers-0.0.23%2Bcu118-cp39-cp39-manylinux2014_x86_64.whl ; python_version=='3.9' and ('linux' in sys_platform)", "xformers==0.0.23 ; ('linux' in sys_platform or sys_platform == 'win32') and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"xformers @ https://download.pytorch.org/whl/cu118/xformers-0.0.23%2Bcu118-cp310-cp310-manylinux2014_x86_64.whl ; python_version=='3.10' and ('linux' in sys_platform)",
"xformers @ https://download.pytorch.org/whl/cu118/xformers-0.0.23%2Bcu118-cp311-cp311-manylinux2014_x86_64.whl ; python_version=='3.11' and ('linux' in sys_platform)",
] ]
cu121onlytorch211 = [ cu121onlytorch211 = [
"xformers @ https://download.pytorch.org/whl/cu121/xformers-0.0.23-cp39-cp39-manylinux2014_x86_64.whl ; python_version=='3.9' and ('linux' in sys_platform)", "xformers==0.0.23 ; ('linux' in sys_platform or sys_platform == 'win32') and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"xformers @ https://download.pytorch.org/whl/cu121/xformers-0.0.23-cp310-cp310-manylinux2014_x86_64.whl ; python_version=='3.10' and ('linux' in sys_platform)",
"xformers @ https://download.pytorch.org/whl/cu121/xformers-0.0.23-cp311-cp311-manylinux2014_x86_64.whl ; python_version=='3.11' and ('linux' in sys_platform)",
] ]
cu118onlytorch212 = [ cu118onlytorch212 = [
"xformers @ https://download.pytorch.org/whl/cu118/xformers-0.0.23.post1%2Bcu118-cp39-cp39-manylinux2014_x86_64.whl ; python_version=='3.9' and ('linux' in sys_platform)", "xformers==0.0.23.post1 ; ('linux' in sys_platform or sys_platform == 'win32') and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"xformers @ https://download.pytorch.org/whl/cu118/xformers-0.0.23.post1%2Bcu118-cp310-cp310-manylinux2014_x86_64.whl ; python_version=='3.10' and ('linux' in sys_platform)",
"xformers @ https://download.pytorch.org/whl/cu118/xformers-0.0.23.post1%2Bcu118-cp311-cp311-manylinux2014_x86_64.whl ; python_version=='3.11' and ('linux' in sys_platform)",
] ]
cu121onlytorch212 = [ cu121onlytorch212 = [
"xformers @ https://download.pytorch.org/whl/cu121/xformers-0.0.23.post1-cp39-cp39-manylinux2014_x86_64.whl ; python_version=='3.9' and ('linux' in sys_platform)", "xformers==0.0.23.post1 ; ('linux' in sys_platform or sys_platform == 'win32') and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"xformers @ https://download.pytorch.org/whl/cu121/xformers-0.0.23.post1-cp310-cp310-manylinux2014_x86_64.whl ; python_version=='3.10' and ('linux' in sys_platform)",
"xformers @ https://download.pytorch.org/whl/cu121/xformers-0.0.23.post1-cp311-cp311-manylinux2014_x86_64.whl ; python_version=='3.11' and ('linux' in sys_platform)",
] ]
cu118onlytorch220 = [ cu118onlytorch220 = [
"xformers @ https://download.pytorch.org/whl/cu118/xformers-0.0.24%2Bcu118-cp39-cp39-manylinux2014_x86_64.whl ; python_version=='3.9' and ('linux' in sys_platform)", "xformers==0.0.24 ; ('linux' in sys_platform or sys_platform == 'win32') and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"xformers @ https://download.pytorch.org/whl/cu118/xformers-0.0.24%2Bcu118-cp310-cp310-manylinux2014_x86_64.whl ; python_version=='3.10' and ('linux' in sys_platform)",
"xformers @ https://download.pytorch.org/whl/cu118/xformers-0.0.24%2Bcu118-cp311-cp311-manylinux2014_x86_64.whl ; python_version=='3.11' and ('linux' in sys_platform)",
] ]
cu121onlytorch220 = [ cu121onlytorch220 = [
"xformers @ https://download.pytorch.org/whl/cu121/xformers-0.0.24-cp39-cp39-manylinux2014_x86_64.whl ; python_version=='3.9' and ('linux' in sys_platform)", "xformers==0.0.24 ; ('linux' in sys_platform or sys_platform == 'win32') and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"xformers @ https://download.pytorch.org/whl/cu121/xformers-0.0.24-cp310-cp310-manylinux2014_x86_64.whl ; python_version=='3.10' and ('linux' in sys_platform)",
"xformers @ https://download.pytorch.org/whl/cu121/xformers-0.0.24-cp311-cp311-manylinux2014_x86_64.whl ; python_version=='3.11' and ('linux' in sys_platform)",
] ]
cu118onlytorch230 = [ cu118onlytorch230 = [
"xformers @ https://download.pytorch.org/whl/cu118/xformers-0.0.27%2Bcu118-cp39-cp39-manylinux2014_x86_64.whl ; python_version=='3.9' and ('linux' in sys_platform)", "xformers==0.0.27 ; ('linux' in sys_platform or sys_platform == 'win32') and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"xformers @ https://download.pytorch.org/whl/cu118/xformers-0.0.27%2Bcu118-cp310-cp310-manylinux2014_x86_64.whl ; python_version=='3.10' and ('linux' in sys_platform)",
"xformers @ https://download.pytorch.org/whl/cu118/xformers-0.0.27%2Bcu118-cp311-cp311-manylinux2014_x86_64.whl ; python_version=='3.11' and ('linux' in sys_platform)",
"xformers @ https://download.pytorch.org/whl/cu118/xformers-0.0.27%2Bcu118-cp312-cp312-manylinux2014_x86_64.whl ; python_version=='3.12' and ('linux' in sys_platform)",
] ]
cu121onlytorch230 = [ cu121onlytorch230 = [
"xformers @ https://download.pytorch.org/whl/cu121/xformers-0.0.27-cp39-cp39-manylinux2014_x86_64.whl ; python_version=='3.9' and ('linux' in sys_platform)", "xformers==0.0.27 ; ('linux' in sys_platform or sys_platform == 'win32') and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"xformers @ https://download.pytorch.org/whl/cu121/xformers-0.0.27-cp310-cp310-manylinux2014_x86_64.whl ; python_version=='3.10' and ('linux' in sys_platform)",
"xformers @ https://download.pytorch.org/whl/cu121/xformers-0.0.27-cp311-cp311-manylinux2014_x86_64.whl ; python_version=='3.11' and ('linux' in sys_platform)",
"xformers @ https://download.pytorch.org/whl/cu121/xformers-0.0.27-cp312-cp312-manylinux2014_x86_64.whl ; python_version=='3.12' and ('linux' in sys_platform)",
] ]
cu118onlytorch240 = [ cu118onlytorch240 = [
"xformers @ https://download.pytorch.org/whl/cu118/xformers-0.0.27.post2%2Bcu118-cp39-cp39-manylinux2014_x86_64.whl ; python_version=='3.9' and ('linux' in sys_platform)", "xformers==0.0.27.post2 ; ('linux' in sys_platform or sys_platform == 'win32') and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"xformers @ https://download.pytorch.org/whl/cu118/xformers-0.0.27.post2%2Bcu118-cp310-cp310-manylinux2014_x86_64.whl ; python_version=='3.10' and ('linux' in sys_platform)",
"xformers @ https://download.pytorch.org/whl/cu118/xformers-0.0.27.post2%2Bcu118-cp311-cp311-manylinux2014_x86_64.whl ; python_version=='3.11' and ('linux' in sys_platform)",
"xformers @ https://download.pytorch.org/whl/cu118/xformers-0.0.27.post2%2Bcu118-cp312-cp312-manylinux2014_x86_64.whl ; python_version=='3.12' and ('linux' in sys_platform)",
] ]
cu121onlytorch240 = [ cu121onlytorch240 = [
"xformers @ https://download.pytorch.org/whl/cu121/xformers-0.0.28.post1-cp39-cp39-manylinux_2_28_x86_64.whl ; python_version=='3.9' and ('linux' in sys_platform)", "xformers==0.0.27.post2 ; ('linux' in sys_platform or sys_platform == 'win32') and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"xformers @ https://download.pytorch.org/whl/cu121/xformers-0.0.28.post1-cp310-cp310-manylinux_2_28_x86_64.whl ; python_version=='3.10' and ('linux' in sys_platform)",
"xformers @ https://download.pytorch.org/whl/cu121/xformers-0.0.28.post1-cp311-cp311-manylinux_2_28_x86_64.whl ; python_version=='3.11' and ('linux' in sys_platform)",
"xformers @ https://download.pytorch.org/whl/cu121/xformers-0.0.28.post1-cp312-cp312-manylinux_2_28_x86_64.whl ; python_version=='3.12' and ('linux' in sys_platform)",
]
cu124onlytorch240 = [
"xformers @ https://download.pytorch.org/whl/cu124/xformers-0.0.28.post1-cp39-cp39-manylinux_2_28_x86_64.whl ; python_version=='3.9' and ('linux' in sys_platform)",
"xformers @ https://download.pytorch.org/whl/cu124/xformers-0.0.28.post1-cp310-cp310-manylinux_2_28_x86_64.whl ; python_version=='3.10' and ('linux' in sys_platform)",
"xformers @ https://download.pytorch.org/whl/cu124/xformers-0.0.28.post1-cp311-cp311-manylinux_2_28_x86_64.whl ; python_version=='3.11' and ('linux' in sys_platform)",
"xformers @ https://download.pytorch.org/whl/cu124/xformers-0.0.28.post1-cp312-cp312-manylinux_2_28_x86_64.whl ; python_version=='3.12' and ('linux' in sys_platform)",
"xformers @ https://download.pytorch.org/whl/cu124/xformers-0.0.28.post1-cp39-cp39-win_amd64.whl ; python_version=='3.9' and (sys_platform == 'win32')",
"xformers @ https://download.pytorch.org/whl/cu124/xformers-0.0.28.post1-cp310-cp310-win_amd64.whl ; python_version=='3.10' and (sys_platform == 'win32')",
"xformers @ https://download.pytorch.org/whl/cu124/xformers-0.0.28.post1-cp311-cp311-win_amd64.whl ; python_version=='3.11' and (sys_platform == 'win32')",
"xformers @ https://download.pytorch.org/whl/cu124/xformers-0.0.28.post1-cp312-cp312-win_amd64.whl ; python_version=='3.12' and (sys_platform == 'win32')",
] ]
cu118onlytorch250 = [ cu118onlytorch250 = [
"xformers @ https://download.pytorch.org/whl/cu118/xformers-0.0.28.post2-cp39-cp39-manylinux_2_28_x86_64.whl ; python_version=='3.9' and ('linux' in sys_platform)", "xformers==0.0.28.post2 ; ('linux' in sys_platform or sys_platform == 'win32') and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"xformers @ https://download.pytorch.org/whl/cu118/xformers-0.0.28.post2-cp310-cp310-manylinux_2_28_x86_64.whl ; python_version=='3.10' and ('linux' in sys_platform)",
"xformers @ https://download.pytorch.org/whl/cu118/xformers-0.0.28.post2-cp311-cp311-manylinux_2_28_x86_64.whl ; python_version=='3.11' and ('linux' in sys_platform)",
"xformers @ https://download.pytorch.org/whl/cu118/xformers-0.0.28.post2-cp312-cp312-manylinux_2_28_x86_64.whl ; python_version=='3.12' and ('linux' in sys_platform)",
] ]
cu121onlytorch250 = [ cu121onlytorch250 = [
"xformers @ https://download.pytorch.org/whl/cu121/xformers-0.0.28.post2-cp39-cp39-manylinux_2_28_x86_64.whl ; python_version=='3.9' and ('linux' in sys_platform)", "xformers==0.0.28.post2 ; ('linux' in sys_platform or sys_platform == 'win32') and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"xformers @ https://download.pytorch.org/whl/cu121/xformers-0.0.28.post2-cp310-cp310-manylinux_2_28_x86_64.whl ; python_version=='3.10' and ('linux' in sys_platform)",
"xformers @ https://download.pytorch.org/whl/cu121/xformers-0.0.28.post2-cp311-cp311-manylinux_2_28_x86_64.whl ; python_version=='3.11' and ('linux' in sys_platform)",
"xformers @ https://download.pytorch.org/whl/cu121/xformers-0.0.28.post2-cp312-cp312-manylinux_2_28_x86_64.whl ; python_version=='3.12' and ('linux' in sys_platform)",
] ]
cu124onlytorch250 = [ cu124onlytorch250 = [
"xformers @ https://download.pytorch.org/whl/cu124/xformers-0.0.28.post2-cp39-cp39-manylinux_2_28_x86_64.whl ; python_version=='3.9' and ('linux' in sys_platform)", "xformers==0.0.28.post2 ; ('linux' in sys_platform or sys_platform == 'win32') and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"xformers @ https://download.pytorch.org/whl/cu124/xformers-0.0.28.post2-cp310-cp310-manylinux_2_28_x86_64.whl ; python_version=='3.10' and ('linux' in sys_platform)",
"xformers @ https://download.pytorch.org/whl/cu124/xformers-0.0.28.post2-cp311-cp311-manylinux_2_28_x86_64.whl ; python_version=='3.11' and ('linux' in sys_platform)",
"xformers @ https://download.pytorch.org/whl/cu124/xformers-0.0.28.post2-cp312-cp312-manylinux_2_28_x86_64.whl ; python_version=='3.12' and ('linux' in sys_platform)",
"xformers @ https://download.pytorch.org/whl/cu124/xformers-0.0.28.post2-cp39-cp39-win_amd64.whl ; python_version=='3.9' and (sys_platform == 'win32')",
"xformers @ https://download.pytorch.org/whl/cu124/xformers-0.0.28.post2-cp310-cp310-win_amd64.whl ; python_version=='3.10' and (sys_platform == 'win32')",
"xformers @ https://download.pytorch.org/whl/cu124/xformers-0.0.28.post2-cp311-cp311-win_amd64.whl ; python_version=='3.11' and (sys_platform == 'win32')",
"xformers @ https://download.pytorch.org/whl/cu124/xformers-0.0.28.post2-cp312-cp312-win_amd64.whl ; python_version=='3.12' and (sys_platform == 'win32')",
] ]
cu118onlytorch251 = [ cu118onlytorch251 = [
"xformers @ https://download.pytorch.org/whl/cu118/xformers-0.0.29.post1-cp39-cp39-manylinux_2_28_x86_64.whl ; python_version=='3.9' and ('linux' in sys_platform)", "xformers==0.0.29.post1 ; ('linux' in sys_platform or sys_platform == 'win32') and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"xformers @ https://download.pytorch.org/whl/cu118/xformers-0.0.29.post1-cp310-cp310-manylinux_2_28_x86_64.whl ; python_version=='3.10' and ('linux' in sys_platform)",
"xformers @ https://download.pytorch.org/whl/cu118/xformers-0.0.29.post1-cp311-cp311-manylinux_2_28_x86_64.whl ; python_version=='3.11' and ('linux' in sys_platform)",
"xformers @ https://download.pytorch.org/whl/cu118/xformers-0.0.29.post1-cp312-cp312-manylinux_2_28_x86_64.whl ; python_version=='3.12' and ('linux' in sys_platform)",
] ]
cu121onlytorch251 = [ cu121onlytorch251 = [
"xformers @ https://download.pytorch.org/whl/cu121/xformers-0.0.29.post1-cp39-cp39-manylinux_2_28_x86_64.whl ; python_version=='3.9' and ('linux' in sys_platform)", "xformers==0.0.29.post1 ; ('linux' in sys_platform or sys_platform == 'win32') and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"xformers @ https://download.pytorch.org/whl/cu121/xformers-0.0.29.post1-cp310-cp310-manylinux_2_28_x86_64.whl ; python_version=='3.10' and ('linux' in sys_platform)",
"xformers @ https://download.pytorch.org/whl/cu121/xformers-0.0.29.post1-cp311-cp311-manylinux_2_28_x86_64.whl ; python_version=='3.11' and ('linux' in sys_platform)",
"xformers @ https://download.pytorch.org/whl/cu121/xformers-0.0.29.post1-cp312-cp312-manylinux_2_28_x86_64.whl ; python_version=='3.12' and ('linux' in sys_platform)",
] ]
cu124onlytorch251 = [ cu124onlytorch251 = [
"xformers @ https://download.pytorch.org/whl/cu124/xformers-0.0.29.post1-cp39-cp39-manylinux_2_28_x86_64.whl ; python_version=='3.9' and ('linux' in sys_platform)", "xformers==0.0.29.post1 ; ('linux' in sys_platform or sys_platform == 'win32') and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"xformers @ https://download.pytorch.org/whl/cu124/xformers-0.0.29.post1-cp310-cp310-manylinux_2_28_x86_64.whl ; python_version=='3.10' and ('linux' in sys_platform)",
"xformers @ https://download.pytorch.org/whl/cu124/xformers-0.0.29.post1-cp311-cp311-manylinux_2_28_x86_64.whl ; python_version=='3.11' and ('linux' in sys_platform)",
"xformers @ https://download.pytorch.org/whl/cu124/xformers-0.0.29.post1-cp312-cp312-manylinux_2_28_x86_64.whl ; python_version=='3.12' and ('linux' in sys_platform)",
"xformers @ https://download.pytorch.org/whl/cu124/xformers-0.0.29.post1-cp39-cp39-win_amd64.whl ; python_version=='3.9' and (sys_platform == 'win32')",
"xformers @ https://download.pytorch.org/whl/cu124/xformers-0.0.29.post1-cp310-cp310-win_amd64.whl ; python_version=='3.10' and (sys_platform == 'win32')",
"xformers @ https://download.pytorch.org/whl/cu124/xformers-0.0.29.post1-cp311-cp311-win_amd64.whl ; python_version=='3.11' and (sys_platform == 'win32')",
"xformers @ https://download.pytorch.org/whl/cu124/xformers-0.0.29.post1-cp312-cp312-win_amd64.whl ; python_version=='3.12' and (sys_platform == 'win32')",
] ]
cu118onlytorch260 = [ cu118onlytorch260 = [
"xformers @ https://download.pytorch.org/whl/cu118/xformers-0.0.29.post3-cp39-cp39-manylinux_2_28_x86_64.whl ; python_version=='3.9' and ('linux' in sys_platform)", "xformers==0.0.29.post3 ; ('linux' in sys_platform or sys_platform == 'win32') and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"xformers @ https://download.pytorch.org/whl/cu118/xformers-0.0.29.post3-cp310-cp310-manylinux_2_28_x86_64.whl ; python_version=='3.10' and ('linux' in sys_platform)",
"xformers @ https://download.pytorch.org/whl/cu118/xformers-0.0.29.post3-cp311-cp311-manylinux_2_28_x86_64.whl ; python_version=='3.11' and ('linux' in sys_platform)",
"xformers @ https://download.pytorch.org/whl/cu118/xformers-0.0.29.post3-cp312-cp312-manylinux_2_28_x86_64.whl ; python_version=='3.12' and ('linux' in sys_platform)",
] ]
cu124onlytorch260 = [ cu124onlytorch260 = [
"xformers @ https://download.pytorch.org/whl/cu124/xformers-0.0.29.post3-cp39-cp39-manylinux_2_28_x86_64.whl ; python_version=='3.9' and ('linux' in sys_platform)", "xformers==0.0.29.post3 ; ('linux' in sys_platform or sys_platform == 'win32') and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"xformers @ https://download.pytorch.org/whl/cu124/xformers-0.0.29.post3-cp310-cp310-manylinux_2_28_x86_64.whl ; python_version=='3.10' and ('linux' in sys_platform)",
"xformers @ https://download.pytorch.org/whl/cu124/xformers-0.0.29.post3-cp311-cp311-manylinux_2_28_x86_64.whl ; python_version=='3.11' and ('linux' in sys_platform)",
"xformers @ https://download.pytorch.org/whl/cu124/xformers-0.0.29.post3-cp312-cp312-manylinux_2_28_x86_64.whl ; python_version=='3.12' and ('linux' in sys_platform)",
"xformers @ https://download.pytorch.org/whl/cu124/xformers-0.0.29.post3-cp39-cp39-win_amd64.whl ; python_version=='3.9' and (sys_platform == 'win32')",
"xformers @ https://download.pytorch.org/whl/cu124/xformers-0.0.29.post3-cp310-cp310-win_amd64.whl ; python_version=='3.10' and (sys_platform == 'win32')",
"xformers @ https://download.pytorch.org/whl/cu124/xformers-0.0.29.post3-cp311-cp311-win_amd64.whl ; python_version=='3.11' and (sys_platform == 'win32')",
"xformers @ https://download.pytorch.org/whl/cu124/xformers-0.0.29.post3-cp312-cp312-win_amd64.whl ; python_version=='3.12' and (sys_platform == 'win32')",
] ]
cu126onlytorch260 = [ cu126onlytorch260 = [
"xformers @ https://download.pytorch.org/whl/cu126/xformers-0.0.29.post3-cp39-cp39-manylinux_2_28_x86_64.whl ; python_version=='3.9' and ('linux' in sys_platform)", "xformers==0.0.29.post3 ; ('linux' in sys_platform or sys_platform == 'win32') and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"xformers @ https://download.pytorch.org/whl/cu126/xformers-0.0.29.post3-cp310-cp310-manylinux_2_28_x86_64.whl ; python_version=='3.10' and ('linux' in sys_platform)",
"xformers @ https://download.pytorch.org/whl/cu126/xformers-0.0.29.post3-cp311-cp311-manylinux_2_28_x86_64.whl ; python_version=='3.11' and ('linux' in sys_platform)",
"xformers @ https://download.pytorch.org/whl/cu126/xformers-0.0.29.post3-cp312-cp312-manylinux_2_28_x86_64.whl ; python_version=='3.12' and ('linux' in sys_platform)",
"xformers @ https://download.pytorch.org/whl/cu126/xformers-0.0.29.post3-cp39-cp39-win_amd64.whl ; python_version=='3.9' and (sys_platform == 'win32')",
"xformers @ https://download.pytorch.org/whl/cu126/xformers-0.0.29.post3-cp310-cp310-win_amd64.whl ; python_version=='3.10' and (sys_platform == 'win32')",
"xformers @ https://download.pytorch.org/whl/cu126/xformers-0.0.29.post3-cp311-cp311-win_amd64.whl ; python_version=='3.11' and (sys_platform == 'win32')",
"xformers @ https://download.pytorch.org/whl/cu126/xformers-0.0.29.post3-cp312-cp312-win_amd64.whl ; python_version=='3.12' and (sys_platform == 'win32')",
] ]
cu118onlytorch270 = [ cu118onlytorch270 = [
"xformers @ https://download.pytorch.org/whl/cu118/xformers-0.0.30-cp39-cp39-manylinux_2_28_x86_64.whl ; python_version=='3.9' and ('linux' in sys_platform)", "xformers==0.0.30 ; ('linux' in sys_platform or sys_platform == 'win32') and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"xformers @ https://download.pytorch.org/whl/cu118/xformers-0.0.30-cp310-cp310-manylinux_2_28_x86_64.whl ; python_version=='3.10' and ('linux' in sys_platform)",
"xformers @ https://download.pytorch.org/whl/cu118/xformers-0.0.30-cp311-cp311-manylinux_2_28_x86_64.whl ; python_version=='3.11' and ('linux' in sys_platform)",
"xformers @ https://download.pytorch.org/whl/cu118/xformers-0.0.30-cp312-cp312-manylinux_2_28_x86_64.whl ; python_version=='3.12' and ('linux' in sys_platform)",
"xformers @ https://download.pytorch.org/whl/cu118/xformers-0.0.30-cp39-cp39-win_amd64.whl ; python_version=='3.9' and (sys_platform == 'win32')",
"xformers @ https://download.pytorch.org/whl/cu118/xformers-0.0.30-cp310-cp310-win_amd64.whl ; python_version=='3.10' and (sys_platform == 'win32')",
"xformers @ https://download.pytorch.org/whl/cu118/xformers-0.0.30-cp311-cp311-win_amd64.whl ; python_version=='3.11' and (sys_platform == 'win32')",
"xformers @ https://download.pytorch.org/whl/cu118/xformers-0.0.30-cp312-cp312-win_amd64.whl ; python_version=='3.12' and (sys_platform == 'win32')",
] ]
cu126onlytorch270 = [ cu126onlytorch270 = [
"xformers @ https://download.pytorch.org/whl/cu126/xformers-0.0.30-cp39-cp39-manylinux_2_28_x86_64.whl ; python_version=='3.9' and ('linux' in sys_platform)", "xformers==0.0.30 ; ('linux' in sys_platform or sys_platform == 'win32') and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"xformers @ https://download.pytorch.org/whl/cu126/xformers-0.0.30-cp310-cp310-manylinux_2_28_x86_64.whl ; python_version=='3.10' and ('linux' in sys_platform)",
"xformers @ https://download.pytorch.org/whl/cu126/xformers-0.0.30-cp311-cp311-manylinux_2_28_x86_64.whl ; python_version=='3.11' and ('linux' in sys_platform)",
"xformers @ https://download.pytorch.org/whl/cu126/xformers-0.0.30-cp312-cp312-manylinux_2_28_x86_64.whl ; python_version=='3.12' and ('linux' in sys_platform)",
"xformers @ https://download.pytorch.org/whl/cu126/xformers-0.0.30-cp39-cp39-win_amd64.whl ; python_version=='3.9' and (sys_platform == 'win32')",
"xformers @ https://download.pytorch.org/whl/cu126/xformers-0.0.30-cp310-cp310-win_amd64.whl ; python_version=='3.10' and (sys_platform == 'win32')",
"xformers @ https://download.pytorch.org/whl/cu126/xformers-0.0.30-cp311-cp311-win_amd64.whl ; python_version=='3.11' and (sys_platform == 'win32')",
"xformers @ https://download.pytorch.org/whl/cu126/xformers-0.0.30-cp312-cp312-win_amd64.whl ; python_version=='3.12' and (sys_platform == 'win32')",
] ]
cu128onlytorch270 = [ cu128onlytorch270 = [
"xformers @ https://download.pytorch.org/whl/cu128/xformers-0.0.30-cp39-cp39-manylinux_2_28_x86_64.whl ; python_version=='3.9' and ('linux' in sys_platform)", "xformers==0.0.30 ; ('linux' in sys_platform or sys_platform == 'win32') and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"xformers @ https://download.pytorch.org/whl/cu128/xformers-0.0.30-cp310-cp310-manylinux_2_28_x86_64.whl ; python_version=='3.10' and ('linux' in sys_platform)",
"xformers @ https://download.pytorch.org/whl/cu128/xformers-0.0.30-cp311-cp311-manylinux_2_28_x86_64.whl ; python_version=='3.11' and ('linux' in sys_platform)",
"xformers @ https://download.pytorch.org/whl/cu128/xformers-0.0.30-cp312-cp312-manylinux_2_28_x86_64.whl ; python_version=='3.12' and ('linux' in sys_platform)",
"xformers @ https://download.pytorch.org/whl/cu128/xformers-0.0.30-cp39-cp39-win_amd64.whl ; python_version=='3.9' and (sys_platform == 'win32')",
"xformers @ https://download.pytorch.org/whl/cu128/xformers-0.0.30-cp310-cp310-win_amd64.whl ; python_version=='3.10' and (sys_platform == 'win32')",
"xformers @ https://download.pytorch.org/whl/cu128/xformers-0.0.30-cp311-cp311-win_amd64.whl ; python_version=='3.11' and (sys_platform == 'win32')",
"xformers @ https://download.pytorch.org/whl/cu128/xformers-0.0.30-cp312-cp312-win_amd64.whl ; python_version=='3.12' and (sys_platform == 'win32')",
] ]
cu118onlytorch271 = [ cu118onlytorch271 = [
"xformers @ https://download.pytorch.org/whl/cu118/xformers-0.0.31.post1-cp39-abi3-manylinux_2_28_x86_64.whl ; ('linux' in sys_platform)", "xformers==0.0.31.post1 ; ('linux' in sys_platform or sys_platform == 'win32') and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"xformers @ https://download.pytorch.org/whl/cu118/xformers-0.0.31.post1-cp39-abi3-win_amd64.whl ; (sys_platform == 'win32')",
] ]
cu126onlytorch271 = [ cu126onlytorch271 = [
"xformers @ https://download.pytorch.org/whl/cu126/xformers-0.0.31.post1-cp39-abi3-manylinux_2_28_x86_64.whl ; ('linux' in sys_platform)", "xformers==0.0.31.post1 ; ('linux' in sys_platform or sys_platform == 'win32') and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"xformers @ https://download.pytorch.org/whl/cu126/xformers-0.0.31.post1-cp39-abi3-win_amd64.whl ; (sys_platform == 'win32')",
] ]
cu128onlytorch271 = [ cu128onlytorch271 = [
"xformers @ https://download.pytorch.org/whl/cu128/xformers-0.0.31.post1-cp39-abi3-manylinux_2_28_x86_64.whl ; ('linux' in sys_platform)", "xformers==0.0.31.post1 ; ('linux' in sys_platform or sys_platform == 'win32') and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"xformers @ https://download.pytorch.org/whl/cu128/xformers-0.0.31.post1-cp39-abi3-win_amd64.whl ; (sys_platform == 'win32')",
] ]
cu118onlytorch280 = [ cu118onlytorch280 = [
"xformers @ https://download.pytorch.org/whl/cu126/xformers-0.0.32.post2-cp39-abi3-manylinux_2_28_x86_64.whl ; ('linux' in sys_platform)", "xformers==0.0.32.post2 ; ('linux' in sys_platform or sys_platform == 'win32') and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"xformers @ https://download.pytorch.org/whl/cu126/xformers-0.0.32.post2-cp39-abi3-win_amd64.whl ; (sys_platform == 'win32')",
] ]
cu126onlytorch280 = [ cu126onlytorch280 = [
"xformers @ https://download.pytorch.org/whl/cu128/xformers-0.0.32.post2-cp39-abi3-manylinux_2_28_x86_64.whl ; ('linux' in sys_platform)", "xformers==0.0.32.post2 ; ('linux' in sys_platform or sys_platform == 'win32') and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"xformers @ https://download.pytorch.org/whl/cu128/xformers-0.0.32.post2-cp39-abi3-win_amd64.whl ; (sys_platform == 'win32')",
] ]
cu128onlytorch280 = [ cu128onlytorch280 = [
"xformers @ https://download.pytorch.org/whl/cu129/xformers-0.0.32.post2-cp39-abi3-manylinux_2_28_x86_64.whl ; ('linux' in sys_platform)", "xformers==0.0.32.post2 ; ('linux' in sys_platform or sys_platform == 'win32') and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"xformers @ https://download.pytorch.org/whl/cu129/xformers-0.0.32.post2-cp39-abi3-win_amd64.whl ; (sys_platform == 'win32')",
] ]
cu130onlytorch280 = [ cu130onlytorch280 = [
] ]
cu126onlytorch290 = [ cu126onlytorch290 = [
"xformers @ https://download.pytorch.org/whl/cu126/xformers-0.0.33.post1-cp39-abi3-manylinux_2_28_x86_64.whl ; ('linux' in sys_platform)", "xformers==0.0.33.post1 ; ('linux' in sys_platform or sys_platform == 'win32') and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"xformers @ https://download.pytorch.org/whl/cu126/xformers-0.0.33.post1-cp39-abi3-win_amd64.whl ; (sys_platform == 'win32')",
] ]
cu128onlytorch290 = [ cu128onlytorch290 = [
"xformers @ https://download.pytorch.org/whl/cu128/xformers-0.0.33.post1-cp39-abi3-manylinux_2_28_x86_64.whl ; ('linux' in sys_platform)", "xformers==0.0.33.post1 ; ('linux' in sys_platform or sys_platform == 'win32') and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"xformers @ https://download.pytorch.org/whl/cu128/xformers-0.0.33.post1-cp39-abi3-win_amd64.whl ; (sys_platform == 'win32')",
] ]
cu130onlytorch290 = [ cu130onlytorch290 = [
"xformers @ https://download.pytorch.org/whl/cu130/xformers-0.0.33.post1-cp39-abi3-manylinux_2_28_x86_64.whl ; ('linux' in sys_platform)", "xformers==0.0.33.post1 ; ('linux' in sys_platform or sys_platform == 'win32') and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"xformers @ https://download.pytorch.org/whl/cu130/xformers-0.0.33.post1-cp39-abi3-win_amd64.whl ; (sys_platform == 'win32')",
] ]
cu126onlytorch291 = [ cu126onlytorch291 = [
"xformers @ https://download.pytorch.org/whl/cu126/xformers-0.0.33.post2-cp39-abi3-manylinux_2_28_x86_64.whl ; ('linux' in sys_platform)", "xformers==0.0.33.post2 ; ('linux' in sys_platform or sys_platform == 'win32') and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"xformers @ https://download.pytorch.org/whl/cu126/xformers-0.0.33.post2-cp39-abi3-win_amd64.whl ; (sys_platform == 'win32')",
] ]
cu128onlytorch291 = [ cu128onlytorch291 = [
"xformers @ https://download.pytorch.org/whl/cu128/xformers-0.0.33.post2-cp39-abi3-manylinux_2_28_x86_64.whl ; ('linux' in sys_platform)", "xformers==0.0.33.post2 ; ('linux' in sys_platform or sys_platform == 'win32') and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"xformers @ https://download.pytorch.org/whl/cu128/xformers-0.0.33.post2-cp39-abi3-win_amd64.whl ; (sys_platform == 'win32')",
] ]
cu130onlytorch291 = [ cu130onlytorch291 = [
"xformers @ https://download.pytorch.org/whl/cu130/xformers-0.0.33.post2-cp39-abi3-manylinux_2_28_x86_64.whl ; ('linux' in sys_platform)", "xformers==0.0.33.post2 ; ('linux' in sys_platform or sys_platform == 'win32') and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"xformers @ https://download.pytorch.org/whl/cu130/xformers-0.0.33.post2-cp39-abi3-win_amd64.whl ; (sys_platform == 'win32')",
] ]
cu126onlytorch2100 = [ cu126onlytorch2100 = [
"xformers @ https://download.pytorch.org/whl/cu126/xformers-0.0.34-cp39-abi3-manylinux_2_28_x86_64.whl ; ('linux' in sys_platform)", "xformers==0.0.34 ; ('linux' in sys_platform or sys_platform == 'win32') and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"xformers @ https://download.pytorch.org/whl/cu126/xformers-0.0.34-cp39-abi3-win_amd64.whl ; (sys_platform == 'win32')",
] ]
cu128onlytorch2100 = [ cu128onlytorch2100 = [
"xformers @ https://download.pytorch.org/whl/cu128/xformers-0.0.34-cp39-abi3-manylinux_2_28_x86_64.whl ; ('linux' in sys_platform)", "xformers==0.0.34 ; ('linux' in sys_platform or sys_platform == 'win32') and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"xformers @ https://download.pytorch.org/whl/cu128/xformers-0.0.34-cp39-abi3-win_amd64.whl ; (sys_platform == 'win32')",
] ]
cu130onlytorch2100 = [ cu130onlytorch2100 = [
"xformers @ https://download.pytorch.org/whl/cu130/xformers-0.0.34-cp39-abi3-manylinux_2_28_x86_64.whl ; ('linux' in sys_platform)", "xformers==0.0.34 ; ('linux' in sys_platform or sys_platform == 'win32') and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"xformers @ https://download.pytorch.org/whl/cu130/xformers-0.0.34-cp39-abi3-win_amd64.whl ; (sys_platform == 'win32')",
] ]
cu118 = [ cu118 = [
"unsloth[huggingface]", "unsloth[huggingface]",
@ -347,22 +242,22 @@ cu121 = [
] ]
cu118-torch211 = [ cu118-torch211 = [
"unsloth[huggingface]", "unsloth[huggingface]",
"bitsandbytes==0.45.5", "bitsandbytes>=0.45.5,!=0.46.0,!=0.48.0",
"unsloth[cu118onlytorch211]", "unsloth[cu118onlytorch211]",
] ]
cu121-torch211 = [ cu121-torch211 = [
"unsloth[huggingface]", "unsloth[huggingface]",
"bitsandbytes==0.45.5", "bitsandbytes>=0.45.5,!=0.46.0,!=0.48.0",
"unsloth[cu121onlytorch211]", "unsloth[cu121onlytorch211]",
] ]
cu118-torch212 = [ cu118-torch212 = [
"unsloth[huggingface]", "unsloth[huggingface]",
"bitsandbytes==0.45.5", "bitsandbytes>=0.45.5,!=0.46.0,!=0.48.0",
"unsloth[cu118onlytorch212]", "unsloth[cu118onlytorch212]",
] ]
cu121-torch212 = [ cu121-torch212 = [
"unsloth[huggingface]", "unsloth[huggingface]",
"bitsandbytes==0.45.5", "bitsandbytes>=0.45.5,!=0.46.0,!=0.48.0",
"unsloth[cu121onlytorch212]", "unsloth[cu121onlytorch212]",
] ]
cu118-torch220 = [ cu118-torch220 = [
@ -432,17 +327,17 @@ cu124-torch251 = [
] ]
cu118-torch260 = [ cu118-torch260 = [
"unsloth[huggingface]", "unsloth[huggingface]",
"bitsandbytes>=0.45.5,!=0.46.0,!=0.48.0", "bitsandbytes>=0.45.1",
"unsloth[cu118onlytorch260]", "unsloth[cu118onlytorch260]",
] ]
cu124-torch260 = [ cu124-torch260 = [
"unsloth[huggingface]", "unsloth[huggingface]",
"bitsandbytes>=0.45.5,!=0.46.0,!=0.48.0", "bitsandbytes>=0.45.1",
"unsloth[cu124onlytorch260]", "unsloth[cu124onlytorch260]",
] ]
cu126-torch260 = [ cu126-torch260 = [
"unsloth[huggingface]", "unsloth[huggingface]",
"bitsandbytes>=0.45.5,!=0.46.0,!=0.48.0", "bitsandbytes>=0.45.1",
"unsloth[cu126onlytorch260]", "unsloth[cu126onlytorch260]",
] ]
cu118-torch270 = [ cu118-torch270 = [
@ -552,16 +447,19 @@ conda = [
] ]
colab-torch211 = [ colab-torch211 = [
"unsloth[huggingface]", "unsloth[huggingface]",
"bitsandbytes==0.45.5", "bitsandbytes>=0.45.5,!=0.46.0,!=0.48.0",
"unsloth[cu121onlytorch211]", "unsloth[cu121onlytorch211]",
] ]
flashattention = [
"packaging ; ('linux' in sys_platform)",
"ninja ; ('linux' in sys_platform)",
"flash-attn>=2.6.3 ; ('linux' in sys_platform)",
]
colab-ampere-torch211 = [ colab-ampere-torch211 = [
"unsloth[huggingface]", "unsloth[huggingface]",
"bitsandbytes==0.45.5", "bitsandbytes>=0.45.5,!=0.46.0,!=0.48.0",
"unsloth[cu121onlytorch211]", "unsloth[cu121onlytorch211]",
"packaging", "unsloth[flashattention]",
"ninja",
"flash-attn>=2.6.3 ; ('linux' in sys_platform)",
] ]
colab-torch220 = [ colab-torch220 = [
"unsloth[huggingface]", "unsloth[huggingface]",
@ -572,9 +470,7 @@ colab-ampere-torch220 = [
"unsloth[huggingface]", "unsloth[huggingface]",
"bitsandbytes>=0.45.5,!=0.46.0,!=0.48.0", "bitsandbytes>=0.45.5,!=0.46.0,!=0.48.0",
"unsloth[cu121onlytorch220]", "unsloth[cu121onlytorch220]",
"packaging", "unsloth[flashattention]",
"ninja",
"flash-attn>=2.6.3 ; ('linux' in sys_platform)",
] ]
colab-new = [ colab-new = [
"unsloth_zoo>=2026.3.6", "unsloth_zoo>=2026.3.6",
@ -592,24 +488,22 @@ colab-new = [
"hf_transfer", "hf_transfer",
"bitsandbytes>=0.45.5,!=0.46.0,!=0.48.0", "bitsandbytes>=0.45.5,!=0.46.0,!=0.48.0",
"unsloth[triton]", "unsloth[triton]",
"sentence-transformers", "typer",
"pydantic",
"pyyaml",
"nest-asyncio",
] ]
colab-no-deps = [ colab-no-deps = [
"accelerate>=0.34.1", "accelerate>=0.34.1",
"trl>=0.18.2,!=0.19.0,<=0.24.0", "trl>=0.18.2,!=0.19.0,<=0.24.0",
"peft>=0.18.0", "peft>=0.18.0",
"xformers ; ('linux' in sys_platform or sys_platform == 'win32') and (platform_machine == 'AMD64' or platform_machine == 'x86_64')", "xformers<0.0.27",
"bitsandbytes>=0.45.5,!=0.46.0,!=0.48.0", "bitsandbytes>=0.45.5,!=0.46.0,!=0.48.0",
"protobuf", "protobuf",
] ]
colab = [ colab = [
"unsloth[cu121]", "unsloth[cu121]",
] ]
flashattention = [
"packaging ; ('linux' in sys_platform)",
"ninja ; ('linux' in sys_platform)",
"flash-attn>=2.6.3 ; ('linux' in sys_platform)",
]
colab-ampere = [ colab-ampere = [
"unsloth[colab-ampere-torch220]", "unsloth[colab-ampere-torch220]",
"unsloth[flashattention]", "unsloth[flashattention]",
@ -628,13 +522,13 @@ cu121-ampere = [
] ]
cu118-ampere-torch211 = [ cu118-ampere-torch211 = [
"unsloth[huggingface]", "unsloth[huggingface]",
"bitsandbytes==0.45.5", "bitsandbytes>=0.45.5,!=0.46.0,!=0.48.0",
"unsloth[cu118onlytorch211]", "unsloth[cu118onlytorch211]",
"unsloth[flashattention]", "unsloth[flashattention]",
] ]
cu121-ampere-torch211 = [ cu121-ampere-torch211 = [
"unsloth[huggingface]", "unsloth[huggingface]",
"bitsandbytes==0.45.5", "bitsandbytes>=0.45.5,!=0.46.0,!=0.48.0",
"unsloth[cu121onlytorch211]", "unsloth[cu121onlytorch211]",
"unsloth[flashattention]", "unsloth[flashattention]",
] ]
@ -718,19 +612,19 @@ cu124-ampere-torch251 = [
] ]
cu118-ampere-torch260 = [ cu118-ampere-torch260 = [
"unsloth[huggingface]", "unsloth[huggingface]",
"bitsandbytes>=0.45.5,!=0.46.0,!=0.48.0", "bitsandbytes>=0.45.1",
"unsloth[cu118onlytorch260]", "unsloth[cu118onlytorch260]",
"unsloth[flashattention]", "unsloth[flashattention]",
] ]
cu124-ampere-torch260 = [ cu124-ampere-torch260 = [
"unsloth[huggingface]", "unsloth[huggingface]",
"bitsandbytes>=0.45.5,!=0.46.0,!=0.48.0", "bitsandbytes>=0.45.1",
"unsloth[cu124onlytorch260]", "unsloth[cu124onlytorch260]",
"unsloth[flashattention]", "unsloth[flashattention]",
] ]
cu126-ampere-torch260 = [ cu126-ampere-torch260 = [
"unsloth[huggingface]", "unsloth[huggingface]",
"bitsandbytes>=0.45.5,!=0.46.0,!=0.48.0", "bitsandbytes>=0.45.1",
"unsloth[cu126onlytorch260]", "unsloth[cu126onlytorch260]",
"unsloth[flashattention]", "unsloth[flashattention]",
] ]
@ -792,7 +686,6 @@ cu130-ampere-torch280 = [
"unsloth[huggingface]", "unsloth[huggingface]",
"bitsandbytes>=0.45.5,!=0.46.0,!=0.48.0", "bitsandbytes>=0.45.5,!=0.46.0,!=0.48.0",
"unsloth[cu130onlytorch280]", "unsloth[cu130onlytorch280]",
"unsloth[flashattention]",
] ]
cu126-ampere-torch290 = [ cu126-ampere-torch290 = [
"unsloth[huggingface]", "unsloth[huggingface]",
@ -839,347 +732,8 @@ cu130-ampere-torch2100 = [
"bitsandbytes>=0.45.5,!=0.46.0,!=0.48.0", "bitsandbytes>=0.45.5,!=0.46.0,!=0.48.0",
"unsloth[cu130onlytorch2100]", "unsloth[cu130onlytorch2100]",
] ]
flashattentiontorch260abiFALSEcu12x = [
"flash-attn @ https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.4.post1/flash_attn-2.7.4.post1+cu12torch2.6cxx11abiFALSE-cp39-cp39-linux_x86_64.whl ; ('linux' in sys_platform) and python_version == '3.9'",
"flash-attn @ https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.4.post1/flash_attn-2.7.4.post1+cu12torch2.6cxx11abiFALSE-cp310-cp310-linux_x86_64.whl ; ('linux' in sys_platform) and python_version == '3.10'",
"flash-attn @ https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.4.post1/flash_attn-2.7.4.post1+cu12torch2.6cxx11abiFALSE-cp311-cp311-linux_x86_64.whl ; ('linux' in sys_platform) and python_version == '3.11'",
"flash-attn @ https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.4.post1/flash_attn-2.7.4.post1+cu12torch2.6cxx11abiFALSE-cp312-cp312-linux_x86_64.whl ; ('linux' in sys_platform) and python_version == '3.12'",
"flash-attn @ https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.4.post1/flash_attn-2.7.4.post1+cu12torch2.6cxx11abiFALSE-cp313-cp313-linux_x86_64.whl ; ('linux' in sys_platform) and python_version == '3.13'",
]
flashattentiontorch260abiTRUEcu12x = [
"flash-attn @ https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.4.post1/flash_attn-2.7.4.post1+cu12torch2.6cxx11abiTRUE-cp39-cp39-linux_x86_64.whl ; ('linux' in sys_platform) and python_version == '3.9'",
"flash-attn @ https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.4.post1/flash_attn-2.7.4.post1+cu12torch2.6cxx11abiTRUE-cp310-cp310-linux_x86_64.whl ; ('linux' in sys_platform) and python_version == '3.10'",
"flash-attn @ https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.4.post1/flash_attn-2.7.4.post1+cu12torch2.6cxx11abiTRUE-cp311-cp311-linux_x86_64.whl ; ('linux' in sys_platform) and python_version == '3.11'",
"flash-attn @ https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.4.post1/flash_attn-2.7.4.post1+cu12torch2.6cxx11abiTRUE-cp312-cp312-linux_x86_64.whl ; ('linux' in sys_platform) and python_version == '3.12'",
"flash-attn @ https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.4.post1/flash_attn-2.7.4.post1+cu12torch2.6cxx11abiTRUE-cp313-cp313-linux_x86_64.whl ; ('linux' in sys_platform) and python_version == '3.13'",
]
flashattentiontorch250abiFALSEcu12x = [
"flash-attn @ https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.4.post1/flash_attn-2.7.4.post1+cu12torch2.5cxx11abiFALSE-cp39-cp39-linux_x86_64.whl ; ('linux' in sys_platform) and python_version == '3.9'",
"flash-attn @ https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.4.post1/flash_attn-2.7.4.post1+cu12torch2.5cxx11abiFALSE-cp310-cp310-linux_x86_64.whl ; ('linux' in sys_platform) and python_version == '3.10'",
"flash-attn @ https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.4.post1/flash_attn-2.7.4.post1+cu12torch2.5cxx11abiFALSE-cp311-cp311-linux_x86_64.whl ; ('linux' in sys_platform) and python_version == '3.11'",
"flash-attn @ https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.4.post1/flash_attn-2.7.4.post1+cu12torch2.5cxx11abiFALSE-cp312-cp312-linux_x86_64.whl ; ('linux' in sys_platform) and python_version == '3.12'",
"flash-attn @ https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.4.post1/flash_attn-2.7.4.post1+cu12torch2.5cxx11abiFALSE-cp313-cp313-linux_x86_64.whl ; ('linux' in sys_platform) and python_version == '3.13'",
]
flashattentiontorch250abiTRUEcu12x = [
"flash-attn @ https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.4.post1/flash_attn-2.7.4.post1+cu12torch2.5cxx11abiTRUE-cp39-cp39-linux_x86_64.whl ; ('linux' in sys_platform) and python_version == '3.9'",
"flash-attn @ https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.4.post1/flash_attn-2.7.4.post1+cu12torch2.5cxx11abiTRUE-cp310-cp310-linux_x86_64.whl ; ('linux' in sys_platform) and python_version == '3.10'",
"flash-attn @ https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.4.post1/flash_attn-2.7.4.post1+cu12torch2.5cxx11abiTRUE-cp311-cp311-linux_x86_64.whl ; ('linux' in sys_platform) and python_version == '3.11'",
"flash-attn @ https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.4.post1/flash_attn-2.7.4.post1+cu12torch2.5cxx11abiTRUE-cp312-cp312-linux_x86_64.whl ; ('linux' in sys_platform) and python_version == '3.12'",
"flash-attn @ https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.4.post1/flash_attn-2.7.4.post1+cu12torch2.5cxx11abiTRUE-cp313-cp313-linux_x86_64.whl ; ('linux' in sys_platform) and python_version == '3.13'",
]
flashattentiontorch240abiFALSEcu12x = [
"flash-attn @ https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.4.post1/flash_attn-2.7.4.post1+cu12torch2.4cxx11abiFALSE-cp39-cp39-linux_x86_64.whl ; ('linux' in sys_platform) and python_version == '3.9'",
"flash-attn @ https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.4.post1/flash_attn-2.7.4.post1+cu12torch2.4cxx11abiFALSE-cp310-cp310-linux_x86_64.whl ; ('linux' in sys_platform) and python_version == '3.10'",
"flash-attn @ https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.4.post1/flash_attn-2.7.4.post1+cu12torch2.4cxx11abiFALSE-cp311-cp311-linux_x86_64.whl ; ('linux' in sys_platform) and python_version == '3.11'",
"flash-attn @ https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.4.post1/flash_attn-2.7.4.post1+cu12torch2.4cxx11abiFALSE-cp312-cp312-linux_x86_64.whl ; ('linux' in sys_platform) and python_version == '3.12'",
"flash-attn @ https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.4.post1/flash_attn-2.7.4.post1+cu12torch2.4cxx11abiFALSE-cp313-cp313-linux_x86_64.whl ; ('linux' in sys_platform) and python_version == '3.13'",
]
flashattentiontorch240abiTRUEcu12x = [
"flash-attn @ https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.4.post1/flash_attn-2.7.4.post1+cu12torch2.4cxx11abiTRUE-cp39-cp39-linux_x86_64.whl ; ('linux' in sys_platform) and python_version == '3.9'",
"flash-attn @ https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.4.post1/flash_attn-2.7.4.post1+cu12torch2.4cxx11abiTRUE-cp310-cp310-linux_x86_64.whl ; ('linux' in sys_platform) and python_version == '3.10'",
"flash-attn @ https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.4.post1/flash_attn-2.7.4.post1+cu12torch2.4cxx11abiTRUE-cp311-cp311-linux_x86_64.whl ; ('linux' in sys_platform) and python_version == '3.11'",
"flash-attn @ https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.4.post1/flash_attn-2.7.4.post1+cu12torch2.4cxx11abiTRUE-cp312-cp312-linux_x86_64.whl ; ('linux' in sys_platform) and python_version == '3.12'",
"flash-attn @ https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.4.post1/flash_attn-2.7.4.post1+cu12torch2.4cxx11abiTRUE-cp313-cp313-linux_x86_64.whl ; ('linux' in sys_platform) and python_version == '3.13'",
]
intelgputorch260 = [
"unsloth_zoo[intelgpu]",
"unsloth[huggingfacenotorch]",
"pytorch_triton_xpu @ https://download.pytorch.org/whl/pytorch_triton_xpu-3.2.0-cp39-cp39-linux_x86_64.whl#sha256=147607f190a7d7aa24ba454def5977fbbfec792fdae18e4ed278cfec29b69271 ; ('linux' in sys_platform) and python_version == '3.9' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"pytorch_triton_xpu @ https://download.pytorch.org/whl/pytorch_triton_xpu-3.2.0-cp310-cp310-linux_x86_64.whl#sha256=23aa423fa1542afc34f67eb3ba8ef20060f6d1b3a4697eaeab22b11c92b30f2b ; ('linux' in sys_platform) and python_version == '3.10' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"pytorch_triton_xpu @ https://download.pytorch.org/whl/pytorch_triton_xpu-3.2.0-cp311-cp311-linux_x86_64.whl#sha256=bcfa995229bbfd9ffd8d6c8d9f6428d393e876fa6e23ee3c20e3c0d73ca75ca5 ; ('linux' in sys_platform) and python_version == '3.11' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"pytorch_triton_xpu @ https://download.pytorch.org/whl/pytorch_triton_xpu-3.2.0-cp312-cp312-linux_x86_64.whl#sha256=bd340903d03470708df3442438acb8b7e08087ab9e61fbe349b2872bf9257ab0 ; ('linux' in sys_platform) and python_version == '3.12' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"pytorch_triton_xpu @ https://download.pytorch.org/whl/pytorch_triton_xpu-3.2.0-cp313-cp313-linux_x86_64.whl#sha256=814dccc8a07159e6eca74bed70091bc8fea2d9dd87b0d91845f9f38cde62f01c ; ('linux' in sys_platform) and python_version == '3.13' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"bitsandbytes @ https://github.com/bitsandbytes-foundation/bitsandbytes/releases/download/continuous-release_main/bitsandbytes-1.33.7.preview-py3-none-manylinux_2_24_x86_64.whl ; ('linux' in sys_platform) and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"bitsandbytes @ https://github.com/bitsandbytes-foundation/bitsandbytes/releases/download/continuous-release_main/bitsandbytes-1.33.7.preview-py3-none-win_amd64.whl ; (sys_platform == 'win32') and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"torch @ https://download.pytorch.org/whl/xpu/torch-2.6.0%2Bxpu-cp39-cp39-linux_x86_64.whl#sha256=6a8adf6dc4c089406e8b3a7e58ab57a463bddf9b07130d2576e76eced43e92af ; ('linux' in sys_platform) and python_version == '3.9' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"torch @ https://download.pytorch.org/whl/xpu/torch-2.6.0%2Bxpu-cp310-cp310-linux_x86_64.whl#sha256=ff4561cbf07c83bbccaa0f6e9bb0e6dcf721bacd53c9c43c4eb0e7331b4792f9 ; ('linux' in sys_platform) and python_version == '3.10' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"torch @ https://download.pytorch.org/whl/xpu/torch-2.6.0%2Bxpu-cp311-cp311-linux_x86_64.whl#sha256=12005f66b810ddd3ab93f86c4522bcfdd412cbd27fc9d189b661ff7509bc5e8a ; ('linux' in sys_platform) and python_version == '3.11' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"torch @ https://download.pytorch.org/whl/xpu/torch-2.6.0%2Bxpu-cp312-cp312-linux_x86_64.whl#sha256=c4c5c67625cdacf35765c2b94e61fe166e3c3f4a14521b1212a59ad1b3eb0f2e ; ('linux' in sys_platform) and python_version == '3.12' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"torch @ https://download.pytorch.org/whl/xpu/torch-2.6.0%2Bxpu-cp313-cp313-linux_x86_64.whl#sha256=e6864f7a60a5ecc43d5d38f59a16e5dd132384f73dfd3a697f74944026038f7b ; ('linux' in sys_platform) and python_version == '3.13' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
]
intel-gpu-torch260 = [
"unsloth[intelgputorch260]"
]
intelgputorch270 = [
"unsloth_zoo[intelgpu]",
"unsloth[huggingfacenotorch]",
"pytorch_triton_xpu @ https://download.pytorch.org/whl/pytorch_triton_xpu-3.3.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl#sha256=749a7098492c6a27b356c97149a4a62973b953eae60bc1b6259260974f344913 ; ('linux' in sys_platform) and python_version == '3.9' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"pytorch_triton_xpu @ https://download.pytorch.org/whl/pytorch_triton_xpu-3.3.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl#sha256=44362e80abd752471a08341093321955b066daa2cfb4810e73b8e3b240850f93 ; ('linux' in sys_platform) and python_version == '3.10' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"pytorch_triton_xpu @ https://download.pytorch.org/whl/pytorch_triton_xpu-3.3.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl#sha256=faa6b8c945a837a080f641bc8ccc77a98fa66980dcd7e62e715fd853737343fd ; ('linux' in sys_platform) and python_version == '3.11' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"pytorch_triton_xpu @ https://download.pytorch.org/whl/pytorch_triton_xpu-3.3.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl#sha256=40f6fb65b345dc9a61813abe7ac9a585f2c9808f414d140cc2a5f11f53ee063c ; ('linux' in sys_platform) and python_version == '3.12' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"pytorch_triton_xpu @ https://download.pytorch.org/whl/pytorch_triton_xpu-3.3.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl#sha256=b22b4c02ec71b4bfc862ae3cdfd2871dc0b05d2b1802f5db2196e0f897d581e9 ; ('linux' in sys_platform) and python_version == '3.13' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"pytorch_triton_xpu @ https://download.pytorch.org/whl/pytorch_triton_xpu-3.3.0-cp39-cp39-win_amd64.whl#sha256=d4b738d7fa5100c1bd766f91614962828a4810eb57b4df92cd5214a83505a752 ; sys_platform == 'win32' and python_version == '3.9' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"pytorch_triton_xpu @ https://download.pytorch.org/whl/pytorch_triton_xpu-3.3.0-cp310-cp310-win_amd64.whl#sha256=143fe8a64d807bcdb7d81bbc062816add325570aa160448454ab6ded4a0a17a1 ; sys_platform == 'win32' and python_version == '3.10' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"pytorch_triton_xpu @ https://download.pytorch.org/whl/pytorch_triton_xpu-3.3.0-cp311-cp311-win_amd64.whl#sha256=a8025459ff325d6e3532eb5cf72519db1b178155e7d60aff6c56beb5968fc758 ; sys_platform == 'win32' and python_version == '3.11' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"pytorch_triton_xpu @ https://download.pytorch.org/whl/pytorch_triton_xpu-3.3.0-cp312-cp312-win_amd64.whl#sha256=0dd07e6d5b872e42e48f5ee140e609d4554ca3cc509d5bf509ac232267cf358e ; sys_platform == 'win32' and python_version == '3.12' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"pytorch_triton_xpu @ https://download.pytorch.org/whl/pytorch_triton_xpu-3.3.0-cp313-cp313-win_amd64.whl#sha256=a936a18182d8e065a9933afc9a3ebbffadd38604969f87c493831214539fc027 ; sys_platform == 'win32' and python_version == '3.13' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"bitsandbytes @ https://github.com/bitsandbytes-foundation/bitsandbytes/releases/download/continuous-release_main/bitsandbytes-1.33.7.preview-py3-none-manylinux_2_24_x86_64.whl ; ('linux' in sys_platform) and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"bitsandbytes @ https://github.com/bitsandbytes-foundation/bitsandbytes/releases/download/continuous-release_main/bitsandbytes-1.33.7.preview-py3-none-win_amd64.whl ; (sys_platform == 'win32') and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"torch @ https://download.pytorch.org/whl/xpu/torch-2.7.0%2Bxpu-cp39-cp39-linux_x86_64.whl#sha256=f8ee75e50fcbb37ed5b498299ca2264da99ab278a93fae2358e921e4a6e28273 ; ('linux' in sys_platform) and python_version == '3.9' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"torch @ https://download.pytorch.org/whl/xpu/torch-2.7.0%2Bxpu-cp310-cp310-linux_x86_64.whl#sha256=d6fdc342961d98fdcd9d03dfd491a3208bb5f7fbb435841f8f72ce9fdcd2d026 ; ('linux' in sys_platform) and python_version == '3.10' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"torch @ https://download.pytorch.org/whl/xpu/torch-2.7.0%2Bxpu-cp311-cp311-linux_x86_64.whl#sha256=74d07f9357df5cf2bf223ad3c84de16346bfaa0504f988fdd5590d3e177e5e86 ; ('linux' in sys_platform) and python_version == '3.11' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"torch @ https://download.pytorch.org/whl/xpu/torch-2.7.0%2Bxpu-cp312-cp312-linux_x86_64.whl#sha256=c806d44aa2ca5d225629f6fbc6c994d5deaac2d2cde449195bc8e3522ddd219a ; ('linux' in sys_platform) and python_version == '3.12' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"torch @ https://download.pytorch.org/whl/xpu/torch-2.7.0%2Bxpu-cp313-cp313-linux_x86_64.whl#sha256=25d8277b7f01d42e2e014ccbab57a2692b6ec4eff8dcf894eda1b297407cf97a ; ('linux' in sys_platform) and python_version == '3.13' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"torch @ https://download.pytorch.org/whl/xpu/torch-2.7.0%2Bxpu-cp39-cp39-win_amd64.whl#sha256=046e85125266ae69c1a0d083e6c092f947ab4b6b41532c16bafe40dbced845df ; sys_platform == 'win32' and python_version == '3.9' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"torch @ https://download.pytorch.org/whl/xpu/torch-2.7.0%2Bxpu-cp310-cp310-win_amd64.whl#sha256=9ebaeffb82b0b3e39b6030927d3ebe0eb62a0e9045a3b2d7b0a9e7b15222c0db ; sys_platform == 'win32' and python_version == '3.10' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"torch @ https://download.pytorch.org/whl/xpu/torch-2.7.0%2Bxpu-cp311-cp311-win_amd64.whl#sha256=356ba66cee127e7e2c942880bd50e03768306a4ea08d358a0f29c6eebfc4bc81 ; sys_platform == 'win32' and python_version == '3.11' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"torch @ https://download.pytorch.org/whl/xpu/torch-2.7.0%2Bxpu-cp312-cp312-win_amd64.whl#sha256=94739e665d9b4d5cd7af5f517cb6103f6f9fb421c095184609653a24524040f5 ; sys_platform == 'win32' and python_version == '3.12' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"torch @ https://download.pytorch.org/whl/xpu/torch-2.7.0%2Bxpu-cp313-cp313-win_amd64.whl#sha256=31df3cb674918e89bc8c532baa331dc84f4430e1f9c0ec379232db44cba78355 ; sys_platform == 'win32' and python_version == '3.13' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
]
intel-gpu-torch270 = [
"unsloth[intelgputorch270]"
]
intelgputorch280 = [
"unsloth_zoo[intelgpu]",
"unsloth[huggingfacenotorch]",
"pytorch_triton_xpu @ https://download.pytorch.org/whl/pytorch_triton_xpu-3.4.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl#sha256=ac4d8e33986b1c3c5e48151640539272b2187e83016985853111b46fb82c3c94 ; 'linux' in sys_platform and python_version == '3.9' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"pytorch_triton_xpu @ https://download.pytorch.org/whl/pytorch_triton_xpu-3.4.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl#sha256=999fef4c1f711092b9d3086525920545df490de476ecebe899ffc777019ae17f ; 'linux' in sys_platform and python_version == '3.10' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"pytorch_triton_xpu @ https://download.pytorch.org/whl/pytorch_triton_xpu-3.4.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl#sha256=57b09c8c492985ff6a27cd3a22b08e8f7b96b407bd8030967b6efbb9f63b80cf ; 'linux' in sys_platform and python_version == '3.11' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"pytorch_triton_xpu @ https://download.pytorch.org/whl/pytorch_triton_xpu-3.4.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl#sha256=df4bb3282bac9a3b90231700077110d8680b338416de03c2b7c6133c9b602649 ; 'linux' in sys_platform and python_version == '3.12' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"pytorch_triton_xpu @ https://download.pytorch.org/whl/pytorch_triton_xpu-3.4.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl#sha256=60da63c99ca827bdcb0df28e0298bf7d066dc607454c6d6176783cb4e79d838b ; 'linux' in sys_platform and python_version == '3.13' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"pytorch_triton_xpu @ https://download.pytorch.org/whl/pytorch_triton_xpu-3.4.0-cp39-cp39-win_amd64.whl#sha256=64aea8de349f3e2e0ebf4c24b011a8122531fdffda5776edaef45829cc241cf8 ; sys_platform == 'win32' and python_version == '3.9' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"pytorch_triton_xpu @ https://download.pytorch.org/whl/pytorch_triton_xpu-3.4.0-cp310-cp310-win_amd64.whl#sha256=ae573d255b257fdbed319a3440dc9d0a721e31160ab7f6eba1b2226e6a409a1d ; sys_platform == 'win32' and python_version == '3.10' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"pytorch_triton_xpu @ https://download.pytorch.org/whl/pytorch_triton_xpu-3.4.0-cp311-cp311-win_amd64.whl#sha256=8e0ea4558e5776d8ddab0264310be9b26aee5641bcac0da023537556d4317b86 ; sys_platform == 'win32' and python_version == '3.11' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"pytorch_triton_xpu @ https://download.pytorch.org/whl/pytorch_triton_xpu-3.4.0-cp312-cp312-win_amd64.whl#sha256=4090dde07a4fffc34aaf855701a9db28e9fccb57b368ade520f1a0f8e811c878 ; sys_platform == 'win32' and python_version == '3.12' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"pytorch_triton_xpu @ https://download.pytorch.org/whl/pytorch_triton_xpu-3.4.0-cp313-cp313-win_amd64.whl#sha256=a33d0888f3c8df028a2d028842715837d0049524d6c06b9bb11869890a13601a ; sys_platform == 'win32' and python_version == '3.13' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"torch @ https://download.pytorch.org/whl/xpu/torch-2.8.0%2Bxpu-cp39-cp39-linux_x86_64.whl ; 'linux' in sys_platform and python_version == '3.9' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"torch @ https://download.pytorch.org/whl/xpu/torch-2.8.0%2Bxpu-cp310-cp310-linux_x86_64.whl ; 'linux' in sys_platform and python_version == '3.10' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"torch @ https://download.pytorch.org/whl/xpu/torch-2.8.0%2Bxpu-cp311-cp311-linux_x86_64.whl ; 'linux' in sys_platform and python_version == '3.11' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"torch @ https://download.pytorch.org/whl/xpu/torch-2.8.0%2Bxpu-cp312-cp312-linux_x86_64.whl ; 'linux' in sys_platform and python_version == '3.12' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"torch @ https://download.pytorch.org/whl/xpu/torch-2.8.0%2Bxpu-cp313-cp313-linux_x86_64.whl ; 'linux' in sys_platform and python_version == '3.13' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"torch @ https://download.pytorch.org/whl/xpu/torch-2.8.0%2Bxpu-cp39-cp39-win_amd64.whl#sha256=f2f401276892428e4875cf1d8717c5cbab704b16fc594ccf23795e7b16549a99 ; sys_platform == 'win32' and python_version == '3.9' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"torch @ https://download.pytorch.org/whl/xpu/torch-2.8.0%2Bxpu-cp310-cp310-win_amd64.whl#sha256=125c60cd59d51b39581a7e9afcd4679bc3a6b8c1f9440b1bb502a23fdd60571e ; sys_platform == 'win32' and python_version == '3.10' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"torch @ https://download.pytorch.org/whl/xpu/torch-2.8.0%2Bxpu-cp311-cp311-win_amd64.whl#sha256=47f1a57258cd460e80b38b2ed6744e31587ab77a96b4215bf59546cb4bab5cc0 ; sys_platform == 'win32' and python_version == '3.11' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"torch @ https://download.pytorch.org/whl/xpu/torch-2.8.0%2Bxpu-cp312-cp312-win_amd64.whl#sha256=0937d8943c145a83d9bafc6f80ef28971167817f9eda26066d33f72caf8a6646 ; sys_platform == 'win32' and python_version == '3.12' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"torch @ https://download.pytorch.org/whl/xpu/torch-2.8.0%2Bxpu-cp313-cp313-win_amd64.whl#sha256=e034aab1d71760dc80a731531be43673ffe15e99033b82d24e40d2e6d41bd8bf ; sys_platform == 'win32' and python_version == '3.13' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"bitsandbytes @ https://github.com/bitsandbytes-foundation/bitsandbytes/releases/download/continuous-release_main/bitsandbytes-1.33.7.preview-py3-none-manylinux_2_24_x86_64.whl ; ('linux' in sys_platform) and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"bitsandbytes @ https://github.com/bitsandbytes-foundation/bitsandbytes/releases/download/continuous-release_main/bitsandbytes-1.33.7.preview-py3-none-win_amd64.whl ; (sys_platform == 'win32') and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"torchvision @ https://download.pytorch.org/whl/xpu/torchvision-0.23.0%2Bxpu-cp39-cp39-manylinux_2_28_x86_64.whl#sha256=6e981c192045fc249c008441179ff237bb00174d818b875b0475730b63f0eaca ; 'linux' in sys_platform and python_version == '3.9' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"torchvision @ https://download.pytorch.org/whl/xpu/torchvision-0.23.0%2Bxpu-cp310-cp310-manylinux_2_28_x86_64.whl#sha256=e5ba4805969277175ebfd59cc717093528cc6e3ada89ac2725fc7a3c1fee6169 ; 'linux' in sys_platform and python_version == '3.10' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"torchvision @ https://download.pytorch.org/whl/xpu/torchvision-0.23.0%2Bxpu-cp311-cp311-manylinux_2_28_x86_64.whl#sha256=74c39c144104416bc4c5ad8c26ab0c169dc5cc6be58059e01bc3665dd0ef676f ; 'linux' in sys_platform and python_version == '3.11' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"torchvision @ https://download.pytorch.org/whl/xpu/torchvision-0.23.0%2Bxpu-cp312-cp312-manylinux_2_28_x86_64.whl#sha256=0acec355b80c3899841184084f365df336c508602812e34a44007b8b60d53af4 ; 'linux' in sys_platform and python_version == '3.12' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"torchvision @ https://download.pytorch.org/whl/xpu/torchvision-0.23.0%2Bxpu-cp313-cp313-manylinux_2_28_x86_64.whl#sha256=e2109ae773dad27b98ca17681044b4f876563c37f2382b75de3a371399edcff8 ; 'linux' in sys_platform and python_version == '3.13' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"torchvision @ https://download.pytorch.org/whl/xpu/torchvision-0.23.0%2Bxpu-cp39-cp39-win_amd64.whl#sha256=5f7904e7048d414379bc8c1167260f1e84204f105db2d0a2f9c89e87ce1cf205 ; sys_platform == 'win32' and python_version == '3.9' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"torchvision @ https://download.pytorch.org/whl/xpu/torchvision-0.23.0%2Bxpu-cp310-cp310-win_amd64.whl#sha256=005fca5e658ca8e37adb63c1a021c84f5e56dfa6cf0d601d89cfe40b9473f79f ; sys_platform == 'win32' and python_version == '3.10' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"torchvision @ https://download.pytorch.org/whl/xpu/torchvision-0.23.0%2Bxpu-cp311-cp311-win_amd64.whl#sha256=c6d030f5361461550c0ff1339b5bca8585fc1e84fda2e64b6184e65a581e4f98 ; sys_platform == 'win32' and python_version == '3.11' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"torchvision @ https://download.pytorch.org/whl/xpu/torchvision-0.23.0%2Bxpu-cp312-cp312-win_amd64.whl#sha256=91aafd61864cdce27461cbec13ddbf28c1bc6494265a1e4b80131c64a3b7d18f ; sys_platform == 'win32' and python_version == '3.12' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"torchvision @ https://download.pytorch.org/whl/xpu/torchvision-0.23.0%2Bxpu-cp313-cp313-win_amd64.whl#sha256=71dc4a6421742ed1e7f585b04a100ad53615c341fbccfbc255aefb38ea9091da ; sys_platform == 'win32' and python_version == '3.13' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
]
intel-gpu-torch280 = [
"unsloth[intelgputorch280]"
]
intelgputorch290 = [
"unsloth_zoo[intelgpu]",
"unsloth[huggingfacenotorch]",
"pytorch_triton_xpu @ https://download.pytorch.org/whl/pytorch_triton_xpu-3.5.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl#sha256=c169a1de14c19673b17c751290d467fa282fc90fa5da4314b2e5cdab1f553146 ; platform_system == 'Linux' and python_version == '3.10' and platform_machine == 'x86_64'",
"pytorch_triton_xpu @ https://download.pytorch.org/whl/pytorch_triton_xpu-3.5.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl#sha256=013d9dd5d6479bd22983161f462e61c8dbe1d82e6730624a7a8d5945507eaa61 ; platform_system == 'Linux' and python_version == '3.11' and platform_machine == 'x86_64'",
"pytorch_triton_xpu @ https://download.pytorch.org/whl/pytorch_triton_xpu-3.5.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl#sha256=afc8cabfbf7ed51fd278d1e0f88d6afc157b0201bad4b99d681e4d542f9e66d4 ; platform_system == 'Linux' and python_version == '3.12' and platform_machine == 'x86_64'",
"pytorch_triton_xpu @ https://download.pytorch.org/whl/pytorch_triton_xpu-3.5.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl#sha256=0d24c1716088f2764d0d24c64227732195b6a42706c3c5fc89eeb4904bfa0818 ; platform_system == 'Linux' and python_version == '3.13' and platform_machine == 'x86_64'",
"pytorch_triton_xpu @ https://download.pytorch.org/whl/pytorch_triton_xpu-3.5.0-cp310-cp310-win_amd64.whl#sha256=c83ab007311d9cfb6e809ee5a4587d99a9eef4be720b90da4f1aaa68b45139a0 ; sys_platform == 'win32' and python_version == '3.10' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"pytorch_triton_xpu @ https://download.pytorch.org/whl/pytorch_triton_xpu-3.5.0-cp311-cp311-win_amd64.whl#sha256=debf75348da8e8c7166b4d4a9b91d1508bb8d6581e339f79f7604b2e6746bacd ; sys_platform == 'win32' and python_version == '3.11' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"pytorch_triton_xpu @ https://download.pytorch.org/whl/pytorch_triton_xpu-3.5.0-cp312-cp312-win_amd64.whl#sha256=97337a47425f1963a723475bd61037460e84ba01db4f87a1d662c3718ff6c47e ; sys_platform == 'win32' and python_version == '3.12' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"pytorch_triton_xpu @ https://download.pytorch.org/whl/pytorch_triton_xpu-3.5.0-cp313-cp313-win_amd64.whl#sha256=2caf8138695f6abb023ecd02031a2611ba1bf8fff2f19802567cb2fadefe9e87 ; sys_platform == 'win32' and python_version == '3.13' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"torch @ https://download.pytorch.org/whl/xpu/torch-2.9.0%2Bxpu-cp310-cp310-linux_x86_64.whl#sha256=5afbe860ce991825a36b75706a523601087e414b77598ef0d9d3d565741c277d ; platform_system == 'Linux' and python_version == '3.10' and platform_machine == 'x86_64'",
"torch @ https://download.pytorch.org/whl/xpu/torch-2.9.0%2Bxpu-cp311-cp311-linux_x86_64.whl#sha256=607fe419c32d6e8e0556f745742e7cff1d0babce51f54be890e0c1422359c442 ; platform_system == 'Linux' and python_version == '3.11' and platform_machine == 'x86_64'",
"torch @ https://download.pytorch.org/whl/xpu/torch-2.9.0%2Bxpu-cp312-cp312-linux_x86_64.whl#sha256=376bae584d89980b8e59934d248c38d5fa3b7d4687a4df1a19f4bc1d23dcc8c1 ; platform_system == 'Linux' and python_version == '3.12' and platform_machine == 'x86_64'",
"torch @ https://download.pytorch.org/whl/xpu/torch-2.9.0%2Bxpu-cp313-cp313-linux_x86_64.whl#sha256=98d6a06dd7fb185874367b18bd609f05f16fdce4142a5980ca94461949965cd2 ; platform_system == 'Linux' and python_version == '3.13' and platform_machine == 'x86_64'",
"torch @ https://download.pytorch.org/whl/xpu/torch-2.9.0%2Bxpu-cp310-cp310-win_amd64.whl#sha256=47cc68f631f65bd9c84924d052cd04dec7531023caa85e80345e9c94611c887d ; sys_platform == 'win32' and python_version == '3.10' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"torch @ https://download.pytorch.org/whl/xpu/torch-2.9.0%2Bxpu-cp311-cp311-win_amd64.whl#sha256=d56c44ab4818aba57e5c7b628f422d014e0d507427170a771c5be85e308b0bc6 ; sys_platform == 'win32' and python_version == '3.11' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"torch @ https://download.pytorch.org/whl/xpu/torch-2.9.0%2Bxpu-cp312-cp312-win_amd64.whl#sha256=18cad93aaff76a01ce73aef6935ece7cfc03344b905592ec731446c44d44592b ; sys_platform == 'win32' and python_version == '3.12' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"torch @ https://download.pytorch.org/whl/xpu/torch-2.9.0%2Bxpu-cp313-cp313-win_amd64.whl#sha256=579929cdc10a76800ead41289cac191ea36d1b16f5f501d3fc25607d4375cd83 ; sys_platform == 'win32' and python_version == '3.13' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"bitsandbytes @ https://github.com/bitsandbytes-foundation/bitsandbytes/releases/download/continuous-release_main/bitsandbytes-1.33.7.preview-py3-none-manylinux_2_24_x86_64.whl ; ('linux' in sys_platform) and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"bitsandbytes @ https://github.com/bitsandbytes-foundation/bitsandbytes/releases/download/continuous-release_main/bitsandbytes-1.33.7.preview-py3-none-win_amd64.whl ; (sys_platform == 'win32') and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"torchvision @ https://download.pytorch.org/whl/xpu/torchvision-0.24.0%2Bxpu-cp310-cp310-manylinux_2_28_x86_64.whl#sha256=cbfae2b79b7549fd368c2462fc8e94f8f26cc450782ee72138e908077c09a519 ; platform_system == 'Linux' and python_version == '3.10' and platform_machine == 'x86_64'",
"torchvision @ https://download.pytorch.org/whl/xpu/torchvision-0.24.0%2Bxpu-cp311-cp311-manylinux_2_28_x86_64.whl#sha256=044fa36ef4b6b43edcd490b75c853fa4b3eb033c2bded29f8fbcf27734713c67 ; platform_system == 'Linux' and python_version == '3.11' and platform_machine == 'x86_64'",
"torchvision @ https://download.pytorch.org/whl/xpu/torchvision-0.24.0%2Bxpu-cp312-cp312-manylinux_2_28_x86_64.whl#sha256=4b91e4bec1d740a6211f02578a79888550b73f3a4e1383035f8f6d72f587212c ; platform_system == 'Linux' and python_version == '3.12' and platform_machine == 'x86_64'",
"torchvision @ https://download.pytorch.org/whl/xpu/torchvision-0.24.0%2Bxpu-cp313-cp313-manylinux_2_28_x86_64.whl#sha256=88239e73ca37254bec84f29cd5887e10ff712de7edbbda3fbb3609cd6190d99e ; platform_system == 'Linux' and python_version == '3.13' and platform_machine == 'x86_64'",
"torchvision @ https://download.pytorch.org/whl/xpu/torchvision-0.24.0%2Bxpu-cp310-cp310-win_amd64.whl#sha256=19c7da8ca767d593e13a88a12bb08d06e34a673f6f26c2f9c191d60e81c02953 ; sys_platform == 'win32' and python_version == '3.10' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"torchvision @ https://download.pytorch.org/whl/xpu/torchvision-0.24.0%2Bxpu-cp311-cp311-win_amd64.whl#sha256=9bb0d1421c544ac8e2eca5b47daacaf54706dc9139c003aa5e77ee5f355c5931 ; sys_platform == 'win32' and python_version == '3.11' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"torchvision @ https://download.pytorch.org/whl/xpu/torchvision-0.24.0%2Bxpu-cp312-cp312-win_amd64.whl#sha256=6a5194bc736089606342d48a3f6822829b167617e9495d91d753dd1bd46fda18 ; sys_platform == 'win32' and python_version == '3.12' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"torchvision @ https://download.pytorch.org/whl/xpu/torchvision-0.24.0%2Bxpu-cp313-cp313-win_amd64.whl#sha256=da47a3ce2bb7f0301a31124668b5908f9b9e92d6241443de15a310ef9632fd83 ; sys_platform == 'win32' and python_version == '3.13' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
]
intel-gpu-torch290 = [
"unsloth[intelgputorch290]"
]
intelgputorch210 = [
"unsloth_zoo[intelgpu]",
"unsloth[huggingfacenotorch]",
"pytorch_triton_xpu @ https://download.pytorch.org/whl/pytorch_triton_xpu-3.5.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl#sha256=c169a1de14c19673b17c751290d467fa282fc90fa5da4314b2e5cdab1f553146 ; platform_system == 'Linux' and python_version == '3.10' and platform_machine == 'x86_64'",
"pytorch_triton_xpu @ https://download.pytorch.org/whl/pytorch_triton_xpu-3.5.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl#sha256=013d9dd5d6479bd22983161f462e61c8dbe1d82e6730624a7a8d5945507eaa61 ; platform_system == 'Linux' and python_version == '3.11' and platform_machine == 'x86_64'",
"pytorch_triton_xpu @ https://download.pytorch.org/whl/pytorch_triton_xpu-3.5.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl#sha256=afc8cabfbf7ed51fd278d1e0f88d6afc157b0201bad4b99d681e4d542f9e66d4 ; platform_system == 'Linux' and python_version == '3.12' and platform_machine == 'x86_64'",
"pytorch_triton_xpu @ https://download.pytorch.org/whl/pytorch_triton_xpu-3.5.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl#sha256=0d24c1716088f2764d0d24c64227732195b6a42706c3c5fc89eeb4904bfa0818 ; platform_system == 'Linux' and python_version == '3.13' and platform_machine == 'x86_64'",
"pytorch_triton_xpu @ https://download.pytorch.org/whl/pytorch_triton_xpu-3.5.0-cp310-cp310-win_amd64.whl#sha256=c83ab007311d9cfb6e809ee5a4587d99a9eef4be720b90da4f1aaa68b45139a0 ; sys_platform == 'win32' and python_version == '3.10' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"pytorch_triton_xpu @ https://download.pytorch.org/whl/pytorch_triton_xpu-3.5.0-cp311-cp311-win_amd64.whl#sha256=debf75348da8e8c7166b4d4a9b91d1508bb8d6581e339f79f7604b2e6746bacd ; sys_platform == 'win32' and python_version == '3.11' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"pytorch_triton_xpu @ https://download.pytorch.org/whl/pytorch_triton_xpu-3.5.0-cp312-cp312-win_amd64.whl#sha256=97337a47425f1963a723475bd61037460e84ba01db4f87a1d662c3718ff6c47e ; sys_platform == 'win32' and python_version == '3.12' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"pytorch_triton_xpu @ https://download.pytorch.org/whl/pytorch_triton_xpu-3.5.0-cp313-cp313-win_amd64.whl#sha256=2caf8138695f6abb023ecd02031a2611ba1bf8fff2f19802567cb2fadefe9e87 ; sys_platform == 'win32' and python_version == '3.13' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"torch @ https://download.pytorch.org/whl/xpu/torch-2.10.0%2Bxpu-cp310-cp310-linux_x86_64.whl#sha256=abb1d1ec1ac672bac0ff35420c965f2df0c636ef9d94e2a830e34578489d0a57 ; platform_system == 'Linux' and python_version == '3.10' and platform_machine == 'x86_64'",
"torch @ https://download.pytorch.org/whl/xpu/torch-2.10.0%2Bxpu-cp311-cp311-linux_x86_64.whl#sha256=71ad2f82da0f41eaec159f39fc85854e27c2391efa91b373e550648a6f4aaad3 ; platform_system == 'Linux' and python_version == '3.11' and platform_machine == 'x86_64'",
"torch @ https://download.pytorch.org/whl/xpu/torch-2.10.0%2Bxpu-cp312-cp312-linux_x86_64.whl#sha256=b473571d478912f92881cc13f15fa18f8463fb0fb8a068c96ed47a7d45a4da0a ; platform_system == 'Linux' and python_version == '3.12' and platform_machine == 'x86_64'",
"torch @ https://download.pytorch.org/whl/xpu/torch-2.10.0%2Bxpu-cp313-cp313-linux_x86_64.whl#sha256=3bc64a746ff25a93de140902c60c9e819d7413f5cea1e88d80999c27a5901e9c ; platform_system == 'Linux' and python_version == '3.13' and platform_machine == 'x86_64'",
"torch @ https://download.pytorch.org/whl/xpu/torch-2.10.0%2Bxpu-cp310-cp310-win_amd64.whl#sha256=ce50691ab3fb6301d9b7bb8b3834cf5fa7152a2b5f91fd24c5efdc601a25b780 ; sys_platform == 'win32' and python_version == '3.10' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"torch @ https://download.pytorch.org/whl/xpu/torch-2.10.0%2Bxpu-cp311-cp311-win_amd64.whl#sha256=cb9d37f21cb9fb7df67d62863f021c3144e8d8832b9ea8e8523ac308bc620ea1 ; sys_platform == 'win32' and python_version == '3.11' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"torch @ https://download.pytorch.org/whl/xpu/torch-2.10.0%2Bxpu-cp312-cp312-win_amd64.whl#sha256=3ad605be4728b6d3a28a44d07dd794b1a9e45551b0057815bf25eb2a6d6a56a7 ; sys_platform == 'win32' and python_version == '3.12' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"torch @ https://download.pytorch.org/whl/xpu/torch-2.10.0%2Bxpu-cp313-cp313-win_amd64.whl#sha256=2b4b56dd6c792aef82006904fa888692e3782e4ae5da27526801bad4898f05a5 ; sys_platform == 'win32' and python_version == '3.13' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"bitsandbytes @ https://github.com/bitsandbytes-foundation/bitsandbytes/releases/download/continuous-release_main/bitsandbytes-1.33.7.preview-py3-none-manylinux_2_24_x86_64.whl ; ('linux' in sys_platform) and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"bitsandbytes @ https://github.com/bitsandbytes-foundation/bitsandbytes/releases/download/continuous-release_main/bitsandbytes-1.33.7.preview-py3-none-win_amd64.whl ; (sys_platform == 'win32') and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"torchvision @ https://download.pytorch.org/whl/xpu/torchvision-0.25.0%2Bxpu-cp310-cp310-manylinux_2_28_x86_64.whl#sha256=7e1e7b170fcf7161c8499b67156c5a05462243626dc0974010791a0bab4378d3 ; platform_system == 'Linux' and python_version == '3.10' and platform_machine == 'x86_64'",
"torchvision @ https://download.pytorch.org/whl/xpu/torchvision-0.25.0%2Bxpu-cp311-cp311-manylinux_2_28_x86_64.whl#sha256=bd6add201bd7628af70437292e1447abb368e0b5f4ff9abd334ae435efd44792 ; platform_system == 'Linux' and python_version == '3.11' and platform_machine == 'x86_64'",
"torchvision @ https://download.pytorch.org/whl/xpu/torchvision-0.25.0%2Bxpu-cp312-cp312-manylinux_2_28_x86_64.whl#sha256=6ad2543496bc29e59d3dd614a94d09aa9870318aedb66045344fffddfedd2cf8 ; platform_system == 'Linux' and python_version == '3.12' and platform_machine == 'x86_64'",
"torchvision @ https://download.pytorch.org/whl/xpu/torchvision-0.25.0%2Bxpu-cp313-cp313-manylinux_2_28_x86_64.whl#sha256=80269f37865fcd8b57f20e4786efae2200bfa2b2727926c3c7acc82f0e7d3548 ; platform_system == 'Linux' and python_version == '3.13' and platform_machine == 'x86_64'",
"torchvision @ https://download.pytorch.org/whl/xpu/torchvision-0.25.0%2Bxpu-cp310-cp310-win_amd64.whl#sha256=6b9485ba85dcba4d196d6134d9c3332fb228fb2556416bf0450a64e8a472fcba ; sys_platform == 'win32' and python_version == '3.10' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"torchvision @ https://download.pytorch.org/whl/xpu/torchvision-0.25.0%2Bxpu-cp311-cp311-win_amd64.whl#sha256=36cbaedf10f6412af5c89afd9aeea474e6a56a0050348ada8fabe1ecaf6b879e ; sys_platform == 'win32' and python_version == '3.11' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"torchvision @ https://download.pytorch.org/whl/xpu/torchvision-0.25.0%2Bxpu-cp312-cp312-win_amd64.whl#sha256=738357d97468d75fe3d510ac37e65130f2787f81d9bbc1518898f7396dc3403f ; sys_platform == 'win32' and python_version == '3.12' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
"torchvision @ https://download.pytorch.org/whl/xpu/torchvision-0.25.0%2Bxpu-cp313-cp313-win_amd64.whl#sha256=1c4b44b36a557f7381e3076fb8843366742238648441d607c8d049c6da0f8886 ; sys_platform == 'win32' and python_version == '3.13' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
]
intel-gpu-torch210 = [
"unsloth[intelgputorch210]"
]
intel = [
"unsloth[intelgputorch280]",
]
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')",
]
rocm702-torch280 = [
"unsloth[amd]",
"triton @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.0.2/triton-3.4.0%2Brocm7.0.2.gitf9e5bf54-cp311-cp311-linux_x86_64.whl ; platform_system == 'Linux' and python_version == '3.11' and platform_machine == 'x86_64'",
"triton @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.0.2/triton-3.4.0%2Brocm7.0.2.gitf9e5bf54-cp312-cp312-linux_x86_64.whl ; platform_system == 'Linux' and python_version == '3.12' and platform_machine == 'x86_64'",
"triton @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.0.2/triton-3.4.0%2Brocm7.0.2.gitf9e5bf54-cp313-cp313-linux_x86_64.whl ; platform_system == 'Linux' and python_version == '3.13' and platform_machine == 'x86_64'",
"torch @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.0.2/torch-2.8.0%2Brocm7.0.2.lw.git245bf6ed-cp311-cp311-linux_x86_64.whl ; platform_system == 'Linux' and python_version == '3.11' and platform_machine == 'x86_64'",
"torch @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.0.2/torch-2.8.0%2Brocm7.0.2.lw.git245bf6ed-cp312-cp312-linux_x86_64.whl ; platform_system == 'Linux' and python_version == '3.12' and platform_machine == 'x86_64'",
"torch @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.0.2/torch-2.8.0%2Brocm7.0.2.lw.git245bf6ed-cp313-cp313-linux_x86_64.whl ; platform_system == 'Linux' and python_version == '3.13' and platform_machine == 'x86_64'",
"torchvision @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.0.2/torchvision-0.23.0%2Brocm7.0.2.git824e8c87-cp311-cp311-linux_x86_64.whl ; platform_system == 'Linux' and python_version == '3.11' and platform_machine == 'x86_64'",
"torchvision @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.0.2/torchvision-0.23.0%2Brocm7.0.2.git824e8c87-cp312-cp312-linux_x86_64.whl ; platform_system == 'Linux' and python_version == '3.12' and platform_machine == 'x86_64'",
"torchvision @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.0.2/torchvision-0.23.0%2Brocm7.0.2.git824e8c87-cp313-cp313-linux_x86_64.whl ; platform_system == 'Linux' and python_version == '3.13' and platform_machine == 'x86_64'",
]
rocm72-torch291 = [
"unsloth[amd]",
"triton @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.2/triton-3.5.1%2Brocm7.2.0.gita272dfa8-cp310-cp310-linux_x86_64.whl ; platform_system == 'Linux' and python_version == '3.10' and platform_machine == 'x86_64'",
"triton @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.2/triton-3.5.1%2Brocm7.2.0.gita272dfa8-cp311-cp311-linux_x86_64.whl ; platform_system == 'Linux' and python_version == '3.11' and platform_machine == 'x86_64'",
"triton @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.2/triton-3.5.1%2Brocm7.2.0.gita272dfa8-cp312-cp312-linux_x86_64.whl ; platform_system == 'Linux' and python_version == '3.12' and platform_machine == 'x86_64'",
"triton @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.2/triton-3.5.1%2Brocm7.2.0.gita272dfa8-cp313-cp313-linux_x86_64.whl ; platform_system == 'Linux' and python_version == '3.13' and platform_machine == 'x86_64'",
"torch @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.2/torch-2.9.1%2Brocm7.2.0.lw.git7e1940d4-cp310-cp310-linux_x86_64.whl ; platform_system == 'Linux' and python_version == '3.10' and platform_machine == 'x86_64'",
"torch @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.2/torch-2.9.1%2Brocm7.2.0.lw.git7e1940d4-cp311-cp311-linux_x86_64.whl ; platform_system == 'Linux' and python_version == '3.11' and platform_machine == 'x86_64'",
"torch @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.2/torch-2.9.1%2Brocm7.2.0.lw.git7e1940d4-cp312-cp312-linux_x86_64.whl ; platform_system == 'Linux' and python_version == '3.12' and platform_machine == 'x86_64'",
"torch @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.2/torch-2.9.1%2Brocm7.2.0.lw.git7e1940d4-cp313-cp313-linux_x86_64.whl ; platform_system == 'Linux' and python_version == '3.13' and platform_machine == 'x86_64'",
"torch @ https://repo.radeon.com/rocm/windows/rocm-rel-7.2/torch-2.9.1%2Brocmsdk20260116-cp312-cp312-win_amd64.whl ; sys_platform == 'win32' and python_version == '3.12'",
"torchvision @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.2/torchvision-0.24.0%2Brocm7.2.0.gitb919bd0c-cp310-cp310-linux_x86_64.whl ; platform_system == 'Linux' and python_version == '3.10' and platform_machine == 'x86_64'",
"torchvision @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.2/torchvision-0.24.0%2Brocm7.2.0.gitb919bd0c-cp311-cp311-linux_x86_64.whl ; platform_system == 'Linux' and python_version == '3.11' and platform_machine == 'x86_64'",
"torchvision @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.2/torchvision-0.24.0%2Brocm7.2.0.gitb919bd0c-cp312-cp312-linux_x86_64.whl ; platform_system == 'Linux' and python_version == '3.12' and platform_machine == 'x86_64'",
"torchvision @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.2/torchvision-0.24.0%2Brocm7.2.0.gitb919bd0c-cp313-cp313-linux_x86_64.whl ; platform_system == 'Linux' and python_version == '3.13' and platform_machine == 'x86_64'",
"torchvision @ https://repo.radeon.com/rocm/windows/rocm-rel-7.2/torchvision-0.24.1%2Brocmsdk20260116-cp312-cp312-win_amd64.whl ; sys_platform == 'win32' and python_version == '3.12'",
]
rocm711-torch291 = [
"unsloth[amd]",
"triton @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.1.1/triton-3.5.1%2Brocm7.1.1.gita272dfa8-cp310-cp310-linux_x86_64.whl ; platform_system == 'Linux' and python_version == '3.10' and platform_machine == 'x86_64'",
"triton @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.1.1/triton-3.5.1%2Brocm7.1.1.gita272dfa8-cp311-cp311-linux_x86_64.whl ; platform_system == 'Linux' and python_version == '3.11' and platform_machine == 'x86_64'",
"triton @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.1.1/triton-3.5.1%2Brocm7.1.1.gita272dfa8-cp312-cp312-linux_x86_64.whl ; platform_system == 'Linux' and python_version == '3.12' and platform_machine == 'x86_64'",
"triton @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.1.1/triton-3.5.1%2Brocm7.1.1.gita272dfa8-cp313-cp313-linux_x86_64.whl ; platform_system == 'Linux' and python_version == '3.13' and platform_machine == 'x86_64'",
"torch @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.1.1/torch-2.9.1%2Brocm7.1.1.lw.git351ff442-cp310-cp310-linux_x86_64.whl ; platform_system == 'Linux' and python_version == '3.10' and platform_machine == 'x86_64'",
"torch @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.1.1/torch-2.9.1%2Brocm7.1.1.lw.git351ff442-cp311-cp311-linux_x86_64.whl ; platform_system == 'Linux' and python_version == '3.11' and platform_machine == 'x86_64'",
"torch @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.1.1/torch-2.9.1%2Brocm7.1.1.lw.git351ff442-cp312-cp312-linux_x86_64.whl ; platform_system == 'Linux' and python_version == '3.12' and platform_machine == 'x86_64'",
"torch @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.1.1/torch-2.9.1%2Brocm7.1.1.lw.git351ff442-cp313-cp313-linux_x86_64.whl ; platform_system == 'Linux' and python_version == '3.13' and platform_machine == 'x86_64'",
"torchvision @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.1.1/torchvision-0.24.0%2Brocm7.1.1.gitb919bd0c-cp310-cp310-linux_x86_64.whl ; platform_system == 'Linux' and python_version == '3.10' and platform_machine == 'x86_64'",
"torchvision @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.1.1/torchvision-0.24.0%2Brocm7.1.1.gitb919bd0c-cp311-cp311-linux_x86_64.whl ; platform_system == 'Linux' and python_version == '3.11' and platform_machine == 'x86_64'",
"torchvision @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.1.1/torchvision-0.24.0%2Brocm7.1.1.gitb919bd0c-cp312-cp312-linux_x86_64.whl ; platform_system == 'Linux' and python_version == '3.12' and platform_machine == 'x86_64'",
"torchvision @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.1.1/torchvision-0.24.0%2Brocm7.1.1.gitb919bd0c-cp313-cp313-linux_x86_64.whl ; platform_system == 'Linux' and python_version == '3.13' and platform_machine == 'x86_64'",
]
rocm72-torch2100 = [
"unsloth[amd]",
"triton @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.2/triton-3.6.0%2Brocm7.2.0.gitba5c1517-cp310-cp310-linux_x86_64.whl ; platform_system == 'Linux' and python_version == '3.10' and platform_machine == 'x86_64'",
"triton @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.2/triton-3.6.0%2Brocm7.2.0.gitba5c1517-cp311-cp311-linux_x86_64.whl ; platform_system == 'Linux' and python_version == '3.11' and platform_machine == 'x86_64'",
"triton @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.2/triton-3.6.0%2Brocm7.2.0.gitba5c1517-cp312-cp312-linux_x86_64.whl ; platform_system == 'Linux' and python_version == '3.12' and platform_machine == 'x86_64'",
"triton @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.2/triton-3.6.0%2Brocm7.2.0.gitba5c1517-cp313-cp313-linux_x86_64.whl ; platform_system == 'Linux' and python_version == '3.13' and platform_machine == 'x86_64'",
"torch @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.2/torch-2.10.0%2Brocm7.2.0.lw.gitb6ee5fde-cp310-cp310-linux_x86_64.whl ; platform_system == 'Linux' and python_version == '3.10' and platform_machine == 'x86_64'",
"torch @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.2/torch-2.10.0%2Brocm7.2.0.lw.gitb6ee5fde-cp311-cp311-linux_x86_64.whl ; platform_system == 'Linux' and python_version == '3.11' and platform_machine == 'x86_64'",
"torch @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.2/torch-2.10.0%2Brocm7.2.0.lw.gitb6ee5fde-cp312-cp312-linux_x86_64.whl ; platform_system == 'Linux' and python_version == '3.12' and platform_machine == 'x86_64'",
"torch @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.2/torch-2.10.0%2Brocm7.2.0.lw.gitb6ee5fde-cp313-cp313-linux_x86_64.whl ; platform_system == 'Linux' and python_version == '3.13' and platform_machine == 'x86_64'",
"torchvision @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.2/torchvision-0.25.0%2Brocm7.2.0.git82df5f59-cp310-cp310-linux_x86_64.whl ; platform_system == 'Linux' and python_version == '3.10' and platform_machine == 'x86_64'",
"torchvision @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.2/torchvision-0.25.0%2Brocm7.2.0.git82df5f59-cp311-cp311-linux_x86_64.whl ; platform_system == 'Linux' and python_version == '3.11' and platform_machine == 'x86_64'",
"torchvision @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.2/torchvision-0.25.0%2Brocm7.2.0.git82df5f59-cp312-cp312-linux_x86_64.whl ; platform_system == 'Linux' and python_version == '3.12' and platform_machine == 'x86_64'",
"torchvision @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.2/torchvision-0.25.0%2Brocm7.2.0.git82df5f59-cp313-cp313-linux_x86_64.whl ; platform_system == 'Linux' and python_version == '3.13' and platform_machine == 'x86_64'",
]
rocm711-torch2100 = [
"unsloth[amd]",
"triton @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.1.1/triton-3.6.0%2Brocm7.1.1.gitba5c1517-cp310-cp310-linux_x86_64.whl ; platform_system == 'Linux' and python_version == '3.10' and platform_machine == 'x86_64'",
"triton @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.1.1/triton-3.6.0%2Brocm7.1.1.gitba5c1517-cp311-cp311-linux_x86_64.whl ; platform_system == 'Linux' and python_version == '3.11' and platform_machine == 'x86_64'",
"triton @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.1.1/triton-3.6.0%2Brocm7.1.1.gitba5c1517-cp312-cp312-linux_x86_64.whl ; platform_system == 'Linux' and python_version == '3.12' and platform_machine == 'x86_64'",
"triton @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.1.1/triton-3.6.0%2Brocm7.1.1.gitba5c1517-cp313-cp313-linux_x86_64.whl ; platform_system == 'Linux' and python_version == '3.13' and platform_machine == 'x86_64'",
"torch @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.1.1/torch-2.10.0%2Brocm7.1.1.lw.gitd9556b05-cp310-cp310-linux_x86_64.whl ; platform_system == 'Linux' and python_version == '3.10' and platform_machine == 'x86_64'",
"torch @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.1.1/torch-2.10.0%2Brocm7.1.1.lw.gitd9556b05-cp311-cp311-linux_x86_64.whl ; platform_system == 'Linux' and python_version == '3.11' and platform_machine == 'x86_64'",
"torch @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.1.1/torch-2.10.0%2Brocm7.1.1.lw.gitd9556b05-cp312-cp312-linux_x86_64.whl ; platform_system == 'Linux' and python_version == '3.12' and platform_machine == 'x86_64'",
"torch @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.1.1/torch-2.10.0%2Brocm7.1.1.lw.gitd9556b05-cp313-cp313-linux_x86_64.whl ; platform_system == 'Linux' and python_version == '3.13' and platform_machine == 'x86_64'",
"torchvision @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.1.1/torchvision-0.25.0%2Brocm7.1.1.git82df5f59-cp310-cp310-linux_x86_64.whl ; platform_system == 'Linux' and python_version == '3.10' and platform_machine == 'x86_64'",
"torchvision @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.1.1/torchvision-0.25.0%2Brocm7.1.1.git82df5f59-cp311-cp311-linux_x86_64.whl ; platform_system == 'Linux' and python_version == '3.11' and platform_machine == 'x86_64'",
"torchvision @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.1.1/torchvision-0.25.0%2Brocm7.1.1.git82df5f59-cp312-cp312-linux_x86_64.whl ; platform_system == 'Linux' and python_version == '3.12' and platform_machine == 'x86_64'",
"torchvision @ https://repo.radeon.com/rocm/manylinux/rocm-rel-7.1.1/torchvision-0.25.0%2Brocm7.1.1.git82df5f59-cp313-cp313-linux_x86_64.whl ; platform_system == 'Linux' and python_version == '3.13' and platform_machine == 'x86_64'",
]
[project.urls] [project.urls]
homepage = "https://unsloth.ai" homepage = "https://unsloth.ai"
documentation = "https://unsloth.ai/docs" documentation = "https://unsloth.ai/docs"
repository = "https://github.com/unslothai/unsloth" repository = "https://github.com/unslothai/unsloth"
[tool.ruff]
target-version = "py311"
force-exclude = true
extend-exclude = [
"*chat_templates.py",
"*ollama_template_mappers.py",
"*_auto_install.py",
"*mapper.py",
]
[tool.ruff.lint]
select = ["E9", "F63", "F7", "F82"]
ignore = [
"E402",
"E722",
"F403",
"F405",
"F811",
"F821",
"F841",
"F401",
"E731",
"E741",
"F601",
"E712",
]
[tool.ruff.format]

View file

@ -82,7 +82,6 @@ def start(port: int = 8888):
from colab import start from colab import start
start() start()
""" """
import sys
logger.info("🦥 Starting Unsloth Studio...") logger.info("🦥 Starting Unsloth Studio...")

View file

@ -4,8 +4,6 @@
from __future__ import annotations from __future__ import annotations
import json import json
import structlog
import loggers
import logging import logging
import re import re
import shutil import shutil

View file

@ -5,7 +5,6 @@ from __future__ import annotations
import json import json
import os import os
import structlog
import subprocess import subprocess
from copy import deepcopy from copy import deepcopy
from dataclasses import dataclass from dataclasses import dataclass

View file

@ -8,7 +8,6 @@ Export backend - handles model exporting in various formats
import glob import glob
import json import json
import structlog
from loggers import get_logger from loggers import get_logger
import os import os
import shutil import shutil
@ -23,7 +22,7 @@ from utils.hardware import clear_gpu_cache
from utils.models import is_vision_model, get_base_model_from_lora from utils.models import is_vision_model, get_base_model_from_lora
from utils.models.model_config import detect_audio_type from utils.models.model_config import detect_audio_type
from utils.paths import ensure_dir, outputs_root, resolve_export_dir, resolve_output_dir from utils.paths import ensure_dir, outputs_root, resolve_export_dir
from core.inference import get_inference_backend from core.inference import get_inference_backend
logger = get_logger(__name__) logger = get_logger(__name__)

View file

@ -15,13 +15,11 @@ Pattern follows core/inference/orchestrator.py.
""" """
import atexit import atexit
import structlog
from loggers import get_logger from loggers import get_logger
import multiprocessing as mp import multiprocessing as mp
import queue import queue
import threading import threading
import time import time
from pathlib import Path
from typing import Any, List, Optional, Tuple from typing import Any, List, Optional, Tuple
from utils.paths import outputs_root from utils.paths import outputs_root

View file

@ -17,7 +17,6 @@ Pattern follows core/inference/worker.py and core/training/worker.py.
from __future__ import annotations from __future__ import annotations
import structlog
from loggers import get_logger from loggers import get_logger
import os import os
import sys import sys

View file

@ -9,7 +9,6 @@ Supports: SNAC (Orpheus), CSM (Sesame), BiCodec (Spark), DAC (OuteTTS)
import io import io
import re import re
import wave import wave
import structlog
from loggers import get_logger from loggers import get_logger
from typing import Optional, Tuple from typing import Optional, Tuple

View file

@ -7,21 +7,16 @@ Core inference backend - streamlined
from unsloth import FastLanguageModel, FastVisionModel from unsloth import FastLanguageModel, FastVisionModel
from unsloth.chat_templates import get_chat_template from unsloth.chat_templates import get_chat_template
from transformers import TextStreamer
from peft import PeftModel, PeftModelForCausalLM from peft import PeftModel, PeftModelForCausalLM
import json import json
import sys
import torch import torch
from pathlib import Path from pathlib import Path
from typing import Optional, Union, Generator, Tuple from typing import Optional, Union, Generator, Tuple
from utils.models import ModelConfig, get_base_model_from_lora from utils.models import ModelConfig
from utils.paths import is_model_cached
from utils.utils import format_error_message from utils.utils import format_error_message
from utils.hardware import get_device, clear_gpu_cache, log_gpu_memory from utils.hardware import get_device, clear_gpu_cache, log_gpu_memory
from core.inference.audio_codecs import AudioCodecManager from core.inference.audio_codecs import AudioCodecManager
from io import StringIO
import structlog
from loggers import get_logger from loggers import get_logger
@ -902,7 +897,6 @@ class InferenceBackend:
try: try:
from utils.datasets import ( from utils.datasets import (
MODEL_TO_TEMPLATE_MAPPER, MODEL_TO_TEMPLATE_MAPPER,
get_tokenizer_chat_template,
) )
model_name_lower = self.active_model_name.lower() model_name_lower = self.active_model_name.lower()
@ -1143,7 +1137,6 @@ class InferenceBackend:
Uses processor.apply_chat_template with audio embedded in messages (Gemma 3n pattern). Uses processor.apply_chat_template with audio embedded in messages (Gemma 3n pattern).
""" """
import threading import threading
import numpy as np
model_info = self.models[self.active_model_name] model_info = self.models[self.active_model_name]
model = model_info["model"] model = model_info["model"]
@ -1736,7 +1729,7 @@ class InferenceBackend:
formatted_prompt = tokenizer.apply_chat_template( formatted_prompt = tokenizer.apply_chat_template(
chat_messages, tokenize = False, add_generation_prompt = True chat_messages, tokenize = False, add_generation_prompt = True
) )
logger.info(f"Successfully applied tokenizer's native chat template") logger.info("Successfully applied tokenizer's native chat template")
return formatted_prompt return formatted_prompt
except Exception as e: except Exception as e:
error_msg = str(e).lower() error_msg = str(e).lower()
@ -1745,7 +1738,7 @@ class InferenceBackend:
or "no template argument" in error_msg or "no template argument" in error_msg
): ):
logger.info( logger.info(
f"Base model detected - no built-in chat template available, using fallback formatting" "Base model detected - no built-in chat template available, using fallback formatting"
) )
else: else:
logger.warning(f"Failed to apply tokenizer chat template: {e}") logger.warning(f"Failed to apply tokenizer chat template: {e}")

View file

@ -12,7 +12,6 @@ import atexit
import contextlib import contextlib
import json import json
import struct import struct
import structlog
from loggers import get_logger from loggers import get_logger
import shutil import shutil
import socket import socket
@ -2034,7 +2033,7 @@ class LlamaCppBackend:
except httpx.ConnectError: except httpx.ConnectError:
raise RuntimeError("Lost connection to llama-server") raise RuntimeError("Lost connection to llama-server")
except Exception as e: except Exception:
if cancel_event is not None and cancel_event.is_set(): if cancel_event is not None and cancel_event.is_set():
return return
raise raise
@ -2629,7 +2628,7 @@ class LlamaCppBackend:
except httpx.ConnectError: except httpx.ConnectError:
raise RuntimeError("Lost connection to llama-server") raise RuntimeError("Lost connection to llama-server")
except Exception as e: except Exception:
if cancel_event is not None and cancel_event.is_set(): if cancel_event is not None and cancel_event.is_set():
return return
raise raise
@ -2792,7 +2791,7 @@ class LlamaCppBackend:
except httpx.ConnectError: except httpx.ConnectError:
raise RuntimeError("Lost connection to llama-server") raise RuntimeError("Lost connection to llama-server")
except Exception as e: except Exception:
if cancel_event is not None and cancel_event.is_set(): if cancel_event is not None and cancel_event.is_set():
return return
raise raise

View file

@ -17,7 +17,6 @@ Pattern follows core/training/training.py.
import atexit import atexit
import base64 import base64
import structlog
from loggers import get_logger from loggers import get_logger
import multiprocessing as mp import multiprocessing as mp
import queue import queue
@ -25,7 +24,6 @@ import threading
import time import time
import uuid import uuid
from io import BytesIO from io import BytesIO
from pathlib import Path
from typing import Any, Generator, Optional, Tuple, Union from typing import Any, Generator, Optional, Tuple, Union
logger = get_logger(__name__) logger = get_logger(__name__)

View file

@ -17,7 +17,6 @@ Pattern follows core/training/worker.py.
from __future__ import annotations from __future__ import annotations
import base64 import base64
import structlog
from loggers import get_logger from loggers import get_logger
import os import os
import queue as _queue import queue as _queue

View file

@ -33,22 +33,19 @@ if sys.platform in ("win32", "darwin"):
sys.path.insert(0, _compile_cache) sys.path.insert(0, _compile_cache)
import torch import torch
from utils.hardware import clear_gpu_cache, safe_num_proc, dataset_map_num_proc from utils.hardware import clear_gpu_cache, dataset_map_num_proc
torch._dynamo.config.recompile_limit = 64 torch._dynamo.config.recompile_limit = 64
from unsloth import FastLanguageModel, FastVisionModel, is_bfloat16_supported from unsloth import FastLanguageModel, FastVisionModel, is_bfloat16_supported
from unsloth.chat_templates import get_chat_template
import json import json
import threading import threading
import math import math
import structlog
from loggers import get_logger from loggers import get_logger
import time import time
from pathlib import Path from pathlib import Path
from typing import Optional, Callable from typing import Optional, Callable
from dataclasses import dataclass from dataclasses import dataclass
import pandas as pd
from datasets import Dataset, load_dataset from datasets import Dataset, load_dataset
from utils.models import is_vision_model, detect_audio_type from utils.models import is_vision_model, detect_audio_type
@ -814,7 +811,7 @@ class UnslothTrainer:
# second attempt because the failed first call's partial # second attempt because the failed first call's partial
# imports clean up the stale state as a side effect. # imports clean up the stale state as a side effect.
self._source_code_retried = True self._source_code_retried = True
logger.info(f"\n'could not get source code' — retrying once...\n") logger.info("\n'could not get source code' — retrying once...\n")
return self.load_model( return self.load_model(
model_name = model_name, model_name = model_name,
max_seq_length = max_seq_length, max_seq_length = max_seq_length,
@ -1016,7 +1013,7 @@ class UnslothTrainer:
# Phase 2: Whisper uses FastModel.get_peft_model with task_type=None # Phase 2: Whisper uses FastModel.get_peft_model with task_type=None
from unsloth import FastModel from unsloth import FastModel
logger.info(f"Audio model (whisper) LoRA configuration:") logger.info("Audio model (whisper) LoRA configuration:")
logger.info(f" - Target modules: {target_modules}\n") logger.info(f" - Target modules: {target_modules}\n")
self.model = FastModel.get_peft_model( self.model = FastModel.get_peft_model(
@ -1057,7 +1054,7 @@ class UnslothTrainer:
elif self.is_vlm: elif self.is_vlm:
# Vision model LoRA # Vision model LoRA
logger.info(f"Vision model LoRA configuration:") logger.info("Vision model LoRA configuration:")
logger.info(f" - Finetune vision layers: {finetune_vision_layers}") logger.info(f" - Finetune vision layers: {finetune_vision_layers}")
logger.info(f" - Finetune language layers: {finetune_language_layers}") logger.info(f" - Finetune language layers: {finetune_language_layers}")
logger.info( logger.info(
@ -1085,7 +1082,7 @@ class UnslothTrainer:
) )
else: else:
# Text model LoRA # Text model LoRA
logger.info(f"Text model LoRA configuration:") logger.info("Text model LoRA configuration:")
logger.info(f" - Target modules: {target_modules}\n") logger.info(f" - Target modules: {target_modules}\n")
self.model = FastLanguageModel.get_peft_model( self.model = FastLanguageModel.get_peft_model(
@ -1114,7 +1111,6 @@ class UnslothTrainer:
except Exception as e: except Exception as e:
import traceback import traceback
import sys
error_details = ( error_details = (
f"{type(e).__name__}: {str(e)}" f"{type(e).__name__}: {str(e)}"
@ -1140,7 +1136,6 @@ class UnslothTrainer:
and strip non-TransformersKwargs params that Unsloth/PEFT inject. and strip non-TransformersKwargs params that Unsloth/PEFT inject.
""" """
import types import types
import torch
import torch.nn as nn import torch.nn as nn
from transformers.models.csm.modeling_csm import ( from transformers.models.csm.modeling_csm import (
CsmForConditionalGeneration, CsmForConditionalGeneration,
@ -1707,7 +1702,6 @@ class UnslothTrainer:
""" """
import sys import sys
import torch import torch
import numpy as np
import torchaudio.transforms as T import torchaudio.transforms as T
import subprocess import subprocess
@ -2550,7 +2544,7 @@ class UnslothTrainer:
custom_format_mapping = custom_format_mapping, custom_format_mapping = custom_format_mapping,
) )
eval_dataset = eval_info["dataset"] eval_dataset = eval_info["dataset"]
logger.info(f"Eval dataset formatted successfully\n") logger.info("Eval dataset formatted successfully\n")
elif eval_enabled and not has_separate_eval_source: elif eval_enabled and not has_separate_eval_source:
# No separate eval source — split the already-formatted dataset # No separate eval source — split the already-formatted dataset
formatted_dataset = dataset_info["dataset"] formatted_dataset = dataset_info["dataset"]
@ -3049,7 +3043,7 @@ class UnslothTrainer:
else: else:
# Default to warmup_steps if neither provided # Default to warmup_steps if neither provided
config_args["warmup_steps"] = 5 config_args["warmup_steps"] = 5
logger.info(f"Using default warmup_steps: 5\n") logger.info("Using default warmup_steps: 5\n")
# Add save_steps if specified # Add save_steps if specified
save_steps_val = training_args.get("save_steps", 0) save_steps_val = training_args.get("save_steps", 0)
@ -3191,7 +3185,7 @@ class UnslothTrainer:
self.tokenizer, "tokenizer" self.tokenizer, "tokenizer"
): ):
logger.info( logger.info(
f" ⚠️ Unwrapping Processor → raw tokenizer for text-only SFTTrainer" " ⚠️ Unwrapping Processor → raw tokenizer for text-only SFTTrainer"
) )
sft_tokenizer = self.tokenizer.tokenizer sft_tokenizer = self.tokenizer.tokenizer
@ -3499,7 +3493,6 @@ def _ensure_deepseek_ocr_installed():
sys.path.insert(0, parent_dir) sys.path.insert(0, parent_dir)
# Try importing again # Try importing again
from deepseek_ocr.modeling_deepseekocr import format_messages
logger.info("DeepSeek OCR module installed successfully") logger.info("DeepSeek OCR module installed successfully")
logger.info("DeepSeek OCR module installed successfully!\n") logger.info("DeepSeek OCR module installed successfully!\n")

View file

@ -19,12 +19,9 @@ import math
import multiprocessing as mp import multiprocessing as mp
import queue import queue
import threading import threading
import time
import structlog
from datetime import datetime, timezone from datetime import datetime, timezone
from loggers import get_logger from loggers import get_logger
from dataclasses import dataclass, field from dataclasses import dataclass
from pathlib import Path
from typing import Optional, Tuple, Any from typing import Optional, Tuple, Any
import matplotlib.pyplot as plt import matplotlib.pyplot as plt

View file

@ -13,7 +13,6 @@ Pattern follows core/data_recipe/jobs/worker.py.
from __future__ import annotations from __future__ import annotations
import structlog
from loggers import get_logger from loggers import get_logger
import os import os
import platform import platform
@ -460,7 +459,6 @@ def run_training_process(
ensure_dir, ensure_dir,
resolve_output_dir, resolve_output_dir,
resolve_tensorboard_dir, resolve_tensorboard_dir,
datasets_root,
) )
import transformers import transformers

View file

@ -37,7 +37,7 @@ if os.getenv("ENVIRONMENT_TYPE", "production") == "production":
from fastapi import Depends, FastAPI, Request from fastapi import Depends, FastAPI, Request
from fastapi.middleware.cors import CORSMiddleware from fastapi.middleware.cors import CORSMiddleware
from fastapi.staticfiles import StaticFiles from fastapi.staticfiles import StaticFiles
from fastapi.responses import FileResponse, HTMLResponse, Response from fastapi.responses import FileResponse, Response
from pathlib import Path from pathlib import Path
from datetime import datetime from datetime import datetime
@ -219,7 +219,7 @@ async def get_system_info():
import platform import platform
import subprocess import subprocess
import psutil import psutil
from utils.hardware import get_device, get_gpu_memory_info, DeviceType from utils.hardware import get_gpu_memory_info
# GPU Info — query nvidia-smi for physical GPUs, filtered by # GPU Info — query nvidia-smi for physical GPUs, filtered by
# CUDA_VISIBLE_DEVICES when set (the frontend uses this for GGUF # CUDA_VISIBLE_DEVICES when set (the frontend uses this for GGUF

View file

@ -6,7 +6,7 @@ Pydantic schemas for Export API.
""" """
from pydantic import BaseModel, Field from pydantic import BaseModel, Field
from typing import List, Optional, Literal, Dict, Any from typing import Optional, Literal, Dict, Any
class LoadCheckpointRequest(BaseModel): class LoadCheckpointRequest(BaseModel):

View file

@ -18,7 +18,6 @@ from auth import storage, hashing
from auth.authentication import ( from auth.authentication import (
create_access_token, create_access_token,
create_refresh_token, create_refresh_token,
get_current_subject,
get_current_subject_allow_password_change, get_current_subject_allow_password_change,
refresh_access_token, refresh_access_token,
) )

View file

@ -12,7 +12,6 @@ import sys
from pathlib import Path from pathlib import Path
from uuid import uuid4 from uuid import uuid4
from fastapi import APIRouter, Depends, HTTPException, UploadFile from fastapi import APIRouter, Depends, HTTPException, UploadFile
import structlog
from loggers import get_logger from loggers import get_logger
# Add backend directory to path # Add backend directory to path

View file

@ -7,8 +7,7 @@ Export API routes: checkpoint discovery and model export operations.
import sys import sys
from pathlib import Path from pathlib import Path
from fastapi import APIRouter, Depends, HTTPException, Query from fastapi import APIRouter, Depends, HTTPException
import structlog
from loggers import get_logger from loggers import get_logger
# Add backend directory to path # Add backend directory to path

View file

@ -13,7 +13,6 @@ from fastapi import APIRouter, Depends, HTTPException, Request
from fastapi.responses import StreamingResponse, JSONResponse from fastapi.responses import StreamingResponse, JSONResponse
from typing import Optional from typing import Optional
import json import json
import structlog
from loggers import get_logger from loggers import get_logger
import asyncio import asyncio
import threading import threading
@ -82,8 +81,6 @@ from models.inference import (
) )
from auth.authentication import get_current_subject from auth.authentication import get_current_subject
import io
import wave
import base64 import base64
import numpy as np import numpy as np
@ -328,14 +325,14 @@ async def load_model(
training_method = adapter_cfg.get("unsloth_training_method") training_method = adapter_cfg.get("unsloth_training_method")
if training_method == "lora" and load_in_4bit: if training_method == "lora" and load_in_4bit:
logger.info( logger.info(
f"adapter_config.json says unsloth_training_method='lora'" "adapter_config.json says unsloth_training_method='lora'"
f"setting load_in_4bit=False to match 16-bit training" "setting load_in_4bit=False to match 16-bit training"
) )
load_in_4bit = False load_in_4bit = False
elif training_method == "qlora" and not load_in_4bit: elif training_method == "qlora" and not load_in_4bit:
logger.info( logger.info(
f"adapter_config.json says unsloth_training_method='qlora'" "adapter_config.json says unsloth_training_method='qlora'"
f"setting load_in_4bit=True to match QLoRA training" "setting load_in_4bit=True to match QLoRA training"
) )
load_in_4bit = True load_in_4bit = True
elif training_method: elif training_method:
@ -752,7 +749,6 @@ async def generate_audio(
def _decode_audio_base64(b64: str) -> np.ndarray: def _decode_audio_base64(b64: str) -> np.ndarray:
"""Decode base64 audio (any format) → float32 numpy array at 16kHz.""" """Decode base64 audio (any format) → float32 numpy array at 16kHz."""
import torch
import torchaudio import torchaudio
import tempfile import tempfile
import os import os

View file

@ -10,7 +10,6 @@ import sys
from pathlib import Path from pathlib import Path
from fastapi import APIRouter, Body, Depends, HTTPException, Query from fastapi import APIRouter, Body, Depends, HTTPException, Query
from typing import List, Optional from typing import List, Optional
import structlog
from loggers import get_logger from loggers import get_logger
import re as _re import re as _re
@ -775,7 +774,6 @@ async def get_gguf_variants(
# case-insensitive match. # case-insensitive match.
cached_bytes_by_quant: dict[str, int] = {} cached_bytes_by_quant: dict[str, int] = {}
try: try:
import re as _re
from huggingface_hub import constants as hf_constants from huggingface_hub import constants as hf_constants
# Sanitize repo_id: must be "owner/name" with safe chars only # Sanitize repo_id: must be "owner/name" with safe chars only

View file

@ -9,8 +9,7 @@ import sys
from pathlib import Path from pathlib import Path
from fastapi import APIRouter, Depends, HTTPException, Request from fastapi import APIRouter, Depends, HTTPException, Request
from fastapi.responses import StreamingResponse from fastapi.responses import StreamingResponse
from typing import Dict, Optional, Any from typing import Optional, Any
import structlog
from loggers import get_logger from loggers import get_logger
import asyncio import asyncio
from datetime import datetime from datetime import datetime

View file

@ -4,7 +4,6 @@
"""Tests for transformers version detection with local checkpoint fallbacks.""" """Tests for transformers version detection with local checkpoint fallbacks."""
import json import json
import pytest
from pathlib import Path from pathlib import Path
from unittest.mock import patch from unittest.mock import patch

View file

@ -17,7 +17,6 @@ Run with:
python -m pytest tests/test_utils.py -v python -m pytest tests/test_utils.py -v
""" """
import platform
from unittest.mock import patch, MagicMock from unittest.mock import patch, MagicMock
import pytest import pytest
@ -295,8 +294,6 @@ class TestLogGpuMemory:
"utilization_pct": 12.5, "utilization_pct": 12.5,
"free_gb": 14.0, "free_gb": 14.0,
} }
import structlog
from loggers import get_logger
with ( with (
patch( patch(
@ -312,8 +309,6 @@ class TestLogGpuMemory:
def test_logs_cpu_fallback_when_no_gpu(self, caplog): def test_logs_cpu_fallback_when_no_gpu(self, caplog):
fake_info = {"available": False, "backend": "cpu"} fake_info = {"available": False, "backend": "cpu"}
import structlog
from loggers import get_logger
with ( with (
patch( patch(

View file

@ -12,7 +12,6 @@ by spawned subprocesses.
""" """
import shutil import shutil
import structlog
from loggers import get_logger from loggers import get_logger
from pathlib import Path from pathlib import Path
from typing import List, Optional from typing import List, Optional

View file

@ -8,14 +8,13 @@ This module contains functions for applying chat templates to datasets
and generating dataset info summaries. and generating dataset info summaries.
""" """
from .format_detection import detect_dataset_format, detect_multimodal_dataset, detect_custom_format_heuristic from .format_detection import detect_custom_format_heuristic
from .model_mappings import MODEL_TO_TEMPLATE_MAPPER from .model_mappings import MODEL_TO_TEMPLATE_MAPPER
from loggers import get_logger from loggers import get_logger
logger = get_logger(__name__) logger = get_logger(__name__)
DEFAULT_ALPACA_TEMPLATE = """Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. DEFAULT_ALPACA_TEMPLATE = """Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction: ### Instruction:
@ -63,18 +62,21 @@ def get_tokenizer_chat_template(tokenizer, model_name):
) )
except Exception as e: except Exception as e:
logger.info(f"⚠️ Failed to apply Unsloth template '{matched_template}': {e}") logger.info(f"⚠️ Failed to apply Unsloth template '{matched_template}': {e}")
logger.info(f" Falling back to tokenizer's default chat template") logger.info(" Falling back to tokenizer's default chat template")
else: else:
# Check if tokenizer actually has a chat_template set # Check if tokenizer actually has a chat_template set
has_chat_template = ( has_chat_template = (
hasattr(tokenizer, 'chat_template') hasattr(tokenizer, "chat_template") and tokenizer.chat_template is not None
and tokenizer.chat_template is not None
) )
if has_chat_template: if has_chat_template:
logger.info(f"📝 Using tokenizer's own chat template (no Unsloth template match)") logger.info(
"📝 Using tokenizer's own chat template (no Unsloth template match)"
)
else: else:
# Base model with no chat template — apply default ChatML # Base model with no chat template — apply default ChatML
logger.info(f"📝 No chat template found — applying default ChatML template (base model)") logger.info(
"📝 No chat template found — applying default ChatML template (base model)"
)
try: try:
tokenizer = get_chat_template( tokenizer = get_chat_template(
tokenizer, tokenizer,
@ -82,7 +84,7 @@ def get_tokenizer_chat_template(tokenizer, model_name):
) )
except Exception as e: except Exception as e:
logger.info(f"⚠️ Failed to apply default ChatML template: {e}") logger.info(f"⚠️ Failed to apply default ChatML template: {e}")
logger.info(f" Falling back to tokenizer as-is") logger.info(" Falling back to tokenizer as-is")
return tokenizer return tokenizer
@ -99,7 +101,7 @@ def get_dataset_info_summary(dataset_info):
"sharegpt": "ShareGPT format (needs standardization)", "sharegpt": "ShareGPT format (needs standardization)",
"chatml_messages": "ChatML format (messages column) - OpenAI compatible", "chatml_messages": "ChatML format (messages column) - OpenAI compatible",
"chatml_conversations": "ChatML format (conversations column) - HuggingFace standard", "chatml_conversations": "ChatML format (conversations column) - HuggingFace standard",
"unknown": "Unknown format" "unknown": "Unknown format",
} }
return { return {
@ -110,7 +112,8 @@ def get_dataset_info_summary(dataset_info):
"chat_column": dataset_info["chat_column"], "chat_column": dataset_info["chat_column"],
"is_standardized": dataset_info["is_standardized"], "is_standardized": dataset_info["is_standardized"],
"warnings": dataset_info.get("warnings", []), "warnings": dataset_info.get("warnings", []),
"ready_for_training": dataset_info["is_standardized"] and final_format != "unknown" "ready_for_training": dataset_info["is_standardized"]
and final_format != "unknown",
} }
@ -154,7 +157,7 @@ def apply_chat_template_to_dataset(
# Get EOS token if needed # Get EOS token if needed
eos_token = "" eos_token = ""
if add_eos_token: if add_eos_token:
if hasattr(tokenizer, 'eos_token') and tokenizer.eos_token: if hasattr(tokenizer, "eos_token") and tokenizer.eos_token:
eos_token = tokenizer.eos_token eos_token = tokenizer.eos_token
else: else:
warnings.append("add_eos_token=True but tokenizer has no eos_token") warnings.append("add_eos_token=True but tokenizer has no eos_token")
@ -167,14 +170,16 @@ def apply_chat_template_to_dataset(
if not dataset_info.get("auto_detection_attempted", False): if not dataset_info.get("auto_detection_attempted", False):
custom_format_mapping = detect_custom_format_heuristic(dataset) custom_format_mapping = detect_custom_format_heuristic(dataset)
if custom_format_mapping: if custom_format_mapping:
warnings.append(f"Auto-detected column mapping: {custom_format_mapping}") warnings.append(
f"Auto-detected column mapping: {custom_format_mapping}"
)
else: else:
errors.append("Could not auto-detect format mapping") errors.append("Could not auto-detect format mapping")
return { return {
"dataset": dataset, "dataset": dataset,
"success": False, "success": False,
"warnings": warnings, "warnings": warnings,
"errors": errors "errors": errors,
} }
else: else:
# Already failed once in format_dataset, don't retry # Already failed once in format_dataset, don't retry
@ -186,7 +191,7 @@ def apply_chat_template_to_dataset(
"dataset": dataset, "dataset": dataset,
"success": False, "success": False,
"warnings": warnings, "warnings": warnings,
"errors": errors "errors": errors,
} }
if custom_format_mapping: if custom_format_mapping:
@ -209,7 +214,7 @@ def apply_chat_template_to_dataset(
for i in range(num_examples): for i in range(num_examples):
convo = [] convo = []
role_order = ['system', 'user', 'assistant'] role_order = ["system", "user", "assistant"]
for target_role in role_order: for target_role in role_order:
for col_name, role in custom_format_mapping.items(): for col_name, role in custom_format_mapping.items():
@ -218,11 +223,18 @@ def apply_chat_template_to_dataset(
if is_user_provided: if is_user_provided:
# User explicitly mapped - include even if empty # User explicitly mapped - include even if empty
convo.append({"role": role, "content": str(content) if content else ""}) convo.append(
{
"role": role,
"content": str(content) if content else "",
}
)
else: else:
# Auto-detected - skip empty # Auto-detected - skip empty
if content and str(content).strip(): if content and str(content).strip():
convo.append({"role": role, "content": str(content)}) convo.append(
{"role": role, "content": str(content)}
)
conversations.append(convo) conversations.append(convo)
@ -232,31 +244,35 @@ def apply_chat_template_to_dataset(
return result return result
try: try:
dataset = dataset.map(_apply_custom_mapping, batched = True, batch_size = batch_size) dataset = dataset.map(
_apply_custom_mapping, batched = True, batch_size = batch_size
)
# Update to use conversations format # Update to use conversations format
final_format = "chatml_conversations" final_format = "chatml_conversations"
chat_column = "conversations" chat_column = "conversations"
is_standardized = True is_standardized = True
warnings.append("Successfully converted to ChatML format via custom mapping") warnings.append(
"Successfully converted to ChatML format via custom mapping"
)
except Exception as e: except Exception as e:
errors.append(f"Custom format mapping failed: {e}") errors.append(f"Custom format mapping failed: {e}")
return { return {
"dataset": dataset, "dataset": dataset,
"success": False, "success": False,
"warnings": warnings, "warnings": warnings,
"errors": errors "errors": errors,
} }
# ALPACA FORMAT # ALPACA FORMAT
if final_format == "alpaca": if final_format == "alpaca":
# Set alpaca chat template on tokenizer for saving (if not already set) # Set alpaca chat template on tokenizer for saving (if not already set)
# This ensures the template is saved with the model for inference # This ensures the template is saved with the model for inference
if not (hasattr(tokenizer, 'chat_template') and tokenizer.chat_template): if not (hasattr(tokenizer, "chat_template") and tokenizer.chat_template):
try: try:
from unsloth.chat_templates import get_chat_template from unsloth.chat_templates import get_chat_template
tokenizer = get_chat_template(tokenizer, chat_template = "alpaca") tokenizer = get_chat_template(tokenizer, chat_template = "alpaca")
logger.info(f"📝 Set alpaca chat template on tokenizer for model saving") logger.info("📝 Set alpaca chat template on tokenizer for model saving")
except Exception as e: except Exception as e:
logger.info(f"⚠️ Could not set alpaca template on tokenizer: {e}") logger.info(f"⚠️ Could not set alpaca template on tokenizer: {e}")
@ -266,12 +282,16 @@ def apply_chat_template_to_dataset(
for i in range(len(examples["instruction"])): for i in range(len(examples["instruction"])):
fields = { fields = {
"instruction": examples["instruction"][i], "instruction": examples["instruction"][i],
"input": examples.get("input", [""] * len(examples["instruction"]))[i], "input": examples.get("input", [""] * len(examples["instruction"]))[
"output": examples["output"][i] i
],
"output": examples["output"][i],
} }
try: try:
text = DEFAULT_ALPACA_TEMPLATE.format(fields["instruction"], fields["input"], fields["output"]) text = DEFAULT_ALPACA_TEMPLATE.format(
fields["instruction"], fields["input"], fields["output"]
)
text += eos_token text += eos_token
texts.append(text) texts.append(text)
except KeyError as e: except KeyError as e:
@ -284,24 +304,26 @@ def apply_chat_template_to_dataset(
try: try:
dataset_map_kwargs = { dataset_map_kwargs = {
'batched': True, "batched": True,
'batch_size': batch_size, "batch_size": batch_size,
} }
try: try:
from torch.utils.data import IterableDataset from torch.utils.data import IterableDataset
_is_torch_iterable = isinstance(dataset, IterableDataset) _is_torch_iterable = isinstance(dataset, IterableDataset)
except ImportError: except ImportError:
_is_torch_iterable = False _is_torch_iterable = False
if not _is_torch_iterable: if not _is_torch_iterable:
from utils.hardware import dataset_map_num_proc from utils.hardware import dataset_map_num_proc
if num_proc is None or type(num_proc) is not int: if num_proc is None or type(num_proc) is not int:
num_proc = dataset_map_num_proc() num_proc = dataset_map_num_proc()
else: else:
num_proc = dataset_map_num_proc(num_proc) num_proc = dataset_map_num_proc(num_proc)
dataset_map_kwargs['num_proc'] = num_proc dataset_map_kwargs["num_proc"] = num_proc
dataset_map_kwargs['desc'] = "Applying template to Alpaca format" dataset_map_kwargs["desc"] = "Applying template to Alpaca format"
formatted_dataset = dataset.map(formatted_fn, **dataset_map_kwargs) formatted_dataset = dataset.map(formatted_fn, **dataset_map_kwargs)
@ -309,7 +331,7 @@ def apply_chat_template_to_dataset(
"dataset": formatted_dataset, "dataset": formatted_dataset,
"success": True, "success": True,
"warnings": warnings, "warnings": warnings,
"errors": errors "errors": errors,
} }
except Exception as e: except Exception as e:
errors.append(f"Failed to format Alpaca dataset: {e}") errors.append(f"Failed to format Alpaca dataset: {e}")
@ -317,12 +339,11 @@ def apply_chat_template_to_dataset(
"dataset": dataset, "dataset": dataset,
"success": False, "success": False,
"warnings": warnings, "warnings": warnings,
"errors": errors "errors": errors,
} }
# CHATML FORMATS # CHATML FORMATS
elif final_format in ["chatml_messages", "chatml_conversations"]: elif final_format in ["chatml_messages", "chatml_conversations"]:
if not is_standardized: if not is_standardized:
warnings.append("Dataset may not be fully standardized") warnings.append("Dataset may not be fully standardized")
@ -337,13 +358,11 @@ def apply_chat_template_to_dataset(
for convo in convos: for convo in convos:
try: try:
text = tokenizer.apply_chat_template( text = tokenizer.apply_chat_template(
convo, convo, tokenize = False, add_generation_prompt = False
tokenize = False,
add_generation_prompt = False
) )
if remove_bos_prefix: if remove_bos_prefix:
text = text.removeprefix('<bos>') text = text.removeprefix("<bos>")
text += eos_token text += eos_token
texts.append(text) texts.append(text)
@ -357,23 +376,25 @@ def apply_chat_template_to_dataset(
try: try:
try: try:
from torch.utils.data import IterableDataset from torch.utils.data import IterableDataset
_is_torch_iterable = isinstance(dataset, IterableDataset) _is_torch_iterable = isinstance(dataset, IterableDataset)
except ImportError: except ImportError:
_is_torch_iterable = False _is_torch_iterable = False
dataset_map_kwargs = { dataset_map_kwargs = {
'batched': True, "batched": True,
'batch_size': batch_size, "batch_size": batch_size,
} }
if not _is_torch_iterable: if not _is_torch_iterable:
from utils.hardware import dataset_map_num_proc from utils.hardware import dataset_map_num_proc
if num_proc is None or type(num_proc) is not int: if num_proc is None or type(num_proc) is not int:
num_proc = dataset_map_num_proc() num_proc = dataset_map_num_proc()
else: else:
num_proc = dataset_map_num_proc(num_proc) num_proc = dataset_map_num_proc(num_proc)
dataset_map_kwargs['num_proc'] = num_proc dataset_map_kwargs["num_proc"] = num_proc
dataset_map_kwargs['desc'] = f"Applying chat template to {final_format}" dataset_map_kwargs["desc"] = f"Applying chat template to {final_format}"
# Monitor tqdm progress from dataset.map() and relay to callback # Monitor tqdm progress from dataset.map() and relay to callback
_tqdm_monitor_stop = None _tqdm_monitor_stop = None
@ -411,7 +432,7 @@ def apply_chat_template_to_dataset(
"dataset": formatted_dataset, "dataset": formatted_dataset,
"success": True, "success": True,
"warnings": warnings, "warnings": warnings,
"errors": errors "errors": errors,
} }
except Exception as e: except Exception as e:
errors.append(f"Failed to format ChatML dataset: {e}") errors.append(f"Failed to format ChatML dataset: {e}")
@ -419,7 +440,7 @@ def apply_chat_template_to_dataset(
"dataset": dataset, "dataset": dataset,
"success": False, "success": False,
"warnings": warnings, "warnings": warnings,
"errors": errors "errors": errors,
} }
# UNKNOWN FORMAT # UNKNOWN FORMAT
@ -432,5 +453,5 @@ def apply_chat_template_to_dataset(
"dataset": dataset, "dataset": dataset,
"success": False, "success": False,
"warnings": warnings, "warnings": warnings,
"errors": errors "errors": errors,
} }

View file

@ -9,7 +9,7 @@ particularly for VLM/OCR processing.
""" """
from dataclasses import dataclass from dataclasses import dataclass
from typing import Any, List, Optional, Union from typing import Any, List
from loggers import get_logger from loggers import get_logger
logger = get_logger(__name__) logger = get_logger(__name__)
@ -75,7 +75,6 @@ class DeepSeekOCRDataCollator:
Returns: Returns:
dict with input_ids, attention_mask, labels, pixel_values, etc. dict with input_ids, attention_mask, labels, pixel_values, etc.
""" """
from PIL import Image
# Extract messages and images # Extract messages and images
all_messages = [] all_messages = []

View file

@ -38,12 +38,7 @@ from .format_conversion import (
from .chat_templates import ( from .chat_templates import (
apply_chat_template_to_dataset, apply_chat_template_to_dataset,
get_dataset_info_summary, get_dataset_info_summary,
get_tokenizer_chat_template,
DEFAULT_ALPACA_TEMPLATE,
) )
from .vlm_processing import generate_smart_vlm_instruction
from .data_collators import DeepSeekOCRDataCollator, VLMDataCollator
from .model_mappings import TEMPLATE_TO_MODEL_MAPPER
from loggers import get_logger from loggers import get_logger
logger = get_logger(__name__) logger = get_logger(__name__)
@ -701,7 +696,7 @@ def format_dataset(
} }
else: else:
warnings.append(f"Cannot convert unknown format to Alpaca") warnings.append("Cannot convert unknown format to Alpaca")
return { return {
"dataset": dataset, "dataset": dataset,
"detected_format": "unknown", "detected_format": "unknown",
@ -766,7 +761,7 @@ def format_dataset(
} }
else: else:
warnings.append(f"Unknown format, attempting standardization") warnings.append("Unknown format, attempting standardization")
if detected["chat_column"]: if detected["chat_column"]:
try: try:
standardized = standardize_chat_format( standardized = standardize_chat_format(
@ -914,7 +909,7 @@ def format_and_template_dataset(
f"falling back to auto-detection" f"falling back to auto-detection"
) )
logger.info( logger.info(
f"⚠️ User VLM mapping failed, falling back to auto-detection..." "⚠️ User VLM mapping failed, falling back to auto-detection..."
) )
custom_format_mapping = None # clear so auto-detection runs below custom_format_mapping = None # clear so auto-detection runs below
else: else:

View file

@ -41,7 +41,6 @@ def standardize_chat_format(
""" """
import collections import collections
import itertools import itertools
from datasets import IterableDataset
# Check if vision tokenizer is used # Check if vision tokenizer is used
is_vlm = False is_vlm = False

View file

@ -229,7 +229,7 @@ def detect_custom_format_heuristic(dataset):
if prefix in ["generation", "pass", "inference"]: if prefix in ["generation", "pass", "inference"]:
return True return True
if len(col_lower) <= 2 and not col_lower in ["qa", "q", "a"]: if len(col_lower) <= 2 and col_lower not in ["qa", "q", "a"]:
return True return True
return False return False

View file

@ -19,7 +19,6 @@ import os
import re import re
import textwrap import textwrap
import time import time
from itertools import islice
from typing import Any, Optional from typing import Any, Optional
from loggers import get_logger from loggers import get_logger
@ -105,7 +104,7 @@ def precache_helper_gguf():
finally: finally:
try: try:
enable_progress_bars() enable_progress_bars()
except Exception as e: except Exception:
pass pass

View file

@ -17,7 +17,6 @@ Usage:
""" """
import platform import platform
import structlog
from loggers import get_logger from loggers import get_logger
from enum import Enum from enum import Enum
from typing import Optional, Dict, Any from typing import Optional, Dict, Any
@ -183,7 +182,6 @@ def get_gpu_memory_info() -> Dict[str, Any]:
# ---- MLX path (Apple Silicon) ---- # ---- MLX path (Apple Silicon) ----
if device == DeviceType.MLX: if device == DeviceType.MLX:
try: try:
import mlx.core as mx
import psutil import psutil
# MLX uses unified memory — report system memory as the pool # MLX uses unified memory — report system memory as the pool

View file

@ -13,7 +13,6 @@ from pathlib import Path
from typing import Dict, Any, Optional from typing import Dict, Any, Optional
import json import json
import yaml import yaml
import structlog
from loggers import get_logger from loggers import get_logger
from utils.models.model_config import load_model_defaults from utils.models.model_config import load_model_defaults

View file

@ -6,7 +6,6 @@ Checkpoint scanning utilities for discovering training runs and their checkpoint
""" """
import json import json
import structlog
from loggers import get_logger from loggers import get_logger
from pathlib import Path from pathlib import Path
from typing import List, Optional, Tuple from typing import List, Optional, Tuple

View file

@ -18,7 +18,6 @@ from utils.paths import (
resolve_export_dir, resolve_export_dir,
) )
from utils.utils import without_hf_auth from utils.utils import without_hf_auth
import structlog
from loggers import get_logger from loggers import get_logger
import os import os
import subprocess import subprocess

View file

@ -8,7 +8,6 @@ Path utilities for model and dataset handling
import os import os
from pathlib import Path from pathlib import Path
from typing import Optional from typing import Optional
import structlog
from loggers import get_logger from loggers import get_logger
logger = get_logger(__name__) logger = get_logger(__name__)

View file

@ -23,7 +23,6 @@ Strategy:
import importlib import importlib
import json import json
import structlog
from loggers import get_logger from loggers import get_logger
import os import os
import shutil import shutil

View file

@ -6,7 +6,6 @@ Shared backend utilities
""" """
import os import os
import structlog
from loggers import get_logger from loggers import get_logger
from contextlib import contextmanager from contextlib import contextmanager
from pathlib import Path from pathlib import Path

View file

@ -353,7 +353,7 @@ def pip_install(
) )
if result.returncode == 0: if result.returncode == 0:
return return
print(_red(f" uv failed, falling back to pip...")) print(_red(" uv failed, falling back to pip..."))
if result.stdout: if result.stdout:
print(result.stdout.decode(errors = "replace")) print(result.stdout.decode(errors = "replace"))

View file

@ -5,7 +5,6 @@ from __future__ import annotations
import re import re
from pathlib import Path from pathlib import Path
import pytest
REPO_ROOT = Path(__file__).resolve().parents[2] REPO_ROOT = Path(__file__).resolve().parents[2]
INSTALL_SH = REPO_ROOT / "install.sh" INSTALL_SH = REPO_ROOT / "install.sh"

View file

@ -21,7 +21,6 @@ from __future__ import annotations
import os import os
import shutil import shutil
import signal
import subprocess import subprocess
import sys import sys
import textwrap import textwrap

View file

@ -2,13 +2,11 @@
from __future__ import annotations from __future__ import annotations
import importlib
import os import os
import sys import sys
from pathlib import Path from pathlib import Path
from unittest import mock from unittest import mock
import pytest
# Add the studio directory so we can import install_python_stack # Add the studio directory so we can import install_python_stack
STUDIO_DIR = Path(__file__).resolve().parents[2] / "studio" STUDIO_DIR = Path(__file__).resolve().parents[2] / "studio"

View file

@ -10,7 +10,6 @@ Covers:
from __future__ import annotations from __future__ import annotations
import importlib
import os import os
import re import re
import subprocess import subprocess

View file

@ -15,7 +15,6 @@ import ast
import os import os
import shutil import shutil
import subprocess import subprocess
import sys
import tempfile import tempfile
import textwrap import textwrap
from pathlib import Path from pathlib import Path

View file

@ -1,6 +1,6 @@
from unsloth import FastLanguageModel from unsloth import FastLanguageModel
from unsloth.chat_templates import get_chat_template from unsloth.chat_templates import get_chat_template
from trl import SFTTrainer, SFTConfig from trl import SFTTrainer
from transformers import DataCollatorForSeq2Seq, TrainingArguments from transformers import DataCollatorForSeq2Seq, TrainingArguments
from datasets import load_dataset from datasets import load_dataset
import torch import torch

View file

@ -11,7 +11,6 @@ import sys
from pathlib import Path from pathlib import Path
import multiprocessing as mp import multiprocessing as mp
import gc import gc
from multiprocessing import Queue
REPO_ROOT = Path(__file__).parents[3] REPO_ROOT = Path(__file__).parents[3]
sys.path.insert(0, str(REPO_ROOT)) sys.path.insert(0, str(REPO_ROOT))

View file

@ -1,6 +1,4 @@
from unsloth import FastLanguageModel from unsloth import FastLanguageModel
from transformers import AutoModelForCausalLM
from peft import PeftModel
from pathlib import Path from pathlib import Path
import sys import sys
import warnings import warnings

View file

@ -1,6 +1,5 @@
from unsloth import FastLanguageModel, FastModel from unsloth import FastModel
from transformers import AutoModelForCausalLM, WhisperForConditionalGeneration from transformers import WhisperForConditionalGeneration
from peft import PeftModel
from pathlib import Path from pathlib import Path
import sys import sys
import warnings import warnings

View file

@ -28,7 +28,7 @@ train_dataset = dataset.select(range(2000))
# To select the next 200 examples for evaluation # To select the next 200 examples for evaluation
eval_dataset = dataset.select(range(2000, 2200)) eval_dataset = dataset.select(range(2000, 2200))
print(f"✅ Dataset loaded successfully!") print("✅ Dataset loaded successfully!")
print(f" 📈 Training samples: {len(train_dataset)}") print(f" 📈 Training samples: {len(train_dataset)}")
print(f" 📊 Evaluation samples: {len(eval_dataset)}") print(f" 📊 Evaluation samples: {len(eval_dataset)}")
@ -110,10 +110,10 @@ try:
loftq_config = None, # And LoftQ loftq_config = None, # And LoftQ
) )
print("✅ LoRA configuration applied successfully!") print("✅ LoRA configuration applied successfully!")
print(f" 🎯 LoRA rank (r): 16") print(" 🎯 LoRA rank (r): 16")
print(f" 📊 LoRA alpha: 32") print(" 📊 LoRA alpha: 32")
print(f" 🔍 Vision layers: Enabled") print(" 🔍 Vision layers: Enabled")
print(f" 💬 Language layers: Enabled") print(" 💬 Language layers: Enabled")
except Exception as e: except Exception as e:
print(f"❌ Failed to apply LoRA configuration: {e}") print(f"❌ Failed to apply LoRA configuration: {e}")
raise raise
@ -165,10 +165,10 @@ try:
), ),
) )
print("✅ Trainer setup completed!") print("✅ Trainer setup completed!")
print(f" 📦 Batch size: 2") print(" 📦 Batch size: 2")
print(f" 🔄 Gradient accumulation steps: 4") print(" 🔄 Gradient accumulation steps: 4")
print(f" 📈 Max training steps: 10") print(" 📈 Max training steps: 10")
print(f" 🎯 Learning rate: 2e-4") print(" 🎯 Learning rate: 2e-4")
print(f" 💾 Precision: {'BF16' if is_bf16_supported() else 'FP16'}") print(f" 💾 Precision: {'BF16' if is_bf16_supported() else 'FP16'}")
except Exception as e: except Exception as e:
print(f"❌ Failed to setup trainer: {e}") print(f"❌ Failed to setup trainer: {e}")

View file

@ -29,7 +29,7 @@ train_dataset = dataset.select(range(2000))
# To select the next 200 examples for evaluation # To select the next 200 examples for evaluation
eval_dataset = dataset.select(range(2000, 2200)) eval_dataset = dataset.select(range(2000, 2200))
print(f"✅ Dataset loaded successfully!") print("✅ Dataset loaded successfully!")
print(f" 📈 Training samples: {len(train_dataset)}") print(f" 📈 Training samples: {len(train_dataset)}")
print(f" 📊 Evaluation samples: {len(eval_dataset)}") print(f" 📊 Evaluation samples: {len(eval_dataset)}")
@ -111,10 +111,10 @@ try:
loftq_config = None, # And LoftQ loftq_config = None, # And LoftQ
) )
print("✅ LoRA configuration applied successfully!") print("✅ LoRA configuration applied successfully!")
print(f" 🎯 LoRA rank (r): 16") print(" 🎯 LoRA rank (r): 16")
print(f" 📊 LoRA alpha: 32") print(" 📊 LoRA alpha: 32")
print(f" 🔍 Vision layers: Enabled") print(" 🔍 Vision layers: Enabled")
print(f" 💬 Language layers: Enabled") print(" 💬 Language layers: Enabled")
except Exception as e: except Exception as e:
print(f"❌ Failed to apply LoRA configuration: {e}") print(f"❌ Failed to apply LoRA configuration: {e}")
raise raise
@ -166,10 +166,10 @@ try:
), ),
) )
print("✅ Trainer setup completed!") print("✅ Trainer setup completed!")
print(f" 📦 Batch size: 2") print(" 📦 Batch size: 2")
print(f" 🔄 Gradient accumulation steps: 4") print(" 🔄 Gradient accumulation steps: 4")
print(f" 📈 Max training steps: 10") print(" 📈 Max training steps: 10")
print(f" 🎯 Learning rate: 2e-4") print(" 🎯 Learning rate: 2e-4")
print(f" 💾 Precision: {'BF16' if is_bf16_supported() else 'FP16'}") print(f" 💾 Precision: {'BF16' if is_bf16_supported() else 'FP16'}")
except Exception as e: except Exception as e:
print(f"❌ Failed to setup trainer: {e}") print(f"❌ Failed to setup trainer: {e}")

View file

@ -2,9 +2,6 @@
from unsloth import FastVisionModel from unsloth import FastVisionModel
import torch
from qwen_vl_utils import process_vision_info
import os
from datasets import load_dataset from datasets import load_dataset
from trl import SFTTrainer, SFTConfig from trl import SFTTrainer, SFTConfig
@ -20,7 +17,6 @@ from tests.utils.ocr_eval import OCRModelEvaluator
## Dataset Preparation ## Dataset Preparation
from datasets import load_dataset
dataset = load_dataset("lbourdois/OCR-liboaccn-OPUS-MIT-5M-clean", "en", split = "train") dataset = load_dataset("lbourdois/OCR-liboaccn-OPUS-MIT-5M-clean", "en", split = "train")
# To select the first 2000 examples # To select the first 2000 examples
@ -66,12 +62,6 @@ train_dataset = [format_data(sample) for sample in train_dataset]
eval_dataset = [format_data(sample) for sample in eval_dataset] eval_dataset = [format_data(sample) for sample in eval_dataset]
## Setup OCR main evaluation function and helpers ## Setup OCR main evaluation function and helpers
import os
import torch
from tqdm import tqdm
import pandas as pd
from jiwer import wer, cer
from qwen_vl_utils import process_vision_info
# #
ocr_evaluator = OCRModelEvaluator() ocr_evaluator = OCRModelEvaluator()

View file

@ -2,9 +2,6 @@
from unsloth import FastVisionModel from unsloth import FastVisionModel
import torch
from qwen_vl_utils import process_vision_info
import os
from datasets import load_dataset from datasets import load_dataset
from trl import SFTTrainer, SFTConfig from trl import SFTTrainer, SFTConfig
@ -20,7 +17,6 @@ from tests.utils.ocr_eval import OCRModelEvaluator
## Dataset Preparation ## Dataset Preparation
from datasets import load_dataset
dataset = load_dataset("lbourdois/OCR-liboaccn-OPUS-MIT-5M-clean", "en", split = "train") dataset = load_dataset("lbourdois/OCR-liboaccn-OPUS-MIT-5M-clean", "en", split = "train")
# To select the first 2000 examples # To select the first 2000 examples
@ -66,12 +62,6 @@ train_dataset = [format_data(sample) for sample in train_dataset]
eval_dataset = [format_data(sample) for sample in eval_dataset] eval_dataset = [format_data(sample) for sample in eval_dataset]
## Setup OCR main evaluation function and helpers ## Setup OCR main evaluation function and helpers
import os
import torch
from tqdm import tqdm
import pandas as pd
from jiwer import wer, cer
from qwen_vl_utils import process_vision_info
# #
ocr_evaluator = OCRModelEvaluator() ocr_evaluator = OCRModelEvaluator()

View file

@ -1,6 +1,5 @@
import importlib.util import importlib.util
import io import io
import json
import os import os
import sys import sys
import tarfile import tarfile

View file

@ -14,13 +14,11 @@ Run: pytest tests/studio/install/test_pr4562_bugfixes.py -v
""" """
import importlib.util import importlib.util
import json
import os import os
import subprocess import subprocess
import sys import sys
import textwrap import textwrap
from pathlib import Path from pathlib import Path
from unittest.mock import patch
import pytest import pytest

View file

@ -7,7 +7,6 @@ Tests basic functionality without heavy dependencies.
import sys import sys
import os import os
import tempfile import tempfile
from pathlib import Path
import importlib.util import importlib.util

View file

@ -207,7 +207,7 @@ def evaluate_model_aime(
print(f"\n{'='*70}") print(f"\n{'='*70}")
print(f"🧮 AIME EVALUATION - {model_type.upper()} MODEL") print(f"🧮 AIME EVALUATION - {model_type.upper()} MODEL")
print(f"Combined Dataset: test2024 + test2025-I + test2025-II") print("Combined Dataset: test2024 + test2025-I + test2025-II")
print(f"{'='*70}") print(f"{'='*70}")
# Load combined AIME dataset # Load combined AIME dataset
@ -244,7 +244,7 @@ def evaluate_model_aime(
seed = seed, seed = seed,
) )
print(f"\n🔧 Configuration:") print("\n🔧 Configuration:")
print(f" Temperature: {temperature}") print(f" Temperature: {temperature}")
print(f" Samples per question: {n_sampling}") print(f" Samples per question: {n_sampling}")
print(f" Max tokens: {max_tokens}") print(f" Max tokens: {max_tokens}")
@ -421,28 +421,28 @@ def evaluate_model_aime(
print(f"📊 AIME EVALUATION RESULTS - {model_type.upper()}") print(f"📊 AIME EVALUATION RESULTS - {model_type.upper()}")
print(f"{'='*70}") print(f"{'='*70}")
print(f"\n🎯 Overall Performance:") print("\n🎯 Overall Performance:")
print(f" Total problems: {total_problems:>6}") print(f" Total problems: {total_problems:>6}")
print( print(
f" Correct answers: {correct_answers:>6}/{total_problems} ({accuracy:>5.1f}%)" f" Correct answers: {correct_answers:>6}/{total_problems} ({accuracy:>5.1f}%)"
) )
print(f" Pass@{n_sampling}: {pass_at_k:>10.1f}%") print(f" Pass@{n_sampling}: {pass_at_k:>10.1f}%")
print(f"\n📈 Performance by Dataset:") print("\n📈 Performance by Dataset:")
for source, stats in source_stats.items(): for source, stats in source_stats.items():
source_acc = source_accuracies[source] source_acc = source_accuracies[source]
print( print(
f" {source:>12}: {stats['correct']:>3}/{stats['total']:>3} ({source_acc:>5.1f}%)" f" {source:>12}: {stats['correct']:>3}/{stats['total']:>3} ({source_acc:>5.1f}%)"
) )
print(f"\n🔧 Configuration:") print("\n🔧 Configuration:")
print(f" Temperature: {temperature}") print(f" Temperature: {temperature}")
print(f" Samples per problem: {n_sampling}") print(f" Samples per problem: {n_sampling}")
print(f" Max tokens: {max_tokens}") print(f" Max tokens: {max_tokens}")
print(f" Top-p: {top_p}") print(f" Top-p: {top_p}")
print(f" Seed: {seed}") print(f" Seed: {seed}")
print(f"\n📝 Token Statistics:") print("\n📝 Token Statistics:")
print(f" Avg input tokens: {results['avg_input_tokens']:>10.1f}") print(f" Avg input tokens: {results['avg_input_tokens']:>10.1f}")
print(f" Avg output tokens: {results['avg_output_tokens']:>10.1f}") print(f" Avg output tokens: {results['avg_output_tokens']:>10.1f}")
print(f" Max input tokens: {results['max_input_tokens']:>10}") print(f" Max input tokens: {results['max_input_tokens']:>10}")

View file

@ -12,9 +12,8 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import os from contextlib import nullcontext
from contextlib import contextmanager, nullcontext from typing import Callable
from typing import Callable, Optional
import bitsandbytes as bnb import bitsandbytes as bnb
import torch import torch

View file

@ -348,7 +348,7 @@ class OCRModelEvaluator:
plt.savefig("ocr_model_comparison.png") plt.savefig("ocr_model_comparison.png")
plt.show() plt.show()
print(f"\nVisualization saved to ocr_model_comparison.png") print("\nVisualization saved to ocr_model_comparison.png")
def get_comparison_results(self) -> Dict[str, Dict[str, float]]: def get_comparison_results(self) -> Dict[str, Dict[str, float]]:
"""Get the current comparison results.""" """Get the current comparison results."""

View file

@ -98,10 +98,10 @@ def require_package(package_name, executable_name = None):
for pm_name, cmd in install_commands.items(): for pm_name, cmd in install_commands.items():
print(f" {pm_name}: {cmd}") print(f" {pm_name}: {cmd}")
print(f"\nAlternatively, install with conda:") print("\nAlternatively, install with conda:")
print(f" conda install -c conda-forge {package_name}") print(f" conda install -c conda-forge {package_name}")
print(f"\nPlease install the required package and run the script again.") print("\nPlease install the required package and run the script again.")
sys.exit(1) sys.exit(1)
@ -120,9 +120,9 @@ def require_python_package(package_name, import_name = None, pip_name = None):
print(f"❌ Error: Python package '{package_name}' is not installed") print(f"❌ Error: Python package '{package_name}' is not installed")
print(f"\nPlease install {package_name} using pip:") print(f"\nPlease install {package_name} using pip:")
print(f" pip install {pip_name}") print(f" pip install {pip_name}")
print(f" # or with conda:") print(" # or with conda:")
print(f" conda install {pip_name}") print(f" conda install {pip_name}")
print(f"\nAfter installation, run this script again.") print("\nAfter installation, run this script again.")
sys.exit(1) sys.exit(1)
else: else:
print(f"✓ Python package '{package_name}' is installed") print(f"✓ Python package '{package_name}' is installed")

View file

@ -14,7 +14,6 @@
# #
# Tests for Q-GaLore integration (unsloth/optimizers/). # Tests for Q-GaLore integration (unsloth/optimizers/).
import pytest
import sys import sys
import os import os
import torch import torch

View file

@ -101,8 +101,6 @@ def run(args):
return {"text": texts} return {"text": texts}
def load_dataset_smart(args): def load_dataset_smart(args):
from transformers.utils import strtobool
if args.raw_text_file: if args.raw_text_file:
# Use raw text loader # Use raw text loader
loader = RawTextDataLoader(tokenizer, args.chunk_size, args.stride) loader = RawTextDataLoader(tokenizer, args.chunk_size, args.stride)

View file

@ -12,9 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import warnings, importlib, sys import warnings
import importlib
import sys
from packaging.version import Version from packaging.version import Version
import os, re, subprocess, inspect, functools import os
import re
import subprocess
import inspect
import functools
import numpy as np import numpy as np
# Log Unsloth is being used # Log Unsloth is being used
@ -105,7 +111,7 @@ try:
import unsloth_zoo import unsloth_zoo
except PackageNotFoundError: except PackageNotFoundError:
raise ImportError( raise ImportError(
f"Unsloth: Please install unsloth_zoo via `pip install unsloth_zoo` then retry!" "Unsloth: Please install unsloth_zoo via `pip install unsloth_zoo` then retry!"
) )
except: except:
raise raise

View file

@ -12,32 +12,60 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
try: import torch try:
except: raise ImportError('Install torch via `pip install torch`') import torch
except:
raise ImportError("Install torch via `pip install torch`")
from packaging.version import Version as V from packaging.version import Version as V
import re import re
v = V(re.match(r"[0-9\.]{3,}", torch.__version__).group(0)) v = V(re.match(r"[0-9\.]{3,}", torch.__version__).group(0))
cuda = str(torch.version.cuda) cuda = str(torch.version.cuda)
is_ampere = torch.cuda.get_device_capability()[0] >= 8 is_ampere = torch.cuda.get_device_capability()[0] >= 8
USE_ABI = torch._C._GLIBCXX_USE_CXX11_ABI USE_ABI = torch._C._GLIBCXX_USE_CXX11_ABI
if cuda not in ("11.8", "12.1", "12.4", "12.6", "12.8", "13.0"): raise RuntimeError(f"CUDA = {cuda} not supported!") if cuda not in ("11.8", "12.1", "12.4", "12.6", "12.8", "13.0"):
if v <= V('2.1.0'): raise RuntimeError(f"Torch = {v} too old!") raise RuntimeError(f"CUDA = {cuda} not supported!")
elif v <= V('2.1.1'): x = 'cu{}{}-torch211' if v <= V("2.1.0"):
elif v <= V('2.1.2'): x = 'cu{}{}-torch212' raise RuntimeError(f"Torch = {v} too old!")
elif v < V('2.3.0'): x = 'cu{}{}-torch220' elif v <= V("2.1.1"):
elif v < V('2.4.0'): x = 'cu{}{}-torch230' x = "cu{}{}-torch211"
elif v < V('2.5.0'): x = 'cu{}{}-torch240' elif v <= V("2.1.2"):
elif v < V('2.5.1'): x = 'cu{}{}-torch250' x = "cu{}{}-torch212"
elif v <= V('2.5.1'): x = 'cu{}{}-torch251' elif v < V("2.3.0"):
elif v < V('2.7.0'): x = 'cu{}{}-torch260' x = "cu{}{}-torch220"
elif v < V('2.7.9'): x = 'cu{}{}-torch270' elif v < V("2.4.0"):
elif v < V('2.8.0'): x = 'cu{}{}-torch271' x = "cu{}{}-torch230"
elif v < V('2.8.9'): x = 'cu{}{}-torch280' elif v < V("2.5.0"):
elif v < V('2.9.1'): x = 'cu{}{}-torch290' x = "cu{}{}-torch240"
elif v < V('2.9.2'): x = 'cu{}{}-torch291' elif v < V("2.5.1"):
elif v < V('2.10.1'): x = 'cu{}{}-torch2100' x = "cu{}{}-torch250"
else: raise RuntimeError(f"Torch = {v} too new!") elif v <= V("2.5.1"):
if v > V('2.6.9') and cuda not in ("11.8", "12.6", "12.8", "13.0"): raise RuntimeError(f"CUDA = {cuda} not supported!") x = "cu{}{}-torch251"
if v >= V('2.10.0') and cuda not in ("12.6", "12.8", "13.0"): raise RuntimeError(f"Torch 2.10 requires CUDA 12.6, 12.8, or 13.0! Got CUDA = {cuda}") elif v < V("2.7.0"):
x = x.format(cuda.replace(".", ""), "-ampere" if False else "") # is_ampere is broken due to flash-attn x = "cu{}{}-torch260"
print(f'pip install --upgrade pip && pip install --no-deps git+https://github.com/unslothai/unsloth-zoo.git && pip install "unsloth[{x}] @ git+https://github.com/unslothai/unsloth.git" --no-build-isolation') elif v < V("2.7.9"):
x = "cu{}{}-torch270"
elif v < V("2.8.0"):
x = "cu{}{}-torch271"
elif v < V("2.8.9"):
x = "cu{}{}-torch280"
elif v < V("2.9.1"):
x = "cu{}{}-torch290"
elif v < V("2.9.2"):
x = "cu{}{}-torch291"
elif v < V("2.10.1"):
x = "cu{}{}-torch2100"
else:
raise RuntimeError(f"Torch = {v} too new!")
if v > V("2.6.9") and cuda not in ("11.8", "12.6", "12.8", "13.0"):
raise RuntimeError(f"CUDA = {cuda} not supported!")
if v >= V("2.10.0") and cuda not in ("12.6", "12.8", "13.0"):
raise RuntimeError(
f"Torch 2.10 requires CUDA 12.6, 12.8, or 13.0! Got CUDA = {cuda}"
)
x = x.format(
cuda.replace(".", ""), "-ampere" if False else ""
) # is_ampere is broken due to flash-attn
print(
f'pip install --upgrade pip && pip install --no-deps git+https://github.com/unslothai/unsloth-zoo.git && pip install "unsloth[{x}] @ git+https://github.com/unslothai/unsloth.git" --no-build-isolation'
)

File diff suppressed because it is too large Load diff

View file

@ -12,11 +12,9 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import os
import re import re
import json import json
import csv import csv
from typing import List, Dict, Any, Union, Optional
from datasets import Dataset from datasets import Dataset
from pathlib import Path from pathlib import Path

View file

@ -25,7 +25,6 @@ os.environ["HF_HUB_ENABLE_HF_TRANSFER"] = "1"
import requests import requests
import torch import torch
import gc import gc
import time
import re import re
from unsloth_zoo.log import logger from unsloth_zoo.log import logger
import numpy as np import numpy as np

View file

@ -75,7 +75,7 @@ class HideLoggingMessage(logging.Filter):
self.text = text self.text = text
def filter(self, x): def filter(self, x):
return not (self.text in x.getMessage()) return self.text not in x.getMessage()
class HidePrintMessage: class HidePrintMessage:
@ -1310,7 +1310,7 @@ def disable_broken_wandb():
return # wandb not installed, nothing to do return # wandb not installed, nothing to do
try: try:
import wandb pass
except Exception: except Exception:
# wandb is installed but broken - patch all checkers to skip it # wandb is installed but broken - patch all checkers to skip it
logger.info( logger.info(

View file

@ -23,12 +23,10 @@ from .utils import (
torch_gpu_device, torch_gpu_device,
is_cdna, is_cdna,
) )
from transformers.models.llama.modeling_llama import logger
from unsloth_zoo.utils import Version from unsloth_zoo.utils import Version
from unsloth_zoo.loss_utils import ( from unsloth_zoo.loss_utils import (
patch_loss_functions as _patch_loss_functions, patch_loss_functions as _patch_loss_functions,
post_patch_loss_function,
) )

View file

@ -18,7 +18,6 @@ from .utils import (
fast_dequantize, fast_dequantize,
QUANT_STATE, QUANT_STATE,
get_lora_parameters, get_lora_parameters,
get_lora_parameters_bias,
matmul_lora, matmul_lora,
torch_amp_custom_fwd, torch_amp_custom_fwd,
torch_amp_custom_bwd, torch_amp_custom_bwd,

View file

@ -13,8 +13,6 @@
# limitations under the License. # limitations under the License.
import torch import torch
from functools import lru_cache
from transformers.models.llama.modeling_llama import logger
import os import os
torch_compile_options = { torch_compile_options = {
@ -80,7 +78,8 @@ else:
# See https://github.com/pytorch-labs/attention-gym/blob/main/examples/flex_attn.ipynb # See https://github.com/pytorch-labs/attention-gym/blob/main/examples/flex_attn.ipynb
# for more examples # for more examples
# BSD 3-Clause License Copyright (c) 2023, Driss Guessous, Horace He et al # BSD 3-Clause License Copyright (c) 2023, Driss Guessous, Horace He et al
import functools, math import functools
import math
def generate_tanh_softcap(t): def generate_tanh_softcap(t):
def tanh_softcap(x, b, h, q_idx, kv_idx): def tanh_softcap(x, b, h, q_idx, kv_idx):

View file

@ -13,11 +13,8 @@
# limitations under the License. # limitations under the License.
import os import os
import torch import torch
import torch.nn as nn
import triton import triton
import triton.language as tl import triton.language as tl
from torch.nn import functional as F
import math
from unsloth_zoo.utils import Version from unsloth_zoo.utils import Version
from unsloth_zoo.log import logger from unsloth_zoo.log import logger
from unsloth_zoo.temporary_patches.common import torch_compile from unsloth_zoo.temporary_patches.common import torch_compile
@ -588,7 +585,7 @@ try:
_has_fbgemm = test_has_fbgemm() _has_fbgemm = test_has_fbgemm()
if _has_fbgemm: if _has_fbgemm:
os.environ["UNSLOTH_HAS_FBGEMM"] = "1" os.environ["UNSLOTH_HAS_FBGEMM"] = "1"
logger.info(f"Using fbgemm_gpu block quantized FP8 matmul") logger.info("Using fbgemm_gpu block quantized FP8 matmul")
fp8_block_quant_linear = fp8_fbgemm_block_linear fp8_block_quant_linear = fp8_fbgemm_block_linear
else: else:
os.environ["UNSLOTH_HAS_FBGEMM"] = "0" os.environ["UNSLOTH_HAS_FBGEMM"] = "0"

View file

@ -16,7 +16,6 @@ import triton
import triton.language as tl import triton.language as tl
import torch import torch
from .utils import ( from .utils import (
calculate_settings,
triton_tanh, triton_tanh,
torch_gpu_device, torch_gpu_device,
) )

View file

@ -17,9 +17,6 @@ import triton
import triton.language as tl import triton.language as tl
import torch import torch
from .utils import calculate_settings, torch_gpu_device from .utils import calculate_settings, torch_gpu_device
from unsloth_zoo.patching_utils import (
patch_layernorm,
)
@triton.jit @triton.jit

View file

@ -23,9 +23,8 @@ import json
import logging import logging
import os import os
import time import time
from typing import Dict, List, Optional, Tuple, Any from typing import Dict, Optional, Tuple, Any
import torch import torch
import triton
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)

View file

@ -178,7 +178,7 @@ def save_autotune_results(autotune_cache, mode, ref_time, fused_time, results_di
for key, config in autotune_cache.items(): for key, config in autotune_cache.items():
key = [ key = [
str(k) if not "torch" in str(k) else str(k.split("torch.")[-1]) for k in key str(k) if "torch" not in str(k) else str(k.split("torch.")[-1]) for k in key
] ]
filename = "_".join(key) filename = "_".join(key)
save_path = f"{save_dir}/{filename}.json" save_path = f"{save_dir}/{filename}.json"

View file

@ -3,7 +3,6 @@
import logging import logging
import warnings import warnings
from dataclasses import asdict
from unsloth import DEVICE_TYPE from unsloth import DEVICE_TYPE
import torch import torch

View file

@ -336,7 +336,6 @@ def exceeds_smem_capacity(
def common_prune_criteria(config: triton.Config, kwargs: dict, dtype): def common_prune_criteria(config: triton.Config, kwargs: dict, dtype):
from ..interface import supports_tma
from .tuning import get_device_properties from .tuning import get_device_properties
smem_size = get_device_properties().SIZE_SMEM smem_size = get_device_properties().SIZE_SMEM

View file

@ -1,7 +1,6 @@
# SPDX-License-Identifier: GNU Affero General Public License v3.0 # SPDX-License-Identifier: GNU Affero General Public License v3.0
# Copyright 2023-present the Unsloth team. All rights reserved. # Copyright 2023-present the Unsloth team. All rights reserved.
import torch
import triton import triton
import triton.language as tl import triton.language as tl

View file

@ -1,7 +1,6 @@
# SPDX-License-Identifier: GNU Affero General Public License v3.0 # SPDX-License-Identifier: GNU Affero General Public License v3.0
# Copyright 2023-present the Unsloth team. All rights reserved. # Copyright 2023-present the Unsloth team. All rights reserved.
import torch
import triton import triton
import triton.language as tl import triton.language as tl

View file

@ -7,7 +7,6 @@ import pytest
import torch import torch
from grouped_gemm.interface import ( from grouped_gemm.interface import (
grouped_gemm,
grouped_gemm_dW, grouped_gemm_dW,
grouped_gemm_dX, grouped_gemm_dX,
grouped_gemm_forward, grouped_gemm_forward,
@ -582,7 +581,6 @@ def _test_grouped_gemm_backward_dX(
kernel_config_bwd_dW = KernelConfigBackward_dW() kernel_config_bwd_dW = KernelConfigBackward_dW()
else: else:
from grouped_gemm.kernels.backward import ( from grouped_gemm.kernels.backward import (
_autotuned_grouped_gemm_dW_kernel,
_autotuned_grouped_gemm_dX_kernel, _autotuned_grouped_gemm_dX_kernel,
) )
from grouped_gemm.kernels.forward import ( from grouped_gemm.kernels.forward import (

View file

@ -2,7 +2,6 @@
# Copyright 2023-present the Unsloth team. All rights reserved. # Copyright 2023-present the Unsloth team. All rights reserved.
import argparse import argparse
import sys
from contextlib import contextmanager from contextlib import contextmanager
from functools import partial from functools import partial

View file

@ -15,7 +15,7 @@
import triton import triton
import triton.language as tl import triton.language as tl
import torch import torch
from .utils import calculate_settings, torch_gpu_device from .utils import torch_gpu_device
# signed int32 max is 2**31-1 so num_elements cannot exceed 2**31 # signed int32 max is 2**31-1 so num_elements cannot exceed 2**31
NUM_INT32_ELEMENTS = 2**31 NUM_INT32_ELEMENTS = 2**31

View file

@ -19,18 +19,13 @@ import ctypes
MAX_FUSED_SIZE: int = 65536 MAX_FUSED_SIZE: int = 65536
next_power_of_2 = triton.next_power_of_2 next_power_of_2 = triton.next_power_of_2
import functools import functools
from typing import Optional
from ..device_type import ( from ..device_type import (
is_hip, is_hip,
get_device_type,
DEVICE_TYPE, DEVICE_TYPE,
DEVICE_TYPE_TORCH,
DEVICE_COUNT, DEVICE_COUNT,
ALLOW_PREQUANTIZED_MODELS,
) )
from .fp8 import weight_dequant, fp8_linear from .fp8 import weight_dequant, fp8_linear
import functools
# torch.cuda.amp.custom_fwd is deprecated >= 2.4 # torch.cuda.amp.custom_fwd is deprecated >= 2.4
import torch import torch

View file

@ -86,35 +86,26 @@ from typing import Union, Optional, List, Any, Callable, Tuple, Iterator
from platform import system as platform_system from platform import system as platform_system
platform_system = platform_system() platform_system = platform_system()
import numpy as np
import contextlib
import re import re
from dataclasses import dataclass, field from dataclasses import dataclass, field
import functools import functools
import textwrap import textwrap
import logging import logging
import warnings, subprocess, inspect, psutil, os, math import warnings
import inspect
import psutil
import os
from unsloth_zoo.utils import Version, get_quant_type from unsloth_zoo.utils import Version, get_quant_type
from importlib.metadata import version as importlib_version from importlib.metadata import version as importlib_version
from ..device_type import ( from ..device_type import (
is_hip,
get_device_type,
DEVICE_TYPE, DEVICE_TYPE,
DEVICE_TYPE_TORCH,
DEVICE_COUNT, DEVICE_COUNT,
ALLOW_PREQUANTIZED_MODELS,
) )
from ..import_fixes import UNSLOTH_ENABLE_LOGGING from ..import_fixes import UNSLOTH_ENABLE_LOGGING
from unsloth_zoo.log import logger from unsloth_zoo.log import logger
from unsloth_zoo.tokenizer_utils import ( from unsloth_zoo.tokenizer_utils import (
patch_tokenizer as _patch_tokenizer, patch_tokenizer as _patch_tokenizer,
) )
from unsloth_zoo.rl_environments import (
check_python_modules,
create_locked_down_function,
execute_with_time_limit,
Benchmarker,
)
from unsloth_zoo.patching_utils import ( from unsloth_zoo.patching_utils import (
patch_compiling_bitsandbytes, patch_compiling_bitsandbytes,
patch_layernorm, patch_layernorm,
@ -127,8 +118,6 @@ from unsloth_zoo.gradient_checkpointing import (
unsloth_offloaded_gradient_checkpoint, unsloth_offloaded_gradient_checkpoint,
patch_unsloth_gradient_checkpointing, patch_unsloth_gradient_checkpointing,
unpatch_unsloth_gradient_checkpointing, unpatch_unsloth_gradient_checkpointing,
Unsloth_Gradient_Checkpointer,
unsloth_gradient_checkpoint,
patch_gradient_checkpointing, patch_gradient_checkpointing,
unpatch_gradient_checkpointing, unpatch_gradient_checkpointing,
patch_unsloth_smart_gradient_checkpointing, patch_unsloth_smart_gradient_checkpointing,
@ -313,7 +302,7 @@ class HideLoggingMessage(logging.Filter):
self.text = text self.text = text
def filter(self, x): def filter(self, x):
return not (self.text in x.getMessage()) return self.text not in x.getMessage()
# Replace warning messages (analogous to HideLoggingMessage but for warnings.warn) # Replace warning messages (analogous to HideLoggingMessage but for warnings.warn)
@ -737,21 +726,21 @@ def patch_mistral_nemo_config(config):
try: try:
# Some Config files use layer_type_validation # Some Config files use layer_type_validation
# for eg Gemma-2, so we must import it to stop errors. # for eg Gemma-2, so we must import it to stop errors.
from transformers.configuration_utils import layer_type_validation pass
except: except:
pass pass
try: try:
# Transformers 5.0+ uses RotaryEmbeddingConfigMixin as a base class for configs # Transformers 5.0+ uses RotaryEmbeddingConfigMixin as a base class for configs
from transformers.modeling_rope_utils import RotaryEmbeddingConfigMixin pass
except: except:
pass pass
from transformers import __version__ as transformers_version from transformers import __version__ as transformers_version
try: try:
from transformers import PreTrainedConfig pass
except: except:
from transformers import PretrainedConfig pass
model_architectures = [ model_architectures = [
"llama", "llama",
@ -850,7 +839,7 @@ from transformers.utils import is_openai_available
if is_openai_available(): if is_openai_available():
try: try:
from openai import OpenAI pass
except: except:
print("Unsloth: OpenAI failed to import - ignoring for now.") print("Unsloth: OpenAI failed to import - ignoring for now.")
import transformers.utils import transformers.utils
@ -862,9 +851,7 @@ if is_openai_available():
# ============================================= # =============================================
# Get Flash Attention v2 if Ampere (RTX 30xx, A100) # Get Flash Attention v2 if Ampere (RTX 30xx, A100)
import bitsandbytes as bnb
from transformers import AutoTokenizer
from transformers.utils.import_utils import _is_package_available from transformers.utils.import_utils import _is_package_available
SUPPORTS_BFLOAT16 = False SUPPORTS_BFLOAT16 = False
@ -882,9 +869,9 @@ if DEVICE_TYPE == "cuda":
try: try:
try: try:
# See https://github.com/unslothai/unsloth/issues/1437 # See https://github.com/unslothai/unsloth/issues/1437
from flash_attn.flash_attn_interface import flash_attn_gpu pass
except: except:
from flash_attn.flash_attn_interface import flash_attn_cuda pass
HAS_FLASH_ATTENTION = True HAS_FLASH_ATTENTION = True
# Also check for softcapping # Also check for softcapping
@ -931,9 +918,9 @@ elif DEVICE_TYPE == "hip":
try: try:
try: try:
# See https://github.com/unslothai/unsloth/issues/1437 # See https://github.com/unslothai/unsloth/issues/1437
from flash_attn.flash_attn_interface import flash_attn_gpu pass
except: except:
from flash_attn.flash_attn_interface import flash_attn_cuda pass
HAS_FLASH_ATTENTION = True HAS_FLASH_ATTENTION = True
# Also check for softcapping # Also check for softcapping
@ -1286,7 +1273,7 @@ USE_MODELSCOPE = os.environ.get("UNSLOTH_USE_MODELSCOPE", "0") == "1"
if USE_MODELSCOPE: if USE_MODELSCOPE:
if importlib.util.find_spec("modelscope") is None: if importlib.util.find_spec("modelscope") is None:
raise ImportError( raise ImportError(
f"You are using the modelscope hub, please install modelscope by `pip install modelscope -U`" "You are using the modelscope hub, please install modelscope by `pip install modelscope -U`"
) )
import socket import socket
@ -1304,13 +1291,10 @@ def has_internet(host = "8.8.8.8", port = 53, timeout = 3):
return True return True
finally: finally:
sock.close() sock.close()
except socket.error as ex: except socket.error:
return False return False
import psutil
def _get_statistics(statistics = None, force_download = True): def _get_statistics(statistics = None, force_download = True):
# We log some basic stats about which environment is being used. # We log some basic stats about which environment is being used.
# We simply download a README.md file from HF - all data is made public. # We simply download a README.md file from HF - all data is made public.
@ -1477,7 +1461,6 @@ def get_statistics(local_files_only = False):
# Fixes Bitsandbytes to remove missing warnings # Fixes Bitsandbytes to remove missing warnings
from transformers.utils.quantization_config import ( from transformers.utils.quantization_config import (
BitsAndBytesConfig, BitsAndBytesConfig,
QuantizationMethod,
) )
BitsAndBytesConfig__init__ = inspect.getsource(BitsAndBytesConfig.__init__) BitsAndBytesConfig__init__ = inspect.getsource(BitsAndBytesConfig.__init__)

View file

@ -13,7 +13,6 @@
# limitations under the License. # limitations under the License.
from .llama import * from .llama import *
from ._utils import __version__
from unsloth_zoo.hf_utils import dtype_from_config from unsloth_zoo.hf_utils import dtype_from_config
from unsloth_zoo.utils import _get_dtype, Version from unsloth_zoo.utils import _get_dtype, Version
from ..utils.packing import get_packed_info_from_kwargs from ..utils.packing import get_packed_info_from_kwargs
@ -30,9 +29,6 @@ try:
CohereDecoderLayer, CohereDecoderLayer,
CohereModel, CohereModel,
CohereForCausalLM, CohereForCausalLM,
CohereRotaryEmbedding,
apply_rotary_pos_emb,
repeat_kv,
) )
except: except:
transformers_version = Version(transformers_version) transformers_version = Version(transformers_version)

View file

@ -13,8 +13,6 @@
# limitations under the License. # limitations under the License.
from .llama import * from .llama import *
import os
from ._utils import __version__
from unsloth_zoo.utils import Version, _get_dtype from unsloth_zoo.utils import Version, _get_dtype
from unsloth_zoo.hf_utils import dtype_from_config from unsloth_zoo.hf_utils import dtype_from_config
from ..utils.packing import get_packed_info_from_kwargs from ..utils.packing import get_packed_info_from_kwargs
@ -28,7 +26,6 @@ from ..utils.attention_dispatch import (
from .llama import ( from .llama import (
LlamaRotaryEmbedding, LlamaRotaryEmbedding,
LlamaLinearScalingRotaryEmbedding, LlamaLinearScalingRotaryEmbedding,
_LlamaModel_fast_forward_inference,
) )
try: try:
@ -37,7 +34,6 @@ try:
FalconH1DecoderLayer, FalconH1DecoderLayer,
FalconH1Model, FalconH1Model,
FalconH1ForCausalLM, FalconH1ForCausalLM,
FalconHybridMambaAttentionDynamicCache,
) )
except: except:
from transformers import __version__ as transformers_version from transformers import __version__ as transformers_version

View file

@ -14,14 +14,8 @@
from .llama import * from .llama import *
from .llama import _get_rope_theta from .llama import _get_rope_theta
from ._utils import __version__
from unsloth_zoo.utils import _get_dtype, Version from unsloth_zoo.utils import _get_dtype, Version
from unsloth_zoo.hf_utils import dtype_from_config from unsloth_zoo.hf_utils import dtype_from_config
from ..utils.packing import (
build_sdpa_packed_attention_mask,
build_xformers_block_causal_mask,
get_packed_info_from_kwargs,
)
import math import math
try: try:
@ -30,9 +24,6 @@ try:
GemmaDecoderLayer, GemmaDecoderLayer,
GemmaModel, GemmaModel,
GemmaForCausalLM, GemmaForCausalLM,
GemmaRotaryEmbedding,
apply_rotary_pos_emb,
repeat_kv,
) )
except: except:
transformers_version = Version(transformers_version) transformers_version = Version(transformers_version)

View file

@ -13,7 +13,6 @@
# limitations under the License. # limitations under the License.
from .llama import * from .llama import *
from ._utils import __version__
from unsloth_zoo.utils import _get_dtype, Version from unsloth_zoo.utils import _get_dtype, Version
from unsloth_zoo.hf_utils import dtype_from_config from unsloth_zoo.hf_utils import dtype_from_config
from ..utils.packing import get_packed_info_from_kwargs from ..utils.packing import get_packed_info_from_kwargs
@ -22,7 +21,6 @@ from ..utils.attention_dispatch import (
AttentionContext, AttentionContext,
run_attention, run_attention,
select_attention_backend, select_attention_backend,
SDPA,
) )
from .gemma import ( from .gemma import (
GemmaFixedRotaryEmbedding, GemmaFixedRotaryEmbedding,
@ -36,9 +34,6 @@ try:
Gemma2DecoderLayer, Gemma2DecoderLayer,
Gemma2Model, Gemma2Model,
Gemma2ForCausalLM, Gemma2ForCausalLM,
Gemma2RotaryEmbedding,
apply_rotary_pos_emb,
repeat_kv,
) )
except: except:
transformers_version = Version(transformers_version) transformers_version = Version(transformers_version)
@ -65,7 +60,7 @@ except:
Gemma2FlashAttention2 = Gemma2Attention Gemma2FlashAttention2 = Gemma2Attention
if HAS_FLASH_ATTENTION_SOFTCAPPING: if HAS_FLASH_ATTENTION_SOFTCAPPING:
from flash_attn import flash_attn_func pass
# Logit softcapping # Logit softcapping

View file

@ -25,20 +25,11 @@ Key architecture differences from Qwen3 MoE:
from .llama import * from .llama import *
import os import os
from ._utils import __version__
from .llama import ( from .llama import (
LlamaRotaryEmbedding,
LlamaLinearScalingRotaryEmbedding,
fix_prepare_inputs_for_generation,
fast_rms_layernorm_inference, fast_rms_layernorm_inference,
fast_swiglu_inference, fast_swiglu_inference,
LlamaModel_fast_forward,
LlamaModel_fast_forward_inference,
CausalLM_fast_forward,
PeftModel_fast_forward,
) )
import torch import torch
import torch.nn.functional as F
from typing import Optional, Tuple from typing import Optional, Tuple
from ..kernels import fast_rms_layernorm from ..kernels import fast_rms_layernorm

View file

@ -13,7 +13,6 @@
# limitations under the License. # limitations under the License.
from .llama import * from .llama import *
import os
from ._utils import __version__ from ._utils import __version__
from unsloth_zoo.utils import _get_dtype, Version from unsloth_zoo.utils import _get_dtype, Version
from unsloth_zoo.hf_utils import dtype_from_config from unsloth_zoo.hf_utils import dtype_from_config
@ -265,8 +264,6 @@ def GraniteDecoderLayer_fast_forward(
return outputs return outputs
from math import sqrt as math_sqrt
KV_CACHE_INCREMENT = 256 # KV Cache update size KV_CACHE_INCREMENT = 256 # KV Cache update size
torch_nn_functional_softmax = torch.nn.functional.softmax torch_nn_functional_softmax = torch.nn.functional.softmax
torch_matmul = torch.matmul torch_matmul = torch.matmul
@ -285,7 +282,7 @@ def GraniteAttention_fast_forward_inference(
): ):
assert ( assert (
position_embeddings is not None position_embeddings is not None
), f"Granite model requires position embeddings to be specified" ), "Granite model requires position embeddings to be specified"
Xn = hidden_states Xn = hidden_states
bsz, _, hd = hidden_states.size() bsz, _, hd = hidden_states.size()

View file

@ -26,7 +26,6 @@ from ._utils import (
_get_inference_mode_context_manager, _get_inference_mode_context_manager,
_prepare_model_for_qat, _prepare_model_for_qat,
is_bfloat16_supported, is_bfloat16_supported,
get_quant_type,
) )
from .loader_utils import _get_fp8_mode_and_check_settings from .loader_utils import _get_fp8_mode_and_check_settings
from ..utils.packing import ( from ..utils.packing import (
@ -50,12 +49,9 @@ from unsloth_zoo.hf_utils import (
) )
from unsloth_zoo.peft_utils import SKIP_QUANTIZATION_MODULES from unsloth_zoo.peft_utils import SKIP_QUANTIZATION_MODULES
from ..device_type import ( from ..device_type import (
is_hip,
get_device_type,
DEVICE_TYPE, DEVICE_TYPE,
DEVICE_TYPE_TORCH, DEVICE_TYPE_TORCH,
DEVICE_COUNT, DEVICE_COUNT,
ALLOW_PREQUANTIZED_MODELS,
) )
transformers_version = Version(transformers_version) transformers_version = Version(transformers_version)
@ -97,7 +93,6 @@ except:
LlamaFlashAttention2 = LlamaAttention LlamaFlashAttention2 = LlamaAttention
from transformers import ( from transformers import (
AutoTokenizer,
AutoModelForCausalLM, AutoModelForCausalLM,
AutoModelForSequenceClassification, AutoModelForSequenceClassification,
BitsAndBytesConfig, BitsAndBytesConfig,
@ -108,14 +103,16 @@ from transformers import set_seed as transformers_set_seed
from peft import LoraConfig, TaskType, get_peft_model as _get_peft_model from peft import LoraConfig, TaskType, get_peft_model as _get_peft_model
from peft import PeftModelForCausalLM, PeftModelForSequenceClassification from peft import PeftModelForCausalLM, PeftModelForSequenceClassification
from ..save import patch_saving_functions from ..save import patch_saving_functions
import re, os, inspect, math, sys import re
import os
import inspect
import types import types
try: try:
from huggingface_hub.utils import get_token pass
except: except:
# Old HF Hub versions <= 0.0.25 # Old HF Hub versions <= 0.0.25
from huggingface_hub.utils._token import get_token pass
from triton import __version__ as triton_version from triton import __version__ as triton_version
HAS_XFORMERS = xformers is not None HAS_XFORMERS = xformers is not None
@ -2983,7 +2980,7 @@ class FastLlamaModel:
try: try:
assert module in accepted_modules assert module in accepted_modules
final_modules.append(module) final_modules.append(module)
except AssertionError as e: except AssertionError:
final_modules.append(module) final_modules.append(module)
print( print(
"Unsloth: You added custom modules, but Unsloth hasn't optimized for this.\n" "Unsloth: You added custom modules, but Unsloth hasn't optimized for this.\n"

View file

@ -15,20 +15,17 @@
from ._utils import ( from ._utils import (
_prepare_model_for_qat, _prepare_model_for_qat,
is_bfloat16_supported, is_bfloat16_supported,
is_vLLM_available,
HAS_FLASH_ATTENTION, HAS_FLASH_ATTENTION,
HAS_FLASH_ATTENTION_SOFTCAPPING, HAS_FLASH_ATTENTION_SOFTCAPPING,
USE_MODELSCOPE, USE_MODELSCOPE,
get_transformers_model_type, get_transformers_model_type,
hf_login, hf_login,
) )
from .granite import FastGraniteModel
from .llama import FastLlamaModel, logger from .llama import FastLlamaModel, logger
from .mistral import FastMistralModel from .mistral import FastMistralModel
from .qwen2 import FastQwen2Model from .qwen2 import FastQwen2Model
from .qwen3 import FastQwen3Model from .qwen3 import FastQwen3Model
from .qwen3_moe import FastQwen3MoeModel from .qwen3_moe import FastQwen3MoeModel
from .cohere import FastCohereModel
from transformers import AutoConfig from transformers import AutoConfig
from transformers import __version__ as transformers_version from transformers import __version__ as transformers_version
from peft import PeftConfig, PeftModel from peft import PeftConfig, PeftModel
@ -39,22 +36,20 @@ from .loader_utils import (
get_model_name, get_model_name,
prepare_device_map, prepare_device_map,
) )
import os, contextlib, sys import os
import contextlib
try: try:
from huggingface_hub import get_token pass
except: except:
try: try:
from huggingface_hub.utils import get_token pass
except: except:
# For older versions of huggingface_hub # For older versions of huggingface_hub
from huggingface_hub.utils._token import get_token pass
from huggingface_hub import HfFileSystem from huggingface_hub import HfFileSystem
import importlib.util import importlib.util
from ..device_type import ( from ..device_type import (
is_hip,
get_device_type,
DEVICE_TYPE,
DEVICE_TYPE_TORCH, DEVICE_TYPE_TORCH,
DEVICE_COUNT, DEVICE_COUNT,
ALLOW_PREQUANTIZED_MODELS, ALLOW_PREQUANTIZED_MODELS,
@ -86,15 +81,12 @@ if SUPPORTS_GEMMA:
if SUPPORTS_GEMMA2: if SUPPORTS_GEMMA2:
from .gemma2 import FastGemma2Model from .gemma2 import FastGemma2Model
if SUPPORTS_FALCON_H1: if SUPPORTS_FALCON_H1:
from .falcon_h1 import FastFalconH1Model pass
import torch import torch
from ._utils import ( from ._utils import (
patch_compiling_bitsandbytes, patch_compiling_bitsandbytes,
patch_model_and_tokenizer,
prepare_model_for_kbit_training,
apply_unsloth_gradient_checkpointing, apply_unsloth_gradient_checkpointing,
patch_compiled_autograd, patch_compiled_autograd,
process_vision_info,
unsloth_compile_transformers, unsloth_compile_transformers,
fast_inference_setup, fast_inference_setup,
) )
@ -806,7 +798,6 @@ class FastLanguageModel(FastLlamaModel):
from ..kernels import ( from ..kernels import (
patch_loss_functions, patch_loss_functions,
post_patch_loss_function,
) )
from .vision import FastBaseModel from .vision import FastBaseModel
from transformers import ( from transformers import (

View file

@ -16,7 +16,6 @@ from ..device_type import DEVICE_TYPE_TORCH
import importlib import importlib
import os import os
import torch import torch
import re
import tempfile import tempfile
from typing import Union from typing import Union
from .mapper import ( from .mapper import (

File diff suppressed because it is too large Load diff

View file

@ -14,7 +14,6 @@
from .llama import * from .llama import *
import os import os
from ._utils import __version__
from unsloth_zoo.utils import _get_dtype from unsloth_zoo.utils import _get_dtype
from unsloth_zoo.hf_utils import dtype_from_config from unsloth_zoo.hf_utils import dtype_from_config
from ..utils.packing import ( from ..utils.packing import (
@ -48,7 +47,6 @@ try:
except: except:
MistralSdpaAttention = MistralAttention MistralSdpaAttention = MistralAttention
MistralFlashAttention2 = MistralAttention MistralFlashAttention2 = MistralAttention
from unsloth_zoo.utils import Version, _get_dtype
def MistralAttention_fast_forward( def MistralAttention_fast_forward(

View file

@ -13,9 +13,7 @@
# limitations under the License. # limitations under the License.
from .llama import * from .llama import *
import os from unsloth_zoo.utils import Version
from ._utils import __version__
from unsloth_zoo.utils import Version, _get_dtype
from ..utils.packing import get_packed_info_from_kwargs from ..utils.packing import get_packed_info_from_kwargs
from ..utils.attention_dispatch import ( from ..utils.attention_dispatch import (
AttentionConfig, AttentionConfig,
@ -48,9 +46,6 @@ except:
f'Try `pip install --upgrade "transformers>=4.50.3"`\n' f'Try `pip install --upgrade "transformers>=4.50.3"`\n'
f"to obtain the latest transformers build, then restart this session." f"to obtain the latest transformers build, then restart this session."
) )
from transformers.modeling_attn_mask_utils import (
_prepare_4d_causal_attention_mask_for_sdpa,
)
# For Pytorch 2.1.1 # For Pytorch 2.1.1
try: try:

View file

@ -13,8 +13,6 @@
# limitations under the License. # limitations under the License.
from .llama import * from .llama import *
import os
from ._utils import __version__
from .llama import ( from .llama import (
LlamaRotaryEmbedding, LlamaRotaryEmbedding,
LlamaLinearScalingRotaryEmbedding, LlamaLinearScalingRotaryEmbedding,
@ -43,7 +41,6 @@ from transformers.models.qwen3_moe.modeling_qwen3_moe import (
# Qwen3SdpaAttention = Qwen3Attention # Qwen3SdpaAttention = Qwen3Attention
# Qwen3FlashAttention2 = Qwen3Attention # Qwen3FlashAttention2 = Qwen3Attention
# pass # pass
from unsloth_zoo.utils import Version, _get_dtype
torch_nn_functional_softmax = torch.nn.functional.softmax torch_nn_functional_softmax = torch.nn.functional.softmax

Some files were not shown because too many files have changed in this diff Show more