ChatLM-mini-Chinese
ChatLM-mini-Chinese (ChatLM-Chinese-0.2B) is an open-source project for a small Chinese dialogue model, aiming to provide complete process code for training a generative language model from scratch, covering data cleaning, tokenizer training, model pretraining, SFT instruction fine-tuning, RLHF optimization, and other stages. The model has about 0.2B parameters (about 210M including shared weights), can be pretrained on a machine with as little as 4GB of VRAM, and requires only about 512MB of VRAM at minimum for float16 loading and inference. The project publicly discloses all sources of pretraining, SFT instruction fine-tuning, and DPO preference optimization datasets, is based on Hugging Face frameworks such as transformers, accelerate, trl, and peft, and uses a self-implemented trainer, supporting single-machine single-GPU, single-machine multi-GPU training, and resuming training from checkpoints at any position. In addition, it supports SFT fine-tuning for downstream tasks and provides a fine-tuning example for triple information extraction.