Chapter 4 - Custom NER Model

We create a model using xlmr_model = XLMRobertaForTokenClassification.from_pretrained("xlm-roberta-base"). The model has layers like RobertaAttention, RobertaEmbeddings, etc. But if I instantiate XLMRobertaForTokenClassification using from transformers import XLMRobertaForTokenClassification, it has layers like XLMRobertaAttention, XLMRobertaEmbeddings etc. But both say ..from_pretrained("xlm-roberta-base") i.e. loading weights from the same checkpoint. Shouldn’t it give an error or something?