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

Generation after wrapping with XLA FSDP using TPU #68

Open
pUmpKin-Co opened this issue Jul 30, 2024 · 0 comments
Open

Generation after wrapping with XLA FSDP using TPU #68

pUmpKin-Co opened this issue Jul 30, 2024 · 0 comments

Comments

@pUmpKin-Co
Copy link

Hi~
Thanks for your great work.

I would like to ask if it is possible to perform inference with model.generate() after wrapping with XLA FSDP on TPU?

I found that directly using generate() will cause an error as mentioned in this issue. However, if we rebuild the parameters before generating and free the parameters afterward (similar to how FSDP.forward works), it results in an OOM error on v3-8 TPU (same even for 3B models).

I would like to know if you have encountered the same issue or have any related suggestions. Thanks!

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