Zimix commited on
Commit
2208407
·
1 Parent(s): 291cc9a

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +87 -0
README.md CHANGED
@@ -1,3 +1,90 @@
1
  ---
 
 
 
2
  license: apache-2.0
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ language:
3
+ - zh
4
+
5
  license: apache-2.0
6
  ---
7
+
8
+ # Erlangshen-SimCSE-110M-Chinese
9
+
10
+ - Github: [Fengshenbang-LM](https://github.com/IDEA-CCNL/Fengshenbang-LM)
11
+ - Docs: [Fengshenbang-Docs](https://fengshenbang-doc.readthedocs.io/)
12
+
13
+ ## 简介 Brief Introduction
14
+
15
+ 基于simcse无监督版本,用搜集整理的中文nli数据进行simcse有监督任务的训练。在中文句子对任务上有良好的效果。
16
+
17
+ **Erlangshen-SimCSE-110M-Chinese** is based on the unsupervised version of simcse, And training simcse supervised task with collected and sorted chinese NLI data for. It has good effect on the task in Chinese sentences pair.
18
+
19
+ ## 模型分类 Model Taxonomy
20
+
21
+ | 需求 Demand | 任务 Task | 系列 Series | 模型 Model | 参数 Parameter | 额外 Extra |
22
+ | :----: | :----: | :----: | :----: | :----: | :----: |
23
+ | 通用 General | 自然语言生成 NLU | 闻仲 Erlangshen | Bert | 110M | 中文 Chinese |
24
+
25
+ ## 模型信息 Model Information
26
+
27
+ 为了获得一个通用句子向量表征的模型,我们基于bert-base模型用了大量的无监督数据和有监督数据进行对比学习,最终获得了一个无需微调就能够利用模型输出的[CLS]进行相似度判断的模型。与用bert模型在针对任务微调后,再进行句子相似度任务不同,我们的模型在预训练完成后直接具备提取句子向量的能力。在一些任务上有如下的测评效果:
28
+
29
+ In order to obtain a general sentence-embedding-model, we use a large number of unsupervised data and supervised data for comparative learning based on the Bert-base model, and finally obtained a model that can use the [CLS] output from the model to judge the similarity without fine-tuning. Different from the sentence similarity task after fine tuning the task with the bert model, our model has the ability to extract sentence vectors directly after pre training. In some tasks, the evaluation results are as follows:
30
+
31
+ |模型 | LCQMC | BQ | PAWSX | ATEC | STS-B |
32
+ | :----: | :----: | :----: | :----: | :----: | :----: |
33
+ |Bert | 62 |38.62 |17.38 |28.98 |68.27|
34
+ |Bert-large| 63.78| 37.51| 18.63| 30.24| 68.87|
35
+ |RoBerta| 67.3| 39.89| 16.79| 30.57| 69.|36
36
+ |RoBerta large |67.25 |38.39 |19.09 |30.85 |69.36|
37
+ |RoFormer| 63.58| 39.9 |17.52| 29.37 |67.32|
38
+ |SimBERT| 73.43| 40.98| 15.87| 31.24| 72|
39
+ |Erlangshen-SimCSE-110M-Chinese|74.94| 56.97| 21.84| 34.12| 70.5|
40
+
41
+ ## 使用 Usage
42
+
43
+ ### 加载模型 Loading Models
44
+
45
+ ```python
46
+ from transformers import GPT2Tokenizer, GPT2Model
47
+ tokenizer = GPT2Tokenizer.from_pretrained('IDEA-CCNL/Wenzhong2.0-GPT2-3.5B-chinese')
48
+ model = GPT2Model.from_pretrained('IDEA-CCNL/Wenzhong2.0-GPT2-3.5B-chinese')
49
+ text = "Replace me by any text you'd like."
50
+ encoded_input = tokenizer(text, return_tensors='pt')
51
+ output = model(**encoded_input)
52
+ ```
53
+
54
+ ### 使用示例 Usage Examples
55
+
56
+ ```python
57
+ from transformers import pipeline, set_seed
58
+ set_seed(55)
59
+ generator = pipeline('text-generation', model='IDEA-CCNL/Wenzhong2.0-GPT2-3.5B-chinese')
60
+ generator("北京位于", max_length=30, num_return_sequences=1)
61
+ ```
62
+
63
+ ## 引用 Citation
64
+
65
+ 如果您在您的工作中使用了我们的模型,可以引用我们的[论文](https://arxiv.org/abs/2209.02970):
66
+
67
+ If you are using the resource for your work, please cite the our [paper](https://arxiv.org/abs/2209.02970):
68
+
69
+ ```text
70
+ @article{fengshenbang,
71
+ 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},
72
+ title = {Fengshenbang 1.0: Being the Foundation of Chinese Cognitive Intelligence},
73
+ journal = {CoRR},
74
+ volume = {abs/2209.02970},
75
+ year = {2022}
76
+ }
77
+ ```
78
+
79
+ 也可以引用我们的[网站](https://github.com/IDEA-CCNL/Fengshenbang-LM/):
80
+
81
+ You can also cite our [website](https://github.com/IDEA-CCNL/Fengshenbang-LM/):
82
+
83
+ ```text
84
+ @misc{Fengshenbang-LM,
85
+ title={Fengshenbang-LM},
86
+ author={IDEA-CCNL},
87
+ year={2021},
88
+ howpublished={\url{https://github.com/IDEA-CCNL/Fengshenbang-LM}},
89
+ }
90
+ ```