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

how to use device_map in diffusers.stablediffusionpipeline.from_pretrained #8646

Open
chaowenguo opened this issue Jan 29, 2025 · 3 comments
Labels
usability Bugs/features related to improving the usability of PyTorch/XLA xla:tpu TPU specific issues and PRs

Comments

@chaowenguo
Copy link

chaowenguo commented Jan 29, 2025

❓ Questions and Help

https://huggingface.co/docs/accelerate/main/en/usage_guides/big_modeling#designing-a-device-map

i try device_map=auto. but it seems not recongize the xla device tpu all goto cpu. please help and provide the minimum working example. @JackCaoG

@zpcore
Copy link
Collaborator

zpcore commented Feb 3, 2025

The feature sounds like host offloading. It's currently in experimental stage by @tengyifei .

@chaowenguo
Copy link
Author

@zpcore @tengyifei could you give me more detailed example?how to use host offloading?

@miladm
Copy link
Collaborator

miladm commented Feb 3, 2025

You should be able to find an example of this implementation here: https://github.com/AI-Hypercomputer/tpu-recipes/tree/main/training/trillium/Llama3-405B-PyTorch

On a related note, we are working on rolling out a much cleaner reference model.

@ysiraichi ysiraichi added xla:tpu TPU specific issues and PRs usability Bugs/features related to improving the usability of PyTorch/XLA labels Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
usability Bugs/features related to improving the usability of PyTorch/XLA xla:tpu TPU specific issues and PRs
Projects
None yet
Development

No branches or pull requests

4 participants