#14 · Primary category: NLP Tools & Text Processing

GPT2-Chinese

chinese gpt-2 nlp text-generation transformer

Chinese version of GPT2 training code, using BERT tokenizer.

Project last updated:04/25/24

GitHub Stars

7.6K

Forks

1.7K

Contributors

5

License

MIT

Why we included this project

This codebase is a practical starting point for training or fine-tuning a Chinese generative language model. It adapts HuggingFace Transformers' GPT-2 implementation to handle Chinese input, with character, word, and BPE tokenization so you can match the granularity to your corpus. The repo also ships pretrained models for specific genres, including poems, couplets, lyrics, classical Chinese, and general Chinese, which lets you generate usable text right away before investing in your own training run. The author is upfront that this started as a self-taught learning project and gets limited maintenance, so production users should weigh that, but the training scripts remain a clear reference for getting a Chinese GPT-2 working on large corpora. Teams exploring Chinese creative or content generation will find it a useful baseline to build on.

Articles for this project

No articles for this project yet.

To suggest a topic or contribute an article, contact us.

Related projects in this category