I want to know why all of my models failed on eval and this is frustating

#1125
by rootxhacker - opened
Open LLM Leaderboard org

Hi @rootxhacker ,

It looks like there is a shape mismatch when loading the models weights:

ValueError: Trying to set a tensor of shape torch.Size([151665, 5120]) in "weight" (which has shape torch.Size([152064, 5120])), this looks incorrect.

The expected tensor shape doesn't match the shape in the checkpoint, which usually happens due to an incorrect model configuration or a mismatch between the model architecture and the checkpoint

Could you please verify your models settings?

Open LLM Leaderboard org

@Cran-May , could you please open a separate discussion? Thus I'll be able to check your models, it can be an another error

Hey @alozowski
I am able to load the model Apollo_v2-32B
Using below

from transformers import AutoModelForCausalLM, AutoTokenizer

model_name = "rootxhacker/Apollo_v2-32B”

model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype="auto",
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained(model_name)

prompt = "How many r's are in the word "strawberry""
messages = [
{"role": "user", "content": prompt}
]
text = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True
)

model_inputs = tokenizer([text], return_tensors="pt").to(model.device)

generated_ids = model.generate(
**model_inputs,
max_new_tokens=32768
)
generated_ids = [
output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
]

response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
print(response)

clefourrier changed discussion status to closed
Your need to confirm your account before you can post a new comment.

Sign up or log in to comment