Contrastive Demonstration Tuning for Pre-trained Language Models

Xiaozhuan Liang, Ningyu Zhang, Siyuan Cheng, Zhenru Zhang, Chuanqi Tan +1 more
4/9/2022
cs.CLcs.AIcs.IR
lora-peft-merging

Official code: zjunlp/PromptKG (736 stars, Python, MIT, PyTorch, last commit 2024-03-22).

Abstract

Pretrained language models can be effectively stimulated by textual prompts or demonstrations, especially in low-data scenarios. Recent works have focused on automatically searching discrete or continuous prompts or optimized verbalizers, yet studies for the demonstration are still limited.

Show full abstract

Concretely, the demonstration examples are crucial for an excellent final performance of prompt-tuning. In this paper, we propose a novel pluggable, extensible, and efficient approach named contrastive demonstration tuning, which is free of demonstration sampling. Furthermore, the proposed approach can be: (i) Plugged into any previous prompt-tuning approaches; (ii) Extended to widespread classification tasks with a large number of categories. Experimental results on 16 datasets illustrate that our method integrated with previous approaches LM-BFF and P-tuning can yield better performance. Code is available in https://github.com/zjunlp/PromptKG/tree/main/research/Demo-Tuning.

View on arXivView PDF

Code Implementations(1)

zjunlp/PromptKGOfficial100%
PyTorchMIT

PromptKG Family: a Gallery of Prompt Learning & KG-related research works, toolkits, and paper-list.

73676Python, ShellDec 18, 20212 years agoMIT
awsome-listdemo-tuningdialoguegenkgcknowledge-graph+15 more

Similar Papers

Cite this paper

@article{liang2022contrastive,
  title  = {Contrastive Demonstration Tuning for Pre-trained Language Models},
  author = {Xiaozhuan Liang and Ningyu Zhang and Siyuan Cheng and Zhenru Zhang and Chuanqi Tan and Huajun Chen},
  year   = {2022},
  eprint = {2204.04392},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2204.04392}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2204.04392.svg)](https://codeofpaper.com/paper/2204.04392)

Discussion