Installation

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.

Note

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 https://github.com/thunlp/OpenPrompt.git
cd OpenPrompt
python setup.py install

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