google-research / bert

TensorFlow code and pre-trained models for BERT
https://arxiv.org/abs/1810.04805
Apache License 2.0
37.7k stars 9.55k forks source link

why the result model.ckpt is such bigger than the pretrained bert model #813

Open MrRace opened 5 years ago

MrRace commented 5 years ago

After I run run_classifier.py,I see the fine tuning result model(1.2GB) is such bigger than the pretrained BERT model(390MB). The model which is saved by fine tuning : 01

The defalt pretrained bert model: 02

I think the fine tuning result should be same with the pretrained bert model in the size, is it? How can I do to get a fine-tuned model that has the same size with pretrained bert model?

MrRace commented 5 years ago

@jacobdevlin-google could you help me? I have been confused for a long time. Thanks a lot!

frankinwi commented 5 years ago

Same problem.Why the fine-tuned model is much larger than the pretrained model?

sarnikowski commented 5 years ago

Check out issue #99 for an explanation.

frankinwi commented 5 years ago

@sarnikowski Thank you very much and I know the reason.

MrRace commented 4 years ago

@sarnikowski Thanks a lot!