Summary
Transformers 5.x support is documented as available (December release notes, Issue #3786), but the pyproject.toml constraint blocks installation:
transformers>4.51.3,...,<=4.57.6
This makes it impossible to install unsloth alongside packages that require transformers>=5.0.0 without workarounds like --no-deps.
Request
Provide an official mechanism to opt-in to transformers 5.x support. Two options:
Option A: New extra
[project.optional-dependencies]
transformers5 = [
"transformers>=5.0.0",
]
Install with:
pip install unsloth[transformers5]
This option would likely be the easiest, both to add and maintain, as well as for people looking for an easy addition to their own pyproject.toml, requirements, scripts, etc.
Option B: Environment variable bypass
(In setup/pyproject)
if os.environ.get("UNSLOTH_ALLOW_TRANSFORMERS5"):
# Skip version constraint check
Why This Matters
Environment
- unsloth 2026.2.1
- transformers 5.x required by dependent package
- uv/pip fails to resolve dependencies
References
Summary
Transformers 5.x support is documented as available (December release notes, Issue #3786), but the pyproject.toml constraint blocks installation:
transformers>4.51.3,...,<=4.57.6
This makes it impossible to install unsloth alongside packages that require transformers>=5.0.0 without workarounds like --no-deps.
Request
Provide an official mechanism to opt-in to transformers 5.x support. Two options:
Option A: New extra
Install with:
pip install unsloth[transformers5]This option would likely be the easiest, both to add and maintain, as well as for people looking for an easy addition to their own pyproject.toml, requirements, scripts, etc.
Option B: Environment variable bypass
(In setup/pyproject)
if os.environ.get("UNSLOTH_ALLOW_TRANSFORMERS5"):
# Skip version constraint check
Why This Matters
Environment
References