Skip to content

Latest commit

 

History

History
387 lines (311 loc) · 33.5 KB

README_en.md

File metadata and controls

387 lines (311 loc) · 33.5 KB

Open Source Large Model User Guide

中文 | English

  This project is a large model tutorial tailored for domestic beginners, focusing on open-source large models and based on the Linux platform. It provides comprehensive guidance on environment configuration, local deployment, and efficient fine-tuning for various open-source large models. The goal is to simplify the deployment, usage, and application processes of open-source large models, enabling more students and researchers to effectively utilize these models and integrate open-source, freely available large models into their daily lives.

  The main content of this project includes:

  1. A guide to configuring the environment for open-source LLMs on the Linux platform, offering detailed steps tailored to different model requirements;
  2. Deployment and usage tutorials for mainstream open-source LLMs, both domestic and international, including LLaMA, ChatGLM, InternLM, MiniCPM, and more;
  3. Guidance on deploying and applying open-source LLMs, covering command-line invocation, online demo deployment, and integration with the LangChain framework;
  4. Methods for full fine-tuning and efficient fine-tuning of open-source LLMs, including distributed full fine-tuning, LoRA, and ptuning.

  The main content of this project is tutorials, aimed at helping more students and future practitioners understand and master the usage of open-source large models! Anyone can submit issues or pull requests to contribute to the project.

  Students who wish to deeply participate can contact us, and we will add them as project maintainers.

  Learning Suggestion: The recommended learning path for this project is to start with environment configuration, then move on to model deployment and usage, and finally tackle fine-tuning. Environment configuration is the foundation, model deployment and usage are the basics, and fine-tuning is the advanced step. Beginners are advised to start with models like Qwen1.5, InternLM2, and MiniCPM.

Note: For students interested in understanding the architecture of large models and learning to hand-write RAG, Agent, and Eval tasks from scratch, they can refer to another Datawhale project, Tiny-Universe. Large models are a hot topic in the field of deep learning, but most existing tutorials focus on teaching how to call APIs for large model applications, with few explaining the model structure, RAG, Agent, and Eval from a theoretical perspective. This repository provides a completely hand-written approach, without using APIs, to complete RAG, Agent, and Eval tasks for large models.

Note: For students who wish to learn the theoretical aspects of large models before diving into this project, they can refer to Datawhale's so-large-llm course to gain a deeper understanding of LLM theory and its applications.

Note: For students who want to develop large model applications after completing this course, they can refer to Datawhale's Hands-On Large Model Application Development course. This project is a tutorial for beginner developers, aiming to present the complete large model application development process based on Alibaba Cloud servers and a personal knowledge base assistant project.

Project Significance

  What is a large model?

A large model (LLM) narrowly refers to a natural language processing (NLP) model trained based on deep learning algorithms, primarily used in natural language understanding and generation. Broadly, it also includes computer vision (CV) large models, multimodal large models, and scientific computing large models.

  The battle of a hundred models is in full swing, with open-source LLMs emerging one after another. Numerous excellent open-source LLMs have appeared both domestically and internationally, such as LLaMA and Alpaca abroad, and ChatGLM, BaiChuan, and InternLM (Scholar·Puyu) in China. Open-source LLMs support local deployment and private domain fine-tuning, allowing everyone to create their own unique large models based on open-source LLMs.

  However, for ordinary students and users, using these large models requires a certain level of technical expertise to complete the deployment and usage. With the continuous emergence of diverse open-source LLMs, quickly mastering the application methods of an open-source LLM is a challenging task.

  This project aims to first provide deployment, usage, and fine-tuning tutorials for mainstream open-source LLMs based on the core contributors' experience. After completing the relevant sections for mainstream LLMs, we hope to gather more collaborators to enrich this open-source LLM world, creating tutorials for more and more unique LLMs. Sparks will gather into a sea.

  We hope to become the bridge between LLMs and the general public, embracing a broader and more expansive LLM world with the spirit of freedom and equality in open source.

Target Audience

  This project is suitable for the following learners:

  • Those who want to use or experience LLMs but lack access to or cannot use related APIs;
  • Those who wish to apply LLMs in large quantities over the long term at a low cost;
  • Those interested in open-source LLMs and want to get hands-on experience;
  • NLP students who wish to further their understanding of LLMs;
  • Those who want to combine open-source LLMs to create domain-specific private LLMs;
  • And the broadest, most ordinary student population.

