<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>The Residual Stream</title>
	<description>Understanding computation from one layer below the API — AI internals, GPUs, and the physics of computation.</description>
	<link>https://theresidualstream.ai</link>
	<atom:link href="https://theresidualstream.ai/rss.xml" rel="self" type="application/rss+xml"/>
	<language>en</language>
	
	<item>
		<title>Building this site</title>
		<description>The site itself is the first experiment — an engineering notebook exploring what runs one layer below the API.</description>
		<content:encoded><![CDATA[<h2 id="a-workshop-not-a-manifesto"><a href="#a-workshop-not-a-manifesto" class="content-permalink">A workshop, not a manifesto</a></h2>
<p>This site is a workshop open to the street. There are no categories yet, no grand
About page, no manifesto — just a stream of things I make: short notes, interactive
toys, and experiments that poke at the layer below the one everyone else stops at.</p>
<p>The stack is deliberately boring where it can be (SvelteKit, markdown files in a git
repo, static hosting) and interesting only where it pays (Svelte components embedded
directly inside posts, so an essay can carry a live simulation in its pocket).</p>
<h2 id="the-first-live-artifact"><a href="#the-first-live-artifact" class="content-permalink">The first live artifact</a></h2>
<p>The first such essay is already here — it has a <a href="/posts/gpu-flops">GPU roofline you can play with</a>.</p>]]></content:encoded>
		<link>https://theresidualstream.ai/posts/building-this-site</link>
		<guid isPermaLink="true">https://theresidualstream.ai/posts/building-this-site</guid>
		<pubDate>Thu, 16 Jul 2026 00:00:00 GMT</pubDate>
	</item>
	<item>
		<title>How fast can your GPU actually run a transformer?</title>
		<description>A playable roofline model — pick a GPU, shape a transformer, and watch where the FLOPs go.</description>
		<content:encoded><![CDATA[<blockquote>
<p>Draft stub — the real essay goes here. The point of this post in the skeleton is to
prove that prose and live computation can share a page.</p>
</blockquote>
<p>Everyone quotes peak TFLOPs. Almost nobody hits them. During decode, a transformer
reads <strong>every weight once per token step</strong> — so until your batch is large enough, the
GPU spends its life waiting on HBM, not multiplying matrices.</p>
<h2 id="find-the-ridge"><a href="#find-the-ridge" class="content-permalink">Find the ridge</a></h2>
<p>Try it. Watch the "bound by" readout flip as you push the batch size past the ridge:</p>
<blockquote>
<p><strong>The ridge point.</strong> Arithmetic intensity is useful work per byte moved. Batched decode raises that intensity until compute, rather than memory bandwidth, becomes the ceiling.
B<sub>ridge</sub> ≈ F<sub>peak</sub> / BW<sub>mem</sub></p>
</blockquote>
<p>Interactive roofline calculator: choose a GPU, model width, layer count, and batch size to compare memory-bound and compute-bound transformer decoding. Open the web article to use the controls.</p>
<h2 id="read-the-result"><a href="#read-the-result" class="content-permalink">Read the result</a></h2>
<p>Two things to notice:</p>
<ol>
<li><strong>The ridge point is a property of the GPU, not the model.</strong> Peak FLOPs divided by
memory bandwidth. On an A100 that's ~153: below that batch size, you are paying
for silicon you cannot feed.</li>
<li><strong>Utilization is a choice you make at design time</strong> — d_model, layer count, and
batch geometry decide your ceiling before a single kernel is written.</li>
</ol>
<p>The full essay will add the KV cache (which makes everything worse), quantization
(which moves the ridge), and real measured numbers against this toy model.</p>
<blockquote>
<p><strong>KV-cache overhead.</strong> The toy counts only model weights. Real decode also streams cached keys and values, so longer contexts add memory traffic without increasing weight reuse.</p>
</blockquote>]]></content:encoded>
		<link>https://theresidualstream.ai/posts/gpu-flops</link>
		<guid isPermaLink="true">https://theresidualstream.ai/posts/gpu-flops</guid>
		<pubDate>Thu, 16 Jul 2026 00:00:00 GMT</pubDate>
	</item>
</channel>
</rss>