Skip to content
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

Support for Zero3 or Zero3 Offload? Error when loading model state_dict #38

Open
Z-MU-Z opened this issue Aug 9, 2024 · 1 comment
Open

Comments

@Z-MU-Z
Copy link

Z-MU-Z commented Aug 9, 2024

Hello,

I encountered an error while trying to load a model using the following code in [clip_encoder.py]

self.vision_tower.load_state_dict(torch.load(self.clip_model), strict=False)

The error message is as follows:
[rank0]: raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
[rank0]: RuntimeError: Error(s) in loading state_dict for CLIP:
[rank0]: size mismatch for visual.trunk.stem.0.weight: copying a param with shape torch.Size([192, 3, 4, 4]) from checkpoint, the shape in current model is torch.Size([0])

This happens only when I use scripts/zero3_offload.json or
scripts/zero3.json

@LiWentomng
Copy link
Collaborator

@Z-MU-Z
Hello, our code currently does not support Zero3 for model training. We also face some unresolved issues. I recommend using Zero2 for now. We also welcome contributions from the community.

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

No branches or pull requests

2 participants