Repository navigation
Declare a minimum bitsandbytes version - #7641
Conversation
Bugbot is paused — on-demand spend limit reachedBugbot 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. |
|
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
left a comment
There was a problem hiding this comment.
Cool, we could also set this version for the test with min deps
| ] | ||
| quantization = [ | ||
| "bitsandbytes" | ||
| "bitsandbytes>=0.43.1" # lowest version transformers 4.56.2 loads |
There was a problem hiding this comment.
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.
This PR declares a minimum bitsandbytes version in the
quantizationanddevextras, which had no lower bound at all.Part of #7644.
Closes the gap raised in #7116.
Depends on
Motivation
bitsandbyteswas 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.1in the min-deps job waits until #7642 pins torch there.Changes
bitsandbyteswithbitsandbytes>=0.45.1in thequantizationextra and indevNote
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 thequantizationanddevoptional dependency extras, replacing an unpinned dependency. The inline comment documents that older releases break on PyTorch 2.6 because they importtriton.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.