File size: 1,080 Bytes
80fad81 4283f6b b74e20d 4283f6b 80fad81 a2b838a 80fad81 0348c67 80fad81 8cb8dd7 80fad81 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
---
language:
- zh
pipeline_tag: "fill-mask"
widget:
- text: "ba黎系[MASK]国的首都"
example_title: "Adversarial Attack Test"
---
# RoCBert
## Introduction
RoCBert is a pretrained Chinese language model that is robust under various forms of adversarial attacks proposed by WeChatAI in 2022,
More detail: https://aclanthology.org/2022.acl-long.65.pdf
Pretrained code: https://github.com/sww9370/RoCBert
## How to use
```Python
# pip install transformers>=4.25.1
from transformers import AutoTokenizer, AutoModel
tokenizer = AutoTokenizer.from_pretrained("weiweishi/roc-bert-base-zh")
model = AutoModel.from_pretrained("weiweishi/roc-bert-base-zh")
```
## Citation
```bibtex
@inproceedings{su2022rocbert,
title={RoCBert: Robust Chinese Bert with Multimodal Contrastive Pretraining},
author={Su, Hui and Shi, Weiwei and Shen, Xiaoyu and Xiao, Zhou and Ji, Tuo and Fang, Jiarui and Zhou, Jie},
booktitle={Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)},
pages={921--931},
year={2022}
}
``` |