TypeError: Qwen2Model.forward() got an unexpected keyword argument 'labels'
#3
by
Lijens
- opened
I wanted to encode the text to get embedded, but I got the above error.
same here, any solution?
I used "AutoModelForCausalLM", and this problem was solved.
"
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype=torch.float16,
device_map="auto"
).to(device)
"