Regarding distlbert uncased model's size
I finetuned the distlbert uncased model, and I had a thought that since it is a lower layer model, it should have less weight. But, to my surprise, I find that the model generated after finetuning, I saved it as :
      tf.saved_model.save(model, "./tempdir/distilbert/2/")
and the tf model got saved.
this model has a very high size(of 810 Mb), although it should be less .And the original bert mdoel which is a large model has a size of 410 Mb.
Please look into the matter
please reply<|||||>You're comparing two formats that are different, so the comparison doesn't really make sense. The BERT model weighs 410MB when saved as a HDF5 file, whereas DistilBERT weighs 810MB when saved as a SavedModel, which also contains the graph and variables.

Saving both files in HDF5:

```py
from transformers import TFBertModel, TFDistilBertModel

bert = TFBertModel.from_pretrained("bert-base-uncased")
distilbert = TFDistilBert.from_pretrained("distilbert-base-uncased")

bert.save_pretrained("bert")
distilbert.savePretrained("distilbert")
```

`ls` in "bert" -> 414MB for the `tf_model.h5`
`ls` in "distilbert" -> 254MB for the `tf_model.h5`<|||||>I got your answer, that's correct.But, since I need to serve the model  using tfserving,so I need a SavedModel format only.
1)Or is there any way to serve   .h5 models through tfserving?
2)Or is there any way i can remove adam momentum and such trainig variables from my model to reduce the size in tensorflow 2.1?,because i have seen in tf 2.x freezing graph is deprecated
<|||||>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.
