Code for Hard Prompts Made Interpretable: Sparse Entropy Regularization for Prompt Tuning with RL
This code is built on the RLPrompt GitHub repository, which you can find "https://github.com/mingkaid/rl-prompt"
To use this code, you need the following versions of Python and PyTorch: Python >= 3.7 PyTorch >= 1.10.1 (install from the official website)
To install the core modules, run the following command:
pip install -e .
Refer to the examples folder for implementations of the following tasks, as described in our paper:
- Few-shot classification
- Text style transfer
- Textual inversion from images