Randolphzeng
commited on
Commit
•
64a0e23
1
Parent(s):
0585f68
Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,81 @@
|
|
1 |
---
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
language: zh
|
3 |
+
tags:
|
4 |
+
- VAE
|
5 |
+
- CVAE
|
6 |
+
- NER
|
7 |
+
- Data Augmentation
|
8 |
+
inference: False
|
9 |
---
|
10 |
+
|
11 |
+
# Randeng-DELLA-226M-Chinese
|
12 |
+
|
13 |
+
- Github: [Fengshenbang-LM](https://github.com/IDEA-CCNL/Fengshenbang-LM)
|
14 |
+
- Docs: [Fengshenbang-Docs](https://fengshenbang-doc.readthedocs.io/)
|
15 |
+
|
16 |
+
## 简介 Brief Introduction
|
17 |
+
|
18 |
+
在悟道数据集上进行通用预训练的Deep VAE模型后又在命名实体识别任务的数据上微调的CVAE模型。其中编码器和解码器都是GPT-2架构。可以在给定命名实体和其类别后生成包含该命名实体的句子。
|
19 |
+
|
20 |
+
A deep VAE model pretrained on Wudao dataset and finetinued on NER dataset. Both encoder and decoder are based on GPT-2 architecture. This model is capable of generating a sentence given the named entity and its entity type.
|
21 |
+
|
22 |
+
## 模型分类 Model Taxonomy
|
23 |
+
|
24 |
+
| 需求 Demand | 任务 Task | 系列 Series | 模型 Model | 参数 Parameter | 额外 Extra |
|
25 |
+
| :----: | :----: | :----: | :----: | :----: | :----: |
|
26 |
+
| 通用 General | 受控文本生成 CTG | 燃灯 Randeng | DELLA | 226M | 条件变分自编码器-中文 CVAE-Chinese |
|
27 |
+
|
28 |
+
|
29 |
+
## 模型信息 Model Information
|
30 |
+
|
31 |
+
参考论文 Reference Paper:[Fuse It More Deeply! A Variational Transformer with Layer-Wise Latent Variable Inference for Text Generation](https://arxiv.org/abs/2207.06130)
|
32 |
+
|
33 |
+
本模型使用了Della论文里的循环潜在向量架构,但对于解码器生成并未采用原论文的low-rank-tensor-product来进行信息融合,而是使用了简单的线性变换后逐位逐词添加的方式。该方式对于开放域数据集的预训练稳定性有较大正向作用。
|
34 |
+
|
35 |
+
Note that although we adopted the layer-wise recurrent latent variables structure as the paper, we did not use the low-rank-tensor-product to fuse the latent vectors to the decoder hidden states. Instead we applied a simple linear transformation on the latent vectors and then add them to the hidden states independently.
|
36 |
+
|
37 |
+
|
38 |
+
## 使用 Usage
|
39 |
+
|
40 |
+
```python
|
41 |
+
# Checkout the latest Fengshenbang-LM directory and run following script under Fengshenbang-LM root directory
|
42 |
+
|
43 |
+
import torch
|
44 |
+
from torch.nn.utils.rnn import pad_sequence
|
45 |
+
from fengshen.models.deepVAE.deep_vae import Della
|
46 |
+
from transformers.models.bert.tokenization_bert import BertTokenizer
|
47 |
+
|
48 |
+
tokenizer = BertTokenizer.from_pretrained("IDEA-CCNL/Randeng-DELLA-226M-CVAE-NER-Chinese")
|
49 |
+
vae_model = Della.from_pretrained("IDEA-CCNL/Randeng-DELLA-226M-CVAE-NER-Chinese")
|
50 |
+
|
51 |
+
|
52 |
+
```
|
53 |
+
|
54 |
+
## 引用 Citation
|
55 |
+
|
56 |
+
如果您在您的工作中使用了我们的模型,可以引用我们的[论文](https://arxiv.org/abs/2209.02970):
|
57 |
+
|
58 |
+
If you are using the resource for your work, please cite the our [paper](https://arxiv.org/abs/2209.02970):
|
59 |
+
|
60 |
+
```text
|
61 |
+
@article{fengshenbang,
|
62 |
+
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},
|
63 |
+
title = {Fengshenbang 1.0: Being the Foundation of Chinese Cognitive Intelligence},
|
64 |
+
journal = {CoRR},
|
65 |
+
volume = {abs/2209.02970},
|
66 |
+
year = {2022}
|
67 |
+
}
|
68 |
+
```
|
69 |
+
|
70 |
+
也可以引用我们的[网站](https://github.com/IDEA-CCNL/Fengshenbang-LM/):
|
71 |
+
|
72 |
+
You can also cite our [website](https://github.com/IDEA-CCNL/Fengshenbang-LM/):
|
73 |
+
|
74 |
+
```text
|
75 |
+
@misc{Fengshenbang-LM,
|
76 |
+
title={Fengshenbang-LM},
|
77 |
+
author={IDEA-CCNL},
|
78 |
+
year={2021},
|
79 |
+
howpublished={\url{https://github.com/IDEA-CCNL/Fengshenbang-LM}},
|
80 |
+
}
|
81 |
+
```
|