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

NotImplementedError: Cannot copy out of meta tensor; no data! #43

Open
lianhh1212 opened this issue Nov 12, 2024 · 0 comments
Open

NotImplementedError: Cannot copy out of meta tensor; no data! #43

lianhh1212 opened this issue Nov 12, 2024 · 0 comments

Comments

@lianhh1212
Copy link

Thanks your great work! the following error happened when I used run.py. What is the problem?

Traceback (most recent call last):
File "ShareGPT4Video-master/run.py", line 161, in
tokenizer, model, processor, context_len = load_pretrained_model(
File "ShareGPT4Video-master/llava/model/builder.py", line 147, in load_pretrained_model
model = LlavaLlamaForCausalLM.from_pretrained(
File "/usr/local/lib/python3.10/site-packages/transformers/modeling_utils.py", line 3917, in from_pretrained
dispatch_model(model, **device_map_kwargs)
File "/usr/local/lib/python3.10/site-packages/accelerate/big_modeling.py", line 385, in dispatch_model
model.to(device)
File "/usr/local/lib/python3.10/site-packages/transformers/modeling_utils.py", line 2595, in to
return super().to(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1160, in to
return self._apply(convert)
File "/usr/local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 810, in _apply
module._apply(fn)
File "/usr/local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 810, in _apply
module._apply(fn)
File "/usr/local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 833, in _apply
param_applied = fn(param)
File "/usr/local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1158, in convert
return t.to(device, dtype if t.is_floating_point() or t.is_complex() else None, non_blocking)
NotImplementedError: Cannot copy out of meta tensor; no data!

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