Perplexity overshoots after resuming the training from the last checkpoint using multilingual transformer.
❓ Questions and Help
What is your question?
I am training a multilingual transformer model using the default parameters as listed in the official example.
I trained the model for 20 epochs and the validation perplexity was 24.56 after the end of that epoch. But, after resuming the training from 21th epoch, the perplexity just overshoot to 2540.74. So should I reset the parameters before resuming from the last checkpoint?
What's your environment?
- fairseq Version : latest master
- PyTorch Version : 1.5.0
- OS : ubuntu 18.04
- How you installed fairseq : source
- Build command you used (if compiling from source): pip install --editable ./
- Python version: python 3.6.9
- CUDA/cuDNN version: 10.1
- GPU models and configuration: Tesla T4
when you say you resumed training, how exactly did you do this? in general there is no need to reset parameters. you just run the same command you did originally and make sure that --restore-file points to your latest saved checkpoint
Hello @alexeib, thanks for your comment. I used the same training code without any change and didn't use the --restore-file argument as the training should resume from the checkpoint_last.pt automatically. Or do I need to specify it with --restore-file?
--restore-file is defaulted to checkpoint_last.pt so if you are pointing to the same checkpoint dir, yes, it would continue automatically.
Thanks for your suggestion. I've retrained the model from scratch, then resumed from checkpoint_last with and without --restore-file argument. And the perplexity is quite normal. But, I still don't get it why there was sudden hike in perplexity at the first place.