gpt2-chinese-couplet

gpt2-chinese-couplet

uer

GPT2-based Chinese couplet generator trained on 700k couplets. Pre-trained using UER-py framework with 25k steps. Specializes in generating matching Chinese poetry couplets.

PropertyValue
AuthorUER Team
FrameworkUER-py/TencentPretrain
Training Data700,000 Chinese couplets
Model BaseGPT2
Training Steps25,000
Hugging Faceuer/gpt2-chinese-couplet

What is gpt2-chinese-couplet?

The gpt2-chinese-couplet is a specialized language model designed to generate Chinese couplets, traditional paired poetic verses that follow strict parallelism rules. Built on the GPT2 architecture and trained using the UER-py framework, this model has been fine-tuned on a massive dataset of 700,000 Chinese couplets to capture the intricate patterns and linguistic nuances of classical Chinese poetry.

Implementation Details

The model utilizes a GPT2 architecture pre-trained for 25,000 steps with a sequence length of 64. Training was conducted on Tencent Cloud using distributed training across 8 GPUs. The implementation uses BertTokenizer for tokenization and supports both regular and special token handling modes.

  • Pre-training framework: UER-py with support for TencentPretrain
  • Batch size: 64
  • Learning rate: 5e-4
  • Sequence length: 64 tokens
  • Distributed training: 8 GPU configuration

Core Capabilities

  • Generates matching Chinese couplet pairs
  • Handles both traditional and modern Chinese characters
  • Supports flexible text generation parameters
  • Compatible with Hugging Face's transformers library
  • Provides options for special token handling

Frequently Asked Questions

Q: What makes this model unique?

This model specializes in the specific cultural art form of Chinese couplets, trained on a carefully curated dataset of 700,000 examples. Its architecture is optimized for understanding and generating paired verses that follow traditional Chinese poetic rules.

Q: What are the recommended use cases?

The model is primarily designed for generating matching couplets in Chinese poetry, cultural applications, and educational tools for teaching traditional Chinese literature. It can be used through simple API calls or integrated into larger applications using the Hugging Face transformers library.

Socials
PromptLayer
Company
All services online
Location IconPromptLayer is located in the heart of New York City
PromptLayer © 2026