All models

roc_bert

A pretrained Chinese BERT model designed against adversarial attacks such as typos and synonyms.

Language · 311 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (28 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
124.5M
Operations
311
Framework
PyTorch
Recurrent
No
License
Apache-2.0
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m8964
Graph hash
0b59b6fa00a7dc0bfbc6185ace53f3de01ede4eb4a8296581767dca978092615
Skeleton hash
fec2d122a4f6fb94eeee38672a1ac98bc7f4aca7fe6feaf243c1dc562e3c8677
Architecture hash
55fb0f23c86e3390694b7dccf61c5ef4ede8a670c8906447147282dca4d613b9
Diagram SHA-256
6402bd38e9decaeb6940bab67c60cc8156bd8444803f1a3da322691a50d10afc
TorchLens version
2.35.3
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

How this diagram was made

transformers.AutoModelForMaskedLM.from_config()

What it is

RoCBert is a pretrained Chinese BERT model designed to withstand adversarial attacks such as typos and synonyms. It is pretrained with a contrastive learning objective that aligns normal text examples with adversarial ones. Those examples cover different semantic, phonetic and visual features of Chinese.

The model can be applied to different Chinese language tasks. One of them is predicting a masked token in a sentence. The original RoCBert checkpoints are published under the weiweishi profile.

Key idea. RoCBert pretrains a Chinese BERT model with a contrastive learning objective that aligns normal and adversarial text examples.

  • rocbert
  • roc-bert
  • roc_bert
  • robust chinese language model
  • chinese masked language model
  • adversarial robustness
  • contrastive pretraining
  • fill-mask

AI-written summary, based on the model's documentation and checked automatically against it; not reviewed by a person. Corrections welcome.