suolyer commited on
Commit
00e4932
1 Parent(s): 4cc89a4

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +114 -0
README.md CHANGED
@@ -1,3 +1,117 @@
1
  ---
2
  license: apache-2.0
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: apache-2.0
3
+ # inference: false
4
+
5
+ # inference:
6
+ # parameters:
7
+ tags:
8
+ - classification
9
+ - zero-shot
10
  ---
11
+
12
+ # Erlangshen-RoBERTa-110M-UniMC-Chinese
13
+
14
+ - Paper: [Zero-Shot Learners for Nature Language Understanding via a Unified Multiple Choice Perspective](https://github.com/IDEA-CCNL/Fengshenbang-LM)
15
+ - Github: [Fengshenbang-LM](https://github.com/IDEA-CCNL/Fengshenbang-LM)
16
+ - Docs: [Fengshenbang-Docs](https://fengshenbang-doc.readthedocs.io/)
17
+
18
+ ## 简介 Brief Introduction
19
+
20
+ 将自然语言理解任务转化为multiple choice任务,并且使用40个NLU 任务进行预训练
21
+
22
+ Convert natural language understanding tasks into multiple choice tasks, and use 40 NLU task for pre-training
23
+
24
+ ## 模型分类 Model Taxonomy
25
+
26
+ | 需求 Demand | 任务 Task | 系列 Series | 模型 Model | 参数 Parameter | 额外 Extra |
27
+ | :----: | :----: | :----: | :----: | :----: | :----: |
28
+ | 通用 General | 自然语言理解 NLU | 二郎神 Erlangshen | RoBERTa | 110M | Chinese |
29
+
30
+ ## 模型信息 Model Information
31
+
32
+ 我们为零样本学习者提出了一种与输入无关的新范式,从某种意义上说,它与任何格式兼容并适用于一系列语言任务,例如文本分类、常识推理、共指解析、情感分析。我们的方法将零样本学习转化为多项选择任务,避免常用的大型生成模型(如 FLAN)中的问题。它不仅增加了模型的泛化能力,而且显着减少了对参数的需求。我们证明了这种方法可以在通用语言基准上取得最先进的性能,并在自然语言推理和文本分类等任务上产生令人满意的结果。
33
+
34
+ We propose an new paradigm for zero-shot learners that is input-agnostic, in the sense that it is compatible with any format and applicable to a list of language tasks, such as text classification, commonsense reasoning, coreference resolution, sentiment analysis.
35
+ Our approach converts zero-shot learning into multiple choice tasks,
36
+ avoiding problems in commonly used large generative models such as FLAN. It not only adds generalization ability to the models, but also reduces the needs of parameters significantly. We demonstrate that this approach leads to state-of-the-art performance on common language benchmarks, and produces satisfactory results on tasks such as natural language inference and text classification.
37
+
38
+ ### 下游效果 Performance
39
+
40
+ **Zero-Shot Classification**
41
+
42
+ | Model | T0 11B | GLaM 60B | FLAN 137B | PaLM 540B | UniMC 235M |
43
+ |---------|--------|----------|-----------|-----------|------------|
44
+ | ANLI R1 | 43.6 | 40.9 | 47.7 | 48.4 | 52.0 |
45
+ | ANLI R2 | 38.7 | 38.2 | 43.9 | 44.2 | 44.4 |
46
+ | ANLI R3 | 41.3 | 40.9 | 47.0 | 45.7 | 47.8 |
47
+ | CB | 70.1 | 33.9 | 64.1 | 51.8 | 75.7 |
48
+
49
+ ## 使用 Usage
50
+
51
+ ```python3
52
+ import argparse
53
+ from fengshen import UniMCPiplines
54
+
55
+
56
+ total_parser = argparse.ArgumentParser("TASK NAME")
57
+ total_parser = UniMCPiplines.piplines_args(total_parser)
58
+ args = total_parser.parse_args()
59
+ args.pretrained_model_path = 'IDEA-CCNL/Erlangshen-RoBERTa-110M-UniMC-Chinese'
60
+
61
+ train_data = []
62
+ dev_data = []
63
+ test_data = [
64
+ {"texta": "放弃了途观L和荣威RX5,果断入手这部车,外观霸气又好开",
65
+ "textb": "",
66
+ "question": "下面新闻属于哪一个类别?",
67
+ "choice": [
68
+ "房产",
69
+ "汽车",
70
+ "教育",
71
+ "科技"
72
+ ],
73
+ "answer": "汽车",
74
+ "label": 1,
75
+ "id": 7759}
76
+ ]
77
+
78
+
79
+ model = UniMCPiplines(args)
80
+
81
+ if args.train:
82
+ model.fit(train_data, dev_data)
83
+ result = model.predict(test_data)
84
+ for line in result[:20]:
85
+ print(line)
86
+
87
+
88
+ ```
89
+
90
+ ## 引用 Citation
91
+
92
+ 如果您在您的工作中使用了我们的模型,可以引用我们的[论文](https://arxiv.org/abs/2209.02970):
93
+
94
+ If you are using the resource for your work, please cite the our [paper](https://arxiv.org/abs/2209.02970):
95
+
96
+ ```text
97
+ @article{fengshenbang,
98
+ 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},
99
+ title = {Fengshenbang 1.0: Being the Foundation of Chinese Cognitive Intelligence},
100
+ journal = {CoRR},
101
+ volume = {abs/2209.02970},
102
+ year = {2022}
103
+ }
104
+ ```
105
+
106
+ 也可以引用我们的[网站](https://github.com/IDEA-CCNL/Fengshenbang-LM/):
107
+
108
+ You can also cite our [website](https://github.com/IDEA-CCNL/Fengshenbang-LM/):
109
+
110
+ ```text
111
+ @misc{Fengshenbang-LM,
112
+ title={Fengshenbang-LM},
113
+ author={IDEA-CCNL},
114
+ year={2021},
115
+ howpublished={\url{https://github.com/IDEA-CCNL/Fengshenbang-LM}},
116
+ }
117
+ ```