Skip to content

Conversation

matthewdouglas
Copy link
Contributor

@matthewdouglas matthewdouglas commented Jul 1, 2025

What does this PR do?

This PR improves compatibility with bitsandbytes.

In bitsandbytes v0.45.0, we introduced bitsandbytes.functional.int8_vectorwise_quant and bitsandbytes.functional.int8_double_quant as replacements for bitsandbytes.functional.double_quant. At this time we marked the old double_quant function as deprecated, and we then removed it in v0.46.0.

Fixes #20926

Before submitting
  • Was this discussed/agreed via a GitHub issue? (not for typos and docs)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together?
  • Did you make sure to update the documentation with your changes? (if necessary)
  • Did you write any new necessary tests? (not for typos and docs)
  • Did you verify new and existing tests pass locally with your changes?
  • Did you list all the breaking changes introduced by this pull request?
  • Did you update the CHANGELOG? (not for typos, docs, test updates, or minor internal changes/refactors)

PR review

Anyone in the community is welcome to review the PR.
Before you start reviewing, make sure you have read the review guidelines. In short, see the following bullet-list:

Reviewer checklist
  • Is this pull request ready for review? (if not, please submit in draft mode)
  • Check that all items from Before submitting are resolved
  • Make sure the title is self-explanatory and the description concisely explains the PR
  • Add labels and milestones (and optionally projects) to the PR so it can be classified

📚 Documentation preview 📚: https://pytorch-lightning--20956.org.readthedocs.build/en/20956/

@github-actions github-actions bot added docs Documentation related fabric lightning.fabric.Fabric pl Generic label for PyTorch Lightning package dependencies Pull requests that update a dependency file labels Jul 1, 2025
@Borda
Copy link
Collaborator

Borda commented Jul 1, 2025

wondering how we can validate it since the GPU for some reason installed only bitsandbytes==0.45.5

Copy link

codecov bot commented Jul 1, 2025

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 87%. Comparing base (afa7d56) to head (63ecb07).
⚠️ Report is 193 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #20956   +/-   ##
=======================================
  Coverage      87%      87%           
=======================================
  Files         268      268           
  Lines       23460    23460           
=======================================
  Hits        20402    20402           
  Misses       3058     3058           

@matthewdouglas
Copy link
Contributor Author

@Borda It looks like there's a docker image being used here with it preinstalled so it already satisfies bitsandbytes>=0.45.2,<0.47.0. Is there a way to rebuild that? Or could we temporarily change the requirement to bitsandbytes>=0.46.0 to force an update?

@Borda
Copy link
Collaborator

Borda commented Jul 2, 2025

Is there a way to rebuild that?

this will push new docker image: https://github.com/Lightning-AI/pytorch-lightning/actions/runs/16019234343

But this line with -U shall upgrade all packages if possible

pip install -e ".[${extra}dev]" -U --extra-index-url="${TORCH_URL}"

@github-actions github-actions bot added the ci Continuous Integration label Jul 2, 2025
@Borda
Copy link
Collaborator

Borda commented Jul 2, 2025

all shall be fixed now :)

@Borda Borda merged commit 73f1ab8 into Lightning-AI:master Jul 2, 2025
133 checks passed
Borda added a commit that referenced this pull request Aug 13, 2025
* Fix compatibility for bitsandbytes>=0.46
* --upgrade-strategy=eager

---------

Co-authored-by: Jirka B <[email protected]>
(cherry picked from commit 73f1ab8)
Borda added a commit that referenced this pull request Aug 13, 2025
* Fix compatibility for bitsandbytes>=0.46
* --upgrade-strategy=eager

---------

Co-authored-by: Jirka B <[email protected]>
(cherry picked from commit 73f1ab8)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Continuous Integration dependencies Pull requests that update a dependency file docs Documentation related fabric lightning.fabric.Fabric pl Generic label for PyTorch Lightning package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

compatibility patch for BnB >=0.46

2 participants