Views
No views yet
| 需求 Demand | 任务 Task | 系列 Series | 模型 Model | 参数 Parameter | 额外 Extra |
|---|---|---|---|---|---|
| 通用 General | 自然语言理解 NLU | 二郎神 Erlangshen | UBERT | 330M | 中文 Chinese |
1git clone https://github.com/IDEA-CCNL/Fengshenbang-LM.git
2cd Fengshenbang-LM
3pip install --editable ./1import argparse
2from fengshen import UbertPipelines
3
4total_parser = argparse.ArgumentParser("TASK NAME")
5total_parser = UbertPipelines.pipelines_args(total_parser)
6args = total_parser.parse_args()
7
8args.pretrained_model_path = "IDEA-CCNL/Erlangshen-Ubert-330M-Chinese"
9
10test_data=[
11 {
12 "task_type": "抽取任务",
13 "subtask_type": "实体识别",
14 "text": "这也让很多业主据此认为,雅清苑是政府公务员挤对了国家的经适房政策。",
15 "choices": [
16 {"entity_type": "小区名字"},
17 {"entity_type": "岗位职责"}
18 ],
19 "id": 0}
20]
21
22model = UbertPipelines(args)
23result = model.predict(test_data)
24for line in result:
25 print(line)1@article{fengshenbang/ubert,
2 author = {JunYu Lu and
3 Ping Yang and
4 Jiaxing Zhang and
5 Ruyi Gan and
6 Jing Yang},
7 title = {Unified {BERT} for Few-shot Natural Language Understanding},
8 journal = {CoRR},
9 volume = {abs/2206.12094},
10 year = {2022}
11}1@article{fengshenbang,
2 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},
3 title = {Fengshenbang 1.0: Being the Foundation of Chinese Cognitive Intelligence},
4 journal = {CoRR},
5 volume = {abs/2209.02970},
6 year = {2022}
7}1@misc{Fengshenbang-LM,
2 title={Fengshenbang-LM},
3 author={IDEA-CCNL},
4 year={2021},
5 howpublished={\url{https://github.com/IDEA-CCNL/Fengshenbang-LM}},
6}