Our new X account is live! Follow @wizwand_team for updates
WorkDL logo mark

OpenPrompt: An Open-source Framework for Prompt-learning

About

Prompt-learning has become a new paradigm in modern natural language processing, which directly adapts pre-trained language models (PLMs) to $cloze$-style prediction, autoregressive modeling, or sequence to sequence generation, resulting in promising performances on various tasks. However, no standard implementation framework of prompt-learning is proposed yet, and most existing prompt-learning codebases, often unregulated, only provide limited implementations for specific scenarios. Since there are many details such as templating strategy, initializing strategy, and verbalizing strategy, etc. need to be considered in prompt-learning, practitioners face impediments to quickly adapting the desired prompt learning methods to their applications. In this paper, we present {OpenPrompt}, a unified easy-to-use toolkit to conduct prompt-learning over PLMs. OpenPrompt is a research-friendly framework that is equipped with efficiency, modularity, and extendibility, and its combinability allows the freedom to combine different PLMs, task formats, and prompting modules in a unified paradigm. Users could expediently deploy prompt-learning frameworks and evaluate the generalization of them on different NLP tasks without constraints. OpenPrompt is publicly released at {\url{ https://github.com/thunlp/OpenPrompt}}.

Ning Ding, Shengding Hu, Weilin Zhao, Yulin Chen, Zhiyuan Liu, Hai-Tao Zheng, Maosong Sun• 2021

Related benchmarks

TaskDatasetResultRank
Text ClassificationAG News (test)
Accuracy85.85
210
Text ClassificationYahoo! Answers (test)
Clean Accuracy64.12
133
Text ClassificationAGNews
Accuracy79.6
119
Text ClassificationDBpedia (DBP)
Accuracy71.7
110
Text ClassificationIMDB
Accuracy92
107
Topic ClassificationDBPedia (test)
Accuracy96.46
64
Entity TypingFewNERD (test)
Mean Accuracy61.17
52
Topic ClassificationAG's News (test)
CACC85.85
43
Showing 8 of 8 rows

Other info

Code

Follow for update