<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Ge Zhang · 技术笔记</title>
    <link>https://zhangge.dev/</link>
    <description>Recent content on Ge Zhang · 技术笔记</description>
    <image>
      <title>Ge Zhang · 技术笔记</title>
      <url>https://zhangge.dev/images/site-card.png</url>
      <link>https://zhangge.dev/images/site-card.png</link>
    </image>
    <generator>Hugo</generator>
    <language>zh-CN</language>
    <copyright>2026 Ge Zhang</copyright>
    <lastBuildDate>Mon, 10 Aug 2026 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://zhangge.dev/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Optimal Brain Surgeon（OBS）：带补偿的二阶剪枝方法</title>
      <link>https://zhangge.dev/model-inference/optimal-brain-surgeon/</link>
      <pubDate>Mon, 10 Aug 2026 00:00:00 +0000</pubDate>
      <guid>https://zhangge.dev/model-inference/optimal-brain-surgeon/</guid>
      <description>从删除单个权重后的补偿直觉出发，推导 Optimal Brain Surgeon 如何利用完整 Hessian 和约束优化同时回答删哪个权重、其他权重应该如何调整。</description>
    </item>
    <item>
      <title>1. 两数之和</title>
      <link>https://zhangge.dev/leetcode/two-sum/</link>
      <pubDate>Sat, 08 Aug 2026 00:00:00 +0000</pubDate>
      <guid>https://zhangge.dev/leetcode/two-sum/</guid>
      <description>记录两数之和的哈希表一次遍历写法：遍历当前数字时，在哈希表中查找 target - 当前值是否已经出现。</description>
    </item>
    <item>
      <title>Optimal Brain Damage（OBD）：用 Hessian 判断权重重要性</title>
      <link>https://zhangge.dev/model-inference/optimal-brain-damage/</link>
      <pubDate>Wed, 29 Jul 2026 00:00:00 +0000</pubDate>
      <guid>https://zhangge.dev/model-inference/optimal-brain-damage/</guid>
      <description>从 Hessian 矩阵和二阶泰勒展开出发，推导 Optimal Brain Damage 如何估计删除单个权重造成的损失增量，并解释它为何优于单纯的幅值剪枝。</description>
    </item>
    <item>
      <title>大模型量化粒度详解：逐层、逐通道与逐组量化</title>
      <link>https://zhangge.dev/model-inference/quantization-granularity/</link>
      <pubDate>Tue, 28 Jul 2026 00:00:00 +0000</pubDate>
      <guid>https://zhangge.dev/model-inference/quantization-granularity/</guid>
      <description>从同一权重矩阵的数值分布出发，理解逐层、逐通道与逐组量化如何划分 scale 和 zero point，以及量化粒度对误差、元数据和计算内核的影响。</description>
    </item>
    <item>
      <title>量化基本概念</title>
      <link>https://zhangge.dev/model-inference/model-quantization-fundamentals/</link>
      <pubDate>Tue, 28 Jul 2026 00:00:00 +0000</pubDate>
      <guid>https://zhangge.dev/model-inference/model-quantization-fundamentals/</guid>
      <description>从数值表示、线性量化公式和矩阵乘法出发，理解模型量化的误差来源、静态与动态量化、PTQ 与 QAT，以及精度和性能评估方法。</description>
    </item>
    <item>
      <title>从 config.json 读懂 Llama 2 7B</title>
      <link>https://zhangge.dev/model-inference/llama2-config/</link>
      <pubDate>Fri, 24 Jul 2026 00:00:00 +0000</pubDate>
      <guid>https://zhangge.dev/model-inference/llama2-config/</guid>
      <description>以 Llama 2 7B 的 config.json 为入口，还原模型架构、注意力类型、RoPE、RMSNorm、SwiGLU、KV Cache、显存占用与参数量。</description>
    </item>
    <item>
      <title>self-attention</title>
      <link>https://zhangge.dev/ai-fundamentals/self-attention/</link>
      <pubDate>Thu, 23 Jul 2026 00:00:00 +0000</pubDate>
      <guid>https://zhangge.dev/ai-fundamentals/self-attention/</guid>
      <description>从 Q、K、V 和缩放点积出发理解 Self-Attention，进一步分析因果掩码、增量解码、KV Cache，以及为什么没有 Q Cache。</description>
    </item>
    <item>
      <title>transformer结构</title>
      <link>https://zhangge.dev/ai-fundamentals/transformer-architecture/</link>
      <pubDate>Thu, 23 Jul 2026 00:00:00 +0000</pubDate>
      <guid>https://zhangge.dev/ai-fundamentals/transformer-architecture/</guid>
      <description>从原始 Transformer 的 Encoder–Decoder 结构出发，解释自注意力、交叉注意力以及现代 decoder-only 大模型的演变。</description>
    </item>
    <item>
      <title>雅可比矩阵</title>
      <link>https://zhangge.dev/math/jacobian-matrix/</link>
      <pubDate>Thu, 23 Jul 2026 00:00:00 +0000</pubDate>
      <guid>https://zhangge.dev/math/jacobian-matrix/</guid>
      <description>从单变量导数和梯度出发理解雅可比矩阵，结合局部线性化、神经网络与反向传播说明它的计算方法和核心作用。</description>
    </item>
    <item>
      <title>FeedForward</title>
      <link>https://zhangge.dev/ai-fundamentals/feedforward/</link>
      <pubDate>Tue, 21 Jul 2026 00:00:00 +0000</pubDate>
      <guid>https://zhangge.dev/ai-fundamentals/feedforward/</guid>
      <description>从激活函数和前馈网络出发，理解 Transformer FFN 的升维、非线性变换、逐 token 计算，以及现代大模型中的 SwiGLU 门控结构。</description>
    </item>
    <item>
      <title>Add&amp;LayerNorm</title>
      <link>https://zhangge.dev/ai-fundamentals/add-layernorm/</link>
      <pubDate>Mon, 20 Jul 2026 00:00:00 +0000</pubDate>
      <guid>https://zhangge.dev/ai-fundamentals/add-layernorm/</guid>
      <description>分析 Transformer 中 Add &amp;amp; Norm 的两个核心组成：残差连接如何改善深层网络训练，LayerNorm 如何稳定隐藏状态的数值尺度。</description>
    </item>
    <item>
      <title>softmax的优化</title>
      <link>https://zhangge.dev/ai-fundamentals/softmax-optimization/</link>
      <pubDate>Mon, 20 Jul 2026 00:00:00 +0000</pubDate>
      <guid>https://zhangge.dev/ai-fundamentals/softmax-optimization/</guid>
      <description>从 Softmax 的概率含义出发，梳理减最大值、混合精度、log_softmax、全 Mask 行、算子融合与 Online Softmax 等优化方法。</description>
    </item>
    <item>
      <title>RoPE 旋转位置编码：从绝对位置到相对位置</title>
      <link>https://zhangge.dev/ai-fundamentals/rotary-position-embedding/</link>
      <pubDate>Fri, 17 Jul 2026 00:00:00 +0000</pubDate>
      <guid>https://zhangge.dev/ai-fundamentals/rotary-position-embedding/</guid>
      <description>从绝对位置编码与相对位置编码出发，按二维旋转、高维分组和旋转矩阵的设计过程推导 RoPE。</description>
    </item>
    <item>
      <title>Research Todo</title>
      <link>https://zhangge.dev/todo/</link>
      <pubDate>Thu, 16 Jul 2026 00:00:00 +0000</pubDate>
      <guid>https://zhangge.dev/todo/</guid>
      <description>记录当前真正需要推进的算法题、数学知识、推理加速问题和算子实现任务。</description>
    </item>
    <item>
      <title>关于我</title>
      <link>https://zhangge.dev/about/</link>
      <pubDate>Thu, 16 Jul 2026 00:00:00 +0000</pubDate>
      <guid>https://zhangge.dev/about/</guid>
      <description>张革的技术经历与研究方向，聚焦大模型推理加速、AI Agent、程序分析和自动算子优化。</description>
    </item>
    <item>
      <title>泰勒公式与泰勒展开：用多项式逼近函数</title>
      <link>https://zhangge.dev/math/taylor-series/</link>
      <pubDate>Thu, 16 Jul 2026 00:00:00 +0000</pubDate>
      <guid>https://zhangge.dev/math/taylor-series/</guid>
      <description>从各阶导数匹配出发推导泰勒系数，区分泰勒多项式、余项和无穷级数，并用近似计算、极限与无穷小阶数说明它的实际用途。</description>
    </item>
    <item>
      <title>Tokenizer 基础：从文本到 Token ID</title>
      <link>https://zhangge.dev/ai-fundamentals/tokenizer-algorithms/</link>
      <pubDate>Wed, 15 Jul 2026 00:00:00 +0000</pubDate>
      <guid>https://zhangge.dev/ai-fundamentals/tokenizer-algorithms/</guid>
      <description>系统梳理 Tokenizer 的处理流水线，以及词级、字符级、BPE、WordPiece、Unigram 和字节级 BPE 的原理、取舍与常见误区。</description>
    </item>
    <item>
      <title>为什么 DFlash 比 EAGLE-3 推理更快？</title>
      <link>https://zhangge.dev/model-inference/dflash-vs-eagle3/</link>
      <pubDate>Wed, 15 Jul 2026 00:00:00 +0000</pubDate>
      <guid>https://zhangge.dev/model-inference/dflash-vs-eagle3/</guid>
      <description>从 EAGLE 系列的自回归草稿模型出发，拆解 DFlash 如何利用块扩散并行生成草稿，并解释更深的草稿网络为何仍能获得更低延迟。</description>
    </item>
    <item>
      <title>146. LRU 缓存</title>
      <link>https://zhangge.dev/leetcode/lru-cache/</link>
      <pubDate>Tue, 14 Jul 2026 00:00:00 +0000</pubDate>
      <guid>https://zhangge.dev/leetcode/lru-cache/</guid>
      <description>记录 LRU 缓存的经典实现：哈希表负责 O(1) 查找，双向链表负责维护最近使用顺序。</description>
    </item>
    <item>
      <title>51. N 皇后</title>
      <link>https://zhangge.dev/leetcode/n-queens/</link>
      <pubDate>Tue, 14 Jul 2026 00:00:00 +0000</pubDate>
      <guid>https://zhangge.dev/leetcode/n-queens/</guid>
      <description>记录 N 皇后问题的经典回溯写法：按行放置皇后，检查列和两条对角线是否合法，并在回溯时恢复棋盘状态。</description>
    </item>
    <item>
      <title>LCR 053. 二叉搜索树中的中序后继</title>
      <link>https://zhangge.dev/leetcode/inorder-successor-in-bst/</link>
      <pubDate>Tue, 14 Jul 2026 00:00:00 +0000</pubDate>
      <guid>https://zhangge.dev/leetcode/inorder-successor-in-bst/</guid>
      <description>记录二叉搜索树中序后继问题的三种写法：中序遍历记录节点、遍历全树维护候选答案，以及利用 BST 性质迭代查找。</description>
    </item>
    <item>
      <title>Token Recycling：把被丢弃的候选 Token 变成下一轮草稿</title>
      <link>https://zhangge.dev/papers/token-recycling/</link>
      <pubDate>Tue, 14 Jul 2026 00:00:00 +0000</pubDate>
      <guid>https://zhangge.dev/papers/token-recycling/</guid>
      <description>无需训练草稿模型，Token Recycling 用一个不到 2 MiB 的邻接矩阵回收目标模型已经算出的 top-k 候选，并通过草稿树与 Tree Attention 加速解码。</description>
    </item>
  </channel>
</rss>
