Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
📚 从零开始构建大模型
| Date | Stars |
|---|---|
| 2026-07-24 | 32319 |
| 2026-07-25 | 32338 |
| 2026-07-28 | 32338 |
| 2026-07-30 | 32338 |
| 2026-07-31 | 32505 |
| 2026-08-06 | 32505 |
Today
— stars today
This week
+167 stars this week
This month
— stars this month
Momentum
117.0
growth rate 0.52%/day
<div align='center'>
<img src="./images/head.jpg" alt="alt text" width="100%">
<h1>Happy-LLM</h1>
</div>
<div align="center">
<img src="https://img.shields.io/github/stars/datawhalechina/happy-llm?style=flat&logo=github" alt="GitHub stars"/>
<img src="https://img.shields.io/github/forks/datawhalechina/happy-llm?style=flat&logo=github" alt="GitHub forks"/>
<img src="https://img.shields.io/badge/language-Chinese-brightgreen?style=flat" alt="Language"/>
<a href="https://github.com/datawhalechina/happy-llm"><img src="https://img.shields.io/badge/GitHub-Project-blue?style=flat&logo=github" alt="GitHub Project"></a>
<a href="https://swanlab.cn/@kmno4/Happy-LLM/overview"><img src="https://raw.githubusercontent.com/SwanHubX/assets/main/badge1.svg" alt="SwanLab"></a>
</div>
<div align="center">
<a href="https://trendshift.io/repositories/14175" target="_blank"><img src="https://trendshift.io/api/badge/repositories/14175" alt="datawhalechina%2Fhappy-llm | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
</div>
<div align="center">
[中文](./README.md) | [English](./README_en.md)
</div>
<div align="center">
<p><a href="https://datawhalechina.github.io/happy-llm/">📚 在线阅读地址</a></p>
<h3>📚 从零开始构建大模型</h3>
<p><em>深入理解 LLM 核心原理,动手实现你的第一个大模型</em></p>
</div>
---
## 🎯 项目介绍
>   *很多小伙伴在看完 Datawhale开源项目: [self-llm 开源大模型食用指南](https://github.com/datawhalechina/self-llm) 后,感觉意犹未尽,想要深入了解大语言模型的原理和训练过程。于是我们(Datawhale)决定推出《Happy-LLM》项目,旨在帮助大家深入理解大语言模型的原理和训练过程。*
  本项目是一个**系统性的 LLM 学习教程**,将从 NLP 的基本研究方法出发,根据 LLM 的思路及原理逐层深入,依次为读者剖析 LLM 的架构基础和训练过程。同时,我们会结合目前 LLM 领域最主流的代码框架,演练如何亲手搭建、训练一个 LLM,期以实现授之以鱼,更授之以渔。希望大家能从这本书开始走入 LLM 的浩瀚世界,探索 LLM 的无尽可能。
### ✨ 你将收获什么?
- 📚 **Datawhale 开源免费** 完全免费的学习本项目所有内容
- 🔍 **深入理解** Transformer 架构和注意力机制
- 📚 **掌握** 预训练语言模型的基本原理
- 🧠 **了解** 现有大模型的基本结构
- 🏗️ **动手实现** 一个完整的 LLaMA2 模型
- ⚙️ **掌握训练** 从预训练到微调的全流程
- 🚀 **实战应用** RAG、Agent 等前沿技术
## 📖 内容导航
| 章节 | 关键内容 | 状态 |
| --- | --- | --- |
| [学习与环境准备](./docs/学习与环境准备.md) | 分章依赖、硬件建议与实践入口 | ✅ |
| [前言](./docs/前言.md) | 本项目的缘起、背景及读者建议 | ✅ |
| [第一章 NLP 基础概念](./docs/chapter1/第一章%20NLP基础概念.md) | 什么是 NLP、发展历程、任务分类、文本表示演进 | ✅ |
| [第二章 Transformer 架构](./docs/chapter2/第二章%20Transformer架构.md) | 注意力机制、Encoder-Decoder、手把手搭建 Transformer | ✅ |
| [第三章 预训练语言模型](./docs/chapter3/第三章%20预训练语言模型.md) | Encoder-only、Encoder-Decoder、Decoder-Only 模型对比 | ✅ |
| [第四章 大语言模型](./docs/chapter4/第四章%20大语言模型.md) | LLM 定义、训练策略、涌现能力分析 | ✅ |
| [第五章 动手搭建大模型](./docs/chapter5/第五章%20动手搭建大模型.md) | 实现 LLaMA2、训练 Tokenizer、预训练小型 LLM | ✅ |
| [第六章 大模型训练实践](./docs/chapter6/第六章%20大模型训练流程实践.md) | 预训练、有监督微调、LoRA/QLoRA 高效微调 | ✅ |
| [第七章 大模型应用](./docs/chapter7/第七章%20大模型应用.md) | 模型评测、RAG 检索增强、Agent 智能体 | ✅ |
| [Extra Chapter LLM Blog](./Extra-Chapter/) | 优秀的大模型 学习笔记/Blog ,欢迎大家来 PR !| 🚧 |
> 第六章正文已覆盖 Pretrain、SFT 与 PEFT 等核心训练流程,建议结合 [第六章实践说明](./docs/chapter6/readme.md) 和 [学习与环境准备](./docs/学习与环境准备.md) 一起阅读;偏好对齐可继续参考 [第六章补充专题](./docs/chapter6/6.4%5BWIP%5D%20偏好对齐.md)。
### Extra Chapter LLM Blog
- [大模型都这么厉害了,微调0.6B的小模型有什么意义?](./Extra-Chapter/why-fine-tune-small-large-language-models/readme.md) @[不要葱姜蒜](https://github.com/KMnO4-zx) 2025-7-11
- [Transformer 整体模块设计解读](./Extra-Chapter/transformer-architecture/) @[ditingdapeng](https://github.com/ditingdapeng) 2025-7-14
- [文本数据处理详解](./Extra-Chapter/text-data-processing/readme.md) @[蔡鋆捷](https://github.com/xinala-781) 2025-7-14
- [Qwen3-"VL"——超小中文多模态模型的“拼接微调”之路](./Extra-Chapter/vlm-concatenation-finetune/README.md) @[ShaohonChen](https://github.com/ShaohonChen) 2025-7-30
- [S1: Thinking Budget with vLLM](./Extra-Chapter/s1-vllm-thinking-budget/readme.md) @[不要葱姜蒜](https://github.com/kmno4-zx) 2025-8-03
- [CDDRS: 使用细粒度语义信息指导增强的RAG检索方法](./Extra-Chapter/CDDRS/readme.md) @[Hongru0306](https://github.com/Hongru0306) 2025-8-21
- [大模型生成 Token 的方式有哪些?](./Extra-Chapter/generation-method/readme.md) @[不要葱姜蒜](https://github.com/kmno4-zx) 2025-10-17
>   *如果大家在学习 Happy-LLM 项目或 LLM 相关知识中有自己独到的见解、认知、实践,欢迎大家 PR 在 [Extra Chapter Excerpt of 7,653 characters
Read on GitHub不要葱姜蒜 · China
159
Logan Zou · rednote · China
54
11
Ze-Yi LIN · Emotion Machine Lab · China
4
Reagan Zhang · University of Toronto · Canada
3
Oneb1
2
wasamtc · Hunan University.
2
sjjjoaps
2
Shaohon Chen · Xidian University
2
louxuezheng · ByteDance · China
2
Xiaohu · Bytedance · China
1
Tiff Wu
1
Li Xu · Jinan University · China
1
1
Haoyu Li · Wuhan University
1
Genghong Hu · Xidian University · China
1
1
柯慕灵 · ShanghaiTech University · China
1
Jusin · ReliaLab, UESTC · China
1
inf Lu · University of Chinese Academy of Science
1
Would you bet a product on this? Bounded 0–100 and slow moving.
matched fp:88fb70f4402678b2, topic:llm, readme:transformer architecture
matched fp:88fb70f4402678b2, topic:rag