# AutoModel vs PreTrainedModel difference/relationship

**URL:** <https://discuss.huggingface.co/t/automodel-vs-pretrainedmodel-difference-relationship/98618>\
**Category:** 🤗Transformers\
**Created:** [July 21, 2024, 5:17pm UTC](https://discuss.huggingface.co/t/automodel-vs-pretrainedmodel-difference-relationship/98618 "2024-07-21T17:17:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SnailTheSnail](https://avatars.discourse-cdn.com/v4/letter/s/b5e925/32.png) [@SnailTheSnail](https://discuss.huggingface.co/u/SnailTheSnail)\
**Post date:** [July 21, 2024, 5:17pm UTC](https://discuss.huggingface.co/t/automodel-vs-pretrainedmodel-difference-relationship/98618/1 "2024-07-21T17:17:32Z")

</div>

The AutoModel description is:  
“This is a generic model class that will be instantiated as one of the base model classes of the library when created with the [from\_pretrained()](https://huggingface.co/docs/transformers/v4.42.0/en/model_doc/auto#transformers.AutoModel.from_pretrained) class method or the [from\_config()](https://huggingface.co/docs/transformers/v4.42.0/en/model_doc/auto#transformers.AutoModel.from_config) class method.”

The PreTrainedModel description is:  
“Base class for all models.”

Does that mean that AutoModel is a type/subclass of PreTrainedModel? What is the relationship/difference between those two classes exactly?
