Size mismatch

#10
by neighborwang - opened

The same error happens like this https://github.com/huggingface/peft/issues/1579 when i'm trying to merge my adapter (finetuned LoRA model - https://huggingface.co/neighborwang/Codelica-7B) into the base model (Qwen2.5-Coder-7B-Instruct ).

RuntimeError: Error(s) in loading state_dict for PeftModelForCausalLM:
size mismatch for base_model.model.model.embed_tokens.weight: 
copying a param with shape torch.Size([151665, 3584]) from checkpoint, 
the shape in current model is torch.Size([152064, 3584]).

I faced the same issue with Llama 3.1 but i solved it use specific transformers version, so I tried for my adapter and Qwen2.5-Coder-7B-Instruct the following transformers versions:

v4.45.1
v4.45.0
v4.44.0
v4.43.0
v4.37.0

But nothing works... I need some help. Also in the GitHub issue I mentioned above, other people are also facing this issue.

Thanks a lot in advance!

Sign up or log in to comment