ChatGLM toolkit for multi-GPU finetuning, inference, and applications
Top 72.6% on sourcepulse
This repository provides a framework for fine-tuning and deploying large language models, specifically ChatGLM, with a focus on multi-GPU utilization and integration of various AI applications. It targets researchers and developers looking to extend LLM capabilities with custom data, plugins, and advanced features like image generation, retrieval, and digital human creation.
How It Works
The project leverages DeepSpeed and Accelerate for efficient multi-GPU training and inference, enabling distributed execution of LLM fine-tuning. It supports LoRA for parameter-efficient fine-tuning and integrates with tools like LangChain for knowledge-based retrieval and agent construction. The architecture allows for modular expansion with specific application examples provided for tasks such as real-time drawing, retrieval-augmented generation, and AI-powered digital humans.
Quick Start & Requirements
pip install -r requirements.txt
torchrun --nproc_per_node=2 multi_gpu_fintune_belle.py --dataset_path data/alpaca ... --deepspeed ds_config_zero3.json
Highlighted Details
Maintenance & Community
The repository is maintained by liangwq. Links to CSDN and Zhihu articles are provided for theoretical explanations of various components.
Licensing & Compatibility
The repository's license is not explicitly stated in the README. Compatibility for commercial use or closed-source linking would require clarification of the license.
Limitations & Caveats
Some advanced features, like automated multi-module operation for poster generation, are noted as requiring manual intervention and are planned for future automation. The RLHF implementation is described as "naive" and expected to evolve. The README mentions that the DDP (Distributed Data Parallel) method has not been tested.
1 year ago
1 day