JetRunner/BERT-of-Theseus

Why the model of pytorch_model.bin is also 579.3MB?

janyChan opened this issue · 3 comments

Why the model of pytorch_model.bin is as big as 579.3MB?

Good question. For the convenience of experiments, we kept the original layers in the saved model. If you want to get rid of them, simply add this line before saving the model:

del model.layer

It won’t affect the inference since the inference only uses model.scc_layer. Hope it helps.

Also FYI, we’ll add a script to convert a Bert-of-Theseus model to a normal huggingface BERT model later.

Closing it for being inactive. Please reopen it if you have any further question.