↓ 跳过正文

CS336

分布式训练并行策略:CS336 Lecture 7 笔记

··3216 字·7 分钟
从单 GPU 扩展到多 GPU/多机并行:集合通信原语(all-reduce = reduce-scatter + all-gather)、NVLink/InfiniBand 互联,以及 DDP、FSDP/ZeRO、Tensor/Pipeline/Sequence Parallelism 的取舍与实践法则。

Kernels、Triton 与 Profiling:CS336 Lecture 6 笔记

··3493 字·7 分钟
从硬件抽象进入 kernel 编程实践:warp/occupancy/bank conflict/coalescing 如何映射到性能,benchmarking 与 profiling 方法论,以及用 Triton 实现 GeLU、softmax、row sum、matmul+ReLU 四个 kernel。

GPU 架构与 FlashAttention:CS336 Lecture 5 笔记

··4504 字·9 分钟
从模型结构转入系统视角:为什么 LLM 必须依赖 GPU、GPU 的执行模型与内存层次、arithmetic intensity 与 roofline model,以及如何用这套性能模型解释 FlashAttention 这类 IO-aware 算法。