Views
No views yet
| 需求 Demand | 任务 Task | 系列 Series | 模型 Model | 参数 Parameter | 额外 Extra |
|---|---|---|---|---|---|
| 通用 General | 自然语言理解 NLU | 二郎神 Erlangshen | MacBERT | 325M | Chinese |
| Model | BUSTM |
|---|---|
| Erlangshen-UniMC-MegatronBERT-1.3B-Chinese | 80.9 |
| Erlangshen-MacBERT-325M-TextMatch-Chinese | 81.6 |
1git clone https://github.com/IDEA-CCNL/Fengshenbang-LM.git
2cd Fengshenbang-LM
3pip install --editable .1import argparse
2from fengshen.pipelines.multiplechoice import UniMCPipelines
3total_parser = argparse.ArgumentParser("TASK NAME")
4total_parser = UniMCPipelines.piplines_args(total_parser)
5args = total_parser.parse_args()
6model_path='IDEA-CCNL/Erlangshen-MacBERT-325M-TextMatch-Chinese'
7args.learning_rate=2e-5
8args.max_length=512
9args.max_epochs=3
10args.batchsize=8
11args.default_root_dir='./'
12model = UniMCPipelines(args,model_path)
13train_data = []
14dev_data = []
15test_data = [
16 {"task_type":"语义匹配",
17 "texta": "你晚上吃了什么",
18 "textb": "你晚上吃啥了",
19 "question": "怎么理解这段话?",
20 "label": 1,
21 "id": 1}
22 ]
23if args.train:
24 model.train(train_data, dev_data)
25result = model.predict(test_data)
26for line in result[:20]:
27 print(line)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}