gpt2 dialogbot base chinese

shibing624

Introduction

The GPT2-DIALOGBOT-BASE-CHINESE is a Chinese dialogue generation model based on the GPT-2 architecture. It is designed to handle common conversational data in Chinese and generates contextually relevant responses.

Architecture

The model uses the native GPT-2 architecture. It is structured to handle various Chinese dialogue datasets effectively, ensuring correct semantic responses in conversational contexts. The architecture supports text generation tasks using PyTorch and utilizes safetensors for model safety and efficiency.

Training

The model is trained on diverse Chinese dialogue datasets, including:

  • Xiao Huang Ji corpus
  • Douban corpus
  • TV dialogue corpus
  • Tieba forum reply corpus
  • Weibo corpus
  • PTT gossip corpus
  • Qingyun corpus

Datasets are available on both Baidu Netdisk and Google Drive, comprising 500,000 to 1 million multi-turn dialogue entries. These datasets are preprocessed for training purposes.

Guide: Running Locally

To run the GPT2-DIALOGBOT-BASE-CHINESE model locally, follow these steps:

  1. Install the Package
    Install the dialogbot package using pip:

    pip install -U dialogbot
    
  2. Initialize the Model
    Use the following Python code to initialize and interact with the model:

    from dialogbot import GPTBot
    model = GPTBot("shibing624/gpt2-dialogbot-base-chinese")
    response = model.answer("今天你的病好点了吗?")
    print(response)  # Output: '好多了,谢谢你的关心'
    
  3. Cloud GPU Suggestion
    For enhanced performance, especially with large datasets, consider using cloud GPU services from providers like AWS, Google Cloud, or Azure.

License

The model is licensed under the Apache 2.0 License, allowing for extensive use, modification, and distribution while maintaining the original license conditions.

More Related APIs in Text Generation