<?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>Chi's Blog</title><link>https://zhangchitc.github.io/</link><description>Recent content on Chi's Blog</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Thu, 05 Nov 2026 01:00:00 +0800</lastBuildDate><atom:link href="https://zhangchitc.github.io/index.xml" rel="self" type="application/rss+xml"/><item><title>How Mixture of Experts Scales Model Parameters</title><link>https://zhangchitc.github.io/posts/mixture-of-experts/</link><pubDate>Thu, 05 Nov 2026 01:00:00 +0800</pubDate><guid>https://zhangchitc.github.io/posts/mixture-of-experts/</guid><description>Mixture of Experts lets a model&amp;rsquo;s parameter count grow tens of times over while the compute per token barely moves. We build it up step by step: copying the FFN into experts, the router, dispatch and combine, top-K routing, and the auxiliary loss that keeps experts balanced.</description></item><item><title>Why FlashAttention is So Fast</title><link>https://zhangchitc.github.io/posts/flash-attention/</link><pubDate>Wed, 04 Nov 2026 01:00:00 +0800</pubDate><guid>https://zhangchitc.github.io/posts/flash-attention/</guid><description>FlashAttention does every multiplication standard attention does, yet runs several times faster. We build it up step by step from the GPU memory hierarchy: kernel fusion, safe softmax, online softmax, and tiling.</description></item><item><title>How PagedAttention Works: Paging the KV Cache Like an Operating System</title><link>https://zhangchitc.github.io/posts/paged-attention/</link><pubDate>Tue, 03 Nov 2026 01:00:00 +0800</pubDate><guid>https://zhangchitc.github.io/posts/paged-attention/</guid><description>Why serving LLMs fragments GPU memory, and how vLLM&amp;rsquo;s PagedAttention fixes it with OS-style paging: physical blocks, a block table, chained block hashes, and a walkthrough of how blocks are allocated, shared, freed and evicted.</description></item><item><title>How Much GPU Memory Does the KV Cache Really Take?</title><link>https://zhangchitc.github.io/posts/kv-cache-memory/</link><pubDate>Mon, 02 Nov 2026 17:00:00 +0800</pubDate><guid>https://zhangchitc.github.io/posts/kv-cache-memory/</guid><description>We build the KV cache size formula one factor at a time, from single-head attention to multi-head, stacked layers and MQA/GQA, then check it against a real calculator: 13.73 GiB for 100,000 tokens on Qwen3-8B.</description></item><item><title>KV Cache vs. Prompt Cache: What's the Difference?</title><link>https://zhangchitc.github.io/posts/kv-cache-vs-prompt-cache/</link><pubDate>Mon, 02 Nov 2026 01:00:00 +0800</pubDate><guid>https://zhangchitc.github.io/posts/kv-cache-vs-prompt-cache/</guid><description>A prompt cache doesn&amp;rsquo;t store your last answer. We walk through prefill, decode and attention to see what the KV cache keeps, and how a prompt cache reuses it across requests.</description></item><item><title>Why Transformers Need Positional Encoding</title><link>https://zhangchitc.github.io/posts/positional-encoding/</link><pubDate>Sun, 01 Nov 2026 00:00:00 +0000</pubDate><guid>https://zhangchitc.github.io/posts/positional-encoding/</guid><description>Attention can&amp;rsquo;t tell &amp;ldquo;dog bites man&amp;rdquo; from &amp;ldquo;man bites dog&amp;rdquo;. We try integer, fractional and binary encodings, see where each one breaks, and arrive at sines and cosines: a set of clock hands spinning at different speeds.</description></item><item><title>About</title><link>https://zhangchitc.github.io/about/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://zhangchitc.github.io/about/</guid><description>&lt;p&gt;Hi, I&amp;rsquo;m Chi Zhang. I studied computer science at Peking University and have spent more than a decade building consumer products at Facebook and Airbnb. I started out on Facebook&amp;rsquo;s growth team in Kuala Lumpur, went on to work at both companies&amp;rsquo; headquarters in the Bay Area, and later joined the founding team of Airbnb&amp;rsquo;s Beijing office, where I helped build the engineering team from the ground up.&lt;/p&gt;
&lt;p&gt;These days most of my curiosity goes into AI. Working with coding agents like Claude Code and Codex made me curious about what happens underneath, both in the agents themselves and in the LLMs that power them. So I started taking them apart. I capture the real requests, read the papers, redo the math step by step, and turn what I find into visual explainers.&lt;/p&gt;</description></item></channel></rss>