Project Plan and Progress

  This project is organized around the entire application process of open-source LLMs, including environment configuration and usage, deployment applications, and fine-tuning. Each section covers mainstream and unique open-source LLMs:

Example Series

  • Chat-Huanhuan: Chat-Huanhuan is a chat language model that mimics the tone of Zhen Huan, fine-tuned using LoRA based on all the lines and dialogues related to Zhen Huan from the script of "Empresses in the Palace."

  • Tianji-Sky Machine: Tianji is a large language model system application tutorial based on social scenarios of human relationships, covering prompt engineering, agent creation, data acquisition and model fine-tuning, RAG data cleaning and usage, and more.

Supported Models

通用环境配置

General Environment Configuration

Acknowledgments

Core Contributors

  • 宋志学(不要葱姜蒜)-项目负责人 (Datawhale成员-中国矿业大学(北京))
  • 邹雨衡-项目负责人 (Datawhale成员-对外经济贸易大学)
  • 肖鸿儒 (Datawhale成员-同济大学)
  • 郭志航(内容创作者)
  • 林泽毅(内容创作者-SwanLab产品负责人)
  • 张帆(内容创作者-Datawhale成员)
  • 姜舒凡(内容创作者-鲸英助教)
  • 李娇娇 (Datawhale成员)
  • 丁悦 (Datawhale-鲸英助教)
  • 王泽宇(内容创作者-太原理工大学-鲸英助教)
  • 惠佳豪 (Datawhale-宣传大使)
  • 王茂霖(内容创作者-Datawhale成员)
  • 孙健壮(内容创作者-对外经济贸易大学)
  • 东东(内容创作者-谷歌开发者机器学习技术专家)
  • 高立业(内容创作者-DataWhale成员)
  • Kailigithub (Datawhale成员)
  • 郑皓桦 (内容创作者)
  • 李柯辰 (Datawhale成员)
  • 程宏(内容创作者-Datawhale意向成员)
  • 陈思州 (Datawhale成员)
  • 散步 (Datawhale成员)
  • 颜鑫 (Datawhale成员)
  • 荞麦(内容创作者-Datawhale成员)
  • Swiftie (小米NLP算法工程师)
  • 黄柏特(内容创作者-西安电子科技大学)
  • 张友东(内容创作者-Datawhale成员)
  • 余洋(内容创作者-Datawhale成员)
  • 张晋(内容创作者-Datawhale成员)
  • 娄天奥(内容创作者-中国科学院大学-鲸英助教)
  • 左春生(内容创作者-Datawhale成员)
  • 杨卓(内容创作者-西安电子科技大学-鲸英助教)
  • 小罗 (内容创作者-Datawhale成员)
  • 邓恺俊(内容创作者-Datawhale成员)
  • 赵文恺(内容创作者-太原理工大学-鲸英助教)
  • 付志远(内容创作者-海南大学)
  • 杜森(内容创作者-Datawhale成员-南阳理工学院)
  • 郑远婧(内容创作者-鲸英助教-福州大学)
  • 谭逸珂(内容创作者-对外经济贸易大学)
  • 王熠明(内容创作者-Datawhale成员)
  • 何至轩(内容创作者-鲸英助教)
  • 康婧淇(内容创作者-Datawhale成员)
  • 三水(内容创作者-鲸英助教)
  • 杨晨旭(内容创作者-太原理工大学-鲸英助教)
  • 赵伟(内容创作者-鲸英助教)
  • 苏向标(内容创作者-广州大学-鲸英助教)
  • 陈睿(内容创作者-西交利物浦大学-鲸英助教)
  • 林恒宇(内容创作者-广东东软学院-鲸英助教)

Note: Ranking is based on the level of contribution.

Others

  • Special thanks to @Sm1les for their help and support for this project.
  • Some LoRA code and explanations are referenced from the repository: https://github.com/zyds/transformers-code.git
  • If you have any ideas, feel free to contact us at DataWhale. We also welcome everyone to raise issues!
  • Special thanks to the following students who contributed to the tutorials!

Star History