Blog

Tech notes · Learning logs · On the road

Readnest:我的阅读记录,为什么要搬出 NotionReadnest: Why I Moved My Reading Log Out of Notion

一个只存在于自己手机里的阅读记录本A reading log that lives on your phone and nowhere else

我的读书记录原本散在微信读书、掌阅精选、京东读书专业版、文石和图书馆的纸质书里,靠一张 Notion 表手工维护了大半年。最后是因为分类被我自己写成「经管」「经管励志」「商业」三种样子——统计出来毫无意义——才决定自己写一个。这篇文章讲 Readnest 的由来、它现在什么样、以及什么东西会离开你的手机。

📁 技术 📁 项目 🏷 Readnest 🏷 阅读记录 🏷 本地优先 🏷 自研应用

Readnest:我的阅读记录,为什么要搬出 NotionReadnest: Why I Moved My Reading Log Out of Notion

一个只存在于自己手机里的阅读记录本A reading log that lives on your phone and nowhere else

My reading records were scattered across WeRead, Zhangyue, JD Read, my Boox device and library paperbacks, held together by a Notion table I maintained by ha...

📁 Tech 📁 Project 🏷 Readnest 🏷 Reading Log 🏷 Local-First 🏷 Indie App

交叉熵:语言模型的损失函数,为什么只能是它Cross-Entropy: The Loss Function of Language Models, and Why It Must Be This One

3Blue1Brown「压缩即智能」Part 2 学习笔记——从一个玩具编码方案讲交叉熵,为什么 p 和 q 不能对调,又为什么交叉熵公式是「平均损失仅在 q=p 时取最小值」的唯一解Notes on 3Blue1Brown's 'Compression is Intelligence' Part 2 — from a toy coding scheme to cross-entropy, why p and q can't be swapped, and why the cross-entropy formula is the unique answer to 'average loss minimized exactly when q = p'

3Blue1Brown《压缩即智能》Part 2 的学习笔记。从向遥控机器人发 4 种指令的玩具编码讲起:概率 1/2、1/4、1/8、1/8 对应 1、2、3、3 个比特,分布从旧码本挪到 1/8、1/8、1/4、1/2 后,旧方案平均要 2.625 bits/消息——这就是交叉熵。再用两个事件的分布验证非对称...

📁 技术 📁 学习笔记 🏷 交叉熵 🏷 信息论 🏷 3Blue1Brown 🏷 语言模型 🏷 LLM推理 🏷 知识蒸馏

交叉熵:语言模型的损失函数,为什么只能是它Cross-Entropy: The Loss Function of Language Models, and Why It Must Be This One

3Blue1Brown「压缩即智能」Part 2 学习笔记——从一个玩具编码方案讲交叉熵,为什么 p 和 q 不能对调,又为什么交叉熵公式是「平均损失仅在 q=p 时取最小值」的唯一解

Notes on 3Blue1Brown's 'Compression is Intelligence' Part 2. From a toy code that sends four commands to a remote robot — probabilities 1/2, 1/4, 1/8, 1/8 co...

📁 Tech 📁 Study Notes 🏷 Cross-Entropy 🏷 Information Theory 🏷 3Blue1Brown 🏷 Language Models 🏷 LLM Inference 🏷 Knowledge Distillation

千卡训练的隐形账单:通信不是瓶颈The Hidden Bill of Thousand-GPU Training: Communication Is Not the Bottleneck

MLSys·im 学习笔记(五)——从单节点走到千卡集群:谁在偷走训练时间、Young-Daly 公式该往哪用、选址怎么在 61 倍里改写碳足迹MLSys·im Learning Notes (Part 5) — from one node to a thousand GPUs: who actually steals your training time, where the Young-Daly formula should point, and how site selection rewrites the carbon footprint by 61x

MLSys 学习的第五阶段记录:基于 Datawhale mlsysim 打卡任务 Task5(集群、成本与整合),复现教程 06 的 8→1024 GPU 规模扫描,并把通信开销拆成 TP 与 DP 两个分量——发现教程表里'32 卡通信比 8 卡还少'不是通信变好,而是 batch 在单机阶段被灌到 64、跨...

📁 技术 📁 学习笔记 🏷 MLSys 🏷 mlsysim 🏷 分布式训练 🏷 3D并行 🏷 可靠性 🏷 集群经济学 🏷 碳排放 🏷 GPU

千卡训练的隐形账单:通信不是瓶颈The Hidden Bill of Thousand-GPU Training: Communication Is Not the Bottleneck

MLSys·im 学习笔记(五)——从单节点走到千卡集群:谁在偷走训练时间、Young-Daly 公式该往哪用、选址怎么在 61 倍里改写碳足迹MLSys·im Learning Notes (Part 5) — from one node to a thousand GPUs: who actually steals your training time, where the Young-Daly formula should point, and how site selection rewrites the carbon footprint by 61x

