Skip to content

pip: publish the torch 2.13 and 2.14 extras - #16665

Merged
danielhanchen merged 2 commits into
pipfrom
pip-torch-2130-2140-extras
Nov 4, 2026
Merged

danielhanchen merged 2 commits into
pipfrom
pip-torch-2130-2140-extras

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Fixes #16520

Problem

main has carried the torch 2.13 and 2.14 extras since #12151, but this branch (what gets uploaded to PyPI) never got them. #12152 raised the base ceiling to torch<2.15.0 here, and the extras themselves were left out. So on 2026.11.1:

$ uv pip compile <(echo "unsloth[cu130-torch2130]==2026.11.1") --extra-index-url https://download.pytorch.org/whl/cu130 --index-strategy unsafe-best-match
warning: The package `unsloth==2026.11.1` does not have an extra named `cu130-torch2130`
torch==2.14.1+cu130

The install does not fail. It just ignores the extra and resolves a different torch than the one asked for. cu130-torch2140 behaves the same way.

Changes

  • pyproject.toml: adds the 12 extras from main, each placed after its 2.12.1 sibling: cu126/cu130 x onlytorch / -torch / -ampere-torch x 2130 / 2140. The xformers wheel URLs are written as xformers==0.0.35 with the merged platform marker, exactly like the existing torch 2.12 extras on this branch, so there are no direct references for PyPI to reject. Nothing else changes: the base dependencies and all 167 existing extras are byte-identical.
  • tests/python/test_pyproject_pypi_installable.py: a guard that every cu*-torch<T> extra _auto_install.py can print exists here, with cu126 and cu130 required for torch 2.12 and newer. It fails on the current pip head (missing 2130, 2140) and passes with this change, so the next torch bump on main cannot silently miss the release again.

Verification

  • Wheel metadata built from this branch: 179 extras (167 + 12), 0 direct URLs; the new Requires-Dist lines have the same shape as the published cu130-torch2121 ones.
  • With that metadata, uv pip compile (Python 3.12, Linux x86_64 and Windows x86_64) resolves each new extra with no warnings:
extra resolved torch
cu126-torch2130, cu126-ampere-torch2130 2.13.0+cu126
cu130-torch2130, cu130-ampere-torch2130 2.13.0+cu130
cu126-torch2140, cu126-ampere-torch2140 2.14.0+cu126
cu130-torch2140, cu130-ampere-torch2140 2.14.0+cu130
cu126-torch2121, cu130-torch2121 (control) unchanged, 2.12.1+cu126 / 2.12.1+cu130
  • python -m pytest tests/python/test_pyproject_pypi_installable.py: 9 passed (the new test fails on the current pip head).

Effect on users

This only adds extra names. Plain pip install unsloth, every existing extra, Studio, Desktop and the notebooks resolve exactly as before. People who ask for unsloth[cu126-torch2130] / unsloth[cu130-torch2140] and so on now get the torch build they asked for instead of a warning.

@danielhanchen danielhanchen self-assigned this Nov 4, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-04T15:12:50.810788Z 554732a Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: 554732a98f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danielhanchen
danielhanchen merged commit 2353183 into pip Nov 4, 2026
@danielhanchen
danielhanchen deleted the pip-torch-2130-2140-extras branch November 4, 2026 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant