This repository is a minimal example of a Jupyter Notebook running GPT2 (and two other language models).
The notebook is located in the index.ipynb file.
To run the notebook in the cloud using Binder, click on the Binder badge above, or use this link. This will open the notebook in a new tab in your browser.
To run the notebook locally, install the required libraries with conda by running the following command in the terminal.
Note: The environment.yml file lists all Python libraries on which your notebooks depends.
Remove cpuonly from the environment.yml file if you use a GPU.
conda env create -f environment.ymlThen, activate the environment:
conda activate example-environmentIn addition, download the pre-trained GPT2 model by running the following command:
./download_models.pyFinally, start the Jupyter Notebook server:
jupyter-notebook index.ipynb