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

I tired Mistral 7b model, but I got this issue #56

Open
TejasLidhure opened this issue Apr 11, 2024 · 0 comments
Open

I tired Mistral 7b model, but I got this issue #56

TejasLidhure opened this issue Apr 11, 2024 · 0 comments

Comments

@TejasLidhure
Copy link

LOGS:

You are using a model of type mistral to instantiate a model of type llama. This is not supported for all configurations of models and can yield errors.
Loading checkpoint shards: 0%| | 0/3 [00:00<?, ?it/s]
Traceback (most recent call last):
File "/root/whiz/llmpruner/LLM-Pruner/hf_prune.py", line 314, in
main(args)
File "/root/whiz/llmpruner/LLM-Pruner/hf_prune.py", line 40, in main
model = LlamaForCausalLM.from_pretrained(
File "/root/miniconda3/envs/llmpruner/lib/python3.9/site-packages/transformers/modeling_utils.py", line 3531, in from_pretrained
) = cls._load_pretrained_model(
File "/root/miniconda3/envs/llmpruner/lib/python3.9/site-packages/transformers/modeling_utils.py", line 3958, in _load_pretrained_model
new_error_msgs, offload_index, state_dict_index = _load_state_dict_into_meta_model(
File "/root/miniconda3/envs/llmpruner/lib/python3.9/site-packages/transformers/modeling_utils.py", line 812, in _load_state_dict_into_meta_model
set_module_tensor_to_device(model, param_name, param_device, **set_module_kwargs)
File "/root/miniconda3/envs/llmpruner/lib/python3.9/site-packages/accelerate/utils/modeling.py", line 348, in set_module_tensor_to_device
raise ValueError(
ValueError: Trying to set a tensor of shape torch.Size([1024, 4096]) in "weight" (which has shape torch.Size([4096, 4096])), this look incorrect.

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