模型:
RUCAIBox/mvp-data-to-text
MVP-data-to-text模型由Tianyi Tang,Junyi Li,Wayne Xin Zhao和Ji-Rong Wen于 MVP: Multi-task Supervised Pre-training for Natural Language Generation 年提出。
详细信息和说明可以在 https://github.com/RUCAIBox/MVP 找到。
MVP-data-to-text是一个基于提示的模型,可以使用带标签的数据到文本数据集进行预训练的提示。它是我们主要模型(MVP+S)的一个变体。它采用了逐层提示的Transformer编码器-解码器架构。
MVP-data-to-text专门设计用于数据到文本生成任务,例如知识图谱到文本生成(WebNLG,DART),表格到文本生成(WikiBio,ToTTo)和MR到文本生成(E2E)。
>>> from transformers import MvpTokenizer, MvpForConditionalGeneration >>> tokenizer = MvpTokenizer.from_pretrained("RUCAIBox/mvp") >>> model = MvpForConditionalGeneration.from_pretrained("RUCAIBox/mvp-data-to-text") >>> inputs = tokenizer( ... "Describe the following data: Iron Man | instance of | Superhero [SEP] Stan Lee | creator | Iron Man", ... return_tensors="pt", ... ) >>> generated_ids = model.generate(**inputs) >>> tokenizer.batch_decode(generated_ids, skip_special_tokens=True) ['Iron Man is a fictional superhero appearing in American comic books published by Marvel Comics.']
MVP: https://huggingface.co/RUCAIBox/mvp 。
基于提示的模型:
多任务模型:
@article{tang2022mvp, title={MVP: Multi-task Supervised Pre-training for Natural Language Generation}, author={Tang, Tianyi and Li, Junyi and Zhao, Wayne Xin and Wen, Ji-Rong}, journal={arXiv preprint arXiv:2206.12131}, year={2022}, url={https://arxiv.org/abs/2206.12131}, }