Skip to content

FSDP2 integration: torch.chunks(Params4bit) #1612

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 6 commits into
base: main
Choose a base branch
from

Conversation

ved1beta
Copy link
Contributor

@ved1beta ved1beta commented Apr 27, 2025

Fix Params4bit tensor subclass handling

@ved1beta
Copy link
Contributor Author

can i get a feed back on this :)

@Titus-von-Koeller
Copy link
Collaborator

Hey @ved1beta,

Thanks for the contribution. Could you tell us a bit more on why you deleted the lines that you deleted and how you validated your implementation?

@ved1beta
Copy link
Contributor Author

ved1beta commented Apr 28, 2025

When changing from torch.nn.Parameter to torch.Tensor, we're now using the parent class's initialization methods which already handle basic tensor properties.
for validation creating a test initialize 4-bit quantized model wraps it with FSDP2.

@Titus-von-Koeller
Copy link
Collaborator

Really cool, ultimately a high-level test making sure we also notice when this functionality breaks would be really cool. For now to reproduce your exact results it would already be helpful to include an example script in /examples.

@ved1beta ved1beta marked this pull request as ready for review April 30, 2025 12:29
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