#187 · Primary category: Deep Learning Frameworks

P-tuning-v2

natural-language-processing p-tuning parameter-efficient-learning pretrained-language-model prompt-tuning

An optimized deep prompt tuning strategy comparable to fine-tuning across scales and tasks

Project last updated:11/16/23

GitHub Stars

2.1K

Forks

212

Contributors

3

License

Apache-2.0

Why we included this project

P-tuning v2 is a useful option if you want close to full fine-tuning accuracy while updating only a small set of continuous prompt vectors. The method adds trainable prompts to every layer of a frozen pretrained transformer, so you can adapt a model to a new task without the memory and compute cost of classical fine-tuning. The repo comes with runnable scripts and hyper-parameter search tooling for a few standard benchmarks like SuperGLUE and SQuAD, along with sequence tagging, plus a separate module for neural text retrieval. That makes it straightforward to reproduce the reported numbers before trying the approach on your own data. Because the backbone stays frozen, this is a realistic path on modest GPU setups, and the code doubles as a clear reference for comparing deep prompt tuning with prefix tuning.

Articles for this project

No articles for this project yet.

To suggest a topic or contribute an article, contact us.

Related projects in this category