model.generate fails when doing self validation in Transformers library

#2
by pgrazaitis - opened

In using the getting started snippet I am receiving an error within:

output = model.generate(input_ids)

The ultimate error ends up being:

TypeError: The current model class (LlamaModel) is not compatible with .generate(), as it doesn't have a language model head. Please use one of the following classes instead: {'LlamaForCausalLM'}

Any possible insight as to where to dig in?

Sorry for the confusion.
I think you should use AutoModelForCausalLM instead of AutoModel.
I will update the instructions soon.

Thank you for your interest in our project!

Sign up or log in to comment