dongxq commited on
Commit
e5cf564
1 Parent(s): 2460c0e

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +82 -1
README.md CHANGED
@@ -5,4 +5,85 @@ language:
5
 
6
  tags:
7
  - translation
8
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
 
6
  tags:
7
  - translation
8
+ inference: False
9
+ ---
10
+
11
+ # Randeng-Deltalm-362M-Zh-En
12
+
13
+
14
+ ## 简介 Brief Introduction
15
+
16
+ 善于处理摘要任务,在数个中文摘要数据集上微调后的,中文版的PAGASUS-base。
17
+
18
+ Good at solving text summarization tasks, after fine-tuning on multiple Chinese text summarization datasets, Chinese PAGASUS-base.
19
+
20
+ ## 模型分类 Model Taxonomy
21
+
22
+ | 需求 Demand | 任务 Task | 系列 Series | 模型 Model | 参数 Parameter | 额外 Extra |
23
+ | :----: | :----: | :----: | :----: | :----: | :----: |
24
+ | 通用 General | 自然语言转换 NLT | 燃灯 Randeng | PEFASUS | 238M | 文本摘要任务-中文 Summary-Chinese |
25
+
26
+ ## 模型信息 Model Information
27
+
28
+ 参考论文:[PEGASUS: Pre-training with Extracted Gap-sentences for Abstractive Summarization](https://arxiv.org/pdf/1912.08777.pdf)
29
+
30
+ ### 下游效果 Performance
31
+
32
+ | datasets | bleu|
33
+ | ---- | ---- |
34
+ | florse101-zh-en | 26.47 |
35
+
36
+ ## 使用 Usage
37
+
38
+ ```python
39
+ from transformers import PegasusForConditionalGeneration,BertTokenizer
40
+ # Need to download tokenizers_pegasus.py and other Python script from Fengshenbang-LM github repo in advance,
41
+ # or you can download tokenizers_pegasus.py and data_utils.py in https://huggingface.co/IDEA-CCNL/Randeng_Pegasus_523M/tree/main
42
+ # Strongly recommend you git clone the Fengshenbang-LM repo:
43
+ # 1. git clone https://github.com/IDEA-CCNL/Fengshenbang-LM
44
+ # 2. cd Fengshenbang-LM/fengshen/examples/translation/
45
+ # and then you will see the tokenizers_pegasus.py and data_utils.py which are needed by pegasus model
46
+
47
+ from tokenizers_pegasus import PegasusTokenizer
48
+
49
+ model = PegasusForConditionalGeneration.from_pretrained("IDEA-CCNL/Randeng-Pegasus-238M-Summary-Chinese")
50
+ tokenizer = PegasusTokenizer.from_pretrained("IDEA-CCNL/Randeng-Pegasus-238M-Summary-Chinese")
51
+
52
+ text = "在北京冬奥会自由式滑雪女子坡面障碍技巧决赛中,中国选手谷爱凌夺得银牌。祝贺谷爱凌!今天上午,自由式滑雪女子坡面障碍技巧决赛举行。决赛分三轮进行,取选手最佳成绩排名决出奖牌。第一跳,中国选手谷爱凌获得69.90分。在12位选手中排名第三。完成动作后,谷爱凌又扮了个鬼脸,甚是可爱。第二轮中,谷爱凌在道具区第三个障碍处失误,落地时摔倒。获得16.98分。网友:摔倒了也没关系,继续加油!在第二跳失误摔倒的情况下,谷爱凌顶住压力,第三跳稳稳发挥,流畅落地!获得86.23分!此轮比赛,共12位选手参赛,谷爱凌第10位出场。网友:看比赛时我比谷爱凌紧张,加油!"
53
+ inputs = tokenizer(text, max_length=1024, return_tensors="pt")
54
+
55
+ # Generate Summary
56
+ summary_ids = model.generate(inputs["input_ids"])
57
+ tokenizer.batch_decode(summary_ids, skip_special_tokens=True, clean_up_tokenization_spaces=False)[0]
58
+
59
+ # model Output: 滑雪女子坡面障碍技巧决赛谷爱凌获银牌
60
+ ```
61
+
62
+ ## 引用 Citation
63
+
64
+ 如果您在您的工作中使用了我们的模型,可以引用我们的[论文](https://arxiv.org/abs/2209.02970):
65
+
66
+ If you are using the resource for your work, please cite the our [paper](https://arxiv.org/abs/2209.02970):
67
+
68
+ ```text
69
+ @article{fengshenbang,
70
+ author = {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 and Ruyi Gan and Jiaxing Zhang},
71
+ title = {Fengshenbang 1.0: Being the Foundation of Chinese Cognitive Intelligence},
72
+ journal = {CoRR},
73
+ volume = {abs/2209.02970},
74
+ year = {2022}
75
+ }
76
+ ```
77
+
78
+ 也可以引用我们的[网站](https://github.com/IDEA-CCNL/Fengshenbang-LM/):
79
+
80
+ You can also cite our [website](https://github.com/IDEA-CCNL/Fengshenbang-LM/):
81
+
82
+ ```text
83
+ @misc{Fengshenbang-LM,
84
+ title={Fengshenbang-LM},
85
+ author={IDEA-CCNL},
86
+ year={2021},
87
+ howpublished={\url{https://github.com/IDEA-CCNL/Fengshenbang-LM}},
88
+ }
89
+ ```