Fifth stage of my MLSys learning: following the Datawhale mlsysim task (Cluster, Cost & Integration), I reproduce Tutorial 06's 8→1024 GPU scale sweep and sp...

📁 Tech 📁 Learning Notes 🏷 MLSys 🏷 mlsysim 🏷 Distributed Training 🏷 3D Parallelism 🏷 Reliability 🏷 Fleet Economics 🏷 Carbon Emissions 🏷 GPU

给开源教程修了个 demoFixing a Tutorial Demo: An Open-Source PR Retrospective

给 mlsysim 的 KV-Cache 教程重写了 §5 的 Paged Attention demo 并提了 PRI rewrote the §5 Paged Attention demo in mlsysim's KV-Cache tutorial and opened PR #2135; before merging, the maintainer revised it and shrank my numbers from 314 to 259. A retrospective of that experience.

一次开源贡献的完整复盘:读 mlsysim 的 KV-Cache 教程时发现 §5 Paged Attention demo 对三种页大小输出完全相同的结果——max_batch_size 绑定、seq_len 整除所有页大小、引擎只建模末页内部碎片、加速比是固定 0.6 因子。我重写了整个 demo(静态连续 ...

📁 技术 📁 学习笔记 🏷 MLSys 🏷 mlsysim 🏷 KV Cache 🏷 开源 🏷 PR

GPU 为什么会挨饿:数据墙、投机解码与设计空间探索Why Does the GPU Starve: The Data Wall, Speculative Decoding, and Design-Space Exploration

MLSys·im 学习笔记(四)——从单点瓶颈走向全链路优化:CPU 预处理如何让 GPU 饿肚子,投机解码如何以小博大,DSE 如何在数千种配置中自动找最优解MLSys·im Learning Notes (Part 4) — from single-point analysis to whole-pipeline optimization: how CPU preprocessing starves the GPU, how speculative decoding bets small to win big, and how DSE searches thousands of configs automatically

Fourth stage of my MLSys learning: following the Datawhale mlsysim task (Data, Algorithms & System Optimization), I verify the data wall stage by stage — Res...

📁 Tech 📁 Learning Notes 🏷 MLSys 🏷 mlsysim 🏷 Performance Analysis 🏷 Data Pipeline 🏷 Speculative Decoding 🏷 DSE 🏷 GPU 🏷 LLM Inference

GPU 为什么会挨饿:数据墙、投机解码与设计空间探索Why Does the GPU Starve: The Data Wall, Speculative Decoding, and Design-Space Exploration

MLSys·im 学习笔记(四)——从单点瓶颈走向全链路优化:CPU 预处理如何让 GPU 饿肚子,投机解码如何以小博大,DSE 如何在数千种配置中自动找最优解MLSys·im Learning Notes (Part 4) — from single-point analysis to whole-pipeline optimization: how CPU preprocessing starves the GPU, how speculative decoding bets small to win big, and how DSE searches thousands of configs automatically

MLSys 学习的第四阶段记录:基于 Datawhale mlsysim 打卡任务 Task4(数据、算法与系统优化),亲手验证了数据墙的三个环节——ResNet-50 在 A100 上纯 GPU 计算 13.97ms(18,323 img/s)是天花板,存储 I/O 只用到 PCIe 的 28.6%,而 8 个...

📁 技术 📁 学习笔记 🏷 MLSys 🏷 mlsysim 🏷 性能分析 🏷 数据流水线 🏷 投机解码 🏷 DSE 🏷 GPU 🏷 LLM推理

给开源教程修了个 demoFixing a Tutorial Demo: An Open-Source PR Retrospective

给 mlsysim 的 KV-Cache 教程重写了 §5 的 Paged Attention demo 并提了 PR #2135;合并前维护者又改了一版,把数字从 314 改小到 259。复盘这次经历。I rewrote the §5 Paged Attention demo in mlsysim's KV-Cache tutorial and opened PR #2135; before merging, the maintainer revised it and shrank my numbers from 314 to 259. A retrospective of that experience.

A complete retrospective of one open-source contribution: while reading mlsysim's KV-Cache tutorial I found that the §5 Paged Attention demo printed identica...

📁 Tech 📁 Learning Notes 🏷 MLSys 🏷 mlsysim 🏷 KV Cache 🏷 Open Source 🏷 PR

KV-Cache 的显存账本:长上下文、并发与量化剪枝的取舍The KV-Cache Memory Ledger: Long Context, Concurrency, and the Quantization–Pruning Trade-off

MLSys·im 学习笔记(三)——用公式算清一个请求吃多少显存,序列长度如何决定并发上限,以及为什么"压缩"和"剪枝"在推理提速上完全是两回事MLSys·im Learning Notes (Part 3) — a formula for how much memory one request eats, why sequence length decides your concurrency ceiling, and why 'compression' and 'pruning' are two completely different stories for inference speedup

Third stage of my MLSys learning: following the Datawhale mlsysim task (KV-Cache & model properties), I hand-compute the KV-Cache memory ledger — each term o...

📁 Tech 📁 Learning Notes 🏷 MLSys 🏷 KV Cache 🏷 Memory Optimization 🏷 Quantization 🏷 Pruning 🏷 LLM Inference 🏷 mlsysim

KV-Cache 的显存账本:长上下文、并发与量化剪枝的取舍The KV-Cache Memory Ledger: Long Context, Concurrency, and the Quantization–Pruning Trade-off

MLSys·im 学习笔记(三)——用公式算清一个请求吃多少显存,序列长度如何决定并发上限,以及为什么"压缩"和"剪枝"在推理提速上完全是两回事MLSys·im Learning Notes (Part 3) — a formula for how much memory one request eats, why sequence length decides your concurrency ceiling, and why 'compression' and 'pruning' are two completely different stories for inference speedup

MLSys 学习的第三阶段记录:基于 Datawhale mlsysim 打卡任务 Task3(KV Cache 与模型属性),亲手算清 KV-Cache 的显存账本——公式每一项对应 Llama-3-8B 的哪个超参数,实测序列长度翻倍则并发上限减半(2K 260 → 4K 130 → 32K 16 → 128...

📁 技术 📁 学习笔记 🏷 MLSys 🏷 KV Cache 🏷 显存优化 🏷 量化 🏷 剪枝 🏷 LLM推理 🏷 mlsysim

内存墙与两阶段:为什么 3.2 倍算力只换来 1.6 倍加速The Memory Wall & Two Phases: Why 3.2x More FLOPS Buys Only 1.6x Speedup

MLSys·im 学习笔记(二)——从 Memory Wall 到 Prefill/Decode 双墙,一次 LLM 请求里的两套瓶颈MLSys·im Learning Notes (Part 2) — from the Memory Wall to the Prefill/Decode dual walls: two bottlenecks inside a single LLM request

MLSys 学习的第二阶段记录:基于 MLSysBook 的 mlsysim 教程 01 Memory Wall 与 02 Two Phases,亲手验证"升级 H100 算力 3.2 倍、LLM 推理却只快 1.6 倍"的内存墙现象,拆解 Prefill(TTFT)撞算力墙、Decode(ITL)撞内存墙的两阶...

📁 技术 📁 学习笔记 🏷 MLSys 🏷 Memory Wall 🏷 性能分析 🏷 GPU 🏷 LLM推理 🏷 mlsysim

内存墙与两阶段:为什么 3.2 倍算力只换来 1.6 倍加速The Memory Wall & Two Phases: Why 3.2x More FLOPS Buys Only 1.6x Speedup

MLSys·im 学习笔记(二)——从 Memory Wall 到 Prefill/Decode 双墙,一次 LLM 请求里的两套瓶颈MLSys·im Learning Notes (Part 2) — from the Memory Wall to the Prefill/Decode dual walls: two bottlenecks inside a single LLM request

Second stage of my MLSys learning: following the MLSysBook mlsysim tutorials 'The Memory Wall' and 'Two Phases, One Request', I verify hands-on why upgrading...

📁 Tech 📁 Learning Notes 🏷 MLSys 🏷 Memory Wall 🏷 Performance Analysis 🏷 GPU 🏷 LLM Inference 🏷 mlsysim

用 5 行代码预测模型瓶颈:MLSys·im Roofline 教程学习笔记Predicting Model Bottlenecks in 5 Lines of Code: MLSys·im Roofline Tutorial Notes

从 Datawhale 打卡任务开始的性能分析之旅——ResNet-50、Llama-3 在 A100/H100 上的 roofline 实战与踩坑复盘MLSys·im Learning Notes (Part 1) — a performance-analysis journey from a Datawhale assignment: rooflining ResNet-50 and Llama-3 on A100/H100, with a post-mortem of every pitfall

Two days of MLSys learning notes: following the MLSysBook mlsysim tutorial, hands-on Roofline analysis — using arithmetic intensity and the ridge point to ju...

📁 Tech 📁 Learning Notes 🏷 MLSys 🏷 Roofline 🏷 Performance Analysis 🏷 GPU 🏷 mlsysim

用 5 行代码预测模型瓶颈:MLSys·im Roofline 教程学习笔记Predicting Model Bottlenecks in 5 Lines of Code: MLSys·im Roofline Tutorial Notes

从 Datawhale 打卡任务开始的性能分析之旅——ResNet-50、Llama-3 在 A100/H100 上的 roofline 实战与踩坑复盘A performance-analysis journey starting from a Datawhale assignment — rooflining ResNet-50 and Llama-3 on A100/H100, with a post-mortem of every pitfall

这两天的 MLSys 学习记录:基于 MLSysBook 的 mlsysim 教程,亲手跑通 Roofline 模型分析——用算术强度与脊点判断 ResNet-50 在 A100/H100 上的瓶颈变迁,解析 LLM 推理的内存墙现象。文章包含完整的实验数据、学习过程中的六个疑惑与解答,以及我读引擎源码挖出的两个...

📁 技术 📁 学习笔记 🏷 MLSys 🏷 Roofline 🏷 性能分析 🏷 GPU 🏷 mlsysim

个人主页升级实战:Jekyll 增量改造的取舍与落地Upgrading My Personal Site: Jekyll Incremental Refactoring — Trade-offs and What Actually Shipped

从「要不要迁移框架」到「搜索、评论、SEO 全都要」的一次完整记录From 'should I migrate frameworks' to 'search, comments, SEO — I want it all'

一次真实的个人主页升级实践:面对「要不要迁移到 Astro」的诱惑,我选择在现有 Jekyll 基础上做增量改造,最终落地了分类标签、全文搜索、Giscus 评论、全套 SEO、GA4 统计与打赏入口。本文记录完整的决策过程、实施细节与踩坑经验。

📁 技术 🏷 Jekyll 🏷 GitHub Pages 🏷 SEO 🏷 静态博客

个人主页升级实战:Jekyll 增量改造的取舍与落地Upgrading My Personal Site: Jekyll Incremental Refactoring — Trade-offs and What Actually Shipped

从「要不要迁移框架」到「搜索、评论、SEO 全都要」的一次完整记录

A real personal-site upgrade: resisting the temptation to migrate to Astro, I did incremental refactoring on the existing Jekyll setup and shipped categories...

📁 Tech 🏷 Jekyll 🏷 GitHub Pages 🏷 SEO 🏷 Static Blog

傻瓜操作:GraphRAG、Ollama 本地部署及踩坑记录A Noob-Friendly Guide: Deploying GraphRAG with Local Ollama, and Every Pitfall I Hit

GraphRAG 本地部署完整指南:从环境准备、依赖安装到项目初始化,一步步讲解如何将微软 GraphRAG 与本地 Ollama 模型结合,实现完全离线的知识库问答,并附上部署过程中的踩坑记录。

📁 技术 🏷 GraphRAG 🏷 Ollama

傻瓜操作:GraphRAG、Ollama 本地部署及踩坑记录A Noob-Friendly Guide: Deploying GraphRAG with Local Ollama, and Every Pitfall I Hit

Complete GraphRAG local deployment guide: environment setup, dependency install, project init — wiring Microsoft GraphRAG to a local Ollama model for fully o...

📁 Tech 🏷 GraphRAG 🏷 Ollama

学习最优化课程中的一些疑惑Questions from an Optimization Course: Cartesian Products and Convex Sets

学习最优化课程时的几个疑问:卡氏积是什么?n 维空间中凸集的卡氏积含义?凸集的卡氏积是否仍然是凸集?附 GPT 讲解与证明过程。

📁 技术 🏷 数学 🏷 最优化

学习最优化课程中的一些疑惑Questions from an Optimization Course: Cartesian Products and Convex Sets

Questions raised while studying optimization: what is a Cartesian product, what does it mean for convex sets in n-dimensional space, and is the product of co...

📁 Tech 🏷 Math 🏷 Optimization

文献笔记 A View of Cloud ComputingReading Notes: A View of Cloud Computing

经典论文阅读笔记:Armbrust 等人对云计算的权威定义,以及影响云计算落地的 10 大障碍与对应的解决机会。

📁 技术 🏷 文献阅读 🏷 云计算

文献笔记 A View of Cloud ComputingReading Notes: A View of Cloud Computing

Classic paper reading notes: Armbrust et al.'s authoritative definition of cloud computing and the 10 obstacles to adoption with their corresponding opportun...

📁 Tech 🏷 Literature Notes 🏷 Cloud Computing

文献笔记 A Brief Introduction to Distributed SystemsReading Notes: A Brief Introduction to Distributed Systems

本文主要讨论了分布式系统。作者提供了关于分布式系统的概述,是一份很好的新手教程。 Fig.1 大纲 在论文的第一部分,作者简要回顾了计算机的演变,指出了分布式系统的两个技术基础:性能强大的微处理器的发展和高速计算机网络的发明。为什么这些技术很重要? The result of these techn...

📁 技术 🏷 文献阅读 🏷 分布式系统

文献笔记 A Brief Introduction to Distributed SystemsReading Notes: A Brief Introduction to Distributed Systems

Reading notes on Coulouris-style distributed systems overview: definition, transparency classifications, and common design goals.

📁 Tech 🏷 Literature Notes 🏷 Distributed Systems