Unable to load DistilBertModel after training
## ❓ Questions & Help


I'm following the example to train a DistilBert model from scratch from:  examples/distillation/README.md

I perform the training step:

```
python examples/distillation/train.py --dump_path ser_dir/sm_training_1 --data_file data/sm_bin_text.bert-base-uncased.pickle --token_counts data/sm_token_counts.bert-base-uncased.pickle --force --fp16
```

Which completes successfully, however the `dump_path` doesn't contain a `pytorch_model.bin` file so I cannot load in the model:

```py
from pytorch_transformers import DistilBertModel

DistilBertModel.from_pretrained("ser_dir/sm_training_1")
Model name 'ser_dir/sm_training_1' was not found in model name list (distilbert-base-uncased, distilbert-base-uncased-distilled-squad). We assumed 'ser_dir/sm_training_1/pytorch_model.bin' was a path or url but couldn't find any file associated to this path or url.
Traceback (most recent call last):
...
OSError: file ser_dir/sm_training_1/pytorch_model.bin not found
```

Content of serialization directory:

```sh
ls ser_dir/sm_training_1/
checkpoint.pth  config.json  git_log.json  log  model_epoch_0.pth  model_epoch_1.pth  model_epoch_2.pth  parameters.json
```

I also tried to load it as a regular `BertModel`. Is there something else I need to do to load in a basic .bin file then apply the checkpoint weights on top? I cannot find any tutorials or examples specifying the next steps on this process.

Thanks!
Hi @dalefwillis,
You simply have to rename your last checkpoint (I guess in your case it's _"model_epoch_2.pth"_) to _"pytorch_model.bin"_ --> `mv model_epoch_2.pth pytorch_model.bin`.
I updated the training code so that the very last _"model_epoch_*.pth"_ checkpoint is also saved as _"pytorch_model.bin"_ so that you don't have to do this manip manually.<|||||>Thanks for the fast response! I just tried it and it works.