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

Randeng-Pegasus-523M-Chinese

  • 主页面:封神榜
  • 代码仓库:Fengshenbang-LM

简介 Brief Introduction

专于处理摘要任务的中文版PAGASUS-large模型。

擅长解决文本摘要任务的中文PAGASUS-large模型。

模型分类 Model Taxonomy

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

模型信息 Model Information

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

为解决中文自动摘要任务,我们遵循PEGASUS的设计思路训练了中文版本。我们采用悟道语料库(180G版本)作为预训练数据集。此外,考虑到中文 sentence piece 的不稳定性,我们在 Randeng-PEGASUS 中同时使用了结巴分词和 BERT 分词器。我们还提供基础版本:IDEA-CCNL/Randeng-Pegasus-238M-Chinese。同时,我们也提供了在中文摘要数据集上微调后的版本:Randeng-Pegasus-523M-Summary-Chinese。

为解决中文抽象摘要任务,我们遵循PEGASUS的指导原则。我们采用悟道语料库的一个版本(180 GB版本)作为预训练数据集。此外,考虑到中文句子块的不稳定性,我们在Randeng-PEGASUS中使用了结巴分词和BERT分词器。我们还提供基础尺寸版本,可通过IDEA-CCNL/Randeng-Pegasus-238M-Chinese获取。并且,我们还提供了在中文文本摘要数据集上微调后的版本:Randeng-Pegasus-523M-Summary-Chinese。

使用 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-Chinese")
tokenizer = PegasusTokenizer.from_pretrained("IDEA-CCNL/Randeng-Pegasus-523M-Chinese")

text = "据微信公众号“界面”报道,4日上午10点左右,中国发改委反垄断调查小组突击查访奔驰上海办事处,调取数据材料,并对多名奔驰高管进行了约谈。截止昨日晚9点,包括北京梅赛德斯-奔驰销售服务有限公司东区总经理在内的多名管理人员仍留在上海办公室内"
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: 截止昨日晚9点,包括北京梅赛德斯-奔驰销售服务有限公司东区总经理在内的多名管理人员仍留在上海办公室内

引用 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}},
}