#98 · Primary category: Foundation Models
ChatLM-mini-Chinese
中文对话0.2B小模型(ChatLM-Chinese-0.2B),开源所有数据集来源、数据清洗、tokenizer训练、模型预训练、SFT指令微调、RLHF优化等流程的全部代码。支持下游任务sft微调,给出三元组信息抽取微调示例。
Project last updated:04/20/24
GitHub Stars
1.7K
Forks
192
Contributors
3
License
Apache-2.0
Why we included this project
ChatLM-mini-Chinese starts from a simple premise: most large language models are impractical on consumer hardware, so it sets out to build a useful Chinese dialogue model from scratch on a modest setup. The result is a 0.2B model that loads in around 512MB under float16 and can be pretrained on a single 4GB GPU. Every step of the pipeline is open: the data sources, the cleaning and mini-hash deduplication code, tokenizer training, pretraining, SFT, and DPO preference optimization, with custom trainers that support single- and multi-GPU runs and resume from any checkpoint. A worked example shows fine-tuning for relation-triple extraction while keeping the chat ability intact, so the repo works both as a deployable small model and as a study reference for how a Chinese LLM is built end to end.
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
transformers
🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training.
CLIP
CLIP (Contrastive Language-Image Pretraining), Predict the most relevant text snippet given an image
MiniCPM-V
A Pocket-Sized MLLM for Ultra-Efficient Image and Video Understanding on Your Phone
generative-models
Generative Models by Stability AI
unilm
Large-scale Self-supervised Pre-training Across Tasks, Languages, and Modalities