some error

#39
by lca-123 - opened

我在使用以下代码时出现了错误

from transformers import AutoTokenizer, AutoModelForCausalLM



# model_id = "shenzhi-wang/Llama3-8B-Chinese-Chat"

model_id = './models/Llama3-8B-Chinese-Chat'


tokenizer = AutoTokenizer.from_pretrained(model_id)

model = AutoModelForCausalLM.from_pretrained(
 model_id, torch_dtype="auto", device_map="auto"
)

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 or log in to comment