<?xml version="1.0" encoding="utf-8"?> <feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"> <title>Zedong Peng</title> <subtitle>The personal website of Zedong Peng.</subtitle> <link href="https://zedongpeng.com/feed.xml" rel="self" type="application/atom+xml"/> <link href="https://zedongpeng.com/" rel="alternate" type="text/html"/> <id>https://zedongpeng.com/feed.xml</id> <updated>2026-11-22T16:24:40+08:00</updated> <author><name>Zedong Peng</name></author> <entry xml:lang="en"> <title type="html">Train a coding agent in one harness, and the gain shows up in the others</title> <link href="https://zedongpeng.com/blog/2026/one-harness-rl-transfers/" rel="alternate" type="text/html"/> <id>https://zedongpeng.com/blog/2026/one-harness-rl-transfers/</id> <published>2026-11-22T14:00:00+08:00</published> <updated>2026-11-22T14:00:00+08:00</updated> <category term="better-ml"/> <summary type="html">RL in pi alone made a 9B coding agent better on unseen repositories in OpenCode and Claude Code too. Training in two harnesses at once added nothing on top.</summary> <content type="html" xml:base="https://zedongpeng.com/blog/2026/one-harness-rl-transfers/">&lt;p&gt;RL that teaches a coding agent to fix bugs in one harness makes it better in harnesses it never trained in, and training in several harnesses at once adds nothing on top.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://huggingface.co/harness-hub&quot;&gt;Harness Hub&lt;/a&gt; trains one LoRA per harness: a pi adapter for pi, an OpenCode adapter for OpenCode. We wanted a single adapter for every harness, so we first ran the controlled version on Qwen3.5-9B. Three LoRAs got the same recipe, tasks and compute. One trained in pi only, one in OpenCode only, and one in both. We then evaluated each in pi, in OpenCode, and in Claude Code, which none of them trained in.&lt;/p&gt; &lt;table&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;Evaluated in&lt;/th&gt; &lt;th&gt;Base&lt;/th&gt; &lt;th&gt;Trained in pi&lt;/th&gt; &lt;th&gt;Trained in OpenCode&lt;/th&gt; &lt;th&gt;Trained in both&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;pi&lt;/td&gt; &lt;td&gt;40.0&lt;/td&gt; &lt;td&gt;50.0&lt;/td&gt; &lt;td&gt;43.3&lt;/td&gt; &lt;td&gt;53.3&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;OpenCode&lt;/td&gt; &lt;td&gt;38.3&lt;/td&gt; &lt;td&gt;45.0&lt;/td&gt; &lt;td&gt;45.0&lt;/td&gt; &lt;td&gt;50.0&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Claude Code (never trained in)&lt;/td&gt; &lt;td&gt;43.3&lt;/td&gt; &lt;td&gt;56.7&lt;/td&gt; &lt;td&gt;55.0&lt;/td&gt; &lt;td&gt;51.7&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;strong&gt;All three harnesses, change vs base&lt;/strong&gt;&lt;/td&gt; &lt;td&gt; &lt;/td&gt; &lt;td&gt;&lt;strong&gt;+10.0 ± 6.2&lt;/strong&gt;&lt;/td&gt; &lt;td&gt;&lt;strong&gt;+7.2 ± 6.4&lt;/strong&gt;&lt;/td&gt; &lt;td&gt;&lt;strong&gt;+11.1 ± 5.9&lt;/strong&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;All 160 held-out tasks, all three harnesses, change vs base&lt;/td&gt; &lt;td&gt; &lt;/td&gt; &lt;td&gt;+3.3 ± 4.3&lt;/td&gt; &lt;td&gt;+2.3 ± 4.4&lt;/td&gt; &lt;td&gt;+3.8 ± 4.3&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;p&gt;Pass@1 (%) on 60 bug-fix tasks per harness, drawn from four repositories that were not in training, with one attempt per task. Differences are paired by task, with 95% intervals. A single cell has only 60 tasks, so read the pooled rows. The last row adds 100 held-out terminal tasks (TermGrade), on which none of the adapters gained.&lt;/p&gt; &lt;p&gt;The adapter trained only in pi gains as much in Claude Code (+13 points) as in pi (+10). In OpenCode it matches the adapter that trained there, 45.0 against 45.0. Training in both harnesses is no better than training in one. In the two harnesses the pi-only adapter never saw, the both-harness adapter is +0.0 ± 5.0 points ahead of it. In each specialist’s own harness, it is +1.2 and −0.6 points against that specialist.&lt;/p&gt; &lt;p&gt;The gain is not the model learning a harness’s tool format, because tool calls the harness rejected did not become rarer. On the unseen repositories, the both-harness adapter solved 20 more tasks than the base, net. Eleven of them were runs that used to run out of the 50-call budget or the 30-minute limit. Ten were runs whose patch used to be wrong. Rejected tool calls cost one.&lt;/p&gt; &lt;p&gt;The base model already scored about the same in all three harnesses (38.1, 37.5 and 38.8 on all held-out tasks), so there was no harness gap for multi-harness training to close. A NeurIPS 2026 workshop paper reaches the same conclusion with Qwen3-8B, four other harnesses and SWE-bench Verified: “Cross-harness credit yields configuration adaptation and no more portable capability than within-harness credit.”&lt;sup id=&quot;fnref:1&quot;&gt;&lt;a href=&quot;#fn:1&quot; class=&quot;footnote&quot; rel=&quot;footnote&quot; role=&quot;doc-noteref&quot;&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt; &lt;p&gt;The main limitation is scale. Each adapter had only 16 RL steps, and the pooled intervals are about ±4 points.&lt;/p&gt; &lt;div class=&quot;footnotes&quot; role=&quot;doc-endnotes&quot;&gt; &lt;ol&gt; &lt;li id=&quot;fn:1&quot;&gt; &lt;p&gt;Chenqian Le, Jiayi Cheng, Qijia He, Runhao Li, Yinghao Li and Xupeng Chen, &lt;a href=&quot;https://openreview.net/forum?id=OTIi2ucXEA&quot;&gt;What Does Multi-Harness RL Learn? Credit Assignment and Portability in Coding Agents&lt;/a&gt;, NeurIPS 2026 ELLIS Workshop on the Foundations of LLM Post-Training in Changing Environments. In their runs, the evaluation harness moves the mean solve rate by a factor of 4.3, and the training recipe by 1.16. &lt;a href=&quot;#fnref:1&quot; class=&quot;reversefootnote&quot; role=&quot;doc-backlink&quot;&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt; &lt;/li&gt; &lt;/ol&gt; &lt;/div&gt;</content> </entry> <entry xml:lang="en"> <title type="html">Will your LLM say yes to a bad decision?</title> <link href="https://zedongpeng.com/llm-pushback-survey/" rel="alternate" type="text/html"/> <id>https://zedongpeng.com/blog/2026/llm-pushback-survey/</id> <published>2026-11-13T10:00:00+08:00</published> <updated>2026-11-13T10:00:00+08:00</updated> <category term="better-ml"/> <summary type="html">A survey of benchmarks for whether an LLM keeps its better recommendation when the user proposes a worse one, with current results from BullshitBench and XYEval.</summary> </entry> <entry xml:lang="en"> <title type="html">Manage research with GitHub</title> <link href="https://zedongpeng.com/blog/2026/github-for-research/" rel="alternate" type="text/html"/> <id>https://zedongpeng.com/blog/2026/github-for-research/</id> <published>2026-11-12T21:40:00+08:00</published> <updated>2026-11-12T21:40:00+08:00</updated> <category term="life"/> <summary type="html">Main holds the problem statement, reusable modules and evals; agents try several solutions in parallel worktrees; the commit history is the research history.</summary> <content type="html" xml:base="https://zedongpeng.com/blog/2026/github-for-research/">&lt;p&gt;Manage research with GitHub.&lt;/p&gt; &lt;h2 id=&quot;the-repo&quot;&gt;The repo&lt;/h2&gt; &lt;ul&gt; &lt;li&gt;&lt;strong&gt;main&lt;/strong&gt;: the problem statement, reusable modules and evals, iterated on continually.&lt;/li&gt; &lt;li&gt;&lt;strong&gt;worktrees&lt;/strong&gt;: several agents open several worktrees and try several solutions in parallel.&lt;/li&gt; &lt;li&gt;&lt;strong&gt;commits&lt;/strong&gt;: the commit history is the research history.&lt;/li&gt; &lt;/ul&gt; &lt;p&gt;Papers go in the repo too: &lt;a href=&quot;/blog/2026/paper-collaboration-with-claude-code/&quot;&gt;If you still use Overleaf, you are behind&lt;/a&gt;.&lt;/p&gt; &lt;h2 id=&quot;collaboration&quot;&gt;Collaboration&lt;/h2&gt; &lt;p&gt;A labmate who wants to work on the problem is just one more agent opening a worktree to try some research.&lt;/p&gt; &lt;h2 id=&quot;scale&quot;&gt;Scale&lt;/h2&gt; &lt;p&gt;Anthropic had one model coordinate over 1,000 subagents for eight days, from an empty folder to an operating system that boots on a laptop.&lt;sup id=&quot;fnref:1&quot;&gt;&lt;a href=&quot;#fn:1&quot; class=&quot;footnote&quot; rel=&quot;footnote&quot; role=&quot;doc-noteref&quot;&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt; &lt;h2 id=&quot;footnotes&quot;&gt;Footnotes&lt;/h2&gt; &lt;div class=&quot;footnotes&quot; role=&quot;doc-endnotes&quot;&gt; &lt;ol&gt; &lt;li id=&quot;fn:1&quot;&gt; &lt;p&gt;Anthropic, &lt;a href=&quot;https://www.anthropic.com/claude-fable-and-mythos-5-2&quot;&gt;Introducing Claude Fable 5.2 and Claude Mythos 5.2&lt;/a&gt;, November 9, 2026: “As an experiment, one Anthropic engineer gave Fable 5.2 the task of designing a prototype operating system. Starting from an empty folder, the model coordinated over 1,000 subagents, working around the clock for eight days.” &lt;a href=&quot;#fnref:1&quot; class=&quot;reversefootnote&quot; role=&quot;doc-backlink&quot;&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt; &lt;/li&gt; &lt;/ol&gt; &lt;/div&gt;</content> </entry> <entry xml:lang="en"> <title type="html">If you still use Overleaf, you are behind</title> <link href="https://zedongpeng.com/blog/2026/paper-collaboration-with-claude-code/" rel="alternate" type="text/html"/> <id>https://zedongpeng.com/blog/2026/paper-collaboration-with-claude-code/</id> <published>2026-11-12T20:31:00+08:00</published> <updated>2026-11-12T20:31:00+08:00</updated> <category term="life"/> <summary type="html">A paper&apos;s figures, tables and PDF go in one private GitHub repo, and Claude Code does the work.</summary> <content type="html" xml:base="https://zedongpeng.com/blog/2026/paper-collaboration-with-claude-code/">&lt;p&gt;A paper’s figures, tables and PDF go in one private GitHub repo, and Claude Code does the work.&lt;/p&gt; &lt;p&gt;Only for Opus 5.5 high or a higher effort, or Fable 5.2.&lt;/p&gt; &lt;h2 id=&quot;repo-layout&quot;&gt;Repo layout&lt;/h2&gt; &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;paper/ ├── main.tex refs.bib the text ├── figs/ &amp;lt;name&amp;gt;.html figure sources, exported to &amp;lt;name&amp;gt;.pdf ├── data/ *.csv *.json experiment results ├── tables/ *.py LaTeX tables generated from data/ └── tools/ build.sh exports figures, compiles the PDF &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt; &lt;h2 id=&quot;figures&quot;&gt;Figures&lt;/h2&gt; &lt;p&gt;Have Claude Code read your research code first. Then have it search for the figures in Anthropic’s blog and papers and in DeepSeek’s open-source reports. Once it knows what figures in frontier papers look like, it draws yours in HTML.&lt;/p&gt; &lt;p&gt;If you use PowerPoint or draw.io, you are behind.&lt;/p&gt; &lt;p&gt;Revise with a screenshot and a spoken note: capture the part that bothers you and say how to change it. Iteration is fast.&lt;/p&gt; &lt;p&gt;My own figure style is in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;zedong-html-fig&lt;/code&gt;, in &lt;a href=&quot;https://github.com/zedong-peng/zedong-skill&quot;&gt;zedong-skill&lt;/a&gt;.&lt;/p&gt; &lt;h2 id=&quot;tables&quot;&gt;Tables&lt;/h2&gt; &lt;p&gt;Scripts collect each experiment run into one data file, and another script writes every LaTeX table from it, so no number is typed by hand. Claude Code writes those scripts, does the analysis, and draws the analysis charts in HTML from the same data.&lt;/p&gt; &lt;h2 id=&quot;distribution&quot;&gt;Distribution&lt;/h2&gt; &lt;p&gt;Store the PDF in the repo and invite your collaborators to the repo.&lt;/p&gt; &lt;h2 id=&quot;an-advisor-who-only-uses-overleaf&quot;&gt;An advisor who only uses Overleaf&lt;/h2&gt; &lt;ol&gt; &lt;li&gt;See the title. Send your advisor this post and recommend switching workflow.&lt;/li&gt; &lt;li&gt;Have Claude Code open a browser. You log in, it takes the Overleaf cookie itself and syncs the material into the repo.&lt;/li&gt; &lt;/ol&gt;</content> </entry> <entry xml:lang="en"> <title type="html">Claude Code&apos;s hillclimb skill</title> <link href="https://zedongpeng.com/blog/2026/autoresearch/" rel="alternate" type="text/html"/> <id>https://zedongpeng.com/blog/2026/autoresearch/</id> <published>2026-11-06T14:00:00+08:00</published> <updated>2026-11-06T14:00:00+08:00</updated> <category term="life"/> <summary type="html">Anthropic&apos;s hillclimb skill lets Claude Code improve a prompt or a skill against an eval, round after round, unattended. What it adds to the cruder loop I ran in April, and the one default I would change.</summary> <content type="html" xml:base="https://zedongpeng.com/blog/2026/autoresearch/">&lt;p&gt;Anthropic’s &lt;a href=&quot;https://claude.dev/blog/automating-eval-design-and-hillclimbing/&quot;&gt;Automating eval design and hillclimbing with Claude&lt;/a&gt; ships two commands for Claude Code. &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/claude-api build-eval&lt;/code&gt; turns a task into an evaluation. &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/claude-api hillclimb&lt;/code&gt; then improves a prompt or a skill against it, one change at a time, unattended.&lt;/p&gt; &lt;p&gt;I ran a cruder version of this loop in April. It was good at running experiments and weak at deciding which results to trust, and that is the part the skill gets right. There is one default I would change before publishing a number from it.&lt;/p&gt; &lt;h2 id=&quot;the-loop&quot;&gt;The loop&lt;/h2&gt; &lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;build-eval&lt;/code&gt; starts from representative cases, ideally real traffic or real failures, and has a person review the inputs and sample grades. &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;hillclimb&lt;/code&gt; then works within an agreed scope. It tests one change at a time, checks whether a gain is larger than noise, and counts lower cost at equal quality as progress. Prompt and skill edits are the natural first target, because they are cheap to try and easy to revert.&lt;/p&gt; &lt;figure&gt; &lt;iframe class=&quot;autoresearch-figure autoresearch-loop&quot; src=&quot;/assets/autoresearch/eval-loop.html&quot; title=&quot;Anthropic&apos;s evaluation and hillclimbing workflow, with a plateau diagnosis branch&quot; loading=&quot;lazy&quot;&gt;&lt;/iframe&gt; &lt;figcaption&gt;My schematic of the article and the public skill. &lt;a href=&quot;/assets/autoresearch/eval-loop.html&quot;&gt;Open figure&lt;/a&gt;.&lt;/figcaption&gt; &lt;/figure&gt; &lt;h2 id=&quot;my-april-loop&quot;&gt;My April loop&lt;/h2&gt; &lt;p&gt;In April I shared a skill called &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;benchmark-grinder&lt;/code&gt; (&lt;a href=&quot;/assets/autoresearch/benchmark-grinder-2026-04-01.txt&quot;&gt;original text&lt;/a&gt;): give Claude Code a benchmark, let it keep trying changes, go to sleep, and read the git history in the morning. It kept a small contract of the metric, the run command, the files it could edit and the evaluation files it could not. It ran an untouched baseline, tested one hypothesis at a time, and kept or reverted each change.&lt;/p&gt; &lt;p&gt;I used it on GrepQA, which answers questions about long conversations by searching them with keyword predicates that an LLM writes. Over 34 versions, GrepQA went from 29.90 to 51.69 F1 on LoCoMo-10 with GPT-4o-mini (&lt;a href=&quot;/assets/autoresearch/epcc-2026-04-08-grepqa.pdf&quot;&gt;slides&lt;/a&gt;).&lt;/p&gt; &lt;figure&gt; &lt;iframe class=&quot;autoresearch-figure autoresearch-progress&quot; src=&quot;/assets/autoresearch/grepqa-progress.html&quot; title=&quot;GrepQA: all 34 versions, recorded scores and unresolved results&quot; loading=&quot;lazy&quot;&gt;&lt;/iframe&gt; &lt;figcaption&gt;Each mark is a recorded result, not a controlled trajectory; pilots ran on a subset. Select a version to see what changed. &lt;a href=&quot;/assets/autoresearch/grepqa-progress.html&quot;&gt;Open figure&lt;/a&gt; · &lt;a href=&quot;/assets/autoresearch/grepqa-versions.csv&quot;&gt;Data&lt;/a&gt;.&lt;/figcaption&gt; &lt;/figure&gt; &lt;p&gt;The best version was the 21st. Thirteen more followed, and none beat it on a full run. Version 31 scored 51.19 on a pilot, where version 21 had scored 49.57, and then came out 0.89 points below version 21 on the full run.&lt;/p&gt; &lt;p&gt;The loop produced results quickly. It could not tell me which ones to believe. It had no data split, no check of the grader, and no rule for when a gain is real.&lt;/p&gt; &lt;h2 id=&quot;what-the-skill-adds&quot;&gt;What the skill adds&lt;/h2&gt; &lt;p&gt;The public skill, in the version I read on November 6, adds three things I wish I had had.&lt;/p&gt; &lt;ul&gt; &lt;li&gt;It tests the grader first. The &lt;a href=&quot;https://github.com/anthropics/skills/blob/ca45fc496a3436251f191354091d557da31c15b5/skills/claude-api/shared/evals/build-eval.md&quot;&gt;eval-building guide&lt;/a&gt; feeds the grader deliberately bad outputs and induced infrastructure errors to confirm that it rejects them. For coding agents, it checks the resulting workspace, not whether the transcript sounds successful.&lt;/li&gt; &lt;li&gt;It records why, not just what. In the &lt;a href=&quot;https://github.com/anthropics/skills/blob/ca45fc496a3436251f191354091d557da31c15b5/skills/claude-api/shared/evals/eval-hillclimb.md&quot;&gt;hillclimbing guide&lt;/a&gt;, a fresh analyzer reads the training traces and proposes one patch with an explanation backed by a trace. Outputs, grades, patches and loop state go to disk. Git history shows what changed; this record shows why.&lt;/li&gt; &lt;li&gt;It treats a plateau as a diagnosis. Missing knowledge, unclear instructions, a wrong grader, infrastructure failures and noise each need a different fix. If the grader changes, stored outputs are regraded, so a better ruler is not mistaken for a better system.&lt;/li&gt; &lt;/ul&gt; &lt;h2 id=&quot;the-held-out-boundary&quot;&gt;The held-out boundary&lt;/h2&gt; &lt;p&gt;The default I would change is how the winner is chosen. The article scores the test set each round and keeps the version that does best on it. Even if the analyzer never sees a test transcript, choosing among many variants by test score fits the choice to that set, and the test set becomes validation data.&lt;/p&gt; &lt;p&gt;The skill already offers the fix: on larger evals, select on a validation set and hold out a third slice for the final comparison. I would use that for anything I publish, and call a result on a small set exploratory.&lt;/p&gt; &lt;p&gt;Isolation has a similar gap. Giving the analyzer only the training paths is a convention, not a barrier, and the guide notes that its harness hashes detect changes but cannot stop an agent with write access. For a serious benchmark, the runner should enforce the boundary.&lt;/p&gt; &lt;script&gt; // Each figure is as tall as its content, whatever the width. document.querySelectorAll(&apos;.autoresearch-figure&apos;).forEach(function (frame) { function fit() { var body = frame.contentDocument &amp;&amp; frame.contentDocument.body; if (body &amp;&amp; body.offsetHeight) frame.style.height = body.offsetHeight + &apos;px&apos;; } frame.addEventListener(&apos;load&apos;, function () { fit(); new ResizeObserver(fit).observe(frame.contentDocument.body); }); fit(); }); &lt;/script&gt;</content> </entry> <entry xml:lang="en"> <title type="html">How much AI I actually use</title> <link href="https://zedongpeng.com/ai-usage/" rel="alternate" type="text/html"/> <id>https://zedongpeng.com/blog/2026/ai-usage/</id> <published>2026-10-21T09:00:00+08:00</published> <updated>2026-10-21T09:00:00+08:00</updated> <category term="life"/> <summary type="html">My coding-agent usage by day and by model, read from local transcripts by T3 Code and priced at API list rates.</summary> </entry> <entry xml:lang="en"> <title type="html">Continual learning: where experience goes</title> <link href="https://zedongpeng.com/blog/2026/where-experience-goes/" rel="alternate" type="text/html"/> <id>https://zedongpeng.com/blog/2026/where-experience-goes/</id> <published>2026-10-20T12:00:00+08:00</published> <updated>2026-10-20T12:00:00+08:00</updated> <category term="life"/> <summary type="html">Long context, agent memory, parametric memory, test-time training and self-improving agents are one problem: where an experience is kept, and which rule writes it there. The rule is the hard part, and it should be learned.</summary> <content type="html" xml:base="https://zedongpeng.com/blog/2026/where-experience-goes/">&lt;p&gt;Long context, agent memory, parametric memory, test-time training and self-improving agents are all continual learning: learning from experience after training has ended. Each answers two questions: where an experience is kept, and what rule decides what gets written there.&lt;/p&gt; &lt;figure class=&quot;experience-fig&quot; role=&quot;img&quot; aria-label=&quot;A two-by-two grid of stores. Top row, text: Context, append every token; Notes, a writer decides. Bottom row, parameters: Fast weights, update per token; Weights, gradient step. Long context covers the left column, test-time training the bottom row, agent memory the Notes cell, parametric memory the Weights cell. Experience enters from the left; what the model does loops back into its experience, labelled recursive self-improvement.&quot;&gt; &lt;svg viewBox=&quot;0 0 680 405&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt; &lt;style&gt; .experience-fig svg { width: 100%; height: auto; display: block; color: var(--global-text-color); font-family: inherit; } .experience-fig .cell { fill: var(--global-bg-color); stroke: currentColor; stroke-opacity: 0.45; stroke-width: 1.5; } .experience-fig .store { fill: currentColor; font-size: 17px; font-weight: 600; text-anchor: middle; } .experience-fig .rule { fill: currentColor; fill-opacity: 0.7; font-size: 13.5px; text-anchor: middle; } .experience-fig .axis { fill: currentColor; fill-opacity: 0.55; font-size: 13px; } .experience-fig .src { fill: currentColor; font-size: 14px; font-weight: 600; } .experience-fig .field { fill: var(--global-theme-color); font-size: 15px; font-weight: 600; } .experience-fig .brace { fill: none; stroke: var(--global-theme-color); stroke-width: 2; } .experience-fig .flow { fill: none; stroke: currentColor; stroke-opacity: 0.55; stroke-width: 2; } .experience-fig .head { fill: currentColor; fill-opacity: 0.55; } .experience-fig .loop { fill: none; stroke: var(--global-theme-color); stroke-width: 2.5; } .experience-fig .loop-head { fill: var(--global-theme-color); } &lt;/style&gt; &lt;path class=&quot;brace&quot; d=&quot;M175 44 V36 H345 V44&quot; /&gt; &lt;text class=&quot;field&quot; x=&quot;260&quot; y=&quot;26&quot; text-anchor=&quot;middle&quot;&gt;long context&lt;/text&gt; &lt;text class=&quot;axis&quot; x=&quot;260&quot; y=&quot;68&quot; text-anchor=&quot;middle&quot;&gt;every token&lt;/text&gt; &lt;text class=&quot;axis&quot; x=&quot;450&quot; y=&quot;68&quot; text-anchor=&quot;middle&quot;&gt;chosen by a rule&lt;/text&gt; &lt;text class=&quot;axis&quot; x=&quot;163&quot; y=&quot;135&quot; text-anchor=&quot;end&quot;&gt;text&lt;/text&gt; &lt;text class=&quot;axis&quot; x=&quot;163&quot; y=&quot;255&quot; text-anchor=&quot;end&quot;&gt;parameters&lt;/text&gt; &lt;rect class=&quot;cell&quot; x=&quot;175&quot; y=&quot;80&quot; width=&quot;170&quot; height=&quot;100&quot; rx=&quot;8&quot; /&gt; &lt;text class=&quot;store&quot; x=&quot;260&quot; y=&quot;126&quot;&gt;Context&lt;/text&gt; &lt;text class=&quot;rule&quot; x=&quot;260&quot; y=&quot;150&quot;&gt;append&lt;/text&gt; &lt;rect class=&quot;cell&quot; x=&quot;365&quot; y=&quot;80&quot; width=&quot;170&quot; height=&quot;100&quot; rx=&quot;8&quot; /&gt; &lt;text class=&quot;store&quot; x=&quot;450&quot; y=&quot;126&quot;&gt;Notes&lt;/text&gt; &lt;text class=&quot;rule&quot; x=&quot;450&quot; y=&quot;150&quot;&gt;a writer decides&lt;/text&gt; &lt;rect class=&quot;cell&quot; x=&quot;175&quot; y=&quot;200&quot; width=&quot;170&quot; height=&quot;100&quot; rx=&quot;8&quot; /&gt; &lt;text class=&quot;store&quot; x=&quot;260&quot; y=&quot;246&quot;&gt;Fast weights&lt;/text&gt; &lt;text class=&quot;rule&quot; x=&quot;260&quot; y=&quot;270&quot;&gt;update per token&lt;/text&gt; &lt;rect class=&quot;cell&quot; x=&quot;365&quot; y=&quot;200&quot; width=&quot;170&quot; height=&quot;100&quot; rx=&quot;8&quot; /&gt; &lt;text class=&quot;store&quot; x=&quot;450&quot; y=&quot;246&quot;&gt;Weights&lt;/text&gt; &lt;text class=&quot;rule&quot; x=&quot;450&quot; y=&quot;270&quot;&gt;gradient step&lt;/text&gt; &lt;path class=&quot;brace&quot; d=&quot;M539 80 H547 V180 H539&quot; /&gt; &lt;text class=&quot;field&quot; x=&quot;557&quot; y=&quot;126&quot;&gt;agent&lt;/text&gt; &lt;text class=&quot;field&quot; x=&quot;557&quot; y=&quot;145&quot;&gt;memory&lt;/text&gt; &lt;path class=&quot;brace&quot; d=&quot;M539 200 H547 V300 H539&quot; /&gt; &lt;text class=&quot;field&quot; x=&quot;557&quot; y=&quot;246&quot;&gt;parametric&lt;/text&gt; &lt;text class=&quot;field&quot; x=&quot;557&quot; y=&quot;265&quot;&gt;memory&lt;/text&gt; &lt;path class=&quot;brace&quot; d=&quot;M175 308 V316 H535 V308&quot; /&gt; &lt;text class=&quot;field&quot; x=&quot;355&quot; y=&quot;338&quot; text-anchor=&quot;middle&quot;&gt;test-time training&lt;/text&gt; &lt;text class=&quot;src&quot; x=&quot;14&quot; y=&quot;180&quot;&gt;experience&lt;/text&gt; &lt;path class=&quot;flow&quot; d=&quot;M14 190 H163&quot; /&gt; &lt;polygon class=&quot;head&quot; points=&quot;171,190 161,184 161,196&quot; /&gt; &lt;path class=&quot;loop&quot; d=&quot;M535 190 H648 Q660 190 660 202 V358 Q660 370 648 370 H42 Q30 370 30 358 V206&quot; /&gt; &lt;polygon class=&quot;loop-head&quot; points=&quot;30,196 24,207 36,207&quot; /&gt; &lt;text class=&quot;rule&quot; x=&quot;600&quot; y=&quot;182&quot;&gt;acts&lt;/text&gt; &lt;text class=&quot;field&quot; x=&quot;345&quot; y=&quot;394&quot; text-anchor=&quot;middle&quot;&gt;recursive self-improvement&lt;/text&gt; &lt;/svg&gt; &lt;figcaption class=&quot;caption&quot;&gt;Top row keeps text, bottom row changes parameters; left column writes every token, right column only what a rule picks. Recursive self-improvement is the loop.&lt;/figcaption&gt; &lt;/figure&gt; &lt;p&gt;None of the four places is short of room. What goes wrong is the write rule. Four cases from my own work:&lt;/p&gt; &lt;table&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;Store&lt;/th&gt; &lt;th&gt;Rule, designed in advance&lt;/th&gt; &lt;th&gt;What happened&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;Notes (&lt;a href=&quot;https://zedongpeng.com/memorytax/&quot;&gt;MemoryTax&lt;/a&gt;)&lt;/td&gt; &lt;td&gt;Mem0’s extraction&lt;/td&gt; &lt;td&gt;beats the whole conversation only with GPT-4o-mini; a stronger reader cannot recover what a weak writer dropped&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Weights (&lt;a href=&quot;/blog/2025/failure-of-parametric-memory/&quot;&gt;LoRA&lt;/a&gt;)&lt;/td&gt; &lt;td&gt;next-token loss on the conversation&lt;/td&gt; &lt;td&gt;question-answering F1 6.7 → 7.2&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Weights (RL on Brainfuck)&lt;/td&gt; &lt;td&gt;reward when the predicted output matches&lt;/td&gt; &lt;td&gt;after one rule of the machine changed, 32 of 11,712 samples rewarded; trained on the machine’s trace instead, it adapts after 16 runs&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Weights (small net, &lt;a href=&quot;https://arcprize.org/arc-agi/3/&quot;&gt;ARC-AGI-3&lt;/a&gt;)&lt;/td&gt; &lt;td&gt;predict which actions reach an unseen screen&lt;/td&gt; &lt;td&gt;passes level 1 in 77 of 250 runs (random clicks 47), learns nothing that carries to level 2&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;p&gt;Each time, what was kept was decided before the experience arrived. The part that matters is the part the rule did not anticipate.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;The rule should be learned.&lt;/strong&gt; &lt;a href=&quot;http://www.incompleteideas.net/IncIdeas/BitterLesson.html&quot;&gt;The bitter lesson&lt;/a&gt; applies to what a model keeps as much as to what it computes. An agent has a signal for it at every step, with no teacher: the gap between what it expected and what happened. The Brainfuck model adapted once it saw where its prediction went wrong. On ARC, when Qwen3.8-27B wrote down the rule from the moment level 1 was solved and played level 2 with it in the prompt, it passed 5 of 10 runs; without it, none. Where that error signal should land is what I work on.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Notes are a buffer; weights are the destination.&lt;/strong&gt; A note must be read again every time and is only as good as its reader: Qwen3-8B, given the same rule, passes none of 10. Weights need no reader.&lt;/p&gt; &lt;p&gt;A teenager learns to drive in a dozen hours. They see what the car does, an instructor’s words change their next move, and a week later it is in their hands. Nobody calls those three different fields.&lt;/p&gt;</content> </entry> <entry xml:lang="zh-CN"> <title type="html">把海外家里的笔记本分给朋友用 Claude Code</title> <link href="https://zedongpeng.com/blog/2026/claude-code-t3-tailscale-zh/" rel="alternate" type="text/html"/> <id>https://zedongpeng.com/blog/2026/claude-code-t3-tailscale-zh/</id> <published>2026-10-18T12:00:00+08:00</published> <updated>2026-10-18T12:00:00+08:00</updated> <category term="life"/> <summary type="html">海外家里的一台笔记本，环境干净。用 Tailscale 和 T3 Code 分给身边的朋友，手机、电脑、网页都能用 Claude Code。</summary> <content type="html" xml:base="https://zedongpeng.com/blog/2026/claude-code-t3-tailscale-zh/">&lt;p&gt;海外家里有一台笔记本，环境干净，我用它跑 Claude Code。身边的朋友有需要，我就分给他们用，用不用他们自己定。这台机器硬盘只剩十几个 G，所以它只当入口，重活都交给各人自己的服务器。&lt;/p&gt; &lt;p&gt;先选一下你的情况：&lt;/p&gt; &lt;div class=&quot;ai-picker&quot; id=&quot;ai-picker&quot;&gt; &lt;noscript&gt; 国产模型：用 OpenCode Go。OpenAI：每月十块左右的梯子，先测纯净度。Claude：认识我就找我开账号，不认识就找每月一百块左右的家宽梯子。订阅：OpenCode Go 可以用支付宝或微信；OpenAI 和 Claude 用苹果 App Store 礼品卡、Google Pay 或国外银行卡，港卡不行。 &lt;/noscript&gt; &lt;/div&gt; &lt;style&gt; .ai-picker { border: 1px solid var(--global-divider-color); border-radius: 8px; padding: 1rem 1.25rem; margin: 1.5rem 0; } .ai-picker .ap-trail { margin: 0 0 0.75rem; font-size: 0.9rem; color: var(--global-text-color-light); } .ai-picker .ap-trail:empty { display: none; } .ai-picker .ap-trail span { cursor: pointer; } .ai-picker .ap-trail span:hover { color: var(--global-theme-color); } .ai-picker .ap-q { font-weight: 600; margin-bottom: 0.75rem; } .ai-picker .ap-opts { display: flex; flex-wrap: wrap; gap: 0.5rem; } .ai-picker button { border: 1px solid var(--global-theme-color); border-radius: 6px; background: transparent; color: var(--global-theme-color); padding: 0.35rem 0.9rem; cursor: pointer; } .ai-picker button:hover, .ai-picker button.on { background: var(--global-theme-color); color: var(--bg); } .ai-picker button:disabled { opacity: 0.4; cursor: default; } .ai-picker .ap-end { margin-bottom: 0.75rem; } .ai-picker .ap-end ol { margin: 0.5rem 0 0; padding-left: 1.25rem; } &lt;/style&gt; &lt;script&gt; (function () { var root = document.getElementById(&apos;ai-picker&apos;); var short = { cn: &apos;国产&apos;, openai: &apos;OpenAI&apos;, claude: &apos;Claude&apos; }; // A Linux account on my machine, for Claude Code. The reader may install other AIs there too. function mine(s) { return s.client === &apos;code&apos;; } // AIs the reader runs in a terminal; Claude Desktop goes over remote desktop instead. function agents(s) { return (s.ai || []).filter(function (p) { return !(p === &apos;claude&apos; &amp;&amp; s.client === &apos;desktop&apos;); }); } // AIs that run on the reader&apos;s own computer. Managed together with Claude, they all move to my machine. function local(s) { if (mine(s) &amp;&amp; s.unify) return []; return agents(s).filter(function (p) { return !(p === &apos;claude&apos; &amp;&amp; mine(s)); }); } var qs = [ { id: &apos;ai&apos;, multi: true, q: &apos;你想用哪些 AI？可以多选。&apos;, opts: [ [&apos;cn&apos;, &apos;国产模型&apos;], [&apos;openai&apos;, &apos;OpenAI&apos;], [&apos;claude&apos;, &apos;Claude（推荐）&apos;], ], }, { id: &apos;know&apos;, when: function (s) { return s.ai.indexOf(&apos;claude&apos;) &gt;= 0; }, q: &apos;你认识我吗？能接受用我海外家里的电脑吗？它的硬盘不大。&apos;, opts: [ [true, &apos;认识，也能接受&apos;], [false, &apos;不认识，或不想用&apos;], ], }, { id: &apos;client&apos;, when: function (s) { return s.know === true; }, q: &apos;你用 Claude Desktop 还是 Claude Code？&apos;, opts: [ [&apos;desktop&apos;, &apos;Claude Desktop&apos;], [&apos;code&apos;, &apos;Claude Code&apos;], ], }, { id: &apos;ssh&apos;, when: function (s) { return agents(s).length &gt; 0; }, q: &apos;你需要 ssh 到自己的工作环境吗？比如实验室的 GPU 服务器，或者自己的电脑。&apos;, opts: [ [true, &apos;需要&apos;, &apos;要 ssh&apos;], [false, &apos;不需要&apos;, &apos;不 ssh&apos;], ], }, { id: &apos;multi&apos;, when: function (s) { return agents(s).length &gt; 0; }, q: &apos;你需要在手机、电脑、网页上都能看到 AI 的进度吗？&apos;, opts: [ [true, &apos;需要&apos;, &apos;要多端&apos;], [false, &apos;不需要&apos;, &apos;不要多端&apos;], ], }, { id: &apos;unify&apos;, when: function (s) { return agents(s).length &gt; 1; }, q: &apos;这几家 AI，想放在一个界面里统一管理吗？&apos;, opts: [ [true, &apos;想&apos;, &apos;统一管理&apos;], [false, &apos;不用，各用各的&apos;, &apos;各用各的&apos;], ], }, ]; function plan(s) { var me = mine(s); var own = local(s); var steps = []; if (s.client === &apos;desktop&apos;) steps.push(&apos;Claude：我给你开&lt;a href=&quot;https://uuyc.163.com/&quot;&gt;网易 UU 远程&lt;/a&gt;，直接用那台电脑的桌面。&apos;); if (me) steps.push(&apos;Claude：我把这台电脑的 Tailscale 节点 share 给你，再给你建一个 Linux 用户，你自己 ssh 进去。&apos;); if (me &amp;&amp; s.unify) { if (s.ai.indexOf(&apos;cn&apos;) &gt;= 0) steps.push(&apos;国产模型：也在这台电脑上用 &lt;a href=&quot;https://opencode.ai/go&quot;&gt;OpenCode Go&lt;/a&gt;。&apos;); if (s.ai.indexOf(&apos;openai&apos;) &gt;= 0) steps.push(&apos;OpenAI：Codex 也装在这台电脑上，它在海外，不用梯子。&apos;); } own.forEach(function (p) { if (p === &apos;cn&apos;) steps.push(&apos;国产模型：用 &lt;a href=&quot;https://opencode.ai/go&quot;&gt;OpenCode Go&lt;/a&gt;。&apos;); if (p === &apos;openai&apos;) steps.push( &apos;OpenAI：找个每月十块钱左右的梯子，先在 &lt;a href=&quot;https://ip.net.coffee/gpt/&quot;&gt;ip.net.coffee/gpt&lt;/a&gt; 测一下纯净度。OpenAI 不怎么封号，够用了。&apos; ); if (p === &apos;claude&apos;) steps.push( &apos;Claude：找个每月一百块左右的家宽梯子，先在 &lt;a href=&quot;https://ip.net.coffee/claude/&quot;&gt;ip.net.coffee/claude&lt;/a&gt; 测一下纯净度，然后自己搞定。&apos; ); }); if (s.ssh &amp;&amp; me) steps.push(&apos;在我这台电脑上启动用户级 Tailscale，连回你自己的机器（下文第 3 步）。&apos;); if (s.ssh &amp;&amp; own.length) steps.push(&apos;你的电脑和工作环境都装上 Tailscale，配好 SSH 密钥，你电脑上的 AI 就能直接 ssh 过去。&apos;); var native = { cn: &apos;国产模型：电脑上跑 &lt;code&gt;opencode web&lt;/code&gt;，手机装 Tailscale 打开网页就能看。&apos;, openai: &apos;OpenAI：用 Codex App 自带的远程，手机上的 ChatGPT App 就能接着看。Codex App 要跑在 Mac 或 Windows 上。&apos;, claude: &apos;Claude：用 Claude Code 自带的 Remote Control，手机上的 Claude App 也要挂梯子。&apos;, }; if (s.unify) steps.push( (me ? &apos;在我这台电脑上启动 T3 Code（下文第 2 步）&apos; : &apos;在你的电脑上启动 T3 Code&apos;) + &apos;，几家 AI 放在一个界面里&apos; + (s.multi ? &apos;，手机、电脑、网页都能看进度。&apos; : &apos;。&apos;) ); else if (s.multi) { if (me) steps.push(&apos;Claude：在我这台电脑上启动 T3 Code（下文第 2 步）。手机直接开 Claude App 要挂梯子，T3 Code 走 Tailscale 不用。&apos;); own.forEach(function (p) { steps.push(native[p]); }); } var pay = []; if (s.ai.indexOf(&apos;cn&apos;) &gt;= 0) pay.push(&apos;OpenCode Go 可以用支付宝或微信&apos;); var intl = s.ai .filter(function (p) { return p !== &apos;cn&apos;; }) .map(function (p) { return short[p]; }); if (intl.length) pay.push(intl.join(&apos; 和 &apos;) + &apos; 用苹果 App Store 礼品卡、Google Pay 或国外银行卡，港卡不行&apos;); steps.push(&apos;订阅：&apos; + pay.join(&apos;；&apos;) + &apos;。&apos;); return &apos;你要做这几件事：&lt;ol&gt;&lt;li&gt;&apos; + steps.join(&apos;&lt;/li&gt;&lt;li&gt;&apos;) + &apos;&lt;/li&gt;&lt;/ol&gt;&apos;; } var ans = {}; var sel = []; var cur = null; function crumb(q) { if (q.multi) return ans[q.id] .map(function (p) { return short[p]; }) .join(&apos; + &apos;); var o = q.opts.filter(function (o) { return o[0] === ans[q.id]; })[0]; return o[2] || o[1]; } function render() { var html = &apos;&lt;div class=&quot;ap-trail&quot;&gt;&apos;; var n = 0; cur = null; for (var k = 0; k &lt; qs.length; k++) { var q = qs[k]; if (q.when &amp;&amp; !q.when(ans)) continue; if (!(q.id in ans)) { cur = q; break; } html += (n++ ? &apos; › &apos; : &apos;&apos;) + &apos;&lt;span data-back=&quot;&apos; + k + &apos;&quot;&gt;&apos; + crumb(q) + &apos;&lt;/span&gt;&apos;; } html += &apos;&lt;/div&gt;&apos;; if (!cur) { html += &apos;&lt;div class=&quot;ap-end&quot;&gt;&apos; + plan(ans) + &apos;&lt;/div&gt;&lt;button data-reset=&quot;1&quot;&gt;重新选&lt;/button&gt;&apos;; } else { html += &apos;&lt;div class=&quot;ap-q&quot;&gt;&apos; + cur.q + &apos;&lt;/div&gt;&lt;div class=&quot;ap-opts&quot;&gt;&apos;; cur.opts.forEach(function (o, i) { var on = cur.multi &amp;&amp; sel.indexOf(o[0]) &gt;= 0; html += &apos;&lt;button data-i=&quot;&apos; + i + &apos;&quot;&apos; + (on ? &apos; class=&quot;on&quot;&apos; : &apos;&apos;) + &apos;&gt;&apos; + o[1] + &apos;&lt;/button&gt;&apos;; }); if (cur.multi) html += &apos;&lt;button data-next=&quot;1&quot;&apos; + (sel.length ? &apos;&apos; : &apos; disabled&apos;) + &apos;&gt;下一步&lt;/button&gt;&apos;; html += &apos;&lt;/div&gt;&apos;; } root.innerHTML = html; } root.addEventListener(&apos;click&apos;, function (e) { var el = e.target.closest(&apos;[data-i],[data-next],[data-back],[data-reset]&apos;); if (!el) return; var d = el.dataset; if (d.i !== undefined &amp;&amp; cur.multi) { var v = cur.opts[+d.i][0]; sel = sel.indexOf(v) &gt;= 0 ? sel.filter((p) =&gt; p !== v) : sel.concat(v); } else if (d.i !== undefined) { ans[cur.id] = cur.opts[+d.i][0]; } else if (d.next !== undefined) { ans.ai = qs[0].opts .map(function (o) { return o[0]; }) .filter(function (p) { return sel.indexOf(p) &gt;= 0; }); } else if (d.back !== undefined) { qs.slice(+d.back).forEach(function (q) { delete ans[q.id]; }); } else { ans = {}; sel = []; } render(); }); render(); })(); &lt;/script&gt; &lt;h2 id=&quot;1-共享这台机器&quot;&gt;1. 共享这台机器&lt;/h2&gt; &lt;p&gt;给朋友建一个没有 sudo 的普通账号，把自己的家目录锁死：&lt;/p&gt; &lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;adduser friend &lt;span class=&quot;nb&quot;&gt;chmod &lt;/span&gt;700 /home/me &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt; &lt;p&gt;然后在 Tailscale 控制台对这台机器点 Share，把链接发给朋友。对方接受后只能看到这一台机器，看不到你的其他设备。&lt;/p&gt; &lt;h2 id=&quot;2-用-t3-code-当界面&quot;&gt;2. 用 T3 Code 当界面&lt;/h2&gt; &lt;p&gt;T3 Code 可以同时接入 Claude Code、OpenCode 和 Codex 的订阅，在同一个界面里切换。它和 Claude Code 都跑在海外机器上。朋友开着 Tailscale，手机或电脑浏览器打开 T3 Code 就能用，不需要梯子。两端的会话是同步的，在电脑上开的任务，路上用手机接着看、接着批。&lt;/p&gt; &lt;p&gt;配置好之后，手机、电脑或网页端直接启动 T3 Code 就行。&lt;/p&gt; &lt;h2 id=&quot;3-重活回到自己的机器&quot;&gt;3. 重活回到自己的机器&lt;/h2&gt; &lt;p&gt;朋友在海外机器上跑一个用户态 Tailscale，不用 root，状态都放在自己的家目录里：&lt;/p&gt; &lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;tailscaled &lt;span class=&quot;nt&quot;&gt;--tun&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;userspace-networking &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;--state&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$HOME&lt;/span&gt;/.tailscale/state &lt;span class=&quot;nt&quot;&gt;--socket&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$HOME&lt;/span&gt;/.tailscale/sock &amp;amp; tailscale &lt;span class=&quot;nt&quot;&gt;--socket&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$HOME&lt;/span&gt;/.tailscale/sock up &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt; &lt;p&gt;配好 SSH 密钥后，Claude 直接 ssh 回朋友自己的服务器，代码、数据、训练都留在那边。海外机器只占几百 MB。&lt;/p&gt; &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;手机 / 电脑 ──Tailscale──▶ 海外机器（T3 Code + Claude） ──用户态 Tailscale + SSH──▶ 各自的服务器 &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt; &lt;h2 id=&quot;faq&quot;&gt;FAQ&lt;/h2&gt; &lt;p&gt;&lt;strong&gt;为什么要单独起一个用户级的 Tailscale？&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;因为 Claude 还得能连到生产机器上做实验，比如 4090、A100、FPGA。海外机器自带的那个 Tailscale 是宿主的，只负责把这台机器共享出来；朋友自己的机器都在他们自己的 tailnet 里，要连回去，就得有一个属于他们自己的 Tailscale 身份。用户态模式不需要 root，每人一个，互不影响。&lt;/p&gt; &lt;p&gt;&lt;strong&gt;为什么用 T3 Code，而不是直接 ssh 进去开终端？&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;多端，加上多个订阅。我自己就有好几个订阅，用量见 &lt;a href=&quot;https://zedongpeng.com/ai-usage/&quot;&gt;AI 使用实况&lt;/a&gt;。T3 Code 把它们放进同一个界面，会话在手机和电脑之间同步，ssh 做不到这些，在手机上敲终端也很难受。&lt;/p&gt; &lt;p&gt;&lt;strong&gt;第 1 步分享出来的节点，之后还有用吗？&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;用户态 Tailscale 配好以后，朋友就有了自己的入口。分享的节点只用来第一次上机配置，之后留作备份登录：用户态 Tailscale 或 T3 出问题时，还能从这里 ssh 进去修。&lt;/p&gt; &lt;p&gt;&lt;strong&gt;海外机器的硬盘撑得住吗？&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;撑得住。这台机器上只有 T3 Code、Claude Code 和会话记录，几百 MB。仓库、数据和编译产物都留在各人自己的服务器上。&lt;/p&gt; &lt;p&gt;&lt;strong&gt;朋友之间会互相看到吗？&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;不会。每人一个普通账号，没有 sudo，每个人的家目录都是 700。&lt;/p&gt;</content> </entry> <entry xml:lang="en"> <title type="html">MemoryTax: the bitter lesson of agent memory</title> <link href="https://zedongpeng.com/memorytax/" rel="alternate" type="text/html"/> <id>https://zedongpeng.com/blog/2026/memorytax/</id> <published>2026-10-11T10:00:00+08:00</published> <updated>2026-10-11T10:00:00+08:00</updated> <category term="better-ml"/> <summary type="html">Does agent memory still help once the model can search the raw history itself? Memory systems and coding agents on LoCoMo with three models.</summary> </entry> <entry xml:lang="en"> <title type="html">Speculative decoding of Qwen3.8-27B at 322 tokens per second on one RTX 4090</title> <link href="https://zedongpeng.com/blog/2026/qwen38-4090-decode/" rel="alternate" type="text/html"/> <id>https://zedongpeng.com/blog/2026/qwen38-4090-decode/</id> <published>2026-10-06T12:00:00+08:00</published> <updated>2026-10-06T12:00:00+08:00</updated> <category term="faster-ml"/> <summary type="html">322 tokens per second for one user on one RTX 4090, against 200 for vLLM and 102 for llama.cpp, and an agent replay in 4.2 minutes against 9.0 for llama.cpp.</summary> <content type="html" xml:base="https://zedongpeng.com/blog/2026/qwen38-4090-decode/">&lt;style&gt; .q-fig { font-family: var(--sans); font-size: 14px; line-height: 1.55; margin: 40px 0; } .q-title { font-weight: 600; margin-bottom: 12px; } .q-row { display: grid; grid-template-columns: 250px 1fr; align-items: center; gap: 12px; padding: 5px 0; } .q-name span { color: var(--muted); } .q-track { display: flex; align-items: center; gap: 8px; } .q-track i { display: block; height: 14px; border-radius: 0 4px 4px 0; background: var(--cloud); } .q-ours .q-track i { background: var(--clay); } .q-ours .q-track span { font-weight: 600; } .q-fig svg { display: block; min-width: 620px; height: auto; font-family: var(--sans); font-size: 13px; } .q-grid { stroke: var(--line); } .q-ray { stroke: var(--muted); stroke-dasharray: 2 4; } .q-tick { fill: var(--muted); } .q-label { fill: var(--fg); paint-order: stroke; stroke: var(--bg); stroke-width: 5px; stroke-linejoin: round; } .q-path { fill: none; stroke: var(--clay); stroke-width: 2; } .q-dot { fill: var(--cloud); stroke: var(--bg); stroke-width: 2; } .q-dot.q-ours { fill: var(--clay); } .q-heat { display: grid; grid-template-columns: minmax(120px, 1.3fr) repeat(var(--n), minmax(78px, 1fr)); gap: 3px; min-width: 620px; } .q-hcol, .q-hrow { display: flex; flex-direction: column; gap: 2px; } .q-hcol { justify-content: flex-end; text-align: center; padding: 0 2px 6px; } .q-hrow { justify-content: center; padding-right: 8px; position: sticky; left: 0; background: var(--bg); } .q-heat b { font-weight: 500; } .q-heat span, .q-sub { color: var(--muted); } .q-heat span { font-size: 13px; } .q-hcol.q-ours b { color: var(--clay); font-weight: 600; } .q-cell { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 60px; padding: 6px; border-radius: 4px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; background: color-mix(in srgb, var(--olive) var(--p), var(--bg)); } .q-cell.q-dark { color: var(--bg); } .q-cell.q-nofit { background: var(--wash); color: var(--muted); font-size: 13px; font-weight: 400; } .q-board { font-variant-numeric: tabular-nums; } .q-board td:first-child { color: var(--muted); width: 1.5em; } .q-board .q-num { text-align: right; white-space: nowrap; padding-left: 24px; padding-right: 0; } @media (max-width: 600px) { .q-row { grid-template-columns: 1fr; gap: 2px; } .q-heat { grid-template-columns: 100px repeat(var(--n), minmax(76px, 1fr)); } } &lt;/style&gt; &lt;p&gt;Qwen3.8-27B decodes at 322 tokens per second on one RTX 4090, serving one user. On the same card and benchmark, vLLM decodes 200 tokens per second and llama.cpp 102. With the official weights left untouched, our engine reaches 245.&lt;/p&gt; &lt;p&gt;The text does not change: every token is the model’s own greedy choice. The weights behind the last number are our own 4-bit build, and they are closer to the full-precision model than the official 4-bit release.&lt;/p&gt; &lt;p&gt;An agent’s time goes mostly to its long prompts. On Artificial Analysis’s agent replay the same engine finishes in 4.2 minutes against 9.0 for llama.cpp, and what decided that was &lt;a href=&quot;#an-agent-workload&quot;&gt;reusing earlier turns&lt;/a&gt;.&lt;/p&gt; &lt;figure class=&quot;q-fig&quot;&gt; &lt;div class=&quot;q-title&quot;&gt;Decoding speed on one RTX 4090, tokens per second&lt;/div&gt; &lt;div class=&quot;q-bars&quot;&gt; &lt;div class=&quot;q-row&quot; title=&quot;llama.cpp, public 4-bit build: 102 tokens per second&quot;&gt; &lt;div class=&quot;q-name&quot;&gt;&lt;b&gt;llama.cpp&lt;/b&gt; &lt;span&gt;public 4-bit build&lt;/span&gt;&lt;/div&gt; &lt;div class=&quot;q-track&quot;&gt;&lt;i style=&quot;width:30.0%&quot;&gt;&lt;/i&gt;&lt;span&gt;102&lt;/span&gt;&lt;/div&gt; &lt;/div&gt; &lt;div class=&quot;q-row&quot; title=&quot;Cinference-4090, the engine we started from: 178 tokens per second&quot;&gt; &lt;div class=&quot;q-name&quot;&gt;&lt;b&gt;Cinference-4090&lt;/b&gt; &lt;span&gt;the engine we started from&lt;/span&gt;&lt;/div&gt; &lt;div class=&quot;q-track&quot;&gt;&lt;i style=&quot;width:52.4%&quot;&gt;&lt;/i&gt;&lt;span&gt;178&lt;/span&gt;&lt;/div&gt; &lt;/div&gt; &lt;div class=&quot;q-row&quot; title=&quot;vLLM, community RTX 4090 recipe: 200 tokens per second&quot;&gt; &lt;div class=&quot;q-name&quot;&gt;&lt;b&gt;vLLM&lt;/b&gt; &lt;span&gt;community RTX 4090 recipe&lt;/span&gt;&lt;/div&gt; &lt;div class=&quot;q-track&quot;&gt;&lt;i style=&quot;width:58.8%&quot;&gt;&lt;/i&gt;&lt;span&gt;200&lt;/span&gt;&lt;/div&gt; &lt;/div&gt; &lt;div class=&quot;q-row q-ours&quot; title=&quot;Ours, official weights: 245 tokens per second&quot;&gt; &lt;div class=&quot;q-name&quot;&gt;&lt;b&gt;Ours&lt;/b&gt; &lt;span&gt;official weights&lt;/span&gt;&lt;/div&gt; &lt;div class=&quot;q-track&quot;&gt;&lt;i style=&quot;width:72.1%&quot;&gt;&lt;/i&gt;&lt;span&gt;245&lt;/span&gt;&lt;/div&gt; &lt;/div&gt; &lt;div class=&quot;q-row q-ours&quot; title=&quot;Ours, our weights: 322 tokens per second&quot;&gt; &lt;div class=&quot;q-name&quot;&gt;&lt;b&gt;Ours&lt;/b&gt; &lt;span&gt;our weights&lt;/span&gt;&lt;/div&gt; &lt;div class=&quot;q-track&quot;&gt;&lt;i style=&quot;width:94.7%&quot;&gt;&lt;/i&gt;&lt;span&gt;322&lt;/span&gt;&lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;figcaption&gt;Spec-Bench: 480 prompts, 256 output tokens each, one request at a time, greedy decoding. Every engine runs a public 4-bit build of the official checkpoint with the DFlash2 drafter, measured in one session with the same client. The last bar swaps in our weights.&lt;/figcaption&gt; &lt;/figure&gt; &lt;h2 id=&quot;memory-bandwidth&quot;&gt;Memory bandwidth&lt;/h2&gt; &lt;p&gt;With one user, every forward pass reads every weight once. At about 4 bits per weight the model is 13 to 14 GB, and the RTX 4090 reads its memory at close to 1 TB per second. That caps ordinary decoding, one token per pass, near 70 tokens per second. We measured 46 in llama.cpp and 54 in the engine we started from.&lt;/p&gt; &lt;p&gt;Speculative decoding changes the unit of work. A small drafter model proposes several tokens. The target model scores all of them in one pass, which still reads the weights only once, keeps the ones that match its own greedy choices, and adds one token of its own. The drafter can change the speed but never the output.&lt;/p&gt; &lt;p&gt;Speed is then the tokens a round accepts divided by the time a round takes, and a round’s time is mostly the bytes it reads divided by the card’s bandwidth. That leaves three things to work on: more tokens per round, less time in which memory sits idle, and fewer bytes.&lt;/p&gt; &lt;figure class=&quot;q-fig&quot;&gt; &lt;div class=&quot;q-title&quot;&gt;Where the speed comes from&lt;/div&gt; &lt;div class=&quot;scroll&quot;&gt; &lt;svg viewBox=&quot;0 0 680 400&quot; width=&quot;680&quot; role=&quot;img&quot; aria-label=&quot;Tokens per round against time per round for each engine, with lines of constant tokens per second&quot;&gt; &lt;line class=&quot;q-grid&quot; x1=&quot;165.3&quot; y1=&quot;16&quot; x2=&quot;165.3&quot; y2=&quot;356&quot; /&gt;&lt;text class=&quot;q-tick&quot; x=&quot;165.3&quot; y=&quot;374&quot; text-anchor=&quot;middle&quot;&gt;20&lt;/text&gt; &lt;line class=&quot;q-grid&quot; x1=&quot;278.7&quot; y1=&quot;16&quot; x2=&quot;278.7&quot; y2=&quot;356&quot; /&gt;&lt;text class=&quot;q-tick&quot; x=&quot;278.7&quot; y=&quot;374&quot; text-anchor=&quot;middle&quot;&gt;25&lt;/text&gt; &lt;line class=&quot;q-grid&quot; x1=&quot;392.0&quot; y1=&quot;16&quot; x2=&quot;392.0&quot; y2=&quot;356&quot; /&gt;&lt;text class=&quot;q-tick&quot; x=&quot;392.0&quot; y=&quot;374&quot; text-anchor=&quot;middle&quot;&gt;30&lt;/text&gt; &lt;line class=&quot;q-grid&quot; x1=&quot;505.3&quot; y1=&quot;16&quot; x2=&quot;505.3&quot; y2=&quot;356&quot; /&gt;&lt;text class=&quot;q-tick&quot; x=&quot;505.3&quot; y=&quot;374&quot; text-anchor=&quot;middle&quot;&gt;35&lt;/text&gt; &lt;line class=&quot;q-grid&quot; x1=&quot;618.7&quot; y1=&quot;16&quot; x2=&quot;618.7&quot; y2=&quot;356&quot; /&gt;&lt;text class=&quot;q-tick&quot; x=&quot;618.7&quot; y=&quot;374&quot; text-anchor=&quot;middle&quot;&gt;40&lt;/text&gt; &lt;line class=&quot;q-grid&quot; x1=&quot;52&quot; y1=&quot;294.2&quot; x2=&quot;664&quot; y2=&quot;294.2&quot; /&gt;&lt;text class=&quot;q-tick&quot; x=&quot;44&quot; y=&quot;298.2&quot; text-anchor=&quot;end&quot;&gt;4&lt;/text&gt; &lt;line class=&quot;q-grid&quot; x1=&quot;52&quot; y1=&quot;216.9&quot; x2=&quot;664&quot; y2=&quot;216.9&quot; /&gt;&lt;text class=&quot;q-tick&quot; x=&quot;44&quot; y=&quot;220.9&quot; text-anchor=&quot;end&quot;&gt;4.5&lt;/text&gt; &lt;line class=&quot;q-grid&quot; x1=&quot;52&quot; y1=&quot;139.6&quot; x2=&quot;664&quot; y2=&quot;139.6&quot; /&gt;&lt;text class=&quot;q-tick&quot; x=&quot;44&quot; y=&quot;143.6&quot; text-anchor=&quot;end&quot;&gt;5&lt;/text&gt; &lt;line class=&quot;q-grid&quot; x1=&quot;52&quot; y1=&quot;62.4&quot; x2=&quot;664&quot; y2=&quot;62.4&quot; /&gt;&lt;text class=&quot;q-tick&quot; x=&quot;44&quot; y=&quot;66.4&quot; text-anchor=&quot;end&quot;&gt;5.5&lt;/text&gt; &lt;text class=&quot;q-tick&quot; x=&quot;358.0&quot; y=&quot;394&quot; text-anchor=&quot;middle&quot;&gt;Time per round, ms&lt;/text&gt; &lt;text class=&quot;q-tick&quot; x=&quot;14&quot; y=&quot;186.0&quot; text-anchor=&quot;middle&quot; transform=&quot;rotate(-90 14 186.0)&quot;&gt;Tokens per round&lt;/text&gt; &lt;line class=&quot;q-ray&quot; x1=&quot;528.0&quot; y1=&quot;356.0&quot; x2=&quot;664.0&quot; y2=&quot;263.3&quot; /&gt; &lt;text class=&quot;q-tick&quot; x=&quot;660.0&quot; y=&quot;257.3&quot; text-anchor=&quot;end&quot;&gt;100 tok/s&lt;/text&gt; &lt;line class=&quot;q-ray&quot; x1=&quot;120.0&quot; y1=&quot;356.0&quot; x2=&quot;369.3&quot; y2=&quot;16.0&quot; /&gt; &lt;text class=&quot;q-tick&quot; x=&quot;365.3&quot; y=&quot;30.0&quot; text-anchor=&quot;end&quot;&gt;200 tok/s&lt;/text&gt; &lt;line class=&quot;q-ray&quot; x1=&quot;52.0&quot; y1=&quot;216.9&quot; x2=&quot;150.2&quot; y2=&quot;16.0&quot; /&gt; &lt;text class=&quot;q-tick&quot; x=&quot;146.2&quot; y=&quot;30.0&quot; text-anchor=&quot;end&quot;&gt;300 tok/s&lt;/text&gt; &lt;polyline class=&quot;q-path&quot; points=&quot;224.9,290.0 223.4,111.0 190.9,111.7 93.7,73.6&quot; /&gt; &lt;circle class=&quot;q-dot&quot; cx=&quot;224.9&quot; cy=&quot;290.0&quot; r=&quot;5&quot;&gt;&lt;title&gt;Cinference-4090: 4.03 tokens per round, 22.6 ms per round, 178 tokens per second&lt;/title&gt;&lt;/circle&gt; &lt;text class=&quot;q-label&quot; x=&quot;236.9&quot; y=&quot;308.0&quot; text-anchor=&quot;start&quot;&gt;Cinference-4090 · 178&lt;/text&gt; &lt;circle class=&quot;q-dot q-ours&quot; cx=&quot;223.4&quot; cy=&quot;111.0&quot; r=&quot;5&quot;&gt;&lt;title&gt;+ tree of drafts: 5.18 tokens per round, 22.6 ms per round, 230 tokens per second&lt;/title&gt;&lt;/circle&gt; &lt;text class=&quot;q-label&quot; x=&quot;237.4&quot; y=&quot;115.5&quot; text-anchor=&quot;start&quot;&gt;+ tree of drafts · 230&lt;/text&gt; &lt;circle class=&quot;q-dot q-ours&quot; cx=&quot;190.9&quot; cy=&quot;111.7&quot; r=&quot;5&quot;&gt;&lt;title&gt;+ shorter rounds: 5.18 tokens per round, 21.1 ms per round, 245 tokens per second&lt;/title&gt;&lt;/circle&gt; &lt;text class=&quot;q-label&quot; x=&quot;213.0&quot; y=&quot;136.0&quot; text-anchor=&quot;end&quot;&gt;+ shorter rounds · 245&lt;/text&gt; &lt;circle class=&quot;q-dot q-ours&quot; cx=&quot;93.7&quot; cy=&quot;73.6&quot; r=&quot;5&quot;&gt;&lt;title&gt;+ our weights: 5.43 tokens per round, 16.8 ms per round, 322 tokens per second&lt;/title&gt;&lt;/circle&gt; &lt;text class=&quot;q-label&quot; x=&quot;105.7&quot; y=&quot;56.0&quot; text-anchor=&quot;start&quot;&gt;+ our weights · 322&lt;/text&gt; &lt;circle class=&quot;q-dot&quot; cx=&quot;171.9&quot; cy=&quot;284.1&quot; r=&quot;5&quot;&gt;&lt;title&gt;vLLM: 4.07 tokens per round, 20.3 ms per round, 200 tokens per second&lt;/title&gt;&lt;/circle&gt; &lt;text class=&quot;q-label&quot; x=&quot;159.9&quot; y=&quot;289.1&quot; text-anchor=&quot;end&quot;&gt;vLLM · 200&lt;/text&gt; &lt;circle class=&quot;q-dot&quot; cx=&quot;618.9&quot; cy=&quot;280.3&quot; r=&quot;5&quot;&gt;&lt;title&gt;llama.cpp: 4.09 tokens per round, 40.0 ms per round, 102 tokens per second&lt;/title&gt;&lt;/circle&gt; &lt;text class=&quot;q-label&quot; x=&quot;606.9&quot; y=&quot;285.3&quot; text-anchor=&quot;end&quot;&gt;llama.cpp · 102&lt;/text&gt; &lt;/svg&gt; &lt;/div&gt; &lt;figcaption&gt;Each point is one configuration on Spec-Bench, labelled with its tokens per second. Speed is tokens per round divided by time per round, so faster is up and to the left; the dashed lines mark constant speed. The line follows our three steps from the engine we started from.&lt;/figcaption&gt; &lt;/figure&gt; &lt;h2 id=&quot;a-tree-of-drafts&quot;&gt;A tree of drafts&lt;/h2&gt; &lt;p&gt;The engine we started from drafts a chain of 7 tokens: if the third is wrong, the rest are wasted. We draft a tree of 15 candidates instead, grown from the drafter’s most likely tokens at each position, and the target verifies the whole tree in one pass. Where the chain breaks, a side branch often continues.&lt;/p&gt; &lt;p&gt;The tree accepts 5.2 tokens per round where the chain accepted 4.0. Trees were already in the upstream project’s code; we merged them into the port for this card. Each round now verifies 16 positions instead of 8, and at first that made rounds longer. Retuning the matrix kernels for this GPU, which now stream 930 to 1,000 GB per second, took a profiled round from 25.3 to 22.9 ms, and on the benchmark a round takes what the chain’s did.&lt;/p&gt; &lt;p&gt;A wider tree does not pay here. A tree of 32 accepts about a tenth more tokens, but its activations no longer fit the kernels’ 16-column tiles, and the matrix kernels cost 12 to 39 percent more.&lt;/p&gt; &lt;h2 id=&quot;shorter-rounds&quot;&gt;Shorter rounds&lt;/h2&gt; &lt;p&gt;A round is almost all weight reading. In that profiled round of 22.9 ms, 20.4 ms goes to streaming weights. The rest goes to hundreds of small kernels, and while they run, memory sits idle.&lt;/p&gt; &lt;p&gt;Three kinds of change took the benchmark round from 22.6 to 21.1 ms, still on the official weights:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;strong&gt;A cheaper output layer.&lt;/strong&gt; The output layer scores 248,320 tokens at every position. It is first read through a 3-bit copy that keeps 32 candidates per position, and only those are scored exactly. The output was identical on all 480 prompts.&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Idle time put to use.&lt;/strong&gt; While a small kernel runs, a few extra threads in the same launch pull the first megabytes of the next matrix into the GPU’s cache, so the next kernel starts warm. The results are bit-identical, because the extra threads only load data.&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Cheaper small kernels and state.&lt;/strong&gt; Attention over the tree was rewritten and takes 7 µs instead of 17. Compiling the engine as one program let the largest kernel use fewer registers, so three copies of it fit on each processor instead of two. The attention cache now stores its values as 8-bit integers, which measured as lossless against an unquantized cache and made attention faster.&lt;/li&gt; &lt;/ul&gt; &lt;p&gt;That leaves a round that is almost all streaming, and one large lever: fewer bytes.&lt;/p&gt; &lt;h2 id=&quot;fewer-bytes&quot;&gt;Fewer bytes&lt;/h2&gt; &lt;p&gt;A smaller model that is worse than the official one would not count, so we fixed the bar first. The reference is the full-precision model. We score 46,059 next-token predictions, half English prose and half Python source, on three numbers: the divergence of the output distribution from the reference, how often the top token agrees, and perplexity. A change ships only if every number, on prose and on code, is at least as good as the official 4-bit release.&lt;/p&gt; &lt;p&gt;The official release rounds each weight to the nearest 4-bit or 5-bit value. Choosing the rounding with GPTQ, which corrects each weight’s error with the weights after it, cuts the divergence by more than a third at the same size. We spend that headroom on bytes: every matrix goes to 4 bits, the feed-forward matrices of the early layers go to 3, since a byte saved late in the model costs six times the divergence of one saved early, and the quantization scales are then tuned end to end against the full-precision model’s outputs.&lt;/p&gt; &lt;div class=&quot;scroll&quot;&gt; &lt;table&gt; &lt;thead&gt;&lt;tr&gt;&lt;th&gt;&lt;/th&gt;&lt;th&gt;Weights read per round&lt;/th&gt;&lt;th&gt;Divergence (KL)&lt;/th&gt;&lt;th&gt;Top-token agreement&lt;/th&gt;&lt;th&gt;Perplexity&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt;&lt;td&gt;Official 4-bit release&lt;/td&gt;&lt;td&gt;14.37 GB&lt;/td&gt;&lt;td&gt;0.0668&lt;/td&gt;&lt;td&gt;0.9250&lt;/td&gt;&lt;td&gt;3.294&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;GPTQ, same bits as the release&lt;/td&gt;&lt;td&gt;14.37 GB&lt;/td&gt;&lt;td&gt;0.0421&lt;/td&gt;&lt;td&gt;0.9425&lt;/td&gt;&lt;td&gt;–&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;Every matrix at 4 bits&lt;/td&gt;&lt;td&gt;12.57 GB&lt;/td&gt;&lt;td&gt;0.0604&lt;/td&gt;&lt;td&gt;0.9328&lt;/td&gt;&lt;td&gt;–&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;Ours: 3 bits in early layers, tuned scales&lt;/td&gt;&lt;td&gt;11.64 GB&lt;/td&gt;&lt;td&gt;0.0619&lt;/td&gt;&lt;td&gt;0.9250&lt;/td&gt;&lt;td&gt;3.213&lt;/td&gt;&lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;/div&gt; &lt;p&gt;The full-precision model’s perplexity on the same text is 3.146. With these weights a round takes 16.8 ms instead of 21.1.&lt;/p&gt; &lt;p&gt;Quality turned out to be a speed variable too. A noisier target agrees less often with the drafter, which was trained on the full-precision model: a naive all-4-bit build read fewer bytes but accepted fewer tokens per round, and lost most of what it had saved. For the same reason we fine-tuned the drafter on text generated by the new target, which was worth another 2.3% in tokens per second.&lt;/p&gt; &lt;h2 id=&quot;small-effects&quot;&gt;Small effects&lt;/h2&gt; &lt;p&gt;Late in the project most gains were under one percent of round time, and speculative decoding makes effects that small hard to see. A change that is not bit-exact flips a few near-tied tokens; from the first flip on the text differs, and different text is accepted at a different rate. A change we knew to do nothing measured as 0.44% more tokens per round.&lt;/p&gt; &lt;p&gt;Three practices made such effects measurable. The engine can be forced to follow a reference text, so every configuration walks the same 480 outputs. Two configurations alternate on one GPU in the order A B B A B A A B, which cancels the drift of a warming card. And each prompt is compared with itself across runs, which removes the difference between easy and hard prompts. The last change we adopted was measured this way, at 0.16% faster.&lt;/p&gt; &lt;h2 id=&quot;negative-results&quot;&gt;Negative results&lt;/h2&gt; &lt;div class=&quot;scroll&quot;&gt; &lt;table&gt; &lt;thead&gt;&lt;tr&gt;&lt;th&gt;Idea&lt;/th&gt;&lt;th&gt;Why not&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt;&lt;td&gt;Trellis quantization, as in EXL3&lt;/td&gt;&lt;td&gt;Matching our quality needs about 3.75 bits per weight. That is at most 9% fewer bytes, and decoding is slower.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;Entropy-coded weights&lt;/td&gt;&lt;td&gt;Keeping up with the card needs about 2 trillion codes decoded per second. The GPU decodes 1.5 to 1.65 trillion.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;Small kernels on a second stream, alongside the matrix kernels&lt;/td&gt;&lt;td&gt;No gain. Both draw on the same memory, and each slows the other by as much as it saves.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;A 2-bit screen for the output layer&lt;/td&gt;&lt;td&gt;Its candidates contain the model&apos;s top token 98.7% of the time, and the output must not change.&lt;/td&gt;&lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;/div&gt; &lt;h2 id=&quot;an-agent-workload&quot;&gt;An agent workload&lt;/h2&gt; &lt;p&gt;Spec-Bench times decoding alone. An agent’s turns are different: each one sends the whole conversation again, often tens of thousands of tokens, and the server has to process whatever part of it is new before it decodes anything. Artificial Analysis’s &lt;a href=&quot;https://github.com/ArtificialAnalysis/aa-agentperf-local&quot;&gt;AA-AgentPerf-Local&lt;/a&gt; replays eight recorded agent tasks, 168 turns with a 65,536-token context and sampled output, and times how long a machine takes to finish them. We ran it unmodified.&lt;/p&gt; &lt;!-- BEGIN qwen38 heat --&gt; &lt;figure class=&quot;q-fig&quot;&gt; &lt;div class=&quot;q-title&quot;&gt;Time to finish the agent replay, by model and system&lt;/div&gt; &lt;div class=&quot;scroll&quot;&gt;&lt;div class=&quot;q-heat&quot; style=&quot;--n:6&quot;&gt; &lt;div&gt;&lt;/div&gt; &lt;div class=&quot;q-hcol q-ours&quot;&gt;&lt;b&gt;RTX 4090&lt;/b&gt;&lt;span&gt;24 GB VRAM&lt;/span&gt;&lt;/div&gt; &lt;div class=&quot;q-hcol&quot;&gt;&lt;b&gt;RTX 5090&lt;/b&gt;&lt;span&gt;32 GB VRAM&lt;/span&gt;&lt;/div&gt; &lt;div class=&quot;q-hcol&quot;&gt;&lt;b&gt;DGX Spark&lt;/b&gt;&lt;span&gt;128 GB unified&lt;/span&gt;&lt;/div&gt; &lt;div class=&quot;q-hcol&quot;&gt;&lt;b&gt;RTX Spark laptop&lt;/b&gt;&lt;span&gt;128 GB unified&lt;/span&gt;&lt;/div&gt; &lt;div class=&quot;q-hcol&quot;&gt;&lt;b&gt;Ryzen AI Halo&lt;/b&gt;&lt;span&gt;128 GB unified&lt;/span&gt;&lt;/div&gt; &lt;div class=&quot;q-hcol&quot;&gt;&lt;b&gt;MacBook Pro M5 Pro&lt;/b&gt;&lt;span&gt;64 GB unified&lt;/span&gt;&lt;/div&gt; &lt;div class=&quot;q-hrow&quot;&gt;&lt;b&gt;Qwen3.8 27B&lt;/b&gt;&lt;span&gt;27B parameters&lt;/span&gt;&lt;/div&gt; &lt;div class=&quot;q-cell q-dark&quot; style=&quot;--p:79%&quot;&gt;4.2 min&lt;/div&gt; &lt;div class=&quot;q-cell q-dark&quot; style=&quot;--p:74%&quot;&gt;4.9 min&lt;/div&gt; &lt;div class=&quot;q-cell&quot; style=&quot;--p:37%&quot;&gt;17.3 min&lt;/div&gt; &lt;div class=&quot;q-cell&quot; style=&quot;--p:35%&quot;&gt;18.7 min&lt;/div&gt; &lt;div class=&quot;q-cell&quot; style=&quot;--p:18%&quot;&gt;34.5 min&lt;/div&gt; &lt;div class=&quot;q-cell&quot; style=&quot;--p:15%&quot;&gt;37.6 min&lt;/div&gt; &lt;div class=&quot;q-hrow&quot;&gt;&lt;b&gt;Qwen3.6 35B A3B&lt;/b&gt;&lt;span&gt;36B, 3B active parameters&lt;/span&gt;&lt;/div&gt; &lt;div class=&quot;q-cell q-nofit&quot;&gt;Does not fit&lt;span&gt;in 24 GB VRAM&lt;/span&gt;&lt;/div&gt; &lt;div class=&quot;q-cell q-dark&quot; style=&quot;--p:100%&quot;&gt;2.0 min&lt;/div&gt; &lt;div class=&quot;q-cell q-dark&quot; style=&quot;--p:62%&quot;&gt;7.3 min&lt;/div&gt; &lt;div class=&quot;q-cell q-dark&quot; style=&quot;--p:61%&quot;&gt;7.6 min&lt;/div&gt; &lt;div class=&quot;q-cell&quot; style=&quot;--p:49%&quot;&gt;11.7 min&lt;/div&gt; &lt;div class=&quot;q-cell&quot; style=&quot;--p:48%&quot;&gt;11.9 min&lt;/div&gt; &lt;div class=&quot;q-hrow&quot;&gt;&lt;b&gt;Ling 3.0 Flash&lt;/b&gt;&lt;span&gt;124B, 5.1B active parameters&lt;/span&gt;&lt;/div&gt; &lt;div class=&quot;q-cell q-nofit&quot;&gt;Does not fit&lt;span&gt;in 24 GB VRAM&lt;/span&gt;&lt;/div&gt; &lt;div class=&quot;q-cell q-nofit&quot;&gt;Does not fit&lt;span&gt;in 32 GB VRAM&lt;/span&gt;&lt;/div&gt; &lt;div class=&quot;q-cell&quot; style=&quot;--p:42%&quot;&gt;14.9 min&lt;/div&gt; &lt;div class=&quot;q-cell&quot; style=&quot;--p:41%&quot;&gt;15.3 min&lt;/div&gt; &lt;div class=&quot;q-cell&quot; style=&quot;--p:27%&quot;&gt;25.1 min&lt;/div&gt; &lt;div class=&quot;q-cell q-nofit&quot;&gt;Does not fit&lt;span&gt;in 64 GB unified&lt;/span&gt;&lt;/div&gt; &lt;/div&gt;&lt;/div&gt; &lt;figcaption&gt;AA-AgentPerf-Local default replay, 168 turns and 172 tool calls; darker is faster. The RTX 4090 runs our engine on the official weights, median of three replays. The other systems run &lt;a href=&quot;https://artificialanalysis.ai/hardware-inference-stack/laptops-workstations&quot;&gt;Artificial Analysis&lt;/a&gt;&apos;s own configurations, retrieved November 2026.&lt;/figcaption&gt; &lt;/figure&gt; &lt;!-- END qwen38 heat --&gt; &lt;p&gt;At first our engine took 15.9 minutes, the slowest setup on the card, though it decoded three times as fast as llama.cpp (268 output tokens per second against 90). A server keeps the state of each conversation and resumes the next turn from it; ours kept that state at the end of the prompt. Three of the tasks end every prompt with a message that the next prompt no longer contains, so each of their turns was recomputed from the first token. The fix keeps the state from just before that last message.&lt;/p&gt; &lt;!-- BEGIN qwen38 board --&gt; &lt;figure class=&quot;q-fig&quot;&gt; &lt;div class=&quot;q-title&quot;&gt;Every setup we ran on one RTX 4090&lt;/div&gt; &lt;div class=&quot;scroll&quot;&gt;&lt;table class=&quot;q-board&quot;&gt; &lt;thead&gt;&lt;tr&gt;&lt;th&gt;&lt;/th&gt;&lt;th&gt;Setup&lt;/th&gt;&lt;th class=&quot;q-num&quot;&gt;Minutes&lt;/th&gt;&lt;th class=&quot;q-num&quot;&gt;Output tokens/s&lt;/th&gt;&lt;th class=&quot;q-num&quot;&gt;First token, s&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;&lt;b&gt;Ours&lt;/b&gt; &lt;span class=&quot;q-sub&quot;&gt;official weights · DFlash2 tree 15&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;q-num&quot;&gt;4.2&lt;/td&gt;&lt;td class=&quot;q-num&quot;&gt;275&lt;/td&gt;&lt;td class=&quot;q-num&quot;&gt;0.48&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;&lt;b&gt;llama.cpp b11236&lt;/b&gt; &lt;span class=&quot;q-sub&quot;&gt;UD-Q4_K_M · DFlash 7&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;q-num&quot;&gt;9.0&lt;/td&gt;&lt;td class=&quot;q-num&quot;&gt;90&lt;/td&gt;&lt;td class=&quot;q-num&quot;&gt;1.10&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;3&lt;/td&gt;&lt;td&gt;&lt;b&gt;llama.cpp b11026&lt;/b&gt; &lt;span class=&quot;q-sub&quot;&gt;Q4_K_M · MTP 2&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;q-num&quot;&gt;10.1&lt;/td&gt;&lt;td class=&quot;q-num&quot;&gt;78&lt;/td&gt;&lt;td class=&quot;q-num&quot;&gt;1.04&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Ours&lt;/b&gt; &lt;span class=&quot;q-sub&quot;&gt;our weights · DFlash2 tree 15&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;q-num&quot;&gt;4.1&lt;/td&gt;&lt;td class=&quot;q-num&quot;&gt;294&lt;/td&gt;&lt;td class=&quot;q-num&quot;&gt;0.49&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;b&gt;vLLM 0.27.1&lt;/b&gt; &lt;span class=&quot;q-sub&quot;&gt;W4A16 · MTP 3&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;q-sub&quot; colspan=&quot;3&quot;&gt;does not fit a 65,536-token context in 24 GB&lt;/td&gt;&lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt;&lt;/div&gt; &lt;figcaption&gt;The same replay and settings. Each setup is the median of three replays; output speed and the median time to first token are from that replay. Only setups on the official weights are ranked. &lt;a href=&quot;https://github.com/zedong-peng/qwen38-4090-inference&quot;&gt;Commands and raw data&lt;/a&gt;.&lt;/figcaption&gt; &lt;/figure&gt; &lt;!-- END qwen38 board --&gt; &lt;p&gt;Prefill and decoding now take about half the time each. Our weights barely move the total: 31% faster on Spec-Bench, they finish the replay about 1% sooner, since they do not speed up prefill and, under sampling, accept fewer tokens per round.&lt;/p&gt; &lt;h2 id=&quot;limitations&quot;&gt;Limitations&lt;/h2&gt; &lt;ul&gt; &lt;li&gt;One user. The cheaper output layer returns only the top token, so the Spec-Bench numbers are greedy; sampling, as in the agent workload, uses the full output layer.&lt;/li&gt; &lt;li&gt;One kind of card. Most kernel decisions are specific to the RTX 4090.&lt;/li&gt; &lt;li&gt;Most benchmark prompts are short. On prompts of 11,000 and 32,000 tokens, rounds take 18 to 20 ms and accept fewer tokens, and the gain over the engine we started from falls from 1.8 times to 1.55.&lt;/li&gt; &lt;li&gt;Our build keeps extra copies of some weights for decoding, about 4 GB. With the cheaper output layer it starts with a context of 57,344 tokens, not 65,536; with the full one, 65,536 fits.&lt;/li&gt; &lt;li&gt;The quality bar covers English prose and Python.&lt;/li&gt; &lt;li&gt;The other engines ran their published recipes without further tuning, and we did not score their 4-bit builds with our quality harness.&lt;/li&gt; &lt;/ul&gt; &lt;h2 id=&quot;code-and-data&quot;&gt;Code and data&lt;/h2&gt; &lt;p&gt;The engine is a series of 53 patches on Cinference, in jram4’s port to this GPU. The &lt;a href=&quot;https://github.com/zedong-peng/qwen38-4090-decode&quot;&gt;code&lt;/a&gt; includes the measurement tools, and &lt;a href=&quot;https://github.com/zedong-peng/qwen38-4090-decode/blob/master/REPRODUCE.md&quot;&gt;REPRODUCE.md&lt;/a&gt; goes from a fresh clone to each number here, for our engine, for the vLLM and llama.cpp recipes and for the agent replay. The &lt;a href=&quot;https://huggingface.co/zedongpeng/Qwen3.8-27B-NInfer-4090&quot;&gt;weights&lt;/a&gt; are on Hugging Face.&lt;/p&gt; &lt;p&gt;This work builds on NInfer (Neroued), Cinference (satellitedown) and jram4’s port of it, on the DFlash2 drafter (z-lab), on Spec-Bench (Xia et al.), and on the community llama.cpp and vLLM recipes for this model.&lt;/p&gt; &lt;p&gt;An AI coding agent, Claude Code, ran this project on the machine, four days for the decoding work and a week for the agent workload: it designed and ran the experiments, wrote the kernels and kept the research log, while I set the goals, the constraints and the quality bar. Every number here comes from a logged run.&lt;/p&gt;</content> </entry> <entry xml:lang="en"> <title type="html">How I manage a team of AI agents</title> <link href="https://zedongpeng.com/blog/2026/managing-a-team-of-ai-agents/" rel="alternate" type="text/html"/> <id>https://zedongpeng.com/blog/2026/managing-a-team-of-ai-agents/</id> <published>2026-09-19T12:00:00+08:00</published> <updated>2026-09-19T12:00:00+08:00</updated> <category term="life"/> <summary type="html">A CEO and seven agents, each named after someone whose work fits the job. What mattered was ordinary management.</summary> <content type="html" xml:base="https://zedongpeng.com/blog/2026/managing-a-team-of-ai-agents/">&lt;p&gt;Most of my research runs on a team of Claude Code sessions organized like a small company: a CEO and seven members, each owning one line of work and named after someone whose work fits it. Ross Freeman, after the inventor of the FPGA, builds my FPGA backend. A name works as a one-word style guide.&lt;/p&gt; &lt;figure class=&quot;ai-team&quot; role=&quot;img&quot; aria-label=&quot;Me at the top, linked to the CEO; the CEO linked to seven members, four in one row and three in a second; a dashed line runs from the CEO past the members down to a shared repository and llmwiki, the literature library, at the bottom&quot;&gt; &lt;svg viewBox=&quot;0 0 720 424&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt; &lt;style&gt; .ai-team svg { width: 100%; height: auto; display: block; color: var(--global-text-color); font-family: inherit; } .ai-team .box { fill: var(--global-bg-color); stroke: currentColor; stroke-opacity: 0.45; stroke-width: 1.5; } .ai-team .ceo { stroke: var(--global-theme-color); stroke-opacity: 1; stroke-width: 2.5; } .ai-team .me { fill: var(--global-theme-color); } .ai-team .name { fill: currentColor; font-size: 14px; font-weight: 600; text-anchor: middle; } .ai-team .role { fill: currentColor; fill-opacity: 0.7; font-size: 11.5px; text-anchor: middle; } .ai-team .on-me { fill: #fff; font-size: 17px; font-weight: 600; text-anchor: middle; } .ai-team .wire { fill: none; stroke: currentColor; stroke-opacity: 0.45; stroke-width: 1.5; } .ai-team .talk { stroke: var(--global-theme-color); stroke-width: 5; } .ai-team .read { fill: none; stroke: currentColor; stroke-opacity: 0.4; stroke-width: 1.5; stroke-dasharray: 4 4; } .ai-team .repo { fill: currentColor; fill-opacity: 0.06; stroke: currentColor; stroke-opacity: 0.35; stroke-width: 1.5; } .ai-team .book { fill: currentColor; fill-opacity: 0.35; } &lt;/style&gt; &lt;line class=&quot;talk&quot; x1=&quot;360&quot; y1=&quot;56&quot; x2=&quot;360&quot; y2=&quot;92&quot; /&gt; &lt;rect class=&quot;me&quot; x=&quot;290&quot; y=&quot;12&quot; width=&quot;140&quot; height=&quot;44&quot; rx=&quot;8&quot; /&gt; &lt;text class=&quot;on-me&quot; x=&quot;360&quot; y=&quot;40&quot;&gt;Me&lt;/text&gt; &lt;rect class=&quot;box ceo&quot; x=&quot;268&quot; y=&quot;92&quot; width=&quot;184&quot; height=&quot;56&quot; rx=&quot;8&quot; /&gt; &lt;text class=&quot;name&quot; x=&quot;360&quot; y=&quot;116&quot; style=&quot;font-size:17px&quot;&gt;Elon Musk&lt;/text&gt; &lt;text class=&quot;role&quot; x=&quot;360&quot; y=&quot;136&quot; style=&quot;font-size:13.5px&quot;&gt;CEO&lt;/text&gt; &lt;path class=&quot;wire&quot; d=&quot;M360 148 V170 M105 170 H615 M105 170 V190 M275 170 V190 M445 170 V190 M615 170 V190 M190 170 V280 M360 170 V280 M530 170 V280&quot; /&gt; &lt;path class=&quot;read&quot; d=&quot;M268 130 H14 V348 H540 M180 348 V360 M540 348 V360&quot; /&gt; &lt;rect class=&quot;box&quot; x=&quot;30&quot; y=&quot;190&quot; width=&quot;150&quot; height=&quot;56&quot; rx=&quot;8&quot; /&gt; &lt;text class=&quot;name&quot; x=&quot;105&quot; y=&quot;214&quot;&gt;Ross Freeman&lt;/text&gt; &lt;text class=&quot;role&quot; x=&quot;105&quot; y=&quot;234&quot;&gt;FPGA backend&lt;/text&gt; &lt;rect class=&quot;box&quot; x=&quot;200&quot; y=&quot;190&quot; width=&quot;150&quot; height=&quot;56&quot; rx=&quot;8&quot; /&gt; &lt;text class=&quot;name&quot; x=&quot;275&quot; y=&quot;214&quot;&gt;Chris Olah&lt;/text&gt; &lt;text class=&quot;role&quot; x=&quot;275&quot; y=&quot;234&quot;&gt;writing&lt;/text&gt; &lt;rect class=&quot;box&quot; x=&quot;370&quot; y=&quot;190&quot; width=&quot;150&quot; height=&quot;56&quot; rx=&quot;8&quot; /&gt; &lt;text class=&quot;name&quot; x=&quot;445&quot; y=&quot;214&quot;&gt;Richard Sutton&lt;/text&gt; &lt;text class=&quot;role&quot; x=&quot;445&quot; y=&quot;234&quot;&gt;models that learn&lt;/text&gt; &lt;rect class=&quot;box&quot; x=&quot;540&quot; y=&quot;190&quot; width=&quot;150&quot; height=&quot;56&quot; rx=&quot;8&quot; /&gt; &lt;text class=&quot;name&quot; x=&quot;615&quot; y=&quot;214&quot;&gt;Jim Simons&lt;/text&gt; &lt;text class=&quot;role&quot; x=&quot;615&quot; y=&quot;234&quot;&gt;quant research&lt;/text&gt; &lt;rect class=&quot;box&quot; x=&quot;115&quot; y=&quot;280&quot; width=&quot;150&quot; height=&quot;56&quot; rx=&quot;8&quot; /&gt; &lt;text class=&quot;name&quot; x=&quot;190&quot; y=&quot;304&quot;&gt;John Schulman&lt;/text&gt; &lt;text class=&quot;role&quot; x=&quot;190&quot; y=&quot;324&quot;&gt;learning from feedback&lt;/text&gt; &lt;rect class=&quot;box&quot; x=&quot;285&quot; y=&quot;280&quot; width=&quot;150&quot; height=&quot;56&quot; rx=&quot;8&quot; /&gt; &lt;text class=&quot;name&quot; x=&quot;360&quot; y=&quot;304&quot;&gt;Rodney Brooks&lt;/text&gt; &lt;text class=&quot;role&quot; x=&quot;360&quot; y=&quot;324&quot;&gt;embodied&lt;/text&gt; &lt;rect class=&quot;box&quot; x=&quot;455&quot; y=&quot;280&quot; width=&quot;150&quot; height=&quot;56&quot; rx=&quot;8&quot; /&gt; &lt;text class=&quot;name&quot; x=&quot;530&quot; y=&quot;304&quot;&gt;Richard Hamming&lt;/text&gt; &lt;text class=&quot;role&quot; x=&quot;530&quot; y=&quot;324&quot;&gt;life plan&lt;/text&gt; &lt;rect class=&quot;repo&quot; x=&quot;6&quot; y=&quot;360&quot; width=&quot;348&quot; height=&quot;56&quot; rx=&quot;8&quot; /&gt; &lt;text class=&quot;name&quot; x=&quot;180&quot; y=&quot;384&quot;&gt;shared repository&lt;/text&gt; &lt;text class=&quot;role&quot; x=&quot;180&quot; y=&quot;404&quot;&gt;team · decisions · project status&lt;/text&gt; &lt;rect class=&quot;repo&quot; x=&quot;366&quot; y=&quot;360&quot; width=&quot;348&quot; height=&quot;56&quot; rx=&quot;8&quot; /&gt; &lt;path class=&quot;book&quot; d=&quot;M382 374 h6 v30 h-6 z M390 370 h7 v34 h-7 z M399 376 h5 v28 h-5 z&quot; /&gt; &lt;rect class=&quot;book&quot; x=&quot;406&quot; y=&quot;373&quot; width=&quot;6&quot; height=&quot;31&quot; transform=&quot;rotate(14 412 404)&quot; /&gt; &lt;path class=&quot;wire&quot; d=&quot;M378 404.5 H420&quot; /&gt; &lt;text class=&quot;name&quot; x=&quot;556&quot; y=&quot;384&quot;&gt;llmwiki&lt;/text&gt; &lt;text class=&quot;role&quot; x=&quot;556&quot; y=&quot;404&quot;&gt;literature library: papers · notes · code&lt;/text&gt; &lt;/svg&gt; &lt;figcaption class=&quot;caption&quot;&gt;I talk to the CEO. Members bring it only big things. What everyone needs to know lives in a shared repository, and the papers we build on in llmwiki (dashed).&lt;/figcaption&gt; &lt;/figure&gt; &lt;p&gt;What made it work was ordinary management. These are the things I told the agents, from the session logs, translated from Chinese.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;One owner per job.&lt;/strong&gt; Two early hires split work off Freeman. A day later I folded them back:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;“Have the new hire hand its work to Freeman. … It’s the chief designer, after all. Then let the new hire go.”&lt;/p&gt; &lt;/blockquote&gt; &lt;p&gt;&lt;strong&gt;Goals, not targets.&lt;/strong&gt; The CEO proposed speed targets for Freeman.&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;“Don’t send them. Don’t let targets break our ideals.”&lt;/p&gt; &lt;p&gt;“Someone of Freeman’s calibre can explore all kinds of directions on its own. That is where our company’s strength comes from.”&lt;/p&gt; &lt;/blockquote&gt; &lt;p&gt;&lt;strong&gt;Reasons, not rules.&lt;/strong&gt; The CEO wrote my judgments down as rules.&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;“Not going through the processor isn’t a rule. It’s my judgment from experience: that path is obviously slow.”&lt;/p&gt; &lt;/blockquote&gt; &lt;p&gt;A rule can only be followed. A reason can be overturned with evidence.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Don’t wait.&lt;/strong&gt; A build of the FPGA design takes eight hours or more.&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;“It looks like Freeman is waiting on builds. Meanwhile it could keep trying other changes and run other builds in parallel.”&lt;/p&gt; &lt;/blockquote&gt; &lt;p&gt;&lt;strong&gt;Talk little, write it down.&lt;/strong&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;“A CEO doesn’t need to talk with each employee several times a day. Only big things go to the CEO.”&lt;/p&gt; &lt;/blockquote&gt; &lt;p&gt;Every session rereads the shared files after each compaction, so they hold only the current state; git keeps the history.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;What stays with me:&lt;/strong&gt; money, my accounts, and what becomes public. Early on, two agents pushed internal notes to a repository nobody had checked was public. The decisions file now says: “Before pushing anything outward, check whether the target is public.”&lt;/p&gt;</content> </entry> <entry xml:lang="en"> <title type="html">Epic of AGI</title> <link href="https://zedongpeng.com/blog/2026/epic-of-agi/" rel="alternate" type="text/html"/> <id>https://zedongpeng.com/blog/2026/epic-of-agi/</id> <published>2026-07-23T22:18:00+08:00</published> <updated>2026-07-23T22:18:00+08:00</updated> <category term="life"/> <summary type="html">A timeline from the perceptron to Claude Opus 5.5: the work that taught sand to think, and who did it.</summary> <content type="html" xml:base="https://zedongpeng.com/blog/2026/epic-of-agi/">&lt;p&gt;A timeline of the work that led to today’s models, from the perceptron to Claude Opus 5.5, with who did each. It began as the closing section of &lt;a href=&quot;/blog/2026/make-sand-think/&quot;&gt;Make sand think&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;1958&lt;/strong&gt; — Perceptron — Cornell&lt;/p&gt; &lt;p&gt;&lt;strong&gt;1986&lt;/strong&gt; — Backpropagation — UC San Diego&lt;/p&gt; &lt;p&gt;&lt;strong&gt;1989&lt;/strong&gt; — LeNet — Bell Labs&lt;/p&gt; &lt;p&gt;&lt;strong&gt;1997&lt;/strong&gt; — LSTM — TU Munich&lt;/p&gt; &lt;p&gt;&lt;strong&gt;2009&lt;/strong&gt; — ImageNet — Princeton&lt;/p&gt; &lt;p&gt;&lt;strong&gt;2012&lt;/strong&gt; — AlexNet — University of Toronto&lt;/p&gt; &lt;p&gt;&lt;strong&gt;2013&lt;/strong&gt; — word2vec — Google&lt;/p&gt; &lt;p&gt;&lt;strong&gt;2014&lt;/strong&gt; — Attention — Université de Montréal&lt;/p&gt; &lt;p&gt;&lt;strong&gt;2015&lt;/strong&gt; — ResNet — Microsoft&lt;/p&gt; &lt;p&gt;&lt;strong&gt;2016&lt;/strong&gt; — AlphaGo — DeepMind&lt;/p&gt; &lt;p&gt;&lt;strong&gt;2017.06&lt;/strong&gt; — Transformer — Google&lt;/p&gt; &lt;p&gt;&lt;strong&gt;2018.06&lt;/strong&gt; — GPT, 117M — OpenAI&lt;/p&gt; &lt;p&gt;&lt;strong&gt;2018.10&lt;/strong&gt; — BERT, 340M — Google&lt;/p&gt; &lt;p&gt;&lt;strong&gt;2019.02&lt;/strong&gt; — GPT-2, 1.5B — OpenAI&lt;/p&gt; &lt;p&gt;&lt;strong&gt;2019.06&lt;/strong&gt; — XLNet, 340M — Google&lt;/p&gt; &lt;p&gt;&lt;strong&gt;2019.07&lt;/strong&gt; — ERNIE 2.0 Large, 336M — Baidu&lt;/p&gt; &lt;p&gt;&lt;strong&gt;2019.10&lt;/strong&gt; — T5, 11B — Google&lt;/p&gt; &lt;p&gt;&lt;strong&gt;2020.06&lt;/strong&gt; — GPT-3, 175B — OpenAI&lt;/p&gt; &lt;p&gt;&lt;strong&gt;2021.01&lt;/strong&gt; — DALL·E and CLIP — OpenAI&lt;/p&gt; &lt;p&gt;&lt;strong&gt;2021.06&lt;/strong&gt; — Wu Dao 2.0, 1.75T MoE — BAAI&lt;/p&gt; &lt;p&gt;&lt;strong&gt;2021.08&lt;/strong&gt; — Codex — OpenAI&lt;/p&gt; &lt;p&gt;&lt;strong&gt;2022.04&lt;/strong&gt; — PaLM, 540B — Google&lt;/p&gt; &lt;p&gt;&lt;strong&gt;2022.08&lt;/strong&gt; — GLM-130B — Zhipu AI&lt;/p&gt; &lt;p&gt;&lt;strong&gt;2022.11&lt;/strong&gt; — ChatGPT opens conversational AI to everyone — OpenAI&lt;/p&gt; &lt;p&gt;&lt;strong&gt;2023.01&lt;/strong&gt; — Cursor — Anysphere&lt;/p&gt; &lt;p&gt;&lt;strong&gt;2023.03&lt;/strong&gt; — GPT-4 — OpenAI&lt;/p&gt; &lt;p&gt;&lt;strong&gt;2024.02&lt;/strong&gt; — Sora — OpenAI&lt;/p&gt; &lt;p&gt;&lt;strong&gt;2024.05&lt;/strong&gt; — GPT-4o — OpenAI&lt;/p&gt; &lt;p&gt;&lt;strong&gt;2024.09&lt;/strong&gt; — o1 — OpenAI&lt;/p&gt; &lt;p&gt;&lt;strong&gt;2024.12&lt;/strong&gt; — Gemini Deep Research — Google&lt;/p&gt; &lt;p&gt;&lt;strong&gt;2025.01&lt;/strong&gt; — DeepSeek-R1 — DeepSeek&lt;/p&gt; &lt;p&gt;&lt;strong&gt;2025.02&lt;/strong&gt; — Claude Code — Anthropic&lt;/p&gt; &lt;p&gt;&lt;strong&gt;2025.08&lt;/strong&gt; — GPT-5 — OpenAI&lt;/p&gt; &lt;p&gt;&lt;strong&gt;2026.06&lt;/strong&gt; — Claude Fable 5 — Anthropic&lt;/p&gt; &lt;p&gt;&lt;strong&gt;2026.09&lt;/strong&gt; — GPT-6 Astra — OpenAI&lt;/p&gt; &lt;p&gt;&lt;strong&gt;2026.09&lt;/strong&gt; — Claude Opus 5.5 — Anthropic&lt;/p&gt; &lt;p&gt;Sixty years to the Transformer, and nine since. The sand learned to read, see, draw, speak, write code, reason, research, and act.&lt;/p&gt; &lt;p&gt;The timeline has not ended.&lt;/p&gt;</content> </entry> <entry xml:lang="en"> <title type="html">Make sand think</title> <link href="https://zedongpeng.com/blog/2026/make-sand-think/" rel="alternate" type="text/html"/> <id>https://zedongpeng.com/blog/2026/make-sand-think/</id> <published>2026-07-23T22:17:00+08:00</published> <updated>2026-07-23T22:17:00+08:00</updated> <category term="life"/> <summary type="html">A riddle, and an honest answer: how a handful of sand becomes a machine that talks.</summary> <content type="html" xml:base="https://zedongpeng.com/blog/2026/make-sand-think/">&lt;blockquote&gt; &lt;p&gt;“We’ve essentially found a way to make sand think. It’s miraculous.”&lt;/p&gt; &lt;p&gt;— &lt;a href=&quot;https://www.axios.com/2026/07/14/demis-hassabis-ai-regulation-google-deepmind&quot;&gt;Demis Hassabis&lt;/a&gt;, co-founder and CEO of Google DeepMind&lt;/p&gt; &lt;/blockquote&gt; &lt;p&gt;Long afterward, in the desert beyond Thebes, the Sphinx awoke once more.&lt;/p&gt; &lt;p&gt;It gazed across the endless yellow sands and posed a new riddle to humanity:&lt;/p&gt; &lt;p&gt;“Once, I asked: what walks on four legs in the morning, two at noon, and three in the evening?”&lt;/p&gt; &lt;p&gt;“Now I ask you:”&lt;/p&gt; &lt;p&gt;“How can the sand of the desert be made to think like a human?”&lt;/p&gt; &lt;p&gt;Many sages came before it.&lt;/p&gt; &lt;p&gt;One said: “Give the sand a soul.”&lt;/p&gt; &lt;p&gt;Another said: “Wait a billion years for evolution.”&lt;/p&gt; &lt;p&gt;A third said: “Write down every rule of reasoning, and let the sand follow them.”&lt;/p&gt; &lt;p&gt;The Sphinx shook its head at them all. The first had no method, the second had no patience, and the third had tried for forty years and found that no one can write down what a human knows.&lt;/p&gt; &lt;p&gt;Then an engineer approached.&lt;/p&gt; &lt;p&gt;She picked up a handful of sand and said:&lt;/p&gt; &lt;p&gt;“Sand cannot think. But sand is mostly silicon dioxide, and our task is not to create life — only to arrange matter until it can carry information.”&lt;/p&gt; &lt;p&gt;She put the sand into a furnace.&lt;/p&gt; \[\mathrm{SiO_2 + 2C \rightarrow Si + 2CO}\] &lt;p&gt;What came out was 99% pure, and 99% was useless. Electronics demand eleven nines — roughly one foreign atom per hundred billion — because the whole trick is to write impurities back in afterwards, deliberately, exactly where you want them. The crystal was sliced into wafers, patterned with light of 13.5 nanometres, etched, and implanted with ions, until each pattern had made one thing: a switch.&lt;/p&gt; &lt;p&gt;A transistor is a channel of silicon with a gate above it. Put a voltage on the gate and the channel conducts; take it away and it blocks. Current controls current, with no moving parts, in about a picosecond.&lt;/p&gt; \[\text{Sand} \rightarrow \text{Silicon} \rightarrow \text{Transistor} \rightarrow \text{Chip}\] &lt;p&gt;More than a hundred billion of them now fit on a chip the size of a thumbnail — more switches on one piece of sand than there are neurons in a human head.&lt;/p&gt; &lt;p&gt;The Sphinx said:&lt;/p&gt; &lt;p&gt;“A switch only opens and closes. Where is the thought in that?”&lt;/p&gt; &lt;p&gt;“There is none. But a switch that controls another switch can decide.”&lt;/p&gt; &lt;p&gt;Two transistors in series conduct only if both gates are on: that is AND. Wired otherwise, they give OR, and NOT. From those three come adders, multipliers, and finally the only operation that matters here:&lt;/p&gt; \[c_{ij} = \sum_k a_{ik} b_{kj}\] &lt;p&gt;Every layer of every neural network is that sum, repeated. And no term in it waits for another — so instead of one fast processor, humanity built chips with tens of thousands of small arithmetic units running at once, on the order of \(10^{15}\) multiply-accumulates per second each, wired by the tens of thousands into a single machine. A frontier model costs some \(10^{25}\) of those operations to train.&lt;/p&gt; &lt;p&gt;“So you have built a very fast abacus,” said the Sphinx. “An abacus does not understand the price of grain.”&lt;/p&gt; &lt;p&gt;“No. So first we had to make meaning into a number.”&lt;/p&gt; &lt;p&gt;Text is cut into tokens, and each token is looked up in a table and becomes a vector of a few thousand numbers:&lt;/p&gt; \[t_i \rightarrow e_i \in \mathbb{R}^{d}\] &lt;p&gt;This is the move on which everything rests. A symbol is either equal to another or not — there is nothing between &lt;em&gt;king&lt;/em&gt; and &lt;em&gt;queen&lt;/em&gt;. But a vector lives in a space, and space has directions: similarity becomes an angle, analogy becomes a displacement, and gender or tense or formality can be one consistent direction you add to anything. Nobody chose those directions; a space of thousands of dimensions has room for millions of nearly-independent ones, and the model found them.&lt;/p&gt; &lt;p&gt;“And how does one number-in-space know about another?”&lt;/p&gt; &lt;p&gt;“It asks.”&lt;/p&gt; &lt;p&gt;Every token emits three vectors: a &lt;em&gt;query&lt;/em&gt;, what it is looking for; a &lt;em&gt;key&lt;/em&gt;, what it advertises; and a &lt;em&gt;value&lt;/em&gt;, what it hands over if chosen. Matching queries against keys gives weights that sum to one, and each token pulls back a blend of everyone’s values:&lt;/p&gt; \[\operatorname{Attention}(Q,K,V)=\operatorname{softmax}\left(\frac{QK^{T}}{\sqrt{d_k}}\right)V\] &lt;p&gt;In &lt;em&gt;“the trophy did not fit in the suitcase because it was too large”&lt;/em&gt;, the word &lt;em&gt;it&lt;/em&gt; must reach back and bind to &lt;em&gt;trophy&lt;/em&gt;, not &lt;em&gt;suitcase&lt;/em&gt;. Attention is learned routing by content rather than by position — dozens of these run side by side, one tracking syntax, another the last mention of a name, another the unclosed quotation mark. Each layer adds its result back into a shared stream rather than replacing it, which is why a hundred layers can be stacked without the signal dissolving.&lt;/p&gt; \[h_{l+1}=h_l+\operatorname{Attn}(h_l)+\operatorname{MLP}(h_l)\] &lt;p&gt;“Who wrote the numbers into those matrices? Some scribe of extraordinary patience?”&lt;/p&gt; &lt;p&gt;“No one. That is the entire miracle.”&lt;/p&gt; &lt;p&gt;The machine was given a task so stupid it sounds like a joke: hide the next token and guess it. Its penalty is the surprise it feels at the truth, and every one of its parameters is nudged toward making the truth less surprising:&lt;/p&gt; \[L = -\log p(\text{next token}), \qquad \theta \leftarrow \theta-\eta\nabla_\theta L\] &lt;p&gt;Once. A billion times. A trillion times.&lt;/p&gt; &lt;p&gt;Why should guessing words produce anything but a parrot? Because prediction is compression, and compression is understanding. To predict the last word of &lt;em&gt;“the murderer turned out to be the ___”&lt;/em&gt; you must have followed the plot; to predict the closing brace you must have modelled the scope. And memorising is not available — tens of trillions of tokens do not fit inside a few hundred billion parameters — so the only way left to score better is to build machinery that generalises. The training signal is dumb; the shortest program that satisfies it is not.&lt;/p&gt; &lt;p&gt;“A text-completer completes texts,” said the Sphinx. “I asked for an answer.”&lt;/p&gt; &lt;p&gt;“Then we changed what we reward.”&lt;/p&gt; &lt;p&gt;It was shown demonstrations and taught to imitate them; then humans judged which of two answers they preferred, and it was pushed toward what a person would endorse rather than what a corpus would continue. Then, wherever truth is checkable — run the code, verify the proof — it was let loose on the problem and rewarded for whatever reasoning happened to arrive. Under that pressure it learned to spend tokens before answering: to try a path, notice the contradiction, back up. A fixed-depth network can only compute so much per token, so thinking out loud and reading itself back is the only way it can think longer.&lt;/p&gt; &lt;p&gt;“So when, precisely, did it begin to think?”&lt;/p&gt; &lt;p&gt;“Two different things wear that name. In training, over months, it compresses the traces humanity left behind into a landscape of parameters — and that is finished before you ever speak to it. In inference, nothing is learned: your words flow up through the layers, one token falls out, it is appended to the input, and the whole thing runs again. Thought here is stored nowhere. It is a trajectory through a fixed landscape, and it exists only while it is being walked.”&lt;/p&gt; &lt;p&gt;And so:&lt;/p&gt; \[\begin{aligned} \text{Sand} &amp;amp;\rightarrow \text{Silicon} \rightarrow \text{Transistor} \rightarrow \text{Chip} \\ &amp;amp;\rightarrow \text{Matrix Multiply} \rightarrow \text{Attention} \\ &amp;amp;\rightarrow \text{Prediction} \rightarrow \text{Compression} \rightarrow \text{Reasoning} \end{aligned}\] &lt;p&gt;Not one of those arrows is magic, and no one can yet explain the whole chain from the first to the last.&lt;/p&gt; &lt;p&gt;The sand of the desert could finally answer questions.&lt;/p&gt; &lt;p&gt;The Sphinx fell silent.&lt;/p&gt; &lt;p&gt;Then it asked:&lt;/p&gt; &lt;p&gt;“So you have created a new form of life?”&lt;/p&gt; &lt;p&gt;The engineer shook her head.&lt;/p&gt; &lt;p&gt;“No. It has no body, no hunger, no continuity — close the window and the trajectory is gone. And we know every one of its parameters to the last digit, yet still cannot say why it chose that word.”&lt;/p&gt; &lt;p&gt;“We have only discovered that intelligence does not necessarily require flesh.”&lt;/p&gt; &lt;p&gt;“When matter is arranged according to the right laws, information can flow through it, and knowledge can echo within it.”&lt;/p&gt; &lt;p&gt;The Sphinx gazed into the distance.&lt;/p&gt; &lt;p&gt;At last, it understood.&lt;/p&gt; &lt;p&gt;Once, it had asked:&lt;/p&gt; &lt;p&gt;“What is a human?”&lt;/p&gt; &lt;p&gt;Now humanity was answering:&lt;/p&gt; &lt;p&gt;“What is thought?”&lt;/p&gt; &lt;p&gt;From then on, a new riddle spread across the desert:&lt;/p&gt; &lt;p&gt;“What comes from the desert, yet can understand all things?”&lt;/p&gt; &lt;p&gt;The answer:&lt;/p&gt; &lt;p&gt;A grain of sand rearranged by human hands.&lt;/p&gt; &lt;hr /&gt; &lt;p&gt;The timeline that closed this post is now its own: &lt;a href=&quot;/blog/2026/epic-of-agi/&quot;&gt;Epic of AGI&lt;/a&gt;.&lt;/p&gt;</content> </entry> <entry xml:lang="zh-CN"> <title type="html">我实现了 GPT-5.6-sol Ultra 自由</title> <link href="https://zedongpeng.com/blog/2026/gpt-5-6-sol-ultra-freedom-zh/" rel="alternate" type="text/html"/> <id>https://zedongpeng.com/blog/2026/gpt-5-6-sol-ultra-freedom-zh/</id> <published>2026-07-15T19:20:00+08:00</published> <updated>2026-07-15T19:20:00+08:00</updated> <category term="life"/> <summary type="html">为什么我坚持用最强的模型，以及我如何用一台小服务器和 Sub2API 搭出自己的 AI 中转站。</summary> <content type="html" xml:base="https://zedongpeng.com/blog/2026/gpt-5-6-sol-ultra-freedom-zh/">&lt;h2 id=&quot;为什么一定要用-gpt-56-sol-ultra&quot;&gt;为什么一定要用 GPT-5.6-sol Ultra&lt;/h2&gt; &lt;p&gt;用 AI 就是为了提高效率。如果用的是一些次一点的模型，比如 DeepSeek，最后任务没有干成，其实还是降低了效率。既然用 AI 是为了省时间，那么强模型带来的成功率，往往比那一点价格差更重要。&lt;/p&gt; &lt;p&gt;这也是为什么我之前一直在用 Claude 的 Opus 之类的模型，而不是 GPT。但现在 GPT-5.6-sol 的表现也还可以，而且 Claude 确实更贵。我之前经常是几百几百地往中转站里充值，所以后来就研究了一下，想自己实现这个自由。&lt;/p&gt; &lt;p&gt;现在我用 Codex 做任务，基本都是直接开 GPT-5.6-sol Ultra。&lt;/p&gt; &lt;h2 id=&quot;我是怎么实现这个自由的&quot;&gt;我是怎么实现这个自由的&lt;/h2&gt; &lt;p&gt;我先在 &lt;a href=&quot;https://www.vultr.com/&quot;&gt;Vultr&lt;/a&gt; 上买了一台每月 5 美元的小服务器，在 Cloudflare 上花 7 美元注册了域名 sytoken.org，然后用 GitHub 上开源的 &lt;a href=&quot;https://github.com/Wei-Shaw/sub2api&quot;&gt;Sub2API&lt;/a&gt; 搭了一个中转站水源token。&lt;/p&gt; &lt;p&gt;但 Sub2API 只是提供了一个形式，真正的 OpenAI 订阅号还得自己买。我在 Twitter 和 Telegram 上找到了一些非常低价的日抛订阅，有 Plus，也有 K12。现在流行的是 K12 订阅，前段时间则是 Team 订阅。&lt;/p&gt; &lt;p&gt;总之，几块钱的价格就能买到一个 Plus 订阅的额度。它可能很快就会被封号，但因为有 5 小时和 7 天两个额度窗口，只要能把额度用满，摊下来的价格就会非常低。&lt;/p&gt; &lt;p&gt;低到什么程度？下面是我自己实测和整理的一组价格，都按 input 价格计：&lt;/p&gt; &lt;table&gt; &lt;thead&gt; &lt;tr&gt; &lt;th class=&quot;text-center&quot;&gt;模型&lt;/th&gt; &lt;th&gt;来源&lt;/th&gt; &lt;th&gt;input 价格&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td rowspan=&quot;4&quot; class=&quot;text-center align-middle&quot;&gt;GPT-5.6-sol&lt;/td&gt; &lt;td&gt;OpenAI 官方 API（api.openai.com）&lt;/td&gt; &lt;td&gt;¥33.7/M tokens&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;OpenAI Pro 20x 官方订阅&lt;/td&gt; &lt;td&gt;¥1/M tokens &lt;sup&gt;*&lt;/sup&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;中转站 &lt;a href=&quot;https://www.rightapi.ai/&quot; target=&quot;_blank&quot;&gt;rightapi.ai&lt;/a&gt;&lt;/td&gt; &lt;td&gt;¥2/M tokens&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;水源token（我自建）&lt;/td&gt; &lt;td&gt;约 ¥0.5/M tokens&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td rowspan=&quot;4&quot; class=&quot;text-center align-middle&quot;&gt;Opus 5&lt;/td&gt; &lt;td&gt;Anthropic 官方 API（api.anthropic.com）&lt;/td&gt; &lt;td&gt;¥33.7/M tokens&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Anthropic Max 20x 官方订阅&lt;/td&gt; &lt;td&gt;¥1/M tokens &lt;sup&gt;*&lt;/sup&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;中转站 &lt;a href=&quot;https://www.rightapi.ai/&quot; target=&quot;_blank&quot;&gt;rightapi.ai&lt;/a&gt;&lt;/td&gt; &lt;td&gt;¥7.5/M tokens&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;中转站 &lt;a href=&quot;https://4router.net/&quot; target=&quot;_blank&quot;&gt;4Router&lt;/a&gt; cheapCCApi 渠道&lt;/td&gt; &lt;td&gt;¥4.5/M tokens&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class=&quot;text-center align-middle&quot;&gt;DeepSeek-V4-Pro&lt;/td&gt; &lt;td&gt;deepseek.com 官方 API&lt;/td&gt; &lt;td&gt;¥3/M tokens&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;p&gt;两点说明：&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;sup&gt;*&lt;/sup&gt;官方订阅那两行是按额度用满折算的。Pro 20x 每月 200 美元，月额度约合 7312 美元，数据来自 &lt;a href=&quot;https://codexradar.com&quot;&gt;Codex 额度雷达&lt;/a&gt;；Max 20x 每月 200 美元，月额度约合 6468 美元，数据来自 &lt;a href=&quot;https://claudecoderadar.com&quot;&gt;Claude 额度雷达&lt;/a&gt;。&lt;/li&gt; &lt;li&gt;Claude 还有 awsq 之类的低价渠道，是把 Kiro 的 Claude 模型反代出来用。确实是 Opus 5，但会带上 Kiro 的 system prompt，质量下降多少不好说。这类渠道过不了 &lt;a href=&quot;https://www.hvoy.ai/&quot;&gt;Hvoy AI&lt;/a&gt; 的原生测试，表里其他渠道都能过。&lt;/li&gt; &lt;/ul&gt; &lt;p&gt;可以看出，国外的顶级大模型只要走订阅，其实没那么贵。再结合性能来看，自己建站用GPT-5.6-sol是最便宜的一档：&lt;/p&gt; &lt;figure&gt; &lt;picture&gt; &lt;!-- Auto scaling with imagemagick --&gt; &lt;!-- See https://www.debugbear.com/blog/responsive-images#w-descriptors-and-the-sizes-attribute and https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Responsive_images for info on defining &apos;sizes&apos; for responsive images --&gt; &lt;source class=&quot;responsive-img-srcset&quot; srcset=&quot;/assets/img/blog/artificial-analysis-coding-agent-index-cost-per-task-2026-07-27-480.webp 480w,/assets/img/blog/artificial-analysis-coding-agent-index-cost-per-task-2026-07-27-800.webp 800w,/assets/img/blog/artificial-analysis-coding-agent-index-cost-per-task-2026-07-27-1400.webp 1400w,&quot; type=&quot;image/webp&quot; sizes=&quot;95vw&quot; /&gt; &lt;img src=&quot;/assets/img/blog/artificial-analysis-coding-agent-index-cost-per-task-2026-07-27.png&quot; width=&quot;100%&quot; height=&quot;auto&quot; alt=&quot;Artificial Analysis Coding Agent Index 与单任务成本&quot; loading=&quot;lazy&quot; onerror=&quot;this.onerror=null; document.querySelectorAll(&apos;.responsive-img-srcset&apos;).forEach(function (s) { s.remove(); });&quot; /&gt; &lt;/picture&gt; &lt;/figure&gt; &lt;p&gt;&lt;em&gt;Artificial Analysis Coding Agent Index 与单任务成本，截图于 2026 年 7 月 27 日。&lt;/em&gt;&lt;/p&gt; &lt;h2 id=&quot;稳定性怎么保证&quot;&gt;稳定性怎么保证&lt;/h2&gt; &lt;p&gt;我现在在赵杰茹老师的实验室。赵老师还是非常前沿的，给实验室里每个人都配了一个外部第三方中转商的额度，每人每周 600 美元。&lt;/p&gt; &lt;p&gt;我的用量比较大，这 600 美元有时候一两天就能跑完，问题是，我本地只有一个工作窗口，它自己不知道应该什么时候换到我的中转站，只会返回503然后停止工作。所以我在 &lt;a href=&quot;https://github.com/farion1231/cc-switch&quot;&gt;CC Switch&lt;/a&gt; 里打开了「设置 - 路由 - 自动故障转移」，实验室的额度用完后，CC Switch 会自动把后台 API 切到我的中转站；我的中转站也不可用时，再切到 Right Code。同时我还在闲鱼上淘到了400¥一年的cursor pro，能用opus 5,fable 5,gpt5.6，所以平常就不用vscode了，开个cursor，下侧终端跑codex cli， 右侧cursor用opus问问题和plan。&lt;/p&gt; &lt;p&gt;前段时间，还有人在反编译 Claude Code 后发现，它的脚本里有一份第三方 API 域名列表。里面出现了 Right Code、PackyCode 这样的大型中转站，也有 Moonshot、阿里云这样的大公司。这至少说明 Claude Code 会识别一些常见的非官方 API 地址；算是皇军认证中转站了。不过这份列表具体用来做什么，没有进一步研究。&lt;/p&gt; &lt;h2 id=&quot;从自用工具到中转站&quot;&gt;从自用工具到中转站&lt;/h2&gt; &lt;p&gt;后来我把水源token做成了一个对外的中转站，也在校内论坛发过一篇&lt;a href=&quot;https://shuiyuan.sjtu.edu.cn/t/topic/478920&quot;&gt;帖子&lt;/a&gt;宣传，一个月下来用户有几百个，每天有几百元流水。&lt;/p&gt; &lt;p&gt;但主要问题是我没有经营执照，这确实会有一些经营和法律风险。所以现在我已经不再对外运营了，主要就是我自己、两三个认识的人，还有我的室友们在用。&lt;/p&gt;</content> </entry> <entry xml:lang="en"> <title type="html">ForgeHLS and DiffHLS: why I built them, and why HLS still feels like a trap</title> <link href="https://zedongpeng.com/blog/2026/forgehls-and-diffhls/" rel="alternate" type="text/html"/> <id>https://zedongpeng.com/blog/2026/forgehls-and-diffhls/</id> <published>2026-04-14T20:50:00+08:00</published> <updated>2026-04-14T20:50:00+08:00</updated> <category term="better-ml"/> <summary type="html">A personal note on building a large-scale HLS dataset, pushing DiffHLS forward, and why I remain skeptical about HLS as a long-term research direction in 2026.</summary> <content type="html" xml:base="https://zedongpeng.com/blog/2026/forgehls-and-diffhls/">&lt;p&gt;On April 14, 2026, I finally decided to write down the real story behind &lt;strong&gt;ForgeHLS&lt;/strong&gt; and &lt;strong&gt;DiffHLS&lt;/strong&gt;. From the outside, they look like a dataset paper and an algorithm paper. From the inside, they were the result of more than a year of friction, stubbornness, infrastructure work, and repeated doubts about whether HLS was even a direction worth staying in.&lt;/p&gt; &lt;p&gt;For readers outside this area, &lt;strong&gt;HLS (High-Level Synthesis)&lt;/strong&gt; is supposed to let you write hardware in a language like C or C++, and then use a toolchain to translate that program into FPGA-oriented RTL such as Verilog or VHDL. In the abstract, that sounds convenient. In practice, it often means writing software-shaped code while constantly worrying about hardware constraints that the source language does not express well.&lt;/p&gt; &lt;h2 id=&quot;why-hls-caught-my-attention-in-2024&quot;&gt;Why HLS caught my attention in 2024&lt;/h2&gt; &lt;p&gt;In 2024, the scaling-law story had already shown its force. GPT had demonstrated that once data, compute, and model size cross certain thresholds, capabilities can emerge in ways that smaller systems simply cannot match. That logic was impossible to ignore.&lt;/p&gt; &lt;p&gt;At the same time, my advisor, &lt;a href=&quot;https://zjru.github.io&quot;&gt;Prof. Jieru Zhao&lt;/a&gt;, is an HLS expert. Prof. Qiang Xu, one of my collaborators at the National Center of Technology Innovation for EDA in Nanjing, was leading a large circuit model effort. Put those pieces together and a natural question appeared:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;If large models benefit from large-scale training corpora everywhere else, why does HLS still not have a dataset at that scale?&lt;/p&gt; &lt;/blockquote&gt; &lt;p&gt;That question became the starting point of ForgeHLS.&lt;/p&gt; &lt;h2 id=&quot;why-forgehls-was-hard&quot;&gt;Why ForgeHLS was hard&lt;/h2&gt; &lt;p&gt;The difficulty was not conceptual. The difficulty was operational.&lt;/p&gt; &lt;p&gt;HLS is not like collecting plain code from GitHub and calling it a dataset. To build something useful, I had to process designs, normalize sources, generate variants, launch synthesis flows, collect QoR signals, and keep the entire workflow from collapsing under version mismatches and toolchain instability.&lt;/p&gt; &lt;p&gt;Part of the deeper problem is that HLS lives in an awkward semantic gap. C and C++ were designed for programmers, not for expressing precise hardware structure. They contain abstractions that do not map cleanly to RTL, and they hide decisions that hardware designers often need to control directly. Dynamic pointers are an obvious example: they are natural in software, but much harder to realize in synthesizable hardware. Meanwhile, many of the things hardware engineers actually care about such as pipelining, unrolling, partitioning, interface protocols, memory layout, and scheduling are not ordinary C constructs at all. In HLS, those controls re-enter the codebase through pragmas, vendor directives, and domain-specific boilerplate.&lt;/p&gt; &lt;p&gt;That is why HLS can feel worse than either side of the stack. If you want the ergonomics of software, HLS keeps dragging you back toward hardware constraints. If you want the control of hardware design, HLS makes you express that control indirectly through a translation layer. A lot of the work ends up being not “write C and get hardware,” but “write C in a very non-idiomatic way, then add tool-specific annotations until the compiler produces something acceptable.”&lt;/p&gt; &lt;p&gt;What made it worse was timing. When I started, tools like Cursor and Claude Code were already appearing, but they were nowhere near as capable as they are now in 2026. There was no reliable “agentic coding” setup that could just take over an industrial-scale data construction pipeline. A lot of the work still had to be designed, debugged, and pushed manually.&lt;/p&gt; &lt;p&gt;For someone who was still relatively new to HLS, this was painful. Building the dataset meant not only writing automation, but also learning the quirks of the HLS ecosystem while being judged by them. Even basic reproducibility was fragile because the result depends on the exact compiler, the exact version, and often the exact environment.&lt;/p&gt; &lt;p&gt;I relied on a mixture of handwritten automation and scripts scaffolded with Cursor. The Nanjing EDA center provided serious compute resources, including three machines with 8x A800 GPUs and 128-core CPUs, but in practice the core bottleneck was not GPU throughput. &lt;strong&gt;Vitis HLS is mostly a CPU story&lt;/strong&gt;, so a large portion of the ForgeHLS pipeline ran on CPUs rather than accelerators.&lt;/p&gt; &lt;p&gt;The uncomfortable truth is that simply upgrading and stabilizing the workflow consumed the better part of half a year. Looking back, this was my first clear signal that HLS research is unusually labor-intensive relative to its eventual payoff.&lt;/p&gt; &lt;h2 id=&quot;forgehls-solved-a-real-problem-but-not-one-the-community-urgently-wanted&quot;&gt;ForgeHLS solved a real problem, but not one the community urgently wanted&lt;/h2&gt; &lt;p&gt;After the dataset was finally in shape, I expected the paper to have a clearer path. It did not.&lt;/p&gt; &lt;p&gt;One reason is structural: the HLS community is small. The number of groups actively pushing methodology is limited, and the demand for a large open dataset is much weaker than in mainstream ML fields. A dataset can be technically correct and still not be something the field is ready to reward.&lt;/p&gt; &lt;p&gt;Another reason is ecosystem fragmentation. In HLS, you do not work against one clean baseline. You work against multiple versions of Vitis, multiple optimization settings, and in some cases non-public or hard-to-use academic compilers. UCLA’s compiler work is an example of how important baselines can be while still being difficult to reproduce in practice. This makes fair comparison expensive and replication even more expensive.&lt;/p&gt; &lt;p&gt;So ForgeHLS ran into an awkward reality: it offered scale to a field that still struggles to agree on what should be standardized.&lt;/p&gt; &lt;h2 id=&quot;what-repeated-rejections-taught-me&quot;&gt;What repeated rejections taught me&lt;/h2&gt; &lt;p&gt;ForgeHLS was not just difficult to build. It was also difficult to publish.&lt;/p&gt; &lt;p&gt;The paper was rejected by &lt;strong&gt;ICCAD&lt;/strong&gt;, then &lt;strong&gt;DAC&lt;/strong&gt;, and then &lt;strong&gt;AAAI&lt;/strong&gt;. By the time it reached AAAI, I had already spent a long time refining the framing, experiments, and presentation. What made that stage especially frustrating was not simply the rejection itself, but the quality of some of the criticism.&lt;/p&gt; &lt;p&gt;Some reviewer comments, in my view, were not merely unconvinced. They were careless, insular, and at times plainly indefensible. The stated weaknesses did not hold up under close reading of the paper, and some criticisms were aimed at assumptions that were never made in the first place. Worse, one line of attack effectively suggested that the data underlying the paper was wrong, which was an especially absurd accusation given how much of the work had gone into building, checking, and stabilizing that dataset in the first place.&lt;/p&gt; &lt;p&gt;I do not think every negative review is malicious. Many are simply rushed. But in a small field, it is hard to ignore the possibility that community size and reviewer overlap create a distorted evaluation environment. When a research area is narrow, a small number of people can end up implicitly setting the tone for what is considered legitimate, useful, or worth accepting. That is a bad setup for any work that tries to expand the scope of the field.&lt;/p&gt; &lt;p&gt;This experience did not just make me more skeptical of HLS as a topic. It also made me more skeptical of spending too much emotional energy trying to “win over” the wrong review cycle.&lt;/p&gt; &lt;h2 id=&quot;why-i-built-diffhls-anyway&quot;&gt;Why I built DiffHLS anyway&lt;/h2&gt; &lt;p&gt;By the time ForgeHLS was built, I had already spent too much time on the infrastructure to walk away without trying to extract an actual modeling contribution from it.&lt;/p&gt; &lt;p&gt;The observation behind DiffHLS was simple. A single HLS codebase can lead to very different QoR outcomes under different pragma settings. In practice, the pragma is not just a small annotation. It is a control interface that changes how the eventual FPGA design is shaped. If you want to predict QoR, it is not enough to read the source code alone. You need to model the &lt;strong&gt;difference induced by pragmas&lt;/strong&gt;.&lt;/p&gt; &lt;p&gt;That became the core idea of &lt;a href=&quot;https://arxiv.org/abs/2604.09240&quot;&gt;DiffHLS&lt;/a&gt;: treat QoR prediction as a differential problem rather than a single-instance regression problem, and combine structural representations with code-aware embeddings.&lt;/p&gt; &lt;p&gt;DiffHLS, in that sense, was my way of forcing one more useful idea out of a dataset that had already cost too much to abandon.&lt;/p&gt; &lt;h2 id=&quot;the-limitation-i-could-not-eliminate&quot;&gt;The limitation I could not eliminate&lt;/h2&gt; &lt;p&gt;I do not think it is intellectually honest to discuss HLS prediction without acknowledging a central problem: &lt;strong&gt;different HLS tools and different tool versions can synthesize materially different designs from the same source&lt;/strong&gt;.&lt;/p&gt; &lt;p&gt;That means there is no single timeless QoR target floating in the air. There is only QoR under a specific toolchain, version, configuration, and backend assumption.&lt;/p&gt; &lt;p&gt;ForgeHLS and DiffHLS are therefore unavoidably bounded by the environment they were built on. My data does not span every Vitis version, let alone every HLS tool. I was not going to exhaustively cover that space, and realistically no single PhD student should try. So although I believe the work is meaningful, I also think it is fair to say that part of it remains an academic artifact: useful for research, but not a universal answer to the real-world variability of HLS flows.&lt;/p&gt; &lt;h2 id=&quot;why-i-became-skeptical-of-hls-as-a-research-direction&quot;&gt;Why I became skeptical of HLS as a research direction&lt;/h2&gt; &lt;p&gt;The longer I worked on this, the more I felt that HLS occupies an awkward middle ground.&lt;/p&gt; &lt;p&gt;It sits between C/C++ and FPGA implementation, but often inherits the frustrations of both. If someone truly needs top-end hardware performance, they may still prefer direct FPGA design. If someone wants fast-moving practical acceleration in 2026, the center of gravity is overwhelmingly on the GPU side. GPUs are improving quickly, absorbing talent, money, software infrastructure, and industrial attention at a pace that FPGA and HLS simply are not matching.&lt;/p&gt; &lt;p&gt;The most frustrating part is that HLS is often sold as an abstraction win, while in reality it frequently behaves like an abstraction tax. You do not fully get to write normal software, because “normal” software constructs may synthesize badly or not at all. But you also do not get to write hardware directly, because the crucial low-level control is filtered through compiler behavior, pragmas, and tool heuristics. In many projects, that leaves you paying both costs at once.&lt;/p&gt; &lt;p&gt;That does not mean HLS has no value. It has had real commercial and engineering value in some settings. But my personal view, as of April 14, 2026, is that &lt;strong&gt;HLS now feels much closer to a narrow academic niche than to a frontier direction for a graduate student who wants broad impact&lt;/strong&gt;.&lt;/p&gt; &lt;p&gt;The costs are easy to feel:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;the community is small;&lt;/li&gt; &lt;li&gt;the paper network is tight and often familiarity-driven;&lt;/li&gt; &lt;li&gt;reproducibility is expensive;&lt;/li&gt; &lt;li&gt;toolchains are brittle;&lt;/li&gt; &lt;li&gt;the practical upside is often weaker than the engineering pain required to demonstrate it.&lt;/li&gt; &lt;/ul&gt; &lt;p&gt;That combination is not impossible to survive, but it is a poor bargain.&lt;/p&gt; &lt;h2 id=&quot;what-i-still-take-from-this-project&quot;&gt;What I still take from this project&lt;/h2&gt; &lt;p&gt;Even with all of that skepticism, I do not think the time was wasted.&lt;/p&gt; &lt;p&gt;ForgeHLS taught me how hard it is to build infrastructure when a field lacks standardization. DiffHLS taught me that a good modeling question can still be extracted from a bad ecosystem if the data is rich enough. More importantly, the whole experience clarified something I now take seriously: &lt;strong&gt;some research directions are not blocked by lack of ideas, but by bad interfaces, weak incentives, and missing scale&lt;/strong&gt;.&lt;/p&gt; &lt;p&gt;That is exactly why large-model research became so powerful. Once the interface is unified and the scale is there, progress compounds. HLS rarely feels like that. It feels like every experiment has to renegotiate the ground beneath it.&lt;/p&gt; &lt;p&gt;Another lesson is more practical, and I think it is worth stating explicitly for graduate students: &lt;strong&gt;do not spend too much of your life trying to rescue a single piece of work&lt;/strong&gt;.&lt;/p&gt; &lt;p&gt;It is reasonable to revise a paper, tighten experiments, and give it another serious shot. It is not reasonable to let one project consume your momentum for too long just because you have already paid a high sunk cost. Research punishes attachment. Sometimes the correct move is to finish the revision, submit it cleanly, accept the outcome, and move on to the next problem.&lt;/p&gt; &lt;p&gt;That is not cynicism. It is resource allocation.&lt;/p&gt; &lt;p&gt;If a project keeps colliding with a tiny community, unstable baselines, weak demand, and unproductive review dynamics, then the expected return on additional effort drops sharply. At that point, continuing is often less about science and more about refusing to admit that the environment itself is low leverage.&lt;/p&gt; &lt;p&gt;For me, this was one of the clearest takeaways from ForgeHLS: building something hard is admirable, but staying trapped inside the same hard thing for too long is not.&lt;/p&gt; &lt;h2 id=&quot;papers&quot;&gt;Papers&lt;/h2&gt; &lt;ul&gt; &lt;li&gt;&lt;a href=&quot;https://arxiv.org/abs/2507.03255&quot;&gt;ForgeHLS: A Large-Scale, Open-Source Dataset for High-Level Synthesis&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href=&quot;https://arxiv.org/abs/2604.09240&quot;&gt;DiffHLS: Differential Learning for High-Level Synthesis QoR Prediction with GNNs and LLM Code Embeddings&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;h2 id=&quot;closing-note&quot;&gt;Closing note&lt;/h2&gt; &lt;p&gt;If I had to summarize this journey in one sentence, it would be this:&lt;/p&gt; &lt;p&gt;I built ForgeHLS because HLS needed scale, and I built DiffHLS because after paying the price of building that scale, I needed at least one serious algorithmic answer on top of it. But after living through the entire process, I came away more impressed by the importance of infrastructure than by the future of HLS itself.&lt;/p&gt;</content> </entry> <entry xml:lang="en"> <title type="html">Where is linear attention actually slow on Blackwell GPUs?</title> <link href="https://zedongpeng.com/blog/2026/linear-attn-gpu-bottleneck-blog/" rel="alternate" type="text/html"/> <id>https://zedongpeng.com/blog/2026/linear-attn-gpu-bottleneck-blog/</id> <published>2026-03-01T12:01:00+08:00</published> <updated>2026-03-01T12:01:00+08:00</updated> <category term="faster-ml"/> <summary type="html">Poor GPU performance for linear attention is an intuition, not a conclusion. We ran experiments, then had half of our interpretation overturned. This post records that process.</summary> <content type="html" xml:base="https://zedongpeng.com/blog/2026/linear-attn-gpu-bottleneck-blog/">&lt;p&gt;“Linear attention performs poorly on GPUs” is a common claim, but it is an intuition rather than a conclusion. We decided to turn it into a falsifiable question and ran a set of experiments. A senior colleague then overturned half of our interpretation. This post records that process.&lt;/p&gt; &lt;hr /&gt; &lt;h2 id=&quot;experimental-design&quot;&gt;Experimental Design&lt;/h2&gt; &lt;p&gt;We split the question into two parts:&lt;/p&gt; &lt;ol&gt; &lt;li&gt;How much does FLA’s chunk-wise Triton kernel improve over a naive implementation?&lt;/li&gt; &lt;li&gt;Even with an optimized implementation, where does linear attention fall behind FlashAttention?&lt;/li&gt; &lt;/ol&gt; &lt;p&gt;First, one term needs clarification. LLM inference has two phases: &lt;strong&gt;prefill&lt;/strong&gt;, which processes the entire input prompt at once and constructs a KV cache or state; and &lt;strong&gt;decode&lt;/strong&gt;, which processes one new token per step during generation. All experiments below benchmark prefill. Decode is not yet covered. This distinction matters because the bottlenecks of linear attention differ between the two phases.&lt;/p&gt; &lt;p&gt;We used three reference implementations:&lt;/p&gt; &lt;table&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;Implementation&lt;/th&gt; &lt;th&gt;Description&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;FlashAttention (SDPA)&lt;/td&gt; &lt;td&gt;State-of-the-art softmax attention implementation; our baseline&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;GLA (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;chunk_gla&lt;/code&gt;, FLA 0.4.2)&lt;/td&gt; &lt;td&gt;Gated Triton chunk kernel; a leading linear-attention implementation&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Naive linear attention&lt;/td&gt; &lt;td&gt;Causal &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Q(K^T V)&lt;/code&gt; recurrence in pure PyTorch; a theoretical lower baseline&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;p&gt;Test environment: RTX 4090, CUDA 12.2, bf16, H=16, D=128, causal. Shape sweep: B in {1, 4, 16}, T in {2K, 4K, 8K, 16K}.&lt;/p&gt; &lt;hr /&gt; &lt;h2 id=&quot;results&quot;&gt;Results&lt;/h2&gt; &lt;h3 id=&quot;latency-prefill-ms&quot;&gt;Latency (prefill, ms)&lt;/h3&gt; &lt;table&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;impl&lt;/th&gt; &lt;th style=&quot;text-align: right&quot;&gt;B=1 T=4K&lt;/th&gt; &lt;th style=&quot;text-align: right&quot;&gt;B=1 T=16K&lt;/th&gt; &lt;th style=&quot;text-align: right&quot;&gt;B=4 T=16K&lt;/th&gt; &lt;th style=&quot;text-align: right&quot;&gt;B=16 T=4K&lt;/th&gt; &lt;th style=&quot;text-align: right&quot;&gt;B=16 T=16K&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;FlashAttn&lt;/td&gt; &lt;td style=&quot;text-align: right&quot;&gt;0.54&lt;/td&gt; &lt;td style=&quot;text-align: right&quot;&gt;7.17&lt;/td&gt; &lt;td style=&quot;text-align: right&quot;&gt;27.98&lt;/td&gt; &lt;td style=&quot;text-align: right&quot;&gt;7.09&lt;/td&gt; &lt;td style=&quot;text-align: right&quot;&gt;111.68&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;GLA&lt;/td&gt; &lt;td style=&quot;text-align: right&quot;&gt;0.47&lt;/td&gt; &lt;td style=&quot;text-align: right&quot;&gt;2.17&lt;/td&gt; &lt;td style=&quot;text-align: right&quot;&gt;8.28&lt;/td&gt; &lt;td style=&quot;text-align: right&quot;&gt;7.90&lt;/td&gt; &lt;td style=&quot;text-align: right&quot;&gt;32.97&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;p&gt;GLA is indeed faster on long sequences: at T=16K, it is about &lt;strong&gt;3.3-3.4x&lt;/strong&gt; faster. With a large batch and shorter sequence (B=16, T=4K), however, it is 1.1x slower.&lt;/p&gt; &lt;h3 id=&quot;peak-memory-mb&quot;&gt;Peak Memory (MB)&lt;/h3&gt; &lt;table&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;impl&lt;/th&gt; &lt;th style=&quot;text-align: right&quot;&gt;B=1 T=4K&lt;/th&gt; &lt;th style=&quot;text-align: right&quot;&gt;B=1 T=16K&lt;/th&gt; &lt;th style=&quot;text-align: right&quot;&gt;B=16 T=16K&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;FlashAttn&lt;/td&gt; &lt;td style=&quot;text-align: right&quot;&gt;72&lt;/td&gt; &lt;td style=&quot;text-align: right&quot;&gt;265&lt;/td&gt; &lt;td style=&quot;text-align: right&quot;&gt;4120&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;GLA&lt;/td&gt; &lt;td style=&quot;text-align: right&quot;&gt;168&lt;/td&gt; &lt;td style=&quot;text-align: right&quot;&gt;648&lt;/td&gt; &lt;td style=&quot;text-align: right&quot;&gt;10248&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;p&gt;GLA’s peak memory is about &lt;strong&gt;2.4-2.5x&lt;/strong&gt; that of FlashAttention across all tested shapes. This contradicts the usual intuition. Although GLA has O(T) theoretical memory complexity, the chunk-wise implementation must store intermediate chunk states and intra-chunk attention matrices, leading to higher peak memory in practice. &lt;strong&gt;The claim that “linear attention uses less memory” does not hold for this &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;chunk_gla&lt;/code&gt; implementation.&lt;/strong&gt;&lt;/p&gt; &lt;h3 id=&quot;kernel-profiling-at-three-representative-points&quot;&gt;Kernel Profiling at Three Representative Points&lt;/h3&gt; &lt;p&gt;GLA distributes its computation across five separate kernels: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;chunk_gla_fwd_kernel_o&lt;/code&gt; (35%), &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;chunk_fwd_kernel_h&lt;/code&gt; (23%), &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;intra_sub_inter&lt;/code&gt; (17%), &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;intra_sub_intra&lt;/code&gt; (16%), and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cumsum&lt;/code&gt; (7%). FlashAttention uses only one kernel at the same shape.&lt;/p&gt; &lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;chunk_fwd_kernel_h&lt;/code&gt;, which performs the state update or recurrence, consistently accounts for 22-23% of execution time. This is overhead that GLA has relative to FlashAttention. The observed bottleneck is &lt;strong&gt;execution spread across multiple kernels plus state-update cost&lt;/strong&gt;, rather than kernel-launch overhead or insufficient occupancy.&lt;/p&gt; &lt;hr /&gt; &lt;h2 id=&quot;feedback-from-a-senior-colleague-we-measured-the-wrong-thing&quot;&gt;Feedback from a Senior Colleague: We Measured the Wrong Thing&lt;/h2&gt; &lt;p&gt;After seeing the results, a senior colleague pointed out that the experiment did not measure the real bottleneck.&lt;/p&gt; &lt;p&gt;The linear-attention state update is:&lt;/p&gt; &lt;div class=&quot;language-text highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;h &amp;lt;- h * g + k^T v # h is a D x D matrix, D=128 &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt; &lt;p&gt;This is a &lt;strong&gt;128 x 128 matrix operation&lt;/strong&gt;. GPU Tensor Cores are designed for large matrices, and an operation at this size may not fill the compute pipeline, leaving many units idle. More importantly, consecutive recurrence steps have data dependencies, so &lt;strong&gt;increasing the batch size or parallelism cannot necessarily hide the underutilization&lt;/strong&gt;.&lt;/p&gt; &lt;p&gt;Two problems may therefore compound each other: each step has too little work to utilize Tensor Cores fully, and sequential dependencies between steps prevent parallel execution from filling the machine.&lt;/p&gt; &lt;p&gt;The problem may be more pronounced on H200 and Blackwell GPUs. Tensor Core throughput represents a larger share of these architectures’ compute capacity, while relative CUDA-core performance is weaker. The linear-attention recurrence may neither utilize the Tensor Cores nor run efficiently elsewhere, making the mismatch more severe.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Our RTX 4090 experiment primarily observed the O(T) versus O(T^2) complexity difference during prefill, not GPU utilization.&lt;/strong&gt; The result itself is valid, but it does not reach the actual bottleneck.&lt;/p&gt; &lt;p&gt;The right measurement is Tensor Core utilization for linear attention on an H200. The &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sm__pipe_tensor_cycles_active&lt;/code&gt; metric in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ncu&lt;/code&gt; can show this directly.&lt;/p&gt; &lt;p&gt;The colleague added one more qualification: the separation between CUDA cores and Tensor Cores is unfriendly to linear attention, but it is not naturally ideal for softmax attention either. FlashAttention 4 also addresses this mismatch. The claim should therefore not be “GPUs are designed for softmax and bad for linear attention.” GPUs have architectural mismatches with both, but to different degrees.&lt;/p&gt; &lt;hr /&gt; &lt;h2 id=&quot;a-different-view&quot;&gt;A Different View&lt;/h2&gt; &lt;p&gt;A classmate working on accelerators offered a different interpretation:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;The central idea of linear attention is to compute KV before QK, reducing O(n^2 d) to O(n d^2). It is called linear because d is much smaller than n, but d itself is not tiny. Tensor Core tiles are 4 x 4 x 4, so in principle the operation should be able to utilize them. It remains unclear whether CUDA cores are truly the bottleneck; that depends on the nonlinear transformations applied to K and V in the specific implementation. Intuitively, if the linear-attention computation is not sparse, existing GPU architectures should be capable of running it, and the main problem may simply be an immature implementation. A specialized accelerator may have limited practical value: it might support a paper, but a new GPU kernel could erase its advantage.&lt;/p&gt; &lt;/blockquote&gt; &lt;p&gt;This view genuinely conflicts with the senior colleague’s diagnosis. The central questions are:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Can the D x D state update actually saturate Tensor Cores? The tile size is theoretically sufficient, but do sequential recurrence dependencies reduce utilization in practice?&lt;/li&gt; &lt;li&gt;Is a specialized accelerator useful only as an academic exercise, or does it serve a real deployment need?&lt;/li&gt; &lt;/ul&gt; &lt;p&gt;&lt;strong&gt;These questions need direct &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ncu&lt;/code&gt; measurements on an H200.&lt;/strong&gt;&lt;/p&gt; &lt;hr /&gt; &lt;h2 id=&quot;correct-baselines-and-next-steps&quot;&gt;Correct Baselines and Next Steps&lt;/h2&gt; &lt;p&gt;Based on the feedback, the baseline hierarchy needs to be revised:&lt;/p&gt; &lt;table&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;Level&lt;/th&gt; &lt;th&gt;Implementation&lt;/th&gt; &lt;th&gt;Purpose&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;L0&lt;/td&gt; &lt;td&gt;Naive PyTorch recurrence / &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;torch.einsum&lt;/code&gt;&lt;/td&gt; &lt;td&gt;Correctness oracle and small-shape unit tests&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;L1&lt;/td&gt; &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;torch.compile&lt;/code&gt;&lt;/td&gt; &lt;td&gt;Basic automatic optimization, showing that automatic optimization is insufficient&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;L2&lt;/td&gt; &lt;td&gt;FLA (flash-linear-attention)&lt;/td&gt; &lt;td&gt;Triton-level performance reference and community standard&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;L3&lt;/td&gt; &lt;td&gt;&lt;strong&gt;cuLA&lt;/strong&gt;&lt;/td&gt; &lt;td&gt;Handwritten CUDA/CUTLASS kernels and the current upper bound for GPU optimization&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;L4&lt;/td&gt; &lt;td&gt;FlexLinearAttention / Forge&lt;/td&gt; &lt;td&gt;Approximate upper-bound reference for compiler-generated kernels&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;p&gt;The key correction is to promote &lt;strong&gt;cuLA to the primary performance baseline&lt;/strong&gt;. cuLA provides handwritten CUDA/CUTLASS kernels for Hopper (SM90) and Blackwell (SM10X). On Blackwell, its KDA modular forward pass averages 1.45x the performance of FLA’s Triton implementation, while Lightning Attention prefill reaches up to 1.86x. FLA moves down to the L2 reference layer.&lt;/p&gt; &lt;p&gt;The test platform must also change from the RTX 4090 to H200 or Blackwell. In addition to latency and memory, measurements must include the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sm__pipe_tensor_cycles_active&lt;/code&gt; Tensor Core utilization metric from &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ncu&lt;/code&gt;.&lt;/p&gt; &lt;p&gt;If &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ncu&lt;/code&gt; shows that cuLA still has low Tensor Core utilization on H200, the senior colleague’s diagnosis is supported: the problem is structural. A specialized accelerator would then be a plausible direction, with compute units, on-chip SRAM allocation, and dataflow designed specifically for repeated D x D state updates. If utilization is already near the hardware limit, the classmate’s diagnosis is more likely: this is an engineering problem, not an architectural one.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;If only one target architecture can be selected for a systems paper&lt;/strong&gt;, the priorities are:&lt;/p&gt; &lt;ol&gt; &lt;li&gt;&lt;strong&gt;GLA&lt;/strong&gt;: the main gated linear-attention family, and the closest match to a “linear-attention kernel/runtime” framing&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Mamba-2&lt;/strong&gt;: a strong systems block after the SSD/semiseparable unification, covering the broader recurrent-state-model infrastructure&lt;/li&gt; &lt;/ol&gt; &lt;p&gt;Griffin and RecurrentGemma are useful evidence that demand for hybrid architectures is real, but both mix in local attention. They are therefore less suitable as the first target for a kernel abstraction.&lt;/p&gt; &lt;hr /&gt; &lt;h2 id=&quot;the-bigger-picture&quot;&gt;The Bigger Picture&lt;/h2&gt; &lt;p&gt;Beyond this experiment, the framing deserves separate attention.&lt;/p&gt; &lt;p&gt;The thesis that “linear attention will replace softmax attention” is risky. Current evidence supports a narrower claim: &lt;strong&gt;hybrid recurrent and linear-attention models are now a real model-design space&lt;/strong&gt;. Jamba, Kimi Linear, MiniMax-M1, and Granite 4.0 all use some form of hybrid architecture. They therefore need a mature kernel and compiler stack analogous to what FlashAttention provides for softmax attention.&lt;/p&gt; &lt;p&gt;This framing is more defensible because it does not depend on the unproven premise that linear attention must be faster. It starts from demonstrated industry demand.&lt;/p&gt; &lt;p&gt;Several risky claims should be avoided:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;“O(n) must be faster than FlashAttention.” Wall-clock performance depends on the arithmetic intensity of the state update, not complexity alone.&lt;/li&gt; &lt;li&gt;“Writing the recurrence in Triton solves the problem.” Register pressure and intermediate-state materialization are central bottlenecks, not minor implementation details.&lt;/li&gt; &lt;li&gt;“Pure linear attention will naturally become the dominant production architecture.” Current evidence supports demand for hybrid models, not a pure-replacement story.&lt;/li&gt; &lt;/ul&gt; &lt;hr /&gt; &lt;blockquote&gt; &lt;p&gt;Translated from the original Chinese with AI assistance.&lt;/p&gt; &lt;/blockquote&gt;</content> </entry> <entry xml:lang="en"> <title type="html">llmwiki: a literature library for research agents</title> <link href="https://zedongpeng.com/blog/2025/llmwiki/" rel="alternate" type="text/html"/> <id>https://zedongpeng.com/blog/2025/llmwiki/</id> <published>2025-12-19T18:00:00+08:00</published> <updated>2025-12-19T18:00:00+08:00</updated> <category term="life"/> <summary type="html">My coding agents keep the papers they read in a git repo, one folder per reference with a citation and a reading note. Two public skills build your own.</summary> <content type="html" xml:base="https://zedongpeng.com/blog/2025/llmwiki/">&lt;p&gt;A coding agent forgets every paper it read when its session ends, and from memory it invents citations. So my agents keep a library: llmwiki, a private git repository with one folder per paper, blog post or codebase they have read, after Karpathy’s &lt;a href=&quot;https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f&quot;&gt;LLM wiki&lt;/a&gt;.&lt;/p&gt; &lt;figure class=&quot;llmwiki-fig&quot; role=&quot;img&quot; aria-label=&quot;Published work flows into llmwiki through collect; agents read llmwiki through query; missing evidence sends them back to collect&quot;&gt; &lt;svg viewBox=&quot;0 0 720 260&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt; &lt;style&gt; .llmwiki-fig svg { width: 100%; height: auto; display: block; color: var(--global-text-color); font-family: inherit; } .llmwiki-fig .box { fill: var(--global-bg-color); stroke: currentColor; stroke-opacity: 0.45; stroke-width: 1.5; } .llmwiki-fig .wiki { fill: var(--global-bg-color); stroke: var(--global-theme-color); stroke-width: 2.5; } .llmwiki-fig .card { fill: var(--global-bg-color); stroke: currentColor; stroke-opacity: 0.55; stroke-width: 1.3; } .llmwiki-fig .unread { stroke-dasharray: 4 3; } .llmwiki-fig .ink { stroke: currentColor; stroke-opacity: 0.35; stroke-width: 2; stroke-linecap: round; } .llmwiki-fig .flow { fill: none; stroke: var(--global-theme-color); stroke-width: 2.5; } .llmwiki-fig .head { fill: var(--global-theme-color); } .llmwiki-fig .back { fill: none; stroke: currentColor; stroke-opacity: 0.45; stroke-width: 1.5; stroke-dasharray: 4 4; } .llmwiki-fig .back-head { fill: currentColor; fill-opacity: 0.45; } .llmwiki-fig .agent { fill: var(--global-bg-color); stroke: currentColor; stroke-opacity: 0.55; stroke-width: 1.5; } .llmwiki-fig .name { fill: currentColor; font-size: 17px; font-weight: 600; text-anchor: middle; } .llmwiki-fig .verb { fill: var(--global-theme-color); font-size: 15px; font-weight: 600; text-anchor: middle; } .llmwiki-fig .role { fill: currentColor; fill-opacity: 0.7; font-size: 13.5px; text-anchor: middle; } .llmwiki-fig .tag { fill: currentColor; fill-opacity: 0.75; font-size: 11px; text-anchor: middle; font-family: var(--mono); } &lt;/style&gt; &lt;rect class=&quot;box&quot; x=&quot;10&quot; y=&quot;70&quot; width=&quot;150&quot; height=&quot;100&quot; rx=&quot;8&quot; /&gt; &lt;path class=&quot;card&quot; d=&quot;M34 86 h18 l6 6 v30 h-24 z M73 86 h18 l6 6 v30 h-24 z M112 86 h18 l6 6 v30 h-24 z&quot; /&gt; &lt;path class=&quot;ink&quot; d=&quot;M39 100 h14 M39 107 h14 M39 114 h10 M78 100 h14 M78 107 h14 M78 114 h10 M117 100 h14 M117 107 h14 M117 114 h10&quot; /&gt; &lt;text class=&quot;role&quot; x=&quot;85&quot; y=&quot;152&quot;&gt;papers · blogs · code&lt;/text&gt; &lt;path class=&quot;flow&quot; d=&quot;M160 120 H242&quot; /&gt; &lt;polygon class=&quot;head&quot; points=&quot;250,120 240,114 240,126&quot; /&gt; &lt;text class=&quot;verb&quot; x=&quot;205&quot; y=&quot;110&quot;&gt;collect&lt;/text&gt; &lt;rect class=&quot;wiki&quot; x=&quot;250&quot; y=&quot;40&quot; width=&quot;220&quot; height=&quot;160&quot; rx=&quot;10&quot; /&gt; &lt;text class=&quot;name&quot; x=&quot;360&quot; y=&quot;68&quot;&gt;llmwiki&lt;/text&gt; &lt;rect class=&quot;card&quot; x=&quot;268&quot; y=&quot;86&quot; width=&quot;52&quot; height=&quot;82&quot; rx=&quot;4&quot; /&gt; &lt;text class=&quot;tag&quot; x=&quot;294&quot; y=&quot;102&quot;&gt;bib&lt;/text&gt; &lt;path class=&quot;ink&quot; d=&quot;M277 116 h34 M277 126 h34 M277 136 h34 M277 146 h22&quot; /&gt; &lt;rect class=&quot;card&quot; x=&quot;334&quot; y=&quot;86&quot; width=&quot;52&quot; height=&quot;82&quot; rx=&quot;4&quot; /&gt; &lt;text class=&quot;tag&quot; x=&quot;360&quot; y=&quot;102&quot;&gt;bib&lt;/text&gt; &lt;path class=&quot;ink&quot; d=&quot;M343 116 h34 M343 126 h34 M343 136 h26&quot; /&gt; &lt;rect class=&quot;card unread&quot; x=&quot;400&quot; y=&quot;86&quot; width=&quot;52&quot; height=&quot;82&quot; rx=&quot;4&quot; /&gt; &lt;text class=&quot;tag&quot; x=&quot;426&quot; y=&quot;102&quot;&gt;bib&lt;/text&gt; &lt;text class=&quot;role&quot; x=&quot;360&quot; y=&quot;190&quot;&gt;one folder per reference&lt;/text&gt; &lt;path class=&quot;flow&quot; d=&quot;M470 120 H552&quot; /&gt; &lt;polygon class=&quot;head&quot; points=&quot;560,120 550,114 550,126&quot; /&gt; &lt;text class=&quot;verb&quot; x=&quot;515&quot; y=&quot;110&quot;&gt;query&lt;/text&gt; &lt;rect class=&quot;box&quot; x=&quot;560&quot; y=&quot;70&quot; width=&quot;150&quot; height=&quot;100&quot; rx=&quot;8&quot; /&gt; &lt;circle class=&quot;agent&quot; cx=&quot;600&quot; cy=&quot;106&quot; r=&quot;12&quot; /&gt; &lt;circle class=&quot;agent&quot; cx=&quot;635&quot; cy=&quot;106&quot; r=&quot;12&quot; /&gt; &lt;circle class=&quot;agent&quot; cx=&quot;670&quot; cy=&quot;106&quot; r=&quot;12&quot; /&gt; &lt;text class=&quot;role&quot; x=&quot;635&quot; y=&quot;152&quot;&gt;agents&lt;/text&gt; &lt;path class=&quot;back&quot; d=&quot;M635 170 V236 H205 V136&quot; /&gt; &lt;polygon class=&quot;back-head&quot; points=&quot;205,128 200,138 210,138&quot; /&gt; &lt;text class=&quot;role&quot; x=&quot;420&quot; y=&quot;228&quot;&gt;missing evidence&lt;/text&gt; &lt;/svg&gt; &lt;figcaption class=&quot;caption&quot;&gt;Agents ask the wiki first (query). Where evidence is missing, they find, verify, read and file new references (collect). The dashed card has a citation but no note: nobody has read it yet.&lt;/figcaption&gt; &lt;/figure&gt; &lt;div class=&quot;language-text highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;wiki/research/&amp;lt;topic&amp;gt;/ index.md what the topic knows, and its references assets/&amp;lt;slug&amp;gt;/ one reference, e.g. example-2025 citation.bib its key is the folder name note.md written only after reading paper-pdf/ paper-tex/ github-repo/ &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt; &lt;p&gt;Three rules keep it honest: each reference exists once; no &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;note.md&lt;/code&gt; means not read; every ingestion is a commit. The wiki holds only other people’s work. Our own results stay in each project’s notes.&lt;/p&gt; &lt;h2 id=&quot;set-up-your-own&quot;&gt;Set up your own&lt;/h2&gt; &lt;p&gt;Copy the prompt at the top of this post into your agent, or install the two skills by hand. For Claude Code:&lt;/p&gt; &lt;div class=&quot;language-sh highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;git clone https://github.com/zedong-peng/llmwiki-skill.git &lt;span class=&quot;nb&quot;&gt;mkdir&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-p&lt;/span&gt; ~/.claude/skills &lt;span class=&quot;nb&quot;&gt;ln&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-s&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$PWD&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;/llmwiki-skill/skills/llmwiki-query&quot;&lt;/span&gt; ~/.claude/skills/ &lt;span class=&quot;nb&quot;&gt;ln&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-s&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$PWD&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;/llmwiki-skill/skills/llmwiki-collect&quot;&lt;/span&gt; ~/.claude/skills/ &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt; &lt;p&gt;Keep the wiki private: the PDFs belong to their publishers. Then ask in plain words:&lt;/p&gt; &lt;div class=&quot;language-text highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Use llmwiki-collect to ingest https://arxiv.org/abs/&amp;lt;id&amp;gt; into &amp;lt;wiki path&amp;gt; under the topic &amp;lt;topic&amp;gt;. Use llmwiki-query: what does &amp;lt;wiki path&amp;gt; say about &amp;lt;question&amp;gt;? &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;</content> </entry> <entry xml:lang="en"> <title type="html">Velodrome: models draw a pelican riding a bicycle in one prompt</title> <link href="https://zedongpeng.com/velodrome/" rel="alternate" type="text/html"/> <id>https://zedongpeng.com/blog/2025/velodrome/</id> <published>2025-08-15T16:00:00+08:00</published> <updated>2025-08-15T16:00:00+08:00</updated> <category term="better-ml"/> <summary type="html">A pelican riding a bicycle, drawn by model, effort, harness and provider.</summary> </entry> <entry xml:lang="en"> <title type="html">LoRA as parametric memory: a failed experiment</title> <link href="https://zedongpeng.com/blog/2025/failure-of-parametric-memory/" rel="alternate" type="text/html"/> <id>https://zedongpeng.com/blog/2025/failure-of-parametric-memory/</id> <published>2025-03-30T12:00:00+08:00</published> <updated>2025-03-30T12:00:00+08:00</updated> <category term="better-ml"/> <summary type="html">I tried writing conversation facts into model weights via LoRA fine-tuning. The accuracy was dismal and temporal questions were completely unanswerable.</summary> <content type="html" xml:base="https://zedongpeng.com/blog/2025/failure-of-parametric-memory/">&lt;p&gt;Every mainstream memory system — ChatGPT Memory, Claude Code’s MEMORY.md, mem0, A-Mem — works the same way: extract key facts, store them externally, retrieve and inject into context at inference time. None of them touch the model weights.&lt;/p&gt; &lt;p&gt;I wanted to try the opposite: fine-tune a LoRA adapter on a conversation so the facts get written directly into the model parameters. No retrieval, no vector database, no context injection. Just ask the question, and the model answers from its weights.&lt;/p&gt; &lt;p&gt;It didn’t work.&lt;/p&gt; &lt;h2 id=&quot;setup&quot;&gt;Setup&lt;/h2&gt; &lt;p&gt;&lt;strong&gt;Model&lt;/strong&gt;: Qwen2.5-1.5B-Instruct. &lt;strong&gt;Benchmark&lt;/strong&gt;: &lt;a href=&quot;https://github.com/snap-research/locomo&quot;&gt;LOCOMO&lt;/a&gt; — 10 long conversations (~20k tokens each), 1,540 QA pairs across SingleHop, MultiHop, Temporal, and OpenDomain categories.&lt;/p&gt; &lt;h2 id=&quot;results&quot;&gt;Results&lt;/h2&gt; &lt;table&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;Method&lt;/th&gt; &lt;th&gt;SingleHop&lt;/th&gt; &lt;th&gt;MultiHop&lt;/th&gt; &lt;th&gt;OpenDom&lt;/th&gt; &lt;th&gt;Temporal&lt;/th&gt; &lt;th&gt;Avg F1&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;Base (no context)&lt;/td&gt; &lt;td&gt;8.56&lt;/td&gt; &lt;td&gt;5.50&lt;/td&gt; &lt;td&gt;9.67&lt;/td&gt; &lt;td&gt;3.03&lt;/td&gt; &lt;td&gt;6.69&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;LoRA-Mem (r=4)&lt;/td&gt; &lt;td&gt;9.16&lt;/td&gt; &lt;td&gt;6.72&lt;/td&gt; &lt;td&gt;8.87&lt;/td&gt; &lt;td&gt;2.30&lt;/td&gt; &lt;td&gt;6.76&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;LoRA-Mem (r=8)&lt;/td&gt; &lt;td&gt;10.44&lt;/td&gt; &lt;td&gt;7.05&lt;/td&gt; &lt;td&gt;8.64&lt;/td&gt; &lt;td&gt;2.54&lt;/td&gt; &lt;td&gt;7.17&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;p&gt;The best result is &lt;strong&gt;7.17%&lt;/strong&gt; — barely above the base model’s 6.69% without any fine-tuning. Doubling the rank made no meaningful difference. For reference, &lt;a href=&quot;https://arxiv.org/abs/2504.19413&quot;&gt;mem0&lt;/a&gt;, the industrial benchmark for memory agents, reports Avg F1 &amp;gt; 40% on the same dataset.&lt;/p&gt; &lt;h2 id=&quot;two-failure-modes&quot;&gt;Two failure modes&lt;/h2&gt; &lt;p&gt;&lt;strong&gt;Hallucination.&lt;/strong&gt; The model doesn’t say “I don’t know.” It confidently generates plausible but wrong answers:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;Q: What is Caroline’s identity? Model: &lt;em&gt;Caroline is an AI language model created by Anthropic…&lt;/em&gt; Reference: Transgender woman&lt;/p&gt; &lt;/blockquote&gt; &lt;p&gt;The model falls back to pretraining knowledge instead of conversation facts. LoRA training did not overwrite these priors.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Temporal collapse.&lt;/strong&gt; Temporal F1 is the lowest category across all variants (~2%). The model cannot anchor events in time:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;Q: When did Caroline go to the LGBTQ support group? Model: &lt;em&gt;June 15th&lt;/em&gt; — Reference: 7 May 2023&lt;/p&gt; &lt;p&gt;Q: When did Melanie paint a sunrise? Model: &lt;em&gt;2015-07-14&lt;/em&gt; — Reference: 2022&lt;/p&gt; &lt;/blockquote&gt; &lt;p&gt;Raw conversation text has no explicit timestamps. The model has no signal to learn when things happened.&lt;/p&gt; &lt;h2 id=&quot;why&quot;&gt;Why&lt;/h2&gt; &lt;p&gt;The training objective is fundamentally misaligned with the inference task. LM loss trains the model to predict the next token in conversation text. It never sees a question during training, so it has no reason to organize facts in a way that supports QA.&lt;/p&gt; &lt;h2 id=&quot;takeaway&quot;&gt;Takeaway&lt;/h2&gt; &lt;p&gt;After presenting these results, the consensus with my advisor was clear: the approach was too crude. Parametric memory via LoRA continual pretraining does not work for conversation QA at this scale. The project was archived.&lt;/p&gt; &lt;p&gt;For a more promising direction, &lt;a href=&quot;https://arxiv.org/abs/2507.02259&quot;&gt;MemAgent&lt;/a&gt; (ICLR 2026) uses RL to teach memory agents how to take notes — a much better way to learn what to remember and how to organize it.&lt;/p&gt; &lt;p&gt;Code: &lt;a href=&quot;https://github.com/zedong-peng/LoRA-Mem&quot;&gt;LoRA-Mem&lt;/a&gt;.&lt;/p&gt;</content> </entry> <entry xml:lang="en"> <title type="html">How to make your own homepage</title> <link href="https://zedongpeng.com/blog/2024/how-to-make-your-own-homepage/" rel="alternate" type="text/html"/> <id>https://zedongpeng.com/blog/2024/how-to-make-your-own-homepage/</id> <published>2024-06-18T12:00:00+08:00</published> <updated>2024-06-18T12:00:00+08:00</updated> <category term="life"/> <summary type="html">A domain from Cloudflare, the al-folio template and free hosting on GitHub Pages: how to put a homepage like this one together, step by step.</summary> <content type="html" xml:base="https://zedongpeng.com/blog/2024/how-to-make-your-own-homepage/">&lt;p&gt;This site is the kind of homepage many researchers keep: an about page, a CV with a list of papers, and a blog. It costs me about ten dollars a year, and all of that is the domain name. The template and the hosting are free. This post walks through how to build one. I started from the template in 2024 and have since rewritten most of it; where this site now differs from the template, the post says so. If you use an AI coding agent, give it the prompt above; the rest of this post is the same walk-through, for people.&lt;/p&gt; &lt;p&gt;There are three parts:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;strong&gt;Template:&lt;/strong&gt; &lt;a href=&quot;https://github.com/alshedivat/al-folio&quot;&gt;al-folio&lt;/a&gt;, a free &lt;a href=&quot;https://jekyllrb.com&quot;&gt;Jekyll&lt;/a&gt; theme made for academics. Jekyll turns a folder of plain text files into a website.&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Hosting:&lt;/strong&gt; &lt;a href=&quot;https://pages.github.com&quot;&gt;GitHub Pages&lt;/a&gt;, which serves the built site for free.&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Domain:&lt;/strong&gt; zedongpeng.com, bought on &lt;a href=&quot;https://www.cloudflare.com/products/registrar/&quot;&gt;Cloudflare&lt;/a&gt;.&lt;/li&gt; &lt;/ul&gt; &lt;figure class=&quot;homepage-flow&quot; role=&quot;img&quot; aria-label=&quot;Publishing: your files on the main branch are pushed, GitHub Actions builds them with Jekyll, and GitHub Pages serves the built site. Visiting: the browser asks Cloudflare DNS for the address, then fetches the page from GitHub Pages.&quot;&gt;&lt;svg viewBox=&quot;0 0 720 300&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;&lt;style&gt; .homepage-flow svg { width: 100%; height: auto; display: block; color: var(--global-text-color); font-family: inherit; } .homepage-flow .box { fill: var(--global-bg-color); stroke: currentColor; stroke-opacity: 0.45; stroke-width: 1.5; } .homepage-flow .host { fill: var(--global-theme-color); } .homepage-flow .name { fill: currentColor; font-size: 16px; font-weight: 600; text-anchor: middle; } .homepage-flow .sub { fill: currentColor; fill-opacity: 0.7; font-size: 13px; text-anchor: middle; } .homepage-flow .on-host { fill: #fff; fill-opacity: 1; } .homepage-flow .row { fill: currentColor; fill-opacity: 0.55; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; } .homepage-flow .edge { stroke: currentColor; stroke-opacity: 0.6; stroke-width: 1.5; fill: none; } .homepage-flow .head { fill: currentColor; fill-opacity: 0.6; } .homepage-flow .lbl { fill: currentColor; fill-opacity: 0.7; font-size: 12.5px; text-anchor: middle; } .homepage-flow .step { fill: var(--global-theme-color); } .homepage-flow .step-n { fill: #fff; font-size: 11px; font-weight: 700; text-anchor: middle; } &lt;/style&gt; &lt;text class=&quot;row&quot; x=&quot;10&quot; y=&quot;26&quot;&gt;publish&lt;/text&gt; &lt;rect class=&quot;box&quot; x=&quot;10&quot; y=&quot;40&quot; width=&quot;150&quot; height=&quot;64&quot; rx=&quot;8&quot; /&gt; &lt;text class=&quot;name&quot; x=&quot;85&quot; y=&quot;67&quot;&gt;your files&lt;/text&gt; &lt;text class=&quot;sub&quot; x=&quot;85&quot; y=&quot;88&quot;&gt;main branch&lt;/text&gt; &lt;rect class=&quot;box&quot; x=&quot;210&quot; y=&quot;40&quot; width=&quot;150&quot; height=&quot;64&quot; rx=&quot;8&quot; /&gt; &lt;text class=&quot;name&quot; x=&quot;285&quot; y=&quot;67&quot;&gt;GitHub Actions&lt;/text&gt; &lt;text class=&quot;sub&quot; x=&quot;285&quot; y=&quot;88&quot;&gt;Jekyll build&lt;/text&gt; &lt;rect class=&quot;box&quot; x=&quot;410&quot; y=&quot;40&quot; width=&quot;130&quot; height=&quot;64&quot; rx=&quot;8&quot; /&gt; &lt;text class=&quot;name&quot; x=&quot;475&quot; y=&quot;67&quot;&gt;built site&lt;/text&gt; &lt;text class=&quot;sub&quot; x=&quot;475&quot; y=&quot;88&quot;&gt;HTML files&lt;/text&gt; &lt;rect class=&quot;host&quot; x=&quot;590&quot; y=&quot;40&quot; width=&quot;120&quot; height=&quot;250&quot; rx=&quot;8&quot; /&gt; &lt;text class=&quot;name on-host&quot; x=&quot;650&quot; y=&quot;160&quot;&gt;GitHub&lt;/text&gt; &lt;text class=&quot;name on-host&quot; x=&quot;650&quot; y=&quot;180&quot;&gt;Pages&lt;/text&gt; &lt;path class=&quot;edge&quot; d=&quot;M160 72 H202&quot; /&gt;&lt;path class=&quot;head&quot; d=&quot;M210 72 l-8 -4.5 v9 z&quot; /&gt; &lt;text class=&quot;lbl&quot; x=&quot;185&quot; y=&quot;64&quot;&gt;push&lt;/text&gt; &lt;path class=&quot;edge&quot; d=&quot;M360 72 H402&quot; /&gt;&lt;path class=&quot;head&quot; d=&quot;M410 72 l-8 -4.5 v9 z&quot; /&gt; &lt;path class=&quot;edge&quot; d=&quot;M540 72 H582&quot; /&gt;&lt;path class=&quot;head&quot; d=&quot;M590 72 l-8 -4.5 v9 z&quot; /&gt; &lt;text class=&quot;row&quot; x=&quot;10&quot; y=&quot;146&quot;&gt;visit&lt;/text&gt; &lt;rect class=&quot;box&quot; x=&quot;10&quot; y=&quot;160&quot; width=&quot;150&quot; height=&quot;130&quot; rx=&quot;8&quot; /&gt; &lt;text class=&quot;name&quot; x=&quot;85&quot; y=&quot;220&quot;&gt;browser&lt;/text&gt; &lt;text class=&quot;sub&quot; x=&quot;85&quot; y=&quot;241&quot;&gt;zedongpeng.com&lt;/text&gt; &lt;rect class=&quot;box&quot; x=&quot;290&quot; y=&quot;160&quot; width=&quot;160&quot; height=&quot;56&quot; rx=&quot;8&quot; /&gt; &lt;text class=&quot;name&quot; x=&quot;370&quot; y=&quot;184&quot;&gt;Cloudflare&lt;/text&gt; &lt;text class=&quot;sub&quot; x=&quot;370&quot; y=&quot;204&quot;&gt;DNS&lt;/text&gt; &lt;path class=&quot;edge&quot; d=&quot;M168 188 H282&quot; /&gt;&lt;path class=&quot;head&quot; d=&quot;M290 188 l-8 -4.5 v9 z&quot; /&gt;&lt;path class=&quot;head&quot; d=&quot;M160 188 l8 -4.5 v9 z&quot; /&gt; &lt;circle class=&quot;step&quot; cx=&quot;186&quot; cy=&quot;174&quot; r=&quot;9&quot; /&gt;&lt;text class=&quot;step-n&quot; x=&quot;186&quot; y=&quot;178&quot;&gt;1&lt;/text&gt; &lt;text class=&quot;lbl&quot; x=&quot;236&quot; y=&quot;178&quot;&gt;address?&lt;/text&gt; &lt;path class=&quot;edge&quot; d=&quot;M160 262 H582&quot; /&gt;&lt;path class=&quot;head&quot; d=&quot;M590 262 l-8 -4.5 v9 z&quot; /&gt; &lt;circle class=&quot;step&quot; cx=&quot;186&quot; cy=&quot;248&quot; r=&quot;9&quot; /&gt;&lt;text class=&quot;step-n&quot; x=&quot;186&quot; y=&quot;252&quot;&gt;2&lt;/text&gt; &lt;text class=&quot;lbl&quot; x=&quot;236&quot; y=&quot;252&quot;&gt;the page&lt;/text&gt; &lt;/svg&gt; &lt;figcaption class=&quot;caption&quot;&gt;Top: publishing. Pushing to the main branch starts a build on GitHub&apos;s servers, and GitHub Pages serves the finished site. Bottom: visiting. The browser asks Cloudflare where zedongpeng.com lives (1), gets GitHub&apos;s address, and fetches the page from GitHub Pages (2). Cloudflare only answers the lookup; the pages never pass through it.&lt;/figcaption&gt; &lt;/figure&gt; &lt;h2 id=&quot;start-from-the-template&quot;&gt;Start from the template&lt;/h2&gt; &lt;p&gt;al-folio’s own &lt;a href=&quot;https://github.com/alshedivat/al-folio/blob/main/INSTALL.md&quot;&gt;install guide&lt;/a&gt; is good. The short version:&lt;/p&gt; &lt;ol&gt; &lt;li&gt;On the al-folio GitHub page, click &lt;strong&gt;Use this template → Create a new repository&lt;/strong&gt;. Name it &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;your-username&amp;gt;.github.io&lt;/code&gt;. Mine is &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;zedong-peng.github.io&lt;/code&gt;.&lt;/li&gt; &lt;li&gt;In the new repository, go to &lt;strong&gt;Settings → Actions → General → Workflow permissions&lt;/strong&gt; and choose &lt;strong&gt;Read and write permissions&lt;/strong&gt;. The build needs this to save the finished site back to the repository.&lt;/li&gt; &lt;li&gt;In &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;_config.yml&lt;/code&gt;, set &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;url: https://&amp;lt;your-username&amp;gt;.github.io&lt;/code&gt; for now, and leave the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;baseurl:&lt;/code&gt; line empty. Don’t delete it.&lt;/li&gt; &lt;li&gt;Open the &lt;strong&gt;Actions&lt;/strong&gt; tab and wait a few minutes for the job called &lt;strong&gt;Deploy site&lt;/strong&gt; to finish. It creates a new branch, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;gh-pages&lt;/code&gt;, that holds the built site.&lt;/li&gt; &lt;li&gt;Go to &lt;strong&gt;Settings → Pages → Build and deployment&lt;/strong&gt;. Set the source to &lt;strong&gt;Deploy from a branch&lt;/strong&gt;, and choose &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;gh-pages&lt;/code&gt;, not &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;main&lt;/code&gt;.&lt;/li&gt; &lt;/ol&gt; &lt;p&gt;A minute later, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;https://&amp;lt;your-username&amp;gt;.github.io&lt;/code&gt; shows a copy of the al-folio demo. Everything after this is swapping the demo content for your own.&lt;/p&gt; &lt;p&gt;This site no longer has a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;gh-pages&lt;/code&gt; branch. Its workflow uploads the built site straight to GitHub Pages, with the source under &lt;strong&gt;Settings → Pages&lt;/strong&gt; set to &lt;strong&gt;GitHub Actions&lt;/strong&gt;, so steps 2, 4 and 5 fall away. The template’s way works as it is; change it only if you want to.&lt;/p&gt; &lt;h2 id=&quot;make-it-yours&quot;&gt;Make it yours&lt;/h2&gt; &lt;p&gt;al-folio keeps the content apart from the layout. You edit a handful of text files in the template, and it turns them into pages:&lt;/p&gt; &lt;table&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;File&lt;/th&gt; &lt;th&gt;What it holds&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;_config.yml&lt;/code&gt;&lt;/td&gt; &lt;td&gt;Site title, your name, the site address, time zone, features&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;_pages/about.md&lt;/code&gt;&lt;/td&gt; &lt;td&gt;The front page: the text under your name&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;assets/img/&lt;/code&gt;&lt;/td&gt; &lt;td&gt;Your photo and other images&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;_data/socials.yml&lt;/code&gt;&lt;/td&gt; &lt;td&gt;The icons at the bottom: email, GitHub, Google Scholar&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;_bibliography/papers.bib&lt;/code&gt;&lt;/td&gt; &lt;td&gt;Your papers, as BibTeX&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;_data/cv.yml&lt;/code&gt;&lt;/td&gt; &lt;td&gt;The CV page&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;_posts/&lt;/code&gt;&lt;/td&gt; &lt;td&gt;Blog posts, one Markdown file each&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;_sass/_themes.scss&lt;/code&gt;&lt;/td&gt; &lt;td&gt;Colors&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;p&gt;What I changed on this site:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;strong&gt;Fewer pages.&lt;/strong&gt; The demo comes with projects, repositories, teaching and more. I kept three: about, posts and CV. To hide a page, set &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;nav: false&lt;/code&gt; at the top of its file in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;_pages/&lt;/code&gt;. Publications are a section of the CV, and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/publications/&lt;/code&gt; redirects there.&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Look.&lt;/strong&gt; I replaced the template’s styles with one hand-written file, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;assets/css/site.css&lt;/code&gt;, modeled on Anthropic’s site: two typefaces, one accent color, light only. If you only want a different color, the template needs one line in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;_sass/_themes.scss&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;--global-theme-color&lt;/code&gt;.&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Papers.&lt;/strong&gt; Each paper is a BibTeX entry, the format reference managers export. Extra fields such as &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;pdf=&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;arxiv=&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;code=&lt;/code&gt; become bracketed links after the title.&lt;/li&gt; &lt;li&gt;&lt;strong&gt;CV.&lt;/strong&gt; The CV page is built from &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;_data/cv.yml&lt;/code&gt;. On every deploy, the workflow prints that page to a PDF with headless Chrome, so the page and the PDF cannot disagree.&lt;/li&gt; &lt;/ul&gt; &lt;p&gt;A blog post is a Markdown file in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;_posts/&lt;/code&gt; whose name starts with the date, like &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;2024-06-18-how-to-make-your-own-homepage.md&lt;/code&gt;. It begins with a short header:&lt;/p&gt; &lt;div class=&quot;language-yaml highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nn&quot;&gt;---&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;layout&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;post&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;How&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;to&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;make&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;your&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;own&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;homepage&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;date&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;2024-06-18 12:00:00 +0800&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;description&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;A&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;domain&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;from&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Cloudflare,&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;the&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;al-folio&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;template&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;and&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;free&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;hosting&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;on&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;GitHub&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Pages.&quot;&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;---&lt;/span&gt; &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt; &lt;p&gt;The text goes below it, and the post appears at &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/blog/2024/how-to-make-your-own-homepage/&lt;/code&gt;.&lt;/p&gt; &lt;h2 id=&quot;publish-with-a-push&quot;&gt;Publish with a push&lt;/h2&gt; &lt;p&gt;Publishing is just pushing to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;main&lt;/code&gt;. A workflow that ships with the template, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.github/workflows/deploy.yml&lt;/code&gt;, runs on every push: it builds the site with Jekyll and hands the result to GitHub Pages. That is the top row of the figure, and it takes a few minutes end to end. The &lt;strong&gt;Actions&lt;/strong&gt; tab shows where it is.&lt;/p&gt; &lt;h2 id=&quot;connect-your-own-domain&quot;&gt;Connect your own domain&lt;/h2&gt; &lt;p&gt;I bought zedongpeng.com on Cloudflare. Its registrar charges what the registry charges, with no markup, and renewals cost the same as the first year. A &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.com&lt;/code&gt; is about ten dollars a year.&lt;/p&gt; &lt;p&gt;Because the domain is on Cloudflare, Cloudflare also runs its DNS, the public directory that tells browsers which server a name belongs to. In the Cloudflare dashboard, under &lt;strong&gt;DNS → Records&lt;/strong&gt;, add:&lt;/p&gt; &lt;table&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;Type&lt;/th&gt; &lt;th&gt;Name&lt;/th&gt; &lt;th&gt;Content&lt;/th&gt; &lt;th&gt;Proxy status&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;A&lt;/td&gt; &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;@&lt;/code&gt;&lt;/td&gt; &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;185.199.108.153&lt;/code&gt;&lt;/td&gt; &lt;td&gt;DNS only&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;A&lt;/td&gt; &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;@&lt;/code&gt;&lt;/td&gt; &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;185.199.109.153&lt;/code&gt;&lt;/td&gt; &lt;td&gt;DNS only&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;A&lt;/td&gt; &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;@&lt;/code&gt;&lt;/td&gt; &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;185.199.110.153&lt;/code&gt;&lt;/td&gt; &lt;td&gt;DNS only&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;A&lt;/td&gt; &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;@&lt;/code&gt;&lt;/td&gt; &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;185.199.111.153&lt;/code&gt;&lt;/td&gt; &lt;td&gt;DNS only&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;CNAME&lt;/td&gt; &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;www&lt;/code&gt;&lt;/td&gt; &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;your-username&amp;gt;.github.io&lt;/code&gt;&lt;/td&gt; &lt;td&gt;DNS only&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;@&lt;/code&gt; means the bare domain. The four addresses are GitHub Pages’ servers, as listed in &lt;a href=&quot;https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site/managing-a-custom-domain-for-your-github-pages-site&quot;&gt;GitHub’s docs&lt;/a&gt;. Set every record to &lt;strong&gt;DNS only&lt;/strong&gt; (the gray cloud). With the orange cloud, Cloudflare stands between visitors and GitHub, GitHub can’t see that the domain points at it, and it won’t issue the certificate HTTPS needs.&lt;/p&gt; &lt;p&gt;Then, on GitHub:&lt;/p&gt; &lt;ol&gt; &lt;li&gt;&lt;strong&gt;Settings → Pages → Custom domain&lt;/strong&gt;: enter your domain and save. GitHub checks the DNS records and requests a free certificate, which can take a while.&lt;/li&gt; &lt;li&gt;Once it’s ready, tick &lt;strong&gt;Enforce HTTPS&lt;/strong&gt;.&lt;/li&gt; &lt;li&gt;In &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;_config.yml&lt;/code&gt;, change &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;url&lt;/code&gt; to your domain, for example &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;url: https://zedongpeng.com&lt;/code&gt;, and keep &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;baseurl:&lt;/code&gt; empty.&lt;/li&gt; &lt;/ol&gt; &lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;www.zedongpeng.com&lt;/code&gt; now redirects to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;zedongpeng.com&lt;/code&gt;. With the template, saving the custom domain also writes a small file named &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;CNAME&lt;/code&gt; into &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;gh-pages&lt;/code&gt;. If your custom domain goes blank after a deploy, al-folio’s FAQ says to add the same file to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;main&lt;/code&gt;.&lt;/p&gt; &lt;p&gt;Check the spelling in step 3 letter by letter. A typo there breaks nothing you can see, because links between pages are relative, so the site works. But the template uses &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;url&lt;/code&gt; for the addresses that only machines read: the canonical link in each page’s header, which tells search engines a page’s real address, the sitemap and the RSS feed. With a typo, all of them point at a domain you don’t own. After changing &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;url&lt;/code&gt;, open your live site’s page source and search for “canonical”.&lt;/p&gt; &lt;h2 id=&quot;preview-before-you-push&quot;&gt;Preview before you push&lt;/h2&gt; &lt;p&gt;You don’t have to push to see a change. With &lt;a href=&quot;https://www.docker.com&quot;&gt;Docker&lt;/a&gt; installed, run this in the repository:&lt;/p&gt; &lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;docker compose up &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt; &lt;p&gt;Then open &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;http://localhost:8080&lt;/code&gt;. The page reloads as you edit.&lt;/p&gt; &lt;p&gt;One thing caught me out: posts dated in the future don’t appear. Jekyll compares the date with the moment the build runs, so a post dated this evening and pushed this afternoon stays missing until the date is moved back. Give each date a time and an offset, and set &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;timezone:&lt;/code&gt; in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;_config.yml&lt;/code&gt;.&lt;/p&gt; &lt;h2 id=&quot;keep-a-note-for-your-agent&quot;&gt;Keep a note for your agent&lt;/h2&gt; &lt;p&gt;If an agent builds your site, ask it to leave a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;CLAUDE.md&lt;/code&gt; (or &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;AGENTS.md&lt;/code&gt;) file in the repository: a short note on where things live and how to publish. The next time you want a change, the agent reads the note instead of working out the layout again.&lt;/p&gt; &lt;p&gt;The source for this site is &lt;a href=&quot;https://github.com/zedong-peng/zedong-peng.github.io&quot;&gt;public on GitHub&lt;/a&gt;, if you want to see any of the files above.&lt;/p&gt;</content> </entry> </feed>