mirror of
https://github.com/unslothai/unsloth.git
synced 2026-05-02 13:20:28 +00:00
fix: replace [huggingfacenotorch] with no-torch-runtime.txt requirements (#4649)
The [huggingfacenotorch] extras only exist in pyproject.toml but are NOT published on PyPI, so uv pip install "unsloth[huggingfacenotorch]" fails on fresh installs from the registry. Fix: add studio/backend/requirements/no-torch-runtime.txt with the runtime deps (safetensors, transformers, datasets, accelerate, etc.) that mirror [huggingfacenotorch] from pyproject.toml. In no-torch mode: 1. install.sh/ps1 install unsloth + unsloth-zoo with --no-deps 2. SKIP_STUDIO_BASE=0 so install_python_stack.py's NO_TORCH branch runs 3. install_python_stack.py installs no-torch-runtime.txt
This commit is contained in:
parent
9d68621614
commit
b1c3a1e857
4 changed files with 55 additions and 38 deletions
|
|
@ -462,24 +462,14 @@ def install_python_stack() -> int:
|
|||
if skip_base:
|
||||
print(_green(f"✅ {package_name} already installed — skipping base packages"))
|
||||
elif NO_TORCH:
|
||||
# No-torch mode: install runtime deps via [huggingfacenotorch] extras
|
||||
# (safetensors, transformers, datasets, etc.), then unsloth-zoo with
|
||||
# --no-deps to avoid pulling torch.
|
||||
# No-torch mode: unsloth + unsloth-zoo are already installed with
|
||||
# --no-deps by install.sh/install.ps1. Install the runtime deps
|
||||
# (safetensors, transformers, datasets, etc.) from no-torch-runtime.txt.
|
||||
_progress("base packages (no torch)")
|
||||
pip_install(
|
||||
"Installing unsloth runtime deps (no-torch mode)",
|
||||
"Installing no-torch runtime deps",
|
||||
"--no-cache-dir",
|
||||
"--upgrade-package",
|
||||
"unsloth",
|
||||
"unsloth[huggingfacenotorch]>=2026.3.14",
|
||||
)
|
||||
pip_install(
|
||||
"Installing unsloth-zoo (no-torch mode)",
|
||||
"--no-cache-dir",
|
||||
"--no-deps",
|
||||
"--upgrade-package",
|
||||
"unsloth-zoo",
|
||||
"unsloth-zoo",
|
||||
req = REQ_ROOT / "no-torch-runtime.txt",
|
||||
)
|
||||
if local_repo:
|
||||
pip_install(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue