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

RuntimeError: You can't move a model that has some modules offloaded to cpu or disk. #19

Open
MaggieLiuuu opened this issue Oct 29, 2024 · 0 comments

Comments

@MaggieLiuuu
Copy link

Hi! I was trying to run the inference.ipynb notebook, and I got an RuntimeError.

While I ran model = LlamaForCausalLM.from_pretrained(train_config.model_name, device_map="auto", config=config).to(device) , I got RuntimeError: You can't move a model that has some modules offloaded to cpu or disk.

I guess it is related to the device = "cuda" if torch.cuda.is_available() else "cpu" , but my GPU RAM is available and not full.

How should I do to solve it? Thank you.

Best regards,
Maggie

image

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