X-PLUG
ChatPLUG
Python

A Chinese Open-Domain Dialogue System

Last updated Aug 4, 2026
323
Stars
29
Forks
0
Issues
0
Stars/day
Attention Score
44
Language breakdown
Python 99.4%
Shell 0.6%
Files click to expand
README

ChatPLUG: Chinese Personalized Large Language Model

Hex.pm docs Hits

This is the repo for the ChatPLUG project, which aims to build and share a Chinese open-domain dialogue system.


| 爱用emoji的萌妹子小婉 | 富有智慧的得道高僧 | 会说古文的的三国NPC关羽 | :-------------------------:|:-------------------------:|:-------------------------: | |

News

  • 🔥 ChatPLUG-13B will soon be released on ModelScope for research.
  • [2023/05/23] Add guides about retrieval and role-play
  • [2023/05/10] Add training code, which helps train custom models and build chatbots quickly and easily.
  • [2023/04/26] Try our Role-Play-Chat Online Demo in ModelScope Now!
  • [2023/04/19] Add content including spotlights, results and limitations. Upload models to ModelScope.
  • [2023/04/16] Initialize project.

Online Demo

Role-Play-Chat

Spotlights

spotlights

Compared with existed open-source models, we highlight three feaures of ChatPLUG as follows:

  • Knowledge Augmentation
> It's flexible to integrate external knowledge during inference, and this is an optional input. You can utilize a search engine to acquire up-to-date information or use a local knowledge base to obtain domain knowledge.
  • Personalization
> It's easy to customize the style of conversations and characters by setting bot profiles or using role-paly instructions.
  • Multi Skills
> It exhibits its proficiency in open-domain dialogue through mulit-turn conversation, while also displaying impressive multi-task abilities on a wide range of NLP tasks.

How to run

We offer three methods to use or continue developing ChatPLUG as follows:

| | Getting Started | Inference | Train | Deploy | |---|---|---|---|---| | ModelScope | Easy | :heavycheckmark: Cli | :x: Not Ready | :x: Not Ready | | HuggingFace | Medium | :heavycheckmark: Cli | :x: Not Ready | :x: Not Ready | | XDPX | Hard | :heavycheckmark: Cli | :heavycheckmark: Support | :heavycheckmark: Serving |

ModelScope

You can download and use ChatPLUG models from ModelScope.

| Model Name | URL | | ------------- | ------------------------------------------------------------ | | ChatPLUG-240M | ChatPLUG-开放域对话模型-240M | | ChatPLUG-3.7B | ChatPLUG-开放域对话模型-3.7B |

HuggingFace

Coming soon.

XDPX

XDPX is an easy-to-use library, that allows researchers and developers to train custom models and build own chatbots in a streamlined manner. Its all-in-one functionality allows for a one-stop solution that simplifies complex processes. quick start

One-Click Inference

When using ChatPLUG-3.7B, you can set corechathalf_precision : true to save memory.
# Requirement

in the dir of XDPX

cd XDPX pip install -e .

Download checkpoints

in the same dir as the download.sh

cd .. sh download.sh

Inference

in the dir of XDPX

cd XDPX CUDAVISIBLEDEVICES=0 x-script fidchatnew chatpipeline/chatplug3.7Bsftv2.6.0_instruction.hjson

input #exit and exit the terminal

One-Click Train

If your GPU(e.g. A100、A10) support bf16, set deepspeedbf16: true and deepspeedfp16: false, otherwise set deepspeedbf16: false and deepspeedfp16: true
# 1. Download dataset from belle

in ChatPLUG/data/belle dir

cd data/belle git lfs install git clone https://huggingface.co/datasets/BelleGroup/train0.5MCN

python processbelle0.5M.py

$ls data/belle

train_0.jsonl dev.jsonl ...

2. Preprocess Data

in XDPX dir

x-prepro chatpipeline/chatplugpreprosftinstruction.hjson

$ls data/dialogue/sft/chatplug/belle_instruction

train_0.pt dev.pt

3. Training

in XDPX dir

x-train chatpipeline/chatplug3.7Btrainsftv2.6.0_instruction.hjson

One-Click Deploy

Coming soon.

Installation

Please refer to Installation for installation instructions.

For detailed user guides, please refer to our documentation:

  • User Guides
- Quick Start - Retrieval - Role-Play
  • Advanced Guides
- Intro - Training - Develop - F.A.Q

Citations

If you find our project useful in your work, please cite:

@misc{tian2023chatplug,
        title={ChatPLUG: Open-Domain Generative Dialogue System with Internet-Augmented Instruction Tuning for Digital Human}, 
        author={Junfeng Tian and Hehong Chen and Guohai Xu and Ming Yan and Xing Gao and Jianhai Zhang and Chenliang Li and Jiayi Liu and Wenshen Xu and Haiyang Xu and Qi Qian and Wei Wang and Qinghao Ye and Jiejing Zhang and Ji Zhang and Fei Huang and Jingren Zhou},
        year={2023},
        eprint={2304.07849},
        archivePrefix={arXiv},
        primaryClass={cs.CL}
  }
@misc{plug2021,
  title = {{PLUG: Pre-training for Language Understanding and Generation}},
  author={ModelScope},
  publisher = {ModelScope},
  journal = {ModelScope repository},
  year = {2021},
  howpublished = {\url{https://modelscope.cn/models/damo/nlpplugtext-generation_27B/summary}},
}

License

This code is licensed under the Apache License (Version 2.0).
🔗 More in this category

© 2026 GitRepoTrend · X-PLUG/ChatPLUG · Updated daily from GitHub