🚀 燃燈-Pegasus-238M-摘要-中文
燃燈-Pegasus-238M-摘要-中文模型是中文版的PAGASUS-base,善於處理摘要任務,在多箇中文摘要數據集上進行了微調。它為中文文本摘要任務提供了有效的解決方案,能幫助用戶快速準確地生成文本摘要。
🚀 快速開始
模型使用示例
from transformers import PegasusForConditionalGeneration
from tokenizers_pegasus import PegasusTokenizer
model = PegasusForConditionalGeneration.from_pretrained("IDEA-CCNL/Randeng-Pegasus-238M-Summary-Chinese")
tokenizer = PegasusTokenizer.from_pretrained("IDEA-CCNL/Randeng-Pegasus-238M-Summary-Chinese")
text = "在北京冬奧會自由式滑雪女子坡面障礙技巧決賽中,中國選手谷愛凌奪得銀牌。祝賀谷愛凌!今天上午,自由式滑雪女子坡面障礙技巧決賽舉行。決賽分三輪進行,取選手最佳成績排名決出獎牌。第一跳,中國選手谷愛凌獲得69.90分。在12位選手中排名第三。完成動作後,谷愛凌又扮了個鬼臉,甚是可愛。第二輪中,谷愛凌在道具區第三個障礙處失誤,落地時摔倒。獲得16.98分。網友:摔倒了也沒關係,繼續加油!在第二跳失誤摔倒的情況下,谷愛凌頂住壓力,第三跳穩穩發揮,流暢落地!獲得86.23分!此輪比賽,共12位選手參賽,谷愛凌第10位出場。網友:看比賽時我比谷愛凌緊張,加油!"
inputs = tokenizer(text, max_length=1024, return_tensors="pt")
summary_ids = model.generate(inputs["input_ids"])
tokenizer.batch_decode(summary_ids, skip_special_tokens=True, clean_up_tokenization_spaces=False)[0]
✨ 主要特性
- 善於處理摘要任務,經過在多箇中文摘要數據集上的微調,能更好地適應中文文本摘要場景。
- 基於中文版的PAGASUS-base,具有較強的文本生成能力。
📦 模型信息
模型分類
需求 |
任務 |
系列 |
模型 |
參數 |
額外 |
通用 |
自然語言轉換 |
燃燈 |
PEFASUS |
238M |
文本摘要任務-中文 |
模型詳細信息
參考論文:PEGASUS: Pre-training with Extracted Gap-sentences for Abstractive Summarization
基於Randeng-Pegasus-238M-Chinese,我們在收集的7箇中文領域的文本摘要數據集(約4M個樣本)上微調了它,得到了summary版本。這7個數據集為:education, new2016zh, nlpcc, shence, sohu, thucnews和weibo。
下游效果
數據集 |
rouge-1 |
rouge-2 |
rouge-L |
LCSTS |
43.46 |
29.59 |
39.76 |
📄 引用
如果您在您的工作中使用了我們的模型,可以引用我們的論文:
@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}},
}
相關鏈接