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

Exception: Could not find the transformer layer class to wrap in the model. #55

Open
matbee-eth opened this issue May 16, 2024 · 0 comments

Comments

@matbee-eth
Copy link

When trying to use Accelerate with FSDP I get the error:

[rank0]: Traceback (most recent call last):
[rank0]:   File "/home/acidhax/dev/SVD_Xtend/train_svd.py", line 1255, in <module>
[rank0]:     main()
[rank0]:   File "/home/acidhax/dev/SVD_Xtend/train_svd.py", line 881, in main
[rank0]:     unet, optimizer, lr_scheduler, train_dataloader = accelerator.prepare(
[rank0]:   File "/home/acidhax/miniconda3/envs/training/lib/python3.10/site-packages/accelerate/accelerator.py", line 1292, in prepare
[rank0]:     result = tuple(
[rank0]:   File "/home/acidhax/miniconda3/envs/training/lib/python3.10/site-packages/accelerate/accelerator.py", line 1293, in <genexpr>
[rank0]:     self._prepare_one(obj, first_pass=True, device_placement=d) for obj, d in zip(args, device_placement)
[rank0]:   File "/home/acidhax/miniconda3/envs/training/lib/python3.10/site-packages/accelerate/accelerator.py", line 1169, in _prepare_one
[rank0]:     return self.prepare_model(obj, device_placement=device_placement)
[rank0]:   File "/home/acidhax/miniconda3/envs/training/lib/python3.10/site-packages/accelerate/accelerator.py", line 1443, in prepare_model
[rank0]:     self.state.fsdp_plugin.set_auto_wrap_policy(model)
[rank0]:   File "/home/acidhax/miniconda3/envs/training/lib/python3.10/site-packages/accelerate/utils/dataclasses.py", line 1182, in set_auto_wrap_policy
[rank0]:     raise Exception("Could not find the transformer layer class to wrap in the model.")
[rank0]: Exception: Could not find the transformer layer class to wrap in the model.
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

1 participant