Giter VIP home page Giter VIP logo

zen2's Introduction

ZEN 2.0

ZEN 2.0 is a pre-trained language model with Chinese and Arabic versions. ZEN 2.0 is based on the architecture of ZEN 1.0 with an update and adaptation from the following three aspects:

  • Refined N-gram Representations
    We refine the representations of n-grams by applying weights to the n-gram representations when they are integrated into the character encoder.
  • Whole N-gram Masking
    In the training stage, we mask n-grams/words, rather than characters, in the input text of the character encoders.
  • Relative Positional Encoding
    We utilize relative positional encoding for the character encoder to model direction and distance information from the input text.

The structure of ZEN 2.0 is illustrated in the following figure. We elaborate the differences between ZEN 2.0 and ZEN 1.0 at here. ใ€€

ZEN_model

Citation

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

@article{Sinovation2021ZEN2,
  title="{ZEN 2.0: Continue Training and Adaption for N-gram Enhanced Text Encoders}",
  author={Yan Song, Tong Zhang, Yonggang Wang, Kai-Fu Lee},
  journal={arXiv preprint arXiv:2105.01279},
  year={2021},
}

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

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

  • run_pre_train.py: an example pre-training ZEN 2.0
  • run_sequence_level_classification.py: an example fine-tuning ZEN 2.0 on DC, SA, SPM, NLI and QA tasks (sequence-level classification)
  • run_token_level_classification.py: an example fine-tuning ZEN 2.0 on CWS, POS and NER tasks (token-level classification)
  • run_mrc_task.py: an example fine-tuning ZEN 2.0 on MRC tasks

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

Contact information

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

For personal communication related to ZEN 2.0, please contact Yuanhe Tian ([email protected]).

zen2's People

Contributors

yuanhetian avatar guiminchen avatar clksong avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.