TextBox 2.0: A Text Generation Library with Pre-trained Language Models
TextBox 2.0: A Text Generation Library with Pre-trained Language Models
Tianyi Tang; Junyi Li; Zhipeng Chen; Yiwen Hu; Zhuohao Yu; Wenxun Dai; Zican Dong; Xiaoxue Cheng; Yuhao Wang; Wayne Xin Zhao; Jian-Yun Nie; Ji-Rong Wen

Abstract
To facilitate research on text generation, this paper presents a comprehensive and unified library, TextBox 2.0, focusing on the use of pre-trained language models (PLMs). To be comprehensive, our library covers 13 common text generation tasks and their corresponding 83 datasets and further incorporates 45 PLMs covering general, translation, Chinese, dialogue, controllable, distilled, prompting, and lightweight PLMs. We also implement 4 efficient training strategies and provide 4 generation objectives for pre-training new PLMs from scratch. To be unified, we design the interfaces to support the entire research pipeline (from data loading to training and evaluation), ensuring that each step can be fulfilled in a unified way. Despite the rich functionality, it is easy to use our library, either through the friendly Python API or command line. To validate the effectiveness of our library, we conduct extensive experiments and exemplify four types of research scenarios. The project is released at the link: https://github.com/RUCAIBox/TextBox.
Code Repositories
Benchmarks
| Benchmark | Methodology | Metrics |
|---|---|---|
| abstractive-text-summarization-on-cnn-daily-2 | BART (TextBox 2.0) | ROUGE-1: 44.47 ROUGE-2: 21.5 ROUGE-L: 41.35 |
| data-to-text-generation-on-webnlg | BART (TextBox 2.0) | BLEU-4: 67.33 METEOR: 47.78 ROUGE-L: 76.83 |
| dialogue-on-persona-chat | BART (TextBox 2.0) | BLEU-1: 49.581 BLEU-2: 39.24 Distinct-1: 1.44 Distinct-2: 8.89 |
| machine-translation-on-wmt2016-english-1 | BART (TextBox 2.0) | BLEU-4: 37.2 |
| machine-translation-on-wmt2016-romanian | BART (TextBox 2.0) | BLEU-4: 37.48 |
| question-answering-on-squad11 | BART (TextBox 2.0) | Exact Match: 86.44 F1: 93.04 |
| question-generation-on-squad11 | BART (TextBox 2.0) | BLEU-4: 25.08 METEOR: 26.73 ROUGE-L: 52.55 |
| story-generation-on-writingprompts | BART (TextBox 2.0) | BLEU-1: 33.79 BLEU-2: 15.78 Distinct-4: 78.762 |
| style-transfer-on-gyafc | BART (TextBox 2.0) | Accuracy: 94.37 BLEU-4: 76.93 Harmonic mean: 84.74 |
| task-oriented-dialogue-systems-on-multiwoz-2 | BART (TextBox 2.0) | BLEU-4: 20.17 Score: 100.07 |
| text-generation-on-adgen | BART (TextBox 2.0) | BLEU-4: 10.2 |
| text-generation-on-commongen-1 | BART (TextBox 2.0) | BLEU-4: 28.18 CIDEr: 12.98 SPICE: 33 |
| text-generation-on-csl | BART (TextBox 2.0) | ROUGE-L: 64.34 |
| text-generation-on-lcsts | BART (TextBox 2.0) | ROUGE-L: 42.96 |
| text-simplification-on-wiki-auto-turk | BART (TextBox 2.0) | BLEU-4: 90.81 METEOR: 57.58 ROUGE-2: 83.36 |
Build AI with AI
From idea to launch — accelerate your AI development with free AI co-coding, out-of-the-box environment and best price of GPUs.