Downloads · 30 days
80
3% of all-time downloads
ShannonAI/ChineseBERT-large
ChineseBERT-large is a machine learning model from ShannonAI. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers.
This repository contains code, model, dataset for ChineseBERT at ACL2021.
Downloads · 30 days
80
3% of all-time downloads
All-time downloads
2.8K
Public
Repo size
4.8 GB
Likes
6
Public
Click a slice to open those files.
.bin1.5 GB · 82%
From the Hugging Face model README
This repository contains code, model, dataset for ChineseBERT at ACL2021.
paper:
ChineseBERT: Chinese Pretraining Enhanced by Glyph and Pinyin Information
Zijun Sun, Xiaoya Li, Xiaofei Sun, Yuxian Meng, Xiang Ao, Qing He, Fei Wu and Jiwei Li
code:
ChineseBERT github link
We propose ChineseBERT, which incorporates both the glyph and pinyin information of Chinese characters into language model pretraining.
First, for each Chinese character, we get three kind of embedding.
Then, char embedding, glyph embedding and pinyin embedding
are first concatenated, and mapped to a D-dimensional embedding through a fully
connected layer to form the fusion embedding.
Finally, the fusion embedding is added with the position embedding, which is fed as input to the BERT model.
The following image shows an overview architecture of ChineseBERT model.

ChineseBERT leverages the glyph and pinyin information of Chinese characters to enhance the model's ability of capturing context semantics from surface character forms and disambiguating polyphonic characters in Chinese.