1. /144
    2026-08-10

    vLLM and torch.compile

    vLLM 中与 FX 和 torch.compile 相关的几条路径:Transformers backend 的 FX 改写,以及 vLLM 自定义 backend 的图分区、shape 管理、custom pass、缓存与 CUDA Graph 协同。

    ML Compilerstorch.compilevLLM
  2. /143
    2026-08-09

    Piecewise CUDA Graph

    vLLM 的 Piecewise CUDA Graph 如何以 Attention 为边界拆分模型、只 capture CUDA-Graph-safe 的区域,FX-level split 与 Inductor-level partition 两种实现,以及它与 Full CUDA Graph 的关系。

    ML Compilers
  3. /142
    2026-03-18

    Math for ML

    ML 中常用的数学:向量内积与外积(以及外积与线性注意力的关系)、按行和按列理解矩阵乘法、L1/L2 范数与 KL 散度。

    Math
  4. /141
    2026-03-18

    ggml Memory Layout and Allocation

    How a ggml tensor describes memory with ne and nb, why attention code is full of view, permute and cont, how the four gpt-2 examples allocate weights and intermediates, and how llama.cpp maps weights from a GGUF file.

    LLM-Inferenceggml
  5. /140
    2026-03-18

    C++ Notes

    C++ details I ran into while writing an inference engine on ggml: when members are constructed, references, pointers to pointers, and what goes in a header.

    DevC++
  6. /139
    2026-03-16

    [Sequence Modeling 01] RNN

    RNN 如何按时间步迭代,用固定大小的隐藏状态压缩历史;附伪代码,并从并行性和上下文容量对比 RNN 与 Transformer。

  7. /138
    2026-03-16

    [Sequence Modeling 03] Mamba

    Mamba 如何通过离散化的状态空间模型、输入相关的选择性机制和并行扫描,同时获得并行训练与 O(1) 推理;逐块解析一份概念实现,并与 RNN 对比。

  8. /137
    2026-03-16

    [Sequence Modeling 02] LSTM

    Vanilla RNN 为何存在梯度消失与信息覆盖问题,LSTM 如何用细胞状态和门控机制缓解它,以及 LSTM 的四个计算步骤与代码实现。

  9. /136
    2026-03-16

    [Sequence Modeling 04] Linear Attention

    从 Transformer 和线性 attention 两个视角,看 DeltaNet 的 delta rule 与 Mamba2 的 gating 如何组合成 Gated DeltaNet,并给出单头递推实现。

  10. /135
    2026-01-15

    PyTorch Notes

    PyTorch 常用张量操作(高级索引、einsum、scatter、gather 等)、monkey patching,以及从前向传播、DataLoader 到训练循环和模型保存的基础流程。

    PyTorch