Skip to content

Fix Params4bit tensor subclass handling #1719

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

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
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.

@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.

matthewdouglas
matthewdouglas previously approved these changes Aug 4, 2025
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

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