{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/textbox-2-0-a-text-generation-library-with","title":"TextBox 2.0: A Text Generation Library with Pre-trained Language Models","arxiv_id":"2212.13005","date":"2022-12-26","proceeding":null,"authors":["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.","url_abs":"https://arxiv.org/abs/2212.13005v1","url_pdf":"https://arxiv.org/pdf/2212.13005v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"textbox-2-0-a-text-generation-library-with","repo_url":"https://github.com/RUCAIBox/TextBox","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"abstractive-text-summarization","task_name":"Abstractive Text Summarization"},{"task_slug":"data-to-text-generation","task_name":"Data-to-Text Generation"},{"task_slug":"dialogue","task_name":"Dialogue"},{"task_slug":"machine-translation","task_name":"Machine Translation"},{"task_slug":"question-answering","task_name":"Question Answering"},{"task_slug":"question-generation","task_name":"Question Generation"},{"task_slug":"story-generation","task_name":"Story Generation"},{"task_slug":"style-transfer","task_name":"Style Transfer"},{"task_slug":"task-oriented-dialogue-systems","task_name":"Task-Oriented Dialogue Systems"},{"task_slug":"text-generation","task_name":"Text Generation"},{"task_slug":"text-simplification","task_name":"Text Simplification"}],"methods":[{"method_slug":null,"method_name":"Library"}],"datasets_introduced":[{"slug":"textbox-2-0","name":"TextBox 2.0","full_name":""}],"methods_introduced":[],"results":[{"leaderboard":"/sota/abstractive-text-summarization-on-cnn-daily-2","task":"Abstractive Text Summarization","dataset":"CNN/Daily Mail","model":"BART (TextBox 2.0)","rank_in_archive_order":1,"of":4,"metrics":{"ROUGE-1":"44.47","ROUGE-2":"21.5","ROUGE-L":"41.35"},"uses_additional_data":false},{"leaderboard":"/sota/data-to-text-generation-on-webnlg","task":"Data-to-Text Generation","dataset":"WebNLG","model":"BART (TextBox 2.0)","rank_in_archive_order":20,"of":20,"metrics":{"BLEU-4":"67.33","METEOR":"47.78","ROUGE-L":"76.83"},"uses_additional_data":false},{"leaderboard":"/sota/dialogue-on-persona-chat","task":"Dialogue","dataset":"Persona-Chat","model":"BART (TextBox 2.0)","rank_in_archive_order":1,"of":1,"metrics":{"BLEU-1":"49.581","BLEU-2":"39.24","Distinct-1":"1.44","Distinct-2":"8.89"},"uses_additional_data":false},{"leaderboard":"/sota/machine-translation-on-wmt2016-english-1","task":"Machine Translation","dataset":"WMT2016 English-Romanian","model":"BART (TextBox 2.0)","rank_in_archive_order":21,"of":21,"metrics":{"BLEU-4":"37.2"},"uses_additional_data":false},{"leaderboard":"/sota/machine-translation-on-wmt2016-romanian","task":"Machine Translation","dataset":"WMT2016 Romanian-English","model":"BART (TextBox 2.0)","rank_in_archive_order":21,"of":21,"metrics":{"BLEU-4":"37.48"},"uses_additional_data":false},{"leaderboard":"/sota/question-answering-on-squad11","task":"Question Answering","dataset":"SQuAD1.1","model":"BART (TextBox 2.0)","rank_in_archive_order":209,"of":213,"metrics":{"Exact Match":"86.44","F1":"93.04"},"uses_additional_data":false},{"leaderboard":"/sota/question-generation-on-squad11","task":"Question Generation","dataset":"SQuAD1.1","model":"BART (TextBox 2.0)","rank_in_archive_order":2,"of":13,"metrics":{"BLEU-4":"25.08","METEOR":"26.73","ROUGE-L":"52.55"},"uses_additional_data":false},{"leaderboard":"/sota/story-generation-on-writingprompts","task":"Story Generation","dataset":"WritingPrompts","model":"BART (TextBox 2.0)","rank_in_archive_order":1,"of":1,"metrics":{"BLEU-1":"33.79","BLEU-2":"15.78","Distinct-4":"78.762"},"uses_additional_data":false},{"leaderboard":"/sota/style-transfer-on-gyafc","task":"Style Transfer","dataset":"GYAFC","model":"BART (TextBox 2.0)","rank_in_archive_order":1,"of":1,"metrics":{"Accuracy":"94.37","BLEU-4":"76.93","Harmonic mean":"84.74"},"uses_additional_data":false},{"leaderboard":"/sota/task-oriented-dialogue-systems-on-multiwoz-2","task":"Task-Oriented Dialogue Systems","dataset":"MULTIWOZ 2.0","model":"BART (TextBox 2.0)","rank_in_archive_order":1,"of":1,"metrics":{"BLEU-4":"20.17","Score":"100.07"},"uses_additional_data":false},{"leaderboard":"/sota/text-generation-on-adgen","task":"Text Generation","dataset":"ADGEN","model":"BART (TextBox 2.0)","rank_in_archive_order":1,"of":1,"metrics":{"BLEU-4":"10.2"},"uses_additional_data":false},{"leaderboard":"/sota/text-generation-on-csl","task":"Text Generation","dataset":"CSL","model":"BART (TextBox 2.0)","rank_in_archive_order":1,"of":1,"metrics":{"ROUGE-L":"64.34"},"uses_additional_data":false},{"leaderboard":"/sota/text-generation-on-commongen-1","task":"Text Generation","dataset":"CommonGen","model":"BART (TextBox 2.0)","rank_in_archive_order":2,"of":4,"metrics":{"BLEU-4":"28.18","CIDEr":"12.98","SPICE":"33"},"uses_additional_data":false},{"leaderboard":"/sota/text-generation-on-lcsts","task":"Text Generation","dataset":"LCSTS","model":"BART (TextBox 2.0)","rank_in_archive_order":1,"of":1,"metrics":{"ROUGE-L":"42.96"},"uses_additional_data":false},{"leaderboard":"/sota/text-simplification-on-wiki-auto-turk","task":"Text Simplification","dataset":"Wiki-Auto + Turk","model":"BART (TextBox 2.0)","rank_in_archive_order":1,"of":1,"metrics":{"BLEU-4":"90.81","METEOR":"57.58","ROUGE-2":"83.36"},"uses_additional_data":false}],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2212.13005","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2212.13005"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"deterministic:regex_extraction","url":"https://github.com/RUCAIBox/TextBox","reach":null}],"summary":{"ran":1},"by_repo_kind":{"official":{"samples":1,"ran":1,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"36d020284e254099","entry":"AbstractModel","repo":"RUCAIBox/TextBox","repo_kind":"official","path":"textbox/model/abstract_model.py","file_url":"https://github.com/RUCAIBox/TextBox/blob/HEAD/textbox/model/abstract_model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"36d020284e254099"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}