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}}.
翻译:快速学习已成为现代自然语言处理的新范例,在现代自然语言处理中直接将预先培训的语言模式(PLM)调整为美元式的预测、自动递减型模型或顺序,从而产生有希望的成绩,然而,尚未提出快速学习的标准执行框架,而且大多数现有的快速学习代码库(往往是不受管制的)只为具体情景提供了有限的实施。由于在迅速学习中需要考虑许多细节,如诱惑性战略、初始化战略和口头化战略等,从业人员在迅速调整所希望的快速学习方法以适应其应用方面面临障碍。在本文件中,我们提出{Openmprot},一个统一易用的、便于使用的工具包,用于在PLMS上进行快速学习。 OpenPrompt是一个便于研究的框架,配备了效率、模块性和可扩展性,其组合性允许将不同的PLMS、任务格式和推动模块统一化。用户可以迅速部署快速学习框架,并在不同的NPROmpur/Prompls 上评估这些框架的通用情况。