A Pre-Trained Unbalanced Transformer for Both Chinese Language Understanding and Generation. We replace the old BERT vocabulary with a larger one of size 51271 built from the training data, in which we 1) add missing 6800+ Chinese characters (most of them are traditional Chinese characters); 2) remove redundant tokens (e.g. Chinese character tokens with ## prefix); 3) add some English tokens to reduce OOV.
Position Embeddings We extend the max_position_embeddings from 512 to 1024. We initialize the new version of models with the old version of checkpoints with vocabulary alignment. Token embeddings found in the old checkpoints are copied. And other newly added parameters are randomly initialized. We further train the new CPT & Chinese BART 50K steps with batch size 2048, max-seq-length 1024, peak learning rate 2e-5, and warmup ratio 0.1. Aiming to unify both NLU and NLG tasks, We propose a novel Chinese Pre-trained Un-balanced Transformer (CPT).

Features

  • This repository contains code and checkpoints for CPT
  • A Pre-Trained Unbalanced Transformer for Both Chinese Language Understanding and Generation
  • Transformer encoder with fully-connected self-attention, which is designed to capture the common semantic representation for both language understanding and generation
  • Generation Decoder (G-Dec)
  • Shallow Transformer encoder with fully-connected self-attention, which is designed for NLU tasks. The input of U-Dec is the output of S-Enc.
  • G-Dec utilizes the output of S-Enc with cross-attention

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow CPT

CPT Web Site

Other Useful Business Software
Managed MySQL, PostgreSQL, and SQL Databases on Google Cloud Icon
Managed MySQL, PostgreSQL, and SQL Databases on Google Cloud

Get back to your application and leave the database to us. Cloud SQL automatically handles backups, replication, and scaling.

Cloud SQL is a fully managed relational database for MySQL, PostgreSQL, and SQL Server. We handle patching, backups, replication, encryption, and failover—so you can focus on your app. Migrate from on-prem or other clouds with free Database Migration Service. IDC found customers achieved 246% ROI. New customers get $300 in credits plus a 30-day free trial.
Try Cloud SQL Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of CPT!

Additional Project Details

Programming Language

Python

Related Categories

Python AI Text Generators, Python Generative AI

Registered

2023-03-23