fix: bump transformers 5.x pin from 5.1.0 to 5.2.0 for Qwen3.5 support
This commit is contained in:
parent
0b3397cc3a
commit
bd60562145
5 changed files with 8 additions and 8 deletions
4
setup.sh
4
setup.sh
|
|
@ -186,14 +186,14 @@ else
|
|||
install_python_stack
|
||||
|
||||
# ── 6b. Pre-install transformers 5.x into .venv_t5/ ──
|
||||
# Models like GLM-4.7-Flash need transformers>=5.1.0. Instead of pip-installing
|
||||
# Models like GLM-4.7-Flash need transformers>=5.2.0. Instead of pip-installing
|
||||
# at runtime (slow, ~10-15s), we pre-install into a separate directory.
|
||||
# The training subprocess just prepends .venv_t5/ to sys.path — instant switch.
|
||||
echo ""
|
||||
echo " Pre-installing transformers 5.x for newer model support..."
|
||||
VENV_T5_DIR="$SCRIPT_DIR/.venv_t5"
|
||||
mkdir -p "$VENV_T5_DIR"
|
||||
run_quiet "pip install transformers 5.x" pip install --target "$VENV_T5_DIR" --no-deps "transformers==5.1.0"
|
||||
run_quiet "pip install transformers 5.x" pip install --target "$VENV_T5_DIR" --no-deps "transformers==5.2.0"
|
||||
run_quiet "pip install huggingface_hub for t5" pip install --target "$VENV_T5_DIR" --no-deps "huggingface_hub==1.3.0"
|
||||
echo "✅ Transformers 5.x pre-installed to .venv_t5/"
|
||||
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ def _activate_transformers_version(model_name: str, project_root: str) -> None:
|
|||
os.makedirs(venv_t5, exist_ok=True)
|
||||
r1 = sp.run(
|
||||
[sys.executable, "-m", "pip", "install", "--target", venv_t5,
|
||||
"--no-deps", "transformers==5.1.0"],
|
||||
"--no-deps", "transformers==5.2.0"],
|
||||
stdout=sp.PIPE, stderr=sp.STDOUT,
|
||||
)
|
||||
r2 = sp.run(
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ def _activate_transformers_version(model_name: str, project_root: str) -> None:
|
|||
os.makedirs(venv_t5, exist_ok=True)
|
||||
r1 = sp.run(
|
||||
[sys.executable, "-m", "pip", "install", "--target", venv_t5,
|
||||
"--no-deps", "transformers==5.1.0"],
|
||||
"--no-deps", "transformers==5.2.0"],
|
||||
stdout=sp.PIPE, stderr=sp.STDOUT,
|
||||
)
|
||||
r2 = sp.run(
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ def _activate_transformers_version(model_name: str, project_root: str) -> None:
|
|||
os.makedirs(venv_t5, exist_ok=True)
|
||||
r1 = sp.run(
|
||||
[sys.executable, "-m", "pip", "install", "--target", venv_t5,
|
||||
"--no-deps", "transformers==5.1.0"],
|
||||
"--no-deps", "transformers==5.2.0"],
|
||||
stdout=sp.PIPE, stderr=sp.STDOUT,
|
||||
)
|
||||
r2 = sp.run(
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
Automatic transformers version switching.
|
||||
|
||||
Some newer model architectures (Ministral-3, GLM-4.7-Flash, Qwen3-30B-A3B MoE,
|
||||
tiny_qwen3_moe) require transformers>=5.1.0, while everything else needs the
|
||||
tiny_qwen3_moe) require transformers>=5.2.0, while everything else needs the
|
||||
default 4.57.x that ships with Unsloth.
|
||||
|
||||
When loading a LoRA adapter with a custom name, we resolve the base model from
|
||||
|
|
@ -54,7 +54,7 @@ TRANSFORMERS_5_MODEL_SUBSTRINGS: tuple[str, ...] = (
|
|||
)
|
||||
|
||||
# Versions
|
||||
TRANSFORMERS_5_VERSION = "5.1.0"
|
||||
TRANSFORMERS_5_VERSION = "5.2.0"
|
||||
TRANSFORMERS_DEFAULT_VERSION = "4.57.1"
|
||||
|
||||
# Pre-installed directory for transformers 5.x — created by setup.sh / setup.ps1
|
||||
|
|
@ -111,7 +111,7 @@ def _resolve_base_model(model_name: str) -> str:
|
|||
|
||||
def needs_transformers_5(model_name: str) -> bool:
|
||||
"""Return True if *model_name* belongs to an architecture that requires
|
||||
``transformers>=5.1.0``."""
|
||||
``transformers>=5.2.0``."""
|
||||
lowered = model_name.lower()
|
||||
return any(sub in lowered for sub in TRANSFORMERS_5_MODEL_SUBSTRINGS)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue