Need help with ZEN?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

582 Stars 96 Forks Apache License 2.0 23 Commits 7 Opened issues


A BERT-based Chinese Text Encoder Enhanced by N-gram Representations

Services available


Need anything else?

Contributors list

# 182,948
22 commits
# 403,147
1 commit


ZEN is a BERT-based Chinese (Z) text encoder Enhanced by N-gram representations, where different combinations of characters are considered during training. The potential word or phrase boundaries are explicitly pre-trained and fine-tuned with the character encoder (BERT), so that ZEN incorporates the comprehensive information of both the character sequence and words or phrases it contains. The structure of ZEN is illustrated in the figure below.





If you use or extend our work, please cite the following paper:

  title="{ZEN: Pre-training Chinese Text Encoder Enhanced by N-gram Representations}",
  author={Shizhe Diao, Jiaxin Bai, Yan Song, Tong Zhang, Yonggang Wang},

Quick tour of pre-training and fine-tune using ZEN

The library comprises several example scripts for conducting Chinese NLP tasks:

    : an example pre-training ZEN
    : an example fine-tuning ZEN on DC, SA, SPM and NLI tasks (sequence-level classification)
    : an example fine-tuning ZEN on CWS, POS and NER tasks (token-level classification)

Examples of pre-training and fine-tune using ZEN.

Contact information

For help or issues using ZEN, please submit a GitHub issue.

For personal communication related to ZEN, please contact Guimin Chen (

[email protected]

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.