Here is a repo that I made that helps the new user employ Google Colab with a GPU to try the to recreate the pre-trained model at OpenNMT-tf models - OpenNMT
This repo provides a Google Colab notebook that follows the example provided on the OpenNMT website (OpenNMT-tf models - OpenNMT) and more specifically OpenNMT’s repo: OpenNMT-tf/scripts/wmt at master · OpenNMT/OpenNMT-tf · GitHub
Essentially, the notebook helps the new user get started and overcome some obstacles to doing the tutorial listed in the repo above if you want to use Google Colab (e.g., so that you can take advantage of GPUs), including installing an older version of TensorFlow along with implementing the necessary steps to utilize GPUs. It provides a “ready to use out of the box” notebook for new users who want to make use of Google Colab for learning how to use OpenNMT.
As a newcomer to OpenNMT, it took me a while to build this notebook from scratch due to a variety of concerns that arose when using Google Colab:
- The notebook connects with Google Drive for the data files (you’ll need to edit the “cd” --change directory–locations to match your set up.
- The notebook downgrades TF (current Google Colab builds come installed with TF 2.15) since at the time of my project OpenNMT is compatible with TF builds up through 2.13.
- The notebook install cuda and cudnn components so that GPUs can be utilized (this notebook utilzed a single A100 GPU which worked fine and ran to completion [i.e. no improvement on BLEU score after multiple evaluation cycles]). There is a link at the top of the notebooks on getting started with multiple GPUs if you would like to try that.