File size: 3,132 Bytes
658479a
 
 
 
 
 
3f68aa8
658479a
774446d
658479a
 
 
c485440
658479a
c485440
658479a
 
 
 
 
c485440
658479a
 
 
c248ddd
 
cf1446f
658479a
 
 
 
 
 
 
 
 
 
bb758c4
 
 
c485440
3701157
 
c485440
 
658479a
 
 
 
 
c485440
 
bb758c4
658479a
c485440
658479a
 
 
 
 
 
 
 
 
 
51fd80f
658479a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
---
language: 
  - zh
license: apache-2.0
---

# Randeng-Transformer-1.1B-Denoise

- Main Page:[Fengshenbang](https://fengshenbang-lm.com/)
- Github: [Fengshenbang-LM](https://github.com/IDEA-CCNL/Fengshenbang-LM)
## 简介 Brief Introduction

基于Transformer-XL的中文句子改写。

Paraphrase Chinese sentences based on Transformer-XL.

## 模型分类 Model Taxonomy

|  需求 Demand  | 任务 Task       | 系列 Series      | 模型 Model    | 参数 Parameter | 额外 Extra |
|  :----:  | :----:  | :----:  | :----:  | :----:  | :----:  |
| 通用 General | 自然语言转换 NLT | 燃灯 Randeng | Transformer |      1.1B      |     中文-改写 Chinese-Paraphrase    |

## 模型信息 Model Information

在悟道语料库(280G版本)和标注的相似句子对数据集上进行预训练。  

The Transformer-XL model was pre-trained on the Wudao Corpus (with 280G samples) and annotated similar-sentence pair dataset.

## 使用 Usage

### 加载模型 Loading Models

 ```shell
 git clone https://github.com/IDEA-CCNL/Fengshenbang-LM.git
 ```

```python 
from fengshen.models.transfo_xl_paraphrase import TransfoXLModel
from transformers import T5Tokenizer as TransfoXLTokenizer


model = TransfoXLModel.from_pretrained('IDEA-CCNL/Randeng-TransformerXL-1.1B-Paraphrasing-Chinese')
tokenizer = TransfoXLTokenizer.from_pretrained('IDEA-CCNL/Randeng-TransformerXL-1.1B-Paraphrasing-Chinese',
                                               eos_token = '<|endoftext|>',                                    
                                               extra_ids=0)
```

### 使用示例 Usage Examples

```python 
from fengshen.models.transfo_xl_paraphrase import paraphrase_generatete
input_text = "年轻教师选择农村学校,还是县城学校?"                                                 
res = paraphrase_generate(model, tokenizer, input_text, device=0)                                             
print(res)
#
```

## 引用 Citation

如果您在您的工作中使用了我们的模型,可以引用我们的[论文](https://arxiv.org/abs/2209.02970):

If you are using the resource for your work, please cite the our [paper](https://arxiv.org/abs/2209.02970):

```text
@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}
}
```

也可以引用我们的[网站](https://github.com/IDEA-CCNL/Fengshenbang-LM/):

You can also cite our [website](https://github.com/IDEA-CCNL/Fengshenbang-LM/):

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