OpenPrompt is tested on Python 3.8 and Pytorch 1.9. Currently, the pre-trained language models and tokenizers are loaded from huggingface transformers. And OpenPrompt will support models and tokenizers implemented by other libraries in the future.


Please do not conduct the installation as a root user on your system Python. We recommend setup a Anaconda or Miniconda environment or create a Docker image.

Installation from GitHub

From our github repository, you can install the latest version of OpenPrompt.

git clone
cd OpenPrompt
python install

Now the OpenPrompt package is installed, let’s get started.