-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Description
When we pip the latest transformers as the version of it is not clarified in the requirements.txt, and then run src/eval_yarn_mistral.py, the following issue will come up:
MistralForCausalLM has generative capabilities, as
prepare_inputs_for_generationis explicitly defined. However, it doesn't directly inherit fromGenerationMixin. From 👉v4.50👈 onwards,PreTrainedModelwill NOT inherit fromGenerationMixin, and this model will lose the ability to callgenerateand other related functions.
- If you're using
trust_remote_code=True, you can get rid of this warning by loading the model with an auto class. See https://huggingface.co/docs/transformers/en/model_doc/auto#auto-classes- If you are the owner of the model architecture code, please modify your model class such that it inherits from
GenerationMixin(afterPreTrainedModel, otherwise you'll get an exception).- If you are not the owner of the model architecture class, please contact the model code owner to update it.
Can I suggest adding GenerationMixin for MistralForCausalLM?
Infinite Regards
Metadata
Metadata
Assignees
Labels
No labels