<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>首页 on Yiwen Cai</title><link>http://yiwencai.com/</link><description>Recent content in 首页 on Yiwen Cai</description><generator>Hugo -- gohugo.io</generator><language>zh-cn</language><managingEditor>me@yiwencai.com (Yiwen Cai)</managingEditor><webMaster>me@yiwencai.com (Yiwen Cai)</webMaster><copyright>© 2026 Yiwen Cai</copyright><atom:link href="http://yiwencai.com/index.xml" rel="self" type="application/rss+xml"/><item><title>为什么 8 卡跑交互式视频 DiT，不切权重的 CP 反而赢了切权重又切 KV 的 TP？</title><link>http://yiwencai.com/notes/diffusion/why-cp-beats-tp-interactive-video-dit/</link><pubDate>Sun, 29 Nov 2026 00:00:00 +0000</pubDate><author>me@yiwencai.com (Yiwen Cai)</author><guid>http://yiwencai.com/notes/diffusion/why-cp-beats-tp-interactive-video-dit/</guid><description>从 FastFrames 在 8×B200 上的反直觉实测出发，用单卡 Roofline、SM 波次饱和、四路并行 α-β 通信账本与 FP8 正交推演，算清交互式视频 DiT 在单帧 1,560 tokens 夹缝尺度下为何不切权重的 CP 跑赢 TP，并用 80 GB 显存红线标定论文口径与并行翻转边界。</description></item><item><title>三档全 FP8 稀疏注意力：从多分辨率数学直觉到 Hopper SM90 工程落地</title><link>http://yiwencai.com/notes/diffusion/three-tier-fp8-sparse-attention/</link><pubDate>Fri, 27 Nov 2026 00:00:00 +0000</pubDate><author>me@yiwencai.com (Yiwen Cai)</author><guid>http://yiwencai.com/notes/diffusion/three-tier-fp8-sparse-attention/</guid><description>用第一性原理与双账本拆解长视频扩散推理中的 3-Tier（Refine / Skim / Skip）全 FP8 稀疏注意力：讲透 DC+残差量化、虚拟均值与二阶 Jensen 守恒、3D RoPE 正交伴随零重旋、全方差无排序路由，以及每块 18.24 KB 压缩布局与 Hopper QGMMA.E4M3 零转置流水线。</description></item><item><title>从 GPU 换到 Ascend 950DT：从 DeepInfer 四组算子看 NPU 优化的硬件约束与跨平台取舍</title><link>http://yiwencai.com/notes/llm-inference/deepinfer-ascend-npu-tradeoffs/</link><pubDate>Mon, 23 Nov 2026 00:00:00 +0000</pubDate><author>me@yiwencai.com (Yiwen Cai)</author><guid>http://yiwencai.com/notes/llm-inference/deepinfer-ascend-npu-tradeoffs/</guid><description>承接 DeepInfer 上篇，锚定 Ascend 950DT 源码对读 ZOS、FlashMLA、DeepGEMM 与 DeepEP 四组算子：厘清 1C2V 双轨存储、UB 32B 对齐、L0C 限制、MXFP8 布局接缝税与同流 URMA 重叠边界，并总结三条跨平台评审铁律。</description></item><item><title>视频扩散组合加速的真实账本：当 Speculative Forcing、QuantSparse 与 FlashTopK 放进同一条推理路径</title><link>http://yiwencai.com/notes/diffusion/video-diffusion-acceleration-ledger/</link><pubDate>Mon, 23 Nov 2026 00:00:00 +0000</pubDate><author>me@yiwencai.com (Yiwen Cai)</author><guid>http://yiwencai.com/notes/diffusion/video-diffusion-acceleration-ledger/</guid><description>把 Speculative Forcing、QuantSparse 与 FlashTopK 放到固定双卡 CausVid Wan 路径下统一对账：拆穿 40%×15%=6% 加速比幻觉、冻结 KV 与生命周期缺口、CPU Offload 25.1 ms 搬运墙，以及 FlashTopK 精确恢复与 CUDA Graph 接入暗坑。</description></item><item><title>推理引擎的三本账：从 DeepInfer 看状态、时间与确定性</title><link>http://yiwencai.com/notes/llm-inference/deepinfer-three-ledgers/</link><pubDate>Sun, 15 Nov 2026 00:00:00 +0000</pubDate><author>me@yiwencai.com (Yiwen Cai)</author><guid>http://yiwencai.com/notes/llm-inference/deepinfer-three-ledgers/</guid><description>从 StateBlock、ZOS 与 DSpark 出发，理解推理引擎如何保存状态、隐藏等待，并区分数值正确性、批不变性与采样复现。</description></item><item><title>Z-Cache 的系统账本：一个特征缓存近似，在显存、带宽与首帧延迟上意味着什么</title><link>http://yiwencai.com/notes/diffusion/zcache-system-view/</link><pubDate>Wed, 11 Nov 2026 00:00:00 +0000</pubDate><author>me@yiwencai.com (Yiwen Cai)</author><guid>http://yiwencai.com/notes/diffusion/zcache-system-view/</guid><description>从系统视角拆解 Z-Cache 双锚点自省缓存：同样的峰值误差下窗口跨度可从 6 拉到 10；Wan2.1-14B 720p 逐块缓存要约 93 GB，根残差嫁接只要 2.3 GB；H100 PCIe 实测重放 2.16 ms/step，全量步 18.97 s；以及少步流式场景下闭合约束带来的首帧延迟代价。</description></item><item><title>MIT 6.S184: Flow Matching and Diffusion Models — 第 7 章：离散扩散模型：用 CTMC 构建语言模型</title><link>http://yiwencai.com/notes/diffusion/discrete-diffusion/</link><pubDate>Tue, 03 Nov 2026 00:00:00 +0000</pubDate><author>me@yiwencai.com (Yiwen Cai)</author><guid>http://yiwencai.com/notes/diffusion/discrete-diffusion/</guid><description>用连续时间马尔可夫链（CTMC）的跳转速率把简单离散分布逐步演变为文本分布：从速率矩阵、小步 Euler 转移与因子化 CTMC 出发，经条件混合路径、Kolmogorov Forward Equation 与后验加权边缘化，将 Discrete Flow Matching 与掩码扩散语言模型（MDLM）的训练化为逐位置干净 token 的交叉熵分类问题。</description></item><item><title>SGLang 架构精读（二）：SGLang-Omni 七阶段异构调度、流式硬实时声码器与原生全双工状态机</title><link>http://yiwencai.com/notes/llm-inference/sglang-omni-full-duplex/</link><pubDate>Tue, 03 Nov 2026 00:00:00 +0000</pubDate><author>me@yiwencai.com (Yiwen Cai)</author><guid>http://yiwencai.com/notes/llm-inference/sglang-omni-full-duplex/</guid><description>深入解析 SGLang-Omni 服务 Qwen3-Omni 与 MiniCPM-o 全双工多模态模型的系统架构（Ch 16–21）：涵盖 80ms 音频帧与 1+15 双层 RVQ 生成、七阶段三类异构调度器、Talker 禁用 RadixCache 与 Overlap Scheduling 的底层原因、CommRouter 四级通信传输层、多模型共卡的 85.7 GB 显存墙与 86% SM 争用博弈、Code2Wav 25+10 左上下文滑动窗口消除接缝爆音，以及 /v1/realtime 原生全双工的 SessionController 跨步状态保持。</description></item><item><title>SGLang 架构精读（三）：DP Attention、Two-Batch Overlap、HiCache 与 Mooncake PD 分离全景</title><link>http://yiwencai.com/notes/llm-inference/sglang-distributed-and-disaggregation/</link><pubDate>Tue, 03 Nov 2026 00:00:00 +0000</pubDate><author>me@yiwencai.com (Yiwen Cai)</author><guid>http://yiwencai.com/notes/llm-inference/sglang-distributed-and-disaggregation/</guid><description>结合 SGLang 核心源码完整补齐《Learning SGLang》Part IV–V 进阶与多卡解耦架构（Ch 22–29）：涵盖 W4A16 与 W8A8 (FP8) 量化的 Roofline 改写算术、MLA 遇上传统 TP 的 8 倍 KV 冗余灾难与 DP Attention + MoE EP 解耦破局、Two-Batch Overlap (TBO) 双微批计算/通信双流乒乓隐藏、HiCache 三级存储金字塔逐层流水预取、Mooncake GPUDirect RDMA 逐层零拷贝 PD 分离，以及 sgl-router 影子前缀树动态负载均衡。</description></item><item><title>SGLang 架构精读（一）：从三级页表、Piecewise CUDA Graph 到 MLA 矩阵吸收与投机解码</title><link>http://yiwencai.com/notes/llm-inference/sglang-single-gpu-engine/</link><pubDate>Tue, 03 Nov 2026 00:00:00 +0000</pubDate><author>me@yiwencai.com (Yiwen Cai)</author><guid>http://yiwencai.com/notes/llm-inference/sglang-single-gpu-engine/</guid><description>以单步耗时方程 t_step = max(t_cpu, t_comm, max(t_mem, t_compute)) 与 H100 上 Llama-3-8B 的硬件账本为主线，系统拆解 SGLang 单卡引擎与编译器栈（Ch 01–15）：涵盖 page_size=1 三级页表、RadixCache 末位盲区、Overlap Scheduling 双缓冲闭环、Piecewise CUDA Graph 拆图算术、Dynamo/Inductor 融合、DeepSeek MLA 矩阵吸收（128 FLOP/byte）及三代投机解码（EAGLE-3 / DFlash / DSpark）。</description></item><item><title>MIT 6.S184: Flow Matching and Diffusion Models — 第 6 章：构建大规模图像与视频生成器</title><link>http://yiwencai.com/notes/diffusion/large-scale-generators/</link><pubDate>Sun, 18 Oct 2026 00:00:00 +0000</pubDate><author>me@yiwencai.com (Yiwen Cai)</author><guid>http://yiwencai.com/notes/diffusion/large-scale-generators/</guid><description>从「网络到底长什么样」出发，讲清时间、类别与文本如何嵌入成向量，Diffusion Transformer 的 patchify、AdaLN 与交叉注意力，U-Net 的编解码结构；再推导 VAE 的重建项、先验项与重参数化，说明为什么现代生成模型都在潜空间里训练；最后用 Stable Diffusion 3 与 Movie Gen Video 把前五章的方法串起来。</description></item><item><title>MIT 6.S184: Flow Matching and Diffusion Models — 第 5 章：Guidance 与无分类器引导</title><link>http://yiwencai.com/notes/diffusion/guidance/</link><pubDate>Wed, 07 Oct 2026 00:00:00 +0000</pubDate><author>me@yiwencai.com (Yiwen Cai)</author><guid>http://yiwencai.com/notes/diffusion/guidance/</guid><description>从 Vanilla Guidance 的训练目标出发，用贝叶斯公式把条件向量场拆成无条件向量场加分类器梯度，推出 Classifier-Free Guidance 的线性组合形式，说明 label dropping 如何让单一网络同时学条件与无条件向量场，以及 guidance scale 只存在于采样阶段。</description></item><item><title>MIT 6.S184: Flow Matching and Diffusion Models — 第 4 章：Score 函数与 Score Matching</title><link>http://yiwencai.com/notes/diffusion/score-based-diffusion/</link><pubDate>Fri, 11 Sep 2026 00:00:00 +0000</pubDate><author>me@yiwencai.com (Yiwen Cai)</author><guid>http://yiwencai.com/notes/diffusion/score-based-diffusion/</guid><description>从条件 score 的后验平均出发，推导高斯路径下 score、去噪器与速度场的转换，用 Fokker–Planck 方程解释如何给 ODE 加噪而保持边缘分布，并将 score matching 化为噪声回归。</description></item><item><title>MIT 6.S184: Flow Matching and Diffusion Models — 第 3 章：流匹配</title><link>http://yiwencai.com/notes/diffusion/flow-matching/</link><pubDate>Wed, 02 Sep 2026 00:00:00 +0000</pubDate><author>me@yiwencai.com (Yiwen Cai)</author><guid>http://yiwencai.com/notes/diffusion/flow-matching/</guid><description>Flow Matching 通过回归可解析的条件向量场，间接学到边缘向量场，实现 simulation-free 训练。涵盖条件概率路径、边缘化技巧、连续性方程与 Gaussian CondOT 的完整推导。</description></item><item><title>MIT 6.S184: Flow Matching and Diffusion Models — 第 1 章：生成建模即采样</title><link>http://yiwencai.com/notes/diffusion/generative-modeling/</link><pubDate>Tue, 01 Sep 2026 00:00:00 +0000</pubDate><author>me@yiwencai.com (Yiwen Cai)</author><guid>http://yiwencai.com/notes/diffusion/generative-modeling/</guid><description>生成建模的核心任务不是寻找唯一的「最佳答案」，而是学习一个未知的数据分布并从中采样：把图像、视频、分子统一表示为向量，用有限数据集逼近 p_data，并区分无条件生成与条件生成。</description></item><item><title>MIT 6.S184: Flow Matching and Diffusion Models — 第 2 章：流模型与扩散模型</title><link>http://yiwencai.com/notes/diffusion/flow-and-diffusion-models/</link><pubDate>Tue, 01 Sep 2026 00:00:00 +0000</pubDate><author>me@yiwencai.com (Yiwen Cai)</author><guid>http://yiwencai.com/notes/diffusion/flow-and-diffusion-models/</guid><description>深入解析连续时间生成模型的基础范式：从向量场定义、ODE 与 Flow 映射，到布朗运动、SDE 随机动力学及数值模拟（Euler 与 Euler-Maruyama 方法），建立确定性流与随机扩散的统一视角。</description></item><item><title>RL Meets LLMs：大语言模型全生命周期强化学习综述</title><link>http://yiwencai.com/notes/papers/rl-meets-llms-survey/</link><pubDate>Tue, 04 Aug 2026 00:00:00 +0000</pubDate><author>me@yiwencai.com (Yiwen Cai)</author><guid>http://yiwencai.com/notes/papers/rl-meets-llms-survey/</guid><description>梳理 RL 如何贯穿 LLM 全生命周期——预训练/Mid-training、RLHF 对齐微调、RLVR 强化推理三条主线；从策略梯度、PPO 到 GRPO 的算法演进，以及 RLVR 是否真正扩展推理能力、熵坍缩与性能上限等争议。</description></item><item><title>关于</title><link>http://yiwencai.com/about/</link><pubDate>Fri, 10 Jul 2026 00:00:00 +0000</pubDate><author>me@yiwencai.com (Yiwen Cai)</author><guid>http://yiwencai.com/about/</guid><description/></item><item><title>长上下文 LLM 推理中的 KV Cache 优化综述：系统管理、缓存压缩与架构协同</title><link>http://yiwencai.com/notes/llm-inference/kv-cache-optimization-survey/</link><pubDate>Fri, 10 Jul 2026 00:00:00 +0000</pubDate><author>me@yiwencai.com (Yiwen Cai)</author><guid>http://yiwencai.com/notes/llm-inference/kv-cache-optimization-survey/</guid><description>以 KV Cache Size = 2×L×T×H_kv×D_h×bytes 为锚点，系统梳理 2023–2026 年 KV Cache 优化全景：PagedAttention 与 KV-aware serving 的系统管理、DapQ/LaProx/TurboQuant/LongFlow 等压缩新方法、MHA→MLA→DeepSeek V4 CSA/HCA→GDN→MLRA 的架构演进，并讲清四条路线（压维度/压序列/少访问/固定状态）的边界。</description></item><item><title>SparseSpec：加速推理模型的稀疏自推测解码</title><link>http://yiwencai.com/notes/papers/sparsec-speculative-decoding/</link><pubDate>Sat, 20 Jun 2026 00:00:00 +0000</pubDate><author>me@yiwencai.com (Yiwen Cai)</author><guid>http://yiwencai.com/notes/papers/sparsec-speculative-decoding/</guid><description>针对推理语言模型长输出的 memory-bound 瓶颈，用同一模型做 self-speculative decoding——verification 阶段顺手 dump 出 attention scores 做 Top-K，作为后续 draft 的动态稀疏模式，零训练、无损、最高 2.13× 加速。</description></item><item><title>FlashAttention：IO 感知的快速精确注意力</title><link>http://yiwencai.com/notes/papers/flashattention/</link><pubDate>Thu, 18 Jun 2026 00:00:00 +0000</pubDate><author>me@yiwencai.com (Yiwen Cai)</author><guid>http://yiwencai.com/notes/papers/flashattention/</guid><description>通过 IO-aware 的 tiling 和重计算，在不改变 attention 数学定义的前提下大幅减少 HBM 读写，实现 2-4× 加速与 5-20× 内存节省——attention 优化的基础构件。</description></item><item><title>分布式训练并行策略：CS336 Lecture 7 笔记</title><link>http://yiwencai.com/notes/systems/cs336-distributed-parallelism/</link><pubDate>Mon, 15 Jun 2026 00:00:00 +0000</pubDate><author>me@yiwencai.com (Yiwen Cai)</author><guid>http://yiwencai.com/notes/systems/cs336-distributed-parallelism/</guid><description>从单 GPU 扩展到多 GPU/多机并行：集合通信原语（all-reduce = reduce-scatter + all-gather）、NVLink/InfiniBand 互联，以及 DDP、FSDP/ZeRO、Tensor/Pipeline/Sequence Parallelism 的取舍与实践法则。</description></item><item><title>Kernels、Triton 与 Profiling：CS336 Lecture 6 笔记</title><link>http://yiwencai.com/notes/triton/cs336-kernels-triton/</link><pubDate>Sun, 14 Jun 2026 00:00:00 +0000</pubDate><author>me@yiwencai.com (Yiwen Cai)</author><guid>http://yiwencai.com/notes/triton/cs336-kernels-triton/</guid><description>从硬件抽象进入 kernel 编程实践：warp/occupancy/bank conflict/coalescing 如何映射到性能，benchmarking 与 profiling 方法论，以及用 Triton 实现 GeLU、softmax、row sum、matmul+ReLU 四个 kernel。</description></item><item><title>GPU 架构与 FlashAttention：CS336 Lecture 5 笔记</title><link>http://yiwencai.com/notes/cuda/cs336-gpu-attention/</link><pubDate>Sat, 13 Jun 2026 00:00:00 +0000</pubDate><author>me@yiwencai.com (Yiwen Cai)</author><guid>http://yiwencai.com/notes/cuda/cs336-gpu-attention/</guid><description>从模型结构转入系统视角：为什么 LLM 必须依赖 GPU、GPU 的执行模型与内存层次、arithmetic intensity 与 roofline model，以及如何用这套性能模型解释 FlashAttention 这类 IO-aware 算法。</description></item></channel></rss>