Skip to content

FSDP2 integration: torch.chunks(Params4bit)#1612

Closed
ved1beta wants to merge 6 commits into
bitsandbytes-foundation:mainfrom
ved1beta:Fsdp2_integration
Closed

FSDP2 integration: torch.chunks(Params4bit)#1612
ved1beta wants to merge 6 commits into
bitsandbytes-foundation:mainfrom
ved1beta:Fsdp2_integration

Conversation

@ved1beta
Copy link
Copy Markdown
Contributor

@ved1beta ved1beta commented Apr 27, 2025

Fix Params4bit tensor subclass handling

@ved1beta
Copy link
Copy Markdown
Contributor Author

can i get a feed back on this :)

@Titus-von-Koeller
Copy link
Copy Markdown
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
Copy Markdown
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.

Comment thread bitsandbytes/nn/modules.py Outdated
@Titus-von-Koeller
Copy link
Copy Markdown
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
@ved1beta ved1beta closed this May 22, 2025
@Titus-von-Koeller
Copy link
Copy Markdown
Collaborator

@ved1beta Just wondering why you closed this?

@ved1beta
Copy link
Copy Markdown
Contributor Author

ved1beta commented May 23, 2025

I was stuck, examples and tests were failing can you help me with it i amwilling to make it work

@ved1beta ved1beta reopened this May 23, 2025
@ved1beta ved1beta closed this May 27, 2025
@djsaunde
Copy link
Copy Markdown

I'd like to have this for Axolotl, I might jump in here and help test @ved1beta

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

4 participants