Difference between AutoModel and AutoModelForLM
What is the difference between downloading a model usingAutoModel.from_pretrained(model_name)andAutoModelForLM.from_pretrained(model_name)?
2021-05-04T12:17:38Z
The first one will give you the bare pretrained model, while the second one will have a head attached to do language modeling. Note thatAutoModelForLMis deprecated, you should useAutoModelForCausalLM,AutoModelForMaskedLMorAutoModelForSeq2SeqLMdepending on the task at hand.
2021-05-04T14:38:59Z
Thank You.