Loading DistilBertModel with AutoModel gives 12 layers  
I am using ``AutoModel`` to load  ``distilbert-base-uncased`` and save the fine-tuned model after training using ``model.save_pretrained('path_to_save')``. However, when I load the fine-tuned model using ``AutoModel.from_pretrained('path_to_the_saved_model')``, it extracts 12 layers instead of 6 layers. I also checked the ``config.json`` file that was saved automatically and the number of layers is still 6. When I load the model with ``DistilBertModel.from_pretrained()`` it extracts 6 layers. In the following, I copied the ``config.json`` file. Does anyone know why this happens? am I lacking some packages or files when loading/saving the model?

> {
  "activation": "gelu",
  "architectures": [
    "DistilBertModel"
  ],
  "attention_dropout": 0.1,
  "bos_token_id": 0,
  "dim": 768,
  "do_sample": false,
  "dropout": 0.1,
  "eos_token_ids": 0,
  "finetuning_task": null,
  "hidden_dim": 3072,
  "id2label": {
    "0": "LABEL_0",
    "1": "LABEL_1"
  },
  "initializer_range": 0.02,
  "is_decoder": false,
  "label2id": {
    "LABEL_0": 0,
    "LABEL_1": 1
  },
  "length_penalty": 1.0,
  "max_length": 20,
  "max_position_embeddings": 512,
  "model_type": "distilbert",
  "n_heads": 12,
  "n_layers": 6,
  "num_beams": 1,
  "num_labels": 2,
  "num_return_sequences": 1,
  "output_attentions": true,
  "output_hidden_states": false,
  "output_past": true,
  "pad_token_id": 0,
  "pruned_heads": {},
  "qa_dropout": 0.1,
  "repetition_penalty": 1.0,
  "seq_classif_dropout": 0.2,
  "sinusoidal_pos_embds": false,
  "temperature": 1.0,
  "tie_weights_": true,
  "top_k": 50,
  "top_p": 1.0,
  "torchscript": false,
  "use_bfloat16": false,
  "vocab_size": 40000
}


This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
