datawhalechina/self-llm

《开源大模型食用指南》针对中国宝宝量身打造的基于Linux环境快速微调(全参数/Lora)、部署国内外开源大模型(LLM)/多模态大模型(MLLM)教程

What this project is

self-llm (titled "开源大模型食用指南", roughly "A Beginner's Guide to Open-Source LLMs") is a free, community-written tutorial collection. It teaches Chinese-speaking beginners how to install, run, and customize open-source large language models (LLMs) on Linux computers.

The project's core goal is to lower the technical barrier so ordinary students and researchers — not just engineers — can actually use open-source LLMs locally instead of only calling paid APIs.

Who it's for

The README lists these target learners:

  • People who want to use LLMs but can't access or afford commercial APIs
  • People who need long-term, low-cost, high-volume LLM usage
  • Anyone curious about open-source LLMs who wants hands-on experience
  • NLP students who want to go beyond theory
  • People who want to build a customized, domain-specific LLM (e.g., for their own field)
  • General students with no special technical background

What it teaches

Four main skill areas, in this recommended order:

  1. Environment setup — step-by-step Linux configuration guides tailored to different models
  2. Deployment — how to run models locally, including command-line use, web demos, and integration with the LangChain framework
  3. Fine-tuning — both full fine-tuning (including distributed training) and efficient methods like LoRA and P-Tuning
  4. Application — practical ways to use the models once deployed

Supported models and platforms

  • 50+ mainstream LLMs are covered, each with complete deployment, fine-tuning, and usage tutorials. Examples include Qwen (multiple versions), DeepSeek, GLM/ChatGLM, Llama, InternLM, MiniCPM, Gemma, Kimi, Baichuan, Yi, and many more.
  • AMD GPU section — tutorials for running models on AMD hardware via ROCm, with tools like LM Studio, vLLM, Ollama, and llama.cpp. Supported by AMD's University Program.
  • Ascend NPU section — tutorials for Huawei's Ascend NPU platform, including deployment via vLLM-ascend, MindIE, and sglang-ascend, plus performance/accuracy testing guides.
  • Apple M series — a dedicated section for Apple Silicon Macs (linked separately).
  • Muxi GPU — listed as "Coming Soon."
  • The project explicitly welcomes contributions from other hardware platforms (e.g., Moore Threads MUSA).

Example projects included

Four worked examples show the full pipeline in practice:

  • Chat-嬛嬛 — a chatbot fine-tuned with LoRA on dialogue lines from the Chinese TV drama The Legend of Zhen Huan, mimicking the character's speaking style
  • Tianji-天机 — a complete LLM system for social/interpersonal scenarios, covering prompt engineering, agent building, data collection, fine-tuning, and RAG data cleaning
  • AMChat — a math-focused LLM fine-tuned from InternLM2-Math-7B to answer advanced mathematics questions
  • 数字生命 (Digital Life) — a personal AI clone fine-tuned on a custom dataset to mimic the creator's tone, expression, and thinking patterns; the dataset-building process is highlighted as the key innovation

Learning path suggested

  1. Environment configuration first (it's the foundation)
  2. Model deployment and usage second
  3. Fine-tuning last (it's the advanced topic)

Beginners are advised to start with models like Qwen1.5, InternLM2, or MiniCPM.

Community and contribution

  • Anyone can open issues or submit pull requests to help build the project.
  • Active contributors can be added as maintainers.
  • The project is part of the Datawhale open-source community, which also maintains related tutorials: Happy-LLM (building LLMs from scratch), Tiny-Universe (hand-writing RAG, Agent, and Eval systems), so-large-llm (LLM theory), and llm-universe (building LLM applications).
  • A long list of named core contributors is credited, plus a contributor graph and star history chart.

Key takeaway

The project's stated mission: "We hope to become the stepping stone between LLMs and ordinary people — embracing the vast world of LLMs with the free and equal spirit of open source."

Related

  • Project
  • Project
  • Project
  • Project