Fix Params4bit tensor subclass handling by ved1beta · Pull Request #1719 · bitsandbytes-foundation/bitsandbytes

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Conversation

@ved1beta

Copy link

Contributor

fix #1424
Added torch_function method to intercept torch.chunk and torch.split operations
Preserves all quantization attributes when creating new tensor chunks
@djsaunde

djsaunde reacted with eyes emoji

@djsaunde

Copy link

djsaunde commented

Aug 3, 2025

+1, would like to have this for Axolotl. I've opened a PR to patch this into Axolotl for now until this is upstreamed.

ved1beta reacted with heart emoji

@matthewdouglas matthewdouglas added this to the v0.47.0 milestone

Aug 4, 2025

@matthewdouglas

Copy link

Member

Thanks! This seems good to me. Would you mind fixing the lint issues? It looks to just be whitespace mostly.

ved1beta reacted with heart emoji

matthewdouglas

matthewdouglas previously approved these changes Aug 4, 2025

@github-actions

Copy link

github-actions bot commented

Aug 4, 2025

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.

@djsaunde

Copy link

djsaunde commented

Aug 4, 2025

FYI, we just merged a patch including this fix into Axolotl.

@matthewdouglas

Copy link

Member

I haven't tested out FSDP2 with this myself, but if it works for Axolotl, happy to merge! Thanks for the contribution @ved1beta!

djsaunde and ved1beta reacted with heart emoji

@matthewdouglas matthewdouglas merged commit 4265392 into bitsandbytes-foundation:main

Aug 6, 2025

47 checks passed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@matthewdouglas matthewdouglas matthewdouglas left review comments

Assignees

No one assigned

Labels

Projects

None yet

Milestone

v0.47.0

Development

Successfully merging this pull request may close these issues.

FSDP2 integration: torch.chunks(Params4bit) not returning Params4bit subclass

3 participants

@ved1beta @djsaunde @matthewdouglas