CMU / CMU11-868已收录

Large Language Model Systems

从 GPU 编程到分布式训练与模型服务,学习大语言模型系统的核心机制。

关于这组笔记

个人自学讲义,参考 Spring 2026 的 11-868 / 11-968 公开材料,并加入自编前置、附加主题与 CPU 模拟实验。

查看原课程资料

适合的起点

建议熟悉 Python、深度学习与计算机系统基础。

本系列为个人学习整理,非学校官方发布,不代表学校或授课教师的认可或背书。

沿着目录阅读

当前 35 篇

预备知识

  1. 预备知识 1前置讲 P1 · 从 Python 到 C:指针、数组与内存布局 · From Python to C: Pointers, Arrays & Memory Layout
  2. 预备知识 2前置讲 P2 · 数字的表示:整数、浮点与低精度格式 · Number Formats: Integers, Floating Point & Low Precision
  3. 预备知识 3前置讲 P3 · 神经网络与训练速成 · A Crash Course on Neural Networks and Training
  4. 预备知识 4前置讲 P4 · 计算机系统速成:存储层次、排队、并发、分页与网络 · A Crash Course on Computer Systems

课程讲义

  1. Lecture 01第 1 讲 · LLM 导论与 LLM 系统的挑战 · Introduction to LLMs & the Challenges of LLM Systems
  2. Lecture 02第 2 讲 · GPU 编程基础(一):GPU 服务器、GPU 架构与 CUDA 执行模型 · GPU Programming Basics 1
  3. Lecture 03第 3 讲 · GPU 编程基础(二):CUDA 操作与矩阵 / 张量计算 · GPU Programming Basics 2
  4. Lecture 04第 4 讲 · GPU 加速:分块、内存并行、稀疏矩阵与 cuBLAS · GPU Acceleration
  5. Lecture 05第 5 讲 · 深度学习框架与自动微分 · Deep Learning Frameworks and Auto Differentiation
  6. Lecture 06第 6 讲 · Transformer · Transformer
  7. Lecture 07第 7 讲 · 预训练大语言模型:T5、GPT-3 与 LLaMA · Pre-trained LLMs
  8. Lecture 08第 8 讲 · 分词与嵌入 · Tokenization and Embedding
  9. Lecture 09第 9 讲 · 生成与推测解码 · Decoding: Sampling, Beam Search and Speculative Decoding
  10. Lecture 10第 10 讲 · 在 GPU 上加速 Transformer(一):算子融合与推理加速 · Accelerating Transformer on GPU (I): Kernel Fusion and LightSeq Inference
  11. Lecture 11第 11 讲 · 在 GPU 上加速 Transformer(二):训练加速 · Accelerating Transformer on GPU (II): Training with LightSeq2
  12. Lecture 12第 12 讲 · TPU 与 JAX · TPU and JAX: From Python Code to Silicon
  13. Lecture 13第 13 讲 · Pallas 与 Splash Attention · Pallas Kernels and Splash Attention
  14. Lecture 14第 14 讲 · 分布式训练(一):大规模训练概览、多 GPU 通信与数据并行 · Distributed Training I: Communication and Data Parallelism
  15. Lecture 15第 15 讲 · 分布式训练(二):PyTorch DDP 的设计与实现 · Distributed Training II: PyTorch DDP
  16. Lecture 16第 16 讲 · 分布式训练(三):模型并行——流水线并行与张量并行 · Distributed Training III: Model Parallelism
  17. Lecture 17第 17 讲 · 混合专家模型(MoE)的系统 · Systems for Mixture-of-Experts Models
  18. Lecture 18第 18 讲 · 分布式训练中的显存优化:ZeRO · Memory Optimization in Distributed Training: ZeRO
  19. Lecture 19第 19 讲 · 模型量化(一):低精度数字与基础量化方法 · Model Quantization I: Low-precision Numbers & Basic Methods
  20. Lecture 20第 20 讲 · 模型量化(二):GPTQ · Model Quantization II: GPTQ
  21. Lecture 21第 21 讲 · 为现代硬件优化注意力:FlashAttention 1–4 · Optimizing Attention for Modern Hardware
  22. Lecture 22第 22 讲 · LLM 服务:请求调度、连续批处理与 RadixAttention · LLM Serving: Scheduling, Continuous Batching and RadixAttention
  23. Lecture 23第 23 讲 · 大模型的高效微调:CIAT、LoRA 与 QLoRA · Parameter-Efficient Fine-Tuning
  24. Lecture 24第 24 讲 · PagedAttention 与 vLLM · Efficient LLM Inference with PagedAttention and vLLM
  25. Lecture 25第 25 讲 · LLM 的高效强化学习系统:RLHF、GRPO 与 ReaLHF · Efficient Reinforcement Learning Systems for LLMs
  26. Lecture 26第 26 讲 · 预填充与解码分离的 LLM 服务:DistServe 与 Dynamo · Serving with Disaggregated Prefill and Decoding
  27. Lecture 27第 27 讲 · 更好的 KV 缓存:CacheGen、CacheBlend 与 LMCache · KV Cache as a New AI Memory Abstraction

补充与延伸

  1. 附录 A1附加讲 A1 · LLM 应用栈与模型服务框架 · LLM App Stack and Model Serving
  2. 附录 A2附加讲 A2 · 异构硬件上的 LLM 服务:Mooncake 与 KTransformers · LLM Serving on Heterogeneous Hardware
  3. 附录 A3附加讲 A3 · 检索增强生成与向量检索:RAG、IVF、PQ、HNSW · Retrieval-Augmented Generation and Vector Search
  4. 附录 A4附加讲 A4 · 流式长文本与多模态 LLM:注意力汇聚、StreamingLLM、Flamingo · Streaming LLMs and Multimodal LLMs

从讲义到代码

按课程目录整理的配套示例,保留各单元的文件结构。阅读讲义时,可以下载整套代码,在本地逐步探索。

下载 CMU11-868 代码

请在独立虚拟环境中查看依赖后运行;未附模型权重和运行产物;示例未逐一验证。

返回全部课程