Skip to content

[BUG] - <title>When I use fsdp, Because the flattened parameters, I always meet some question #2610

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

Closed
sqzhang-lazy opened this issue Oct 19, 2023 · 4 comments

Comments

@sqzhang-lazy
Copy link

sqzhang-lazy commented Oct 19, 2023

Add Link

When I use fsdp, Because the flattened parameters, I always meet some question.
for examples:
RuntimeError: mat2 must be a matrix, got 1-D tensor
and
RuntimeError: weight should have at least three dimensions
It always occurred in some flattened model weights, sucn as conv, linear etc.
How can I solve this problem?

Describe the bug

When I use fsdp, Because the flattened parameters, I always meet some question
for examples:
RuntimeError: mat2 must be a matrix, got 1-D tensor
and
RuntimeError: weight should have at least three dimensions
It always occurred in some flattened model weights, sucn as conv, linear etc.
How can I solve this problem?

Describe your environment

Pytorch 2.1.0

cc @osalpekar @H-Huang @kwen2501

@yiliu30
Copy link

yiliu30 commented Nov 1, 2023

Hi @648652443, could please provide some code snippets to reproduce the bug?

@weixiong-ur
Copy link

Hi, I faced with the same issue using the latest diffusers and FSDP. I wonder if you have resolved this issue?

@fegin
Copy link

fegin commented May 12, 2025

@svekars This issue is not about tutorial. We should close this issue and ask users to submit to the main PyTorch repo.

@svekars
Copy link
Contributor

svekars commented May 12, 2025

This looks quite old. If this is still an issue, please submit to the main repo.

@svekars svekars closed this as completed May 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants