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.
仅需Python基础,从0构建大语言模型;从0逐步构建GLM4\Llama3\RWKV6, 深入理解大模型原理
| Date | Stars |
|---|---|
| 2026-07-31 | 4290 |
| 2026-08-01 | 4295 |
| 2026-08-02 | 4295 |
| 2026-08-06 | 4295 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
<center> # 动手学LLM # LLMs From Scratch: Hands-on Building Your Own Large Language Models </center> [](https://github.com/datawhalechina/llms-from-scratch-cn) [](https://github.com/datawhalechina/llms-from-scratch-cn) [](https://github.com/datawhalechina/llms-from-scratch-cn/issues) [](https://github.com/datawhalechina/llms-from-scratch-cn/blob/main/LICENSE.txt) --- ## 📘 项目介绍 如果你想从0手写代码,构建大语言模型,本项目很适合你。 本项目 "LLMs From Scratch" 是由 Datawhale 提供的一个从头开始构建类似 ChatGPT 大型语言模型(LLM)的实践教程。 我们旨在通过详细的指导、代码示例和深度学习资源,帮助开发者和研究者掌握创建大语言模型和大语言模型架构的核心技术。 本项目包括了从0逐步构建GLM4\Llama3\RWKV6的教程,从0构建大模型,一起深入理解大模型原理。  --- ## 🌟 项目亮点 - **全面的学习路径**: 提供从基础理论到实际编码的系统化学习路径。 - **实践导向**: 强调通过实际操作掌握 LLM 的开发和训练。 - **重点关注LLM架构**: 在微调、部署相关教程较为丰富的背景下,我们着重关注大模型的架构实现。 ## 🚀 主要内容 ### (1)基础知识 在基础知识部分,我们基于"rasbt/LLMs-from-scratch"提供了一个如何从头开始实现类似ChatGPT的大语言模型(LLM)的详细教程,特别感谢@[rasbt](https://github.com/rasbt)。 如果你想快速入门,请参考Codes路径下的notebook,简洁的代码可以帮助你快速入门。 如果你想详细学习,请参考Translated_Book路径下的notebook,提供了更为详细的相关知识。 👨💻 **代码实现**: 该项目包含了创建GPT-like大语言模型的全部代码,涵盖了编码、预训练和微调过程。 📖 **逐步学习**: 教程通过清晰的文本、图表和示例,分步骤教授如何创建自己的LLM。 💡 **教育目的**: 该方法主要用于教育,帮助学习者训练和开发小型但功能性的模型,这与创建像ChatGPT这样的大型基础模型的方法相似。 🔧 **简洁易懂的代码**: 利用简洁且可运行的notebook代码,即使只有PyTorch基础,也能完成大模型的构建。 🤔 **深入理解模型原理**: 通过本教程,读者可以深入理解大型语言模型的工作原理。 📖 详细章节安排如下: | 章节标题 | 主要代码 | 所有代码和补充 | |-----------------------------------|----------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------| | 第1章: 理解大型语言模型 | 没有代码 | 没有代码 | | 第2章: 处理文本数据 | - [ch02.ipynb](./Codes/ch02/01_main-chapter-code/ch02.ipynb)<br/>- [dataloader.ipynb](./Codes/ch02/01_main-chapter-code/dataloader.ipynb)<br/>- [exercise-solutions.ipynb](./Codes/ch02/01_main-chapter-code/exercise-solutions.ipynb) | [./Codes/ch02](./Codes/ch02) | | 第3章: 编写注意力机制 | - [ch03.ipynb](./Codes/ch03/01_main-chapter-code/ch03.ipynb)<br/>- [multihead-attention.ipynb](./Codes/ch03/01_main-chapter-code/multihead-attention.ipynb)<br/>- [exercise-solutions.ipynb](./Codes/ch03/01_main-chapter-code/exercise-solutions.ipynb) | [./Codes/ch03](./Codes/ch03) | | 第4章: 从零开始实现GPT模型 | - [ch04.ipynb](./Codes/ch04/01_main-chapter-code/ch04.ipynb)<br/>- [gpt.py](./Codes/ch04/01_main-chapter-code/gpt.py)<br/>- [exercise-solutions.ipynb](./Codes/ch04/01_main-chapter-code/exercise-solutions.ipynb) | [./Codes/ch04](./Codes/ch04) | | 第5章: 使用未标记数据进行预训练 | - [ch05.ipynb](./Codes/ch05/01_main-chapter-code/ch05.ipynb)<br/>- [train.py](./Codes/ch05/01_main-chapter-code/train.py)<br/>- [generate.py](./Codes/ch05/01_main-chapter-code/generate.py)<br/>- [exercise-solutions.ipynb](./Codes/ch05/01_main-chapter-code/exercise-solutions.ipynb) | [./Codes/ch05](./Codes/ch05)
Excerpt of 10,083 characters
Read on GitHub64
tan90º · 广州大学 · China
13
9
9
6
Yue Ding · State Key Laboratory of Pattern Recognition
6
Nankai University · China
5
4
4
Youdon · Southeast University · China
3
3
3
Shufan Jiang · @eigent-ai · China
3
0-yy-0
2
ML67
2
2
2
1
Logan Zou · rednote · China
1
:)s · China
1
Would you bet a product on this? Bounded 0–100 and slow moving.
matched fp:12b5abd46e32eaed, topic:llm, topic:llama