HuggingFace镜像/Randeng-Pegasus-523M-Summary-Chinese-V1
模型介绍文件和版本分析
下载使用量0

Randeng-Pegasus-523M-Summary-Chinese-V1

  • Github: Fengshenbang-LM
  • Docs: Fengshenbang-Docs

简介 Brief Introduction

该模型擅长处理摘要任务,是在多个中文摘要数据集上完成微调的中文版PAGASUS-large模型。

模型分类 Model Taxonomy

需求 Demand任务 Task系列 Series模型 Model参数 Parameter额外 Extra
通用 General自然语言转换 NLT燃灯 RandengPEFASUS523M文本摘要任务-中文 Summary-Chinese

模型信息 Model Information

参考论文:PEGASUS: Pre-training with Extracted Gap-sentences for Abstractive Summarization

本模型基于Randeng-Pegasus-523M-Chinese开发,我们在收集的7个中文领域文本摘要数据集(总计约400万个样本)基础上,通过实体过滤得到约180万个样本的数据集,重新进行微调,最终得到summary-v1版本。该版本在不影响下游任务指标(如LCSTS数据集上的Rouge-L值)的前提下,有效提升了摘要内容对原文的忠实度。这7个数据集分别是:education、new2016zh、nlpcc、shence、sohu、thucnews和weibo。

下游效果 Performance

datasetsrouge-1rouge-2rouge-L
LCSTS46.9433.9243.51

使用 Usage

from transformers import PegasusForConditionalGeneration
# Need to download tokenizers_pegasus.py and other Python script from Fengshenbang-LM github repo in advance,
# or you can download tokenizers_pegasus.py and data_utils.py in https://huggingface.co/IDEA-CCNL/Randeng_Pegasus_523M/tree/main
# Strongly recommend you git clone the Fengshenbang-LM repo:
# 1. git clone https://github.com/IDEA-CCNL/Fengshenbang-LM
# 2. cd Fengshenbang-LM/fengshen/examples/pegasus/
# and then you will see the tokenizers_pegasus.py and data_utils.py which are needed by pegasus model

from tokenizers_pegasus import PegasusTokenizer

model = PegasusForConditionalGeneration.from_pretrained("IDEA-CCNL/Randeng-Pegasus-523M-Summary-Chinese-V1")
tokenizer = PegasusTokenizer.from_pretrained("IDEA-CCNL/Randeng-Pegasus-523M-Summary-Chinese-V1")

text = "在北京冬奥会自由式滑雪女子坡面障碍技巧决赛中,中国选手谷爱凌夺得银牌。祝贺谷爱凌!今天上午,自由式滑雪女子坡面障碍技巧决赛举行。决赛分三轮进行,取选手最佳成绩排名决出奖牌。第一跳,中国选手谷爱凌获得69.90分。在12位选手中排名第三。完成动作后,谷爱凌又扮了个鬼脸,甚是可爱。第二轮中,谷爱凌在道具区第三个障碍处失误,落地时摔倒。获得16.98分。网友:摔倒了也没关系,继续加油!在第二跳失误摔倒的情况下,谷爱凌顶住压力,第三跳稳稳发挥,流畅落地!获得86.23分!此轮比赛,共12位选手参赛,谷爱凌第10位出场。网友:看比赛时我比谷爱凌紧张,加油!"
inputs = tokenizer(text, max_length=1024, return_tensors="pt")

# Generate Summary
summary_ids = model.generate(inputs["input_ids"])
tokenizer.batch_decode(summary_ids, skip_special_tokens=True, clean_up_tokenization_spaces=False)[0]

# model Output: 自由式滑雪女子坡面障碍技巧决赛谷爱凌摘银

引用 Citation

如果您在您的工作中使用了我们的模型,可以引用我们的论文:

如果您在工作中使用了该资源,请引用我们的论文:

@article{fengshenbang,
  author    = {Jiaxing Zhang and Ruyi Gan and Junjie Wang and Yuxiang Zhang and Lin Zhang and Ping Yang and Xinyu Gao and Ziwei Wu and Xiaoqun Dong and Junqing He and Jianheng Zhuo and Qi Yang and Yongfeng Huang and Xiayu Li and Yanghan Wu and Junyu Lu and Xinyu Zhu and Weifeng Chen and Ting Han and Kunhao Pan and Rui Wang and Hao Wang and Xiaojun Wu and Zhongshen Zeng and Chongpei Chen},
  title     = {Fengshenbang 1.0: Being the Foundation of Chinese Cognitive Intelligence},
  journal   = {CoRR},
  volume    = {abs/2209.02970},
  year      = {2022}
}

也可以引用我们的网站:

您也可以引用我们的网站:

@misc{Fengshenbang-LM,
  title={Fengshenbang-LM},
  author={IDEA-CCNL},
  year={2021},
  howpublished={\url{https://github.com/IDEA-CCNL/Fengshenbang-LM}},
}