Skip to content

Declare a minimum bitsandbytes version - #7641

Merged
albertvillanova merged 2 commits into
mainfrom
declare-bitsandbytes-floor
Oct 15, 2026
Merged

albertvillanova merged 2 commits into
mainfrom
declare-bitsandbytes-floor

Conversation

@albertvillanova

@albertvillanova albertvillanova commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

This PR declares a minimum bitsandbytes version in the quantization and dev extras, which had no lower bound at all.

Part of #7644.

Closes the gap raised in #7116.

Depends on

Motivation

bitsandbytes was the only dependency TRL named without a version. Declaring a first floor is not a bump: it drops support for nothing, it records the constraint that already applies.

0.45.1 is that constraint. With the torch floor of 2.6 (#7642), 0.45.0 and below cannot even be imported: torch 2.6 ships Triton 3.2, which removed triton.ops, and bitsandbytes only vendored the module it imported from there in 0.45.1 (bitsandbytes-foundation/bitsandbytes#1413). 0.45.1 passes the 18 quantization tests on torch 2.6.0 with transformers 4.56.2.

Released 2025-01-23, so it is 21 months old and well clear of the 1-year rule.

A torch built with CUDA 13, the PyPI default since torch 2.11, needs bitsandbytes 0.48.0 or later, the first release that ships a CUDA 13 binary. That pairing between two compiled packages is not something a floor can express, and a fresh install resolves the latest bitsandbytes, which works with every torch. For the same reason, pinning bitsandbytes==0.45.1 in the min-deps job waits until #7642 pins torch there.

Changes

  • Replace the unpinned bitsandbytes with bitsandbytes>=0.45.1 in the quantization extra and in dev

Note

Low Risk
Packaging-only change to optional extras; no application logic or default install path is modified.

Overview
Adds a minimum version floor for bitsandbytes (>=0.45.1) in the quantization and dev optional dependency extras, replacing an unpinned dependency. The inline comment documents that older releases break on PyTorch 2.6 because they import triton.ops, which Triton 3.2 removed; 0.45.1 vendors the needed compatibility.

This records an effective constraint already implied by the torch stack rather than changing TRL runtime code.

Reviewed by Cursor Bugbot for commit 6fdda42. Bugbot is set up for automated code reviews on this repo. Configure here.

@cursor

cursor Bot commented Oct 12, 2026

Copy link
Copy Markdown

Bugbot is paused — on-demand spend limit reached

Bugbot uses usage-based billing for this team and has hit its on-demand spend limit.

A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue.

@github-actions github-actions Bot added the 🔧 maintenance CI, tooling, tests, or repo upkeep label Oct 12, 2026
@bot-ci-comment

Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@qgallouedec qgallouedec left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, we could also set this version for the test with min deps

Comment thread pyproject.toml Outdated
]
quantization = [
"bitsandbytes"
"bitsandbytes>=0.43.1" # lowest version transformers 4.56.2 loads

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as per the two years rule, it should be 0.44.1

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or even 0.45

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0.45.1 rather than 0.45: with torch >= 2.6 (#7642), 0.44.1 and 0.45.0 fail at import bitsandbytes. torch 2.6 ships Triton 3.2, which removed triton.ops, and bitsandbytes only vendored the module it imported from there in 0.45.1 (bitsandbytes-foundation/bitsandbytes#1413). I ran the 18 quantization tests locally with the min pins: 0.45.1 passes on torch 2.6.0, and so does every later version I tried on a CUDA 12 torch. I'll update the floor here to 0.45.1.

The pin in the min-deps job has to wait for #7642, though: the job currently resolves the newest torch, built with CUDA 13, and 0.45.1 ships no CUDA 13 binary (bitsandbytes added it in 0.48.0), so the 18 quantization tests would fail. I'll add the pin once #7642 pins torch in that job.

@albertvillanova
albertvillanova merged commit c5e6335 into main Oct 15, 2026
10 checks passed
@albertvillanova
albertvillanova deleted the declare-bitsandbytes-floor branch October 15, 2026 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔧 maintenance CI, tooling, tests, or repo upkeep

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants