The issue lies with the tokenizer.json file.

#2
by BrianFu1105 - opened

Hello, I am currently utilizing this model for inference. However, I encountered an issue while loading the model.

============================================================
RuntimeError: Error(s) in loading state_dict for PeftModelForCausalLM:
size mismatch for base_model.model.model.embed_tokens.modules_to_save.default.weight: copying a param with shape torch.Size([51008, 4096]) from checkpoint, the shape in current model is torch.Size([32000, 4096]).
size mismatch for base_model.model.lm_head.modules_to_save.default.weight: copying a param with shape torch.Size([51008, 4096]) from checkpoint, the shape in current model is torch.Size([32000, 4096]).

The tokenizer for this project has a length of 32000, and the tokenizer.json file in this project is identical to the original tokenizer.json file of llama2. I would like to inquire whether this situation is reasonable or if there has been a mistake in the file transmission.

Looking forward to your response! Thank you!

I delete tokenizer.json file and it works.

Sign up or log in to comment