The few-shot experiment results can be reproduced by running scripts as follows.
sh scripts/rte_pt_few_shot.sh
The FewGLUE_32dev dataset is adopted for experiments. PT-Fewshot contains utilities for loading, preprocessing and pattern-verbalizer transformation of FewGLUE_32dev data.
We have summarized several empirical observations that might guide further exploration of P-Tuning.
-
The position of prompt tokens and anchors matter.
-
The order of few-shot training data affects a lot.
-
Choosing a larger learning rate particularly for prompt embeddings leads to better performance.
The code is developed based on pet. We appreciate all the authors who made their code public, which greatly facilitates this project. This repository would be continuously updated.