> ## Documentation Index
> Fetch the complete documentation index at: https://se7en.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# LLM 基础

> Transformer、GPT 实现与语言模型入门课程

## 入门课程

| 资源                                                                                                                 | 类型 | 简介                                                                        | 配套资料                                              |
| ------------------------------------------------------------------------------------------------------------------ | -- | ------------------------------------------------------------------------- | ------------------------------------------------- |
| [CSCI 1390, Spring 2025: Systems for Machine Learning](https://cs.brown.edu/courses/csci1390/)                     | 课程 | 主题包括高效训练和推理、ML 算法与硬件、GPU 编程、CUDA、Transformer 架构和高效检索。                     |                                                   |
| [CS336: Language Modeling from Scratch (Stanford / Spring 2025)](https://cs336.stanford.edu/spring2025/index.html) | 课程 | 从 tokenizer、Transformer 到分布式训练、数据处理和 RLHF 对齐，5 个实战 assignment 覆盖 LLM 全链路。 | [视频](https://www.bilibili.com/video/BV1zvt9zKEK6) |
| [The Smol Training Playbook](https://huggingface.co/spaces/HuggingFaceTB/smol-training-playbook)                   | 教程 | 以 SmolLM3 的真实训练过程为主线，覆盖模型目标与规模选择、架构和数据配比、消融实验、分布式预训练、监控排障、评测及后训练。         |                                                   |

## 从零构建 GPT

| 资源                                                                                                                     | 类型   | 简介                                                                                | 配套资料                                                 |
| ---------------------------------------------------------------------------------------------------------------------- | ---- | --------------------------------------------------------------------------------- | ---------------------------------------------------- |
| [Build a Large Language Model (From Scratch)](https://www.manning.com/books/build-a-large-language-model-from-scratch) | 书籍   | 从零规划并编写 LLM 的各个组件，涵盖数据集准备、文本分类微调、指令对齐和加载预训练权重。                                    | [GitHub](https://github.com/rasbt/LLMs-from-scratch) |
| [nanoGPT](https://github.com/karpathy/nanoGPT)                                                                         | 实践项目 | 精简的 PyTorch GPT 训练与微调实现，可从字符级 toy GPT 入门，并进一步复现 GPT-2 124M，重点是理解语言模型的预训练过程。       | [视频](https://www.youtube.com/watch?v=kCc8FmEb1nY)    |
| [nanochat](https://github.com/karpathy/nanochat)                                                                       | 实践项目 | nanoGPT 的后续项目，以单节点可运行、易修改的代码覆盖 tokenizer、预训练、微调、评测和推理，形成一个可实际对话的端到端 ChatGPT 训练流程。 |                                                      |
