<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Sbayer on Medium]]></title>
        <description><![CDATA[Stories by Sbayer on Medium]]></description>
        <link>https://medium.com/@sbayer2?source=rss-cd1b18e89f37------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*mk1zxAuAhBBcHEDu</url>
            <title>Stories by Sbayer on Medium</title>
            <link>https://medium.com/@sbayer2?source=rss-cd1b18e89f37------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 03:06:00 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sbayer2/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Do AI Models Perceive The Same Concepts From Text Representation Learning Compared to Vision…]]></title>
            <link>https://medium.com/@sbayer2/do-ai-models-develop-the-same-mental-images-from-text-and-vision-examples-fd00677064d6?source=rss-cd1b18e89f37------2</link>
            <guid isPermaLink="false">https://medium.com/p/fd00677064d6</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[world-models]]></category>
            <category><![CDATA[yann-lecun]]></category>
            <category><![CDATA[jepa]]></category>
            <category><![CDATA[latent-space]]></category>
            <dc:creator><![CDATA[Sbayer]]></dc:creator>
            <pubDate>Tue, 10 Nov 2026 18:44:07 GMT</pubDate>
            <atom:updated>2026-11-10T19:15:47.805Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dtWqbHnKGA0c2kOkBfbgJQ.png" /></figure><h3>Do AI Models Perceive The Same Concepts From Text Representation Learning Compared to Vision Learning ?</h3><p>A great thought experiment to help me understand “The Platonic Representation Hypothesis” which suggests that models trained on different modalities align and eventually converge toward the same representation of reality as they scale. What is the Ultimate Scaled AI ? (Your Brain ) and how did it scale ? ( lifetime learning) . My Generation has had the great opportunity to learn through shared text ( books ) and Multimedia ( movies ). I am fifty-nine and as a child devoured fantasy , science fiction , religious , and mystery books. Lewis, Tolkien, Huxley, Asimov, Luke, Ezekiel, Doyle, Christie, Shelley, Clarke, Heinlein. Culture has advanced based on story telling and how the collective of human population has created (encoded) the meanings and concepts of the shared history of humanity.</p><p>When you are ages seven to ten and you read the Chronicles of Narnia in the seventies there is no equivalent visual example of these fantasy stories. No movie can train your memory or perception of the settings , character , or plot. The same is true for early readings of The Hobbit, and Lord of the Rings. When Peter Jackson made his epic recreation of the Lord of The Rings and the films won many awards, the visual representation felt like it was true to my memory of the text. But the real question that is related to the Platonic Representation Hypothesis stems from how much confidence do I have that my text memory of the story represents the visual story faithfully, or is my learned perception telling me that what I “see” is the story.</p><p>I have adult children who only came to Tolkien through the Peter Jackson Movies. They have probably not read the books. When I talk to them about characters , plots , and themes we are usually discussing the same details except when I mention something from the books like the Barrow-wights, or Glorfindel. What is vivid in my mind of these characters does not exist in their perception of the story. So a compressed representation of this fantasy realty does converge but the perception of my scaled brain is different than that of my children. What does this say about how to understand Multimodal learning by the AI models. Does volume or scale of learning allow different models to navigate reality in ways that are similar or is it just a magic trick of guessing the next word or scene to find the compressed representation of the “latent” meaning of something.</p><p>Imagine you’re trying to describe a dog in your yard to someone who has never seen it. One way is to describe every blade of grass, and every pixel of light hitting your eyes. This is enormous and mostly noise. (<em>and mostly irrelevant detail. This is </em><strong><em>next-token / pixel-space prediction)</em></strong></p><p><strong>Every</strong> <strong>modern</strong> <strong>AI</strong> <strong>architecture</strong> <strong>is</strong> <strong>the</strong> <strong>same</strong> <strong>three-function</strong> <strong>machine:</strong> <strong>Encode</strong> <strong>→</strong> <strong>Store</strong> <strong>in</strong> <strong>latent</strong> <strong>space</strong> <strong>→</strong> <strong>Decode.</strong> The only difference is the shape of the encoder and decoder.</p><p>Another type of latent space emerges in large scale training , <strong>LLM</strong> <strong>internals</strong> become “features” ( dog , grass , fence ) are linearly represented in latent space and “truthfulness” is a direction you can measure and steer.</p><p>Training objective: <strong>next-token prediction</strong> (autoregressive, token by token)</p><p>Finding: features end up as <em>linear directions</em> in the hidden representations. “Truthfulness” is a measurable direction. “Sentiment” is another. The residual stream accumulates them.</p><ul><li>The model wasn’t <em>designed</em> to do this. It emerged because training on text pushed the internal representations to encode interpretable features. (scale — like reading of many books as a child )</li></ul><p>The better approach is to just extract the <em>meaning </em>“a dog on grass near a fence.” That’s a compact description. (This is <strong>predicting</strong> <strong>in</strong> <strong>latent</strong> <strong>space</strong> — LeCun’s JEPA.) So <strong>JEPA , </strong>Predict <em>representations</em>, not pixels and don’t predict the next frame’s pixels. Predict what matters about the next frame.</p><p>Training objective: <strong>predict a representation, not a token or pixel</strong>. You encode image A, encode image B, and train the model to predict B’s representation from A’s representation.</p><ul><li>No autoregressive token-by-token loss. No next-token softmax.</li></ul><p>You could argue that next-token prediction <em>is</em> a form of JEPA — but a “bad” one, using noisy shared context (wording, style) as its positive pairs rather than truly aligned multi-modal pairs. A well-structured JEPA (trained on proper image-text pairs) learns the same kind of platonic representations more efficiently.</p><p>We see that these are different architectures that both produce representations where features are linearly organized. LLMs got there through scale + next-token prediction. JEPA gets there by design: train on aligned multi-modal pairs, predict in latent space, not raw space.</p><p>Imagine you’re describing a city to someone blindfolded.</p><p><strong>Very inefficient : Next-token</strong> <strong>/</strong> <strong>pixel</strong> <strong>prediction:</strong> Describe every brick, every leaf, every crack in the sidewalk. Eventually they’ll have enough detail to “see” it. This takes a lot of words, and most of your description is noise.</p><p><strong>Latent-space</strong> <strong>prediction:</strong> Give them the <em>structure</em>: “There’s a park in the center, a river on the east, three tall buildings on the west.” They now understand the city’s layout.</p><p><strong>JEPA:</strong> Instead of describing the city, you give them coordinates on a map. A vision model gives another set of coordinates. The claim: both coordinate systems encode the <em>same</em> <em>city</em>. The model understands the layout faster and with less information</p><p><strong>The</strong> <strong>Platonic</strong> <strong>Representation</strong> <strong>Hypothesis:</strong> If you train different AI systems (vision, text) on the same world, their internal representations should <em>converge</em> they should learn the same “map” of reality, just with different labels (a rotation).</p><p><strong>The</strong> <strong>experiment:</strong></p><p>- Train a 109M-parameter text encoder using JEPA (predict latent representations of images from text descriptions)</p><p>- Compare its embeddings to a 72B-parameter LLM (Qwen2.5) on how well they agree with a frozen vision model (DINOv2)</p><p><strong>The</strong> <strong>result:</strong> The tiny 109M model beat the 72B model at aligning with a vision model’s internal representation (0.184 vs 0.154 on a benchmark called WIT-1024).</p><p><strong>Why</strong> <strong>this</strong> <strong>matters:</strong> It suggests you can learn “platonic” (modality-agnostic) representations — representations of the world itself, not of any specific sensor — with far fewer parameters than next-token prediction, <em>if</em> you train on aligned multi-modal data.</p><p><strong>But there is a catch with this approach: </strong>using<strong> </strong>text encoders on image captions. The text encoder sees synthetic captions (generated by another AI), not raw words about the world. This is actually a form of distillation. Whether the result generalizes to text that wasn’t pre-generated for vision remains open.</p><p>Lets explain the catch : The 109M-parameter text encoder was trained on captions generated by <strong>LLaVA</strong>, a captioner built on Llama-3–8B. Each image has one human alt-text + twoAI-generated recaptions.</p><p>So the training signal flows: <strong><em>image → LLaVA generates caption → JEPA text encoder learns from that caption</em></strong></p><p>This is knowledge distillation through an intermediate model. The text encoder never “sees the world directly.” It only sees LLaVA’s distilled version of it.</p><p>Whether a human reading a caption not generated for a specific image would get the same alignment is genuinely unknown. That JEPA is more efficient than next-token prediction is only proven within this distillation pipeline:</p><p>- Same synthetic captions for both methods → controlled comparison</p><p>- No comparison with text from other sources (other captioners, human-written descriptions, or raw language not generated for vision)</p><p>- No comparison with the Qwen2.5–72B LLM on its native text, only on the same synthetic caption pool</p><p>This is <strong>not a fatal flaw</strong> — it’s a design choice. The point of learning platonic representations is that the same world should be representable regardless of modality. The distillation pipeline tests whether that vision-to-language pipeline can learn to speak the same language as a vision model.</p><p>What it doesn’t test: whether text from other sources would work equally well. Whether a human reading a non-synthetic caption would place it in the same region of the shared space.</p><p>It’s worth noting: the same distillation concern applies to any claim about “text learns the world’s structure.” If the text was generated by a model that already “sees” the world (LLaVA has a vision encoder), the distillation doesn’t prove text alone can learn the world — it proves text distilled from vision can be aligned with vision.</p><p>the Platonic Representation Hypothesis assumes a neat one-to-one mapping: one image, one caption. That’s convenient for measuring alignment, but real data is many-to-many: one image can be described in many valid ways, and one caption can describe many differentimages.</p><p>The next question to test is whether language can be a <strong>lossless bottleneck</strong> — can you encode an image into text and then reconstruct the image from that text, with no information lost? Think of it as an image-text-image autoencoder: if you can go image → text → image and recover the original exactly (or near-exactly), then language really is a complete representation of that visual information.</p><p>A finding that a lossless bottleneck is uncommon — text under a thousand words can’t capture all the visual detail — then the next question is: what part of the image-text relationship <em>does</em> have a one-to-one correspondence? (The intersection, in a Venn diagram sense.) And how do you separate that from the rest?</p><p>1. <strong>Balestriero &amp; LeCun (2026).</strong> “Proving and Improving the Platonic Representation Hypothesis with JEPAs.” <em>arXiv 2610.39302.</em> — The 109M JEPA text encoder paper.</p><p>2. <strong>Koepke, Zverev, Ginosar &amp; Efros (2026).</strong> “Back into Plato’s Cave: Examining Cross-modal Representational Convergence at Scale.” <em>arXiv 2604.18572 (v3, 2026–10–01).</em></p><p>3. <strong>DrSwarnendu (2026).</strong> “Everyone in AI Talks About Latent Space. Almost Nobody Can Explain What It Actually Is. Here Is the Complete Mathematics.” <em>Medium.</em></p><p>4. <strong>Huh, Cheung, Wang &amp; Isola (2024).</strong> “The Platonic Representation Hypothesis.” <em>ICML 2024.</em> — The original hypothesis: as models scale, representations converge to a shared structure of reality.</p><p>5. <strong>Gröger, Wen &amp; Brbić (2026).</strong> “Revisiting the Platonic Representation Hypothesis: An Aristotelian View.” <em>arXiv 2602.14486.</em> — Null-calibration framework: removes width and depth confounders, showing global metrics vanish while local neighborhoods persist.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fd00677064d6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Anthropic S-1, A “Wahlburgers” Comparison & Valuation Estimate]]></title>
            <link>https://medium.com/@sbayer2/anthropic-s-1-a-wahlburgers-comparison-valuation-estimate-78ccf62d200f?source=rss-cd1b18e89f37------2</link>
            <guid isPermaLink="false">https://medium.com/p/78ccf62d200f</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[wahlburgers]]></category>
            <category><![CDATA[anthropic-claude]]></category>
            <category><![CDATA[ipo]]></category>
            <category><![CDATA[michael-burry]]></category>
            <dc:creator><![CDATA[Sbayer]]></dc:creator>
            <pubDate>Thu, 05 Nov 2026 19:48:53 GMT</pubDate>
            <atom:updated>2026-11-05T19:51:08.990Z</atom:updated>
            <content:encoded><![CDATA[<p>AI helps me make sense of complicated concepts by constructing analogies to explore. I frequently read a tech article that is way over my pay grade and that makes me think of food. So that I suggest food analogies. My oMLX served Qwen3.6 MOE large language model asked “to unpack” a trending tech story or Medium article, to provide a food analogy intuition and stimulate creative asides and correlations that are not initially evident. One such recent endeavor related to Anthropic’s much anticipated inital public offering, and the gigantic S-1 filing last week. My first intuition was to have the Model compare the Anthropic Valuation risk to One of my favorite gourmet burger chains “ Wahlburgers”. As crazy as it sounds It worked for me, and I have tried to put an unedited and unredacted AI unpack of one important unrealized risk of the pending valuation and Credit to the analysis first explained by Michael Burry and his speculative shorting strategy. What follows is the result.</p><p><em>Unpacking Michael Burry’s reading of Anthropic’s Form S-1 through the Wahlburgers failure pattern, plus a transparent valuation estimate for the IPO landing price.</em></p><p><strong>Source:</strong> Gladwyn Lewis, <em>Michael Burry Read Anthropic’s S-1 So You Don’t Have To</em> · Published 2026–11–02</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XM4cOCltOyRmhQPVRHyjPQ.png" /></figure><p><em>Corporate restructured. The chain closed 79 stores between 2025 and 2026, ended several grocery store agreements, and refocused on a smaller number of high-quality locations. Expansion shifted horizontally into travel hubs and entertainment venues (airports, stadiums, arenas). The brand survived — but at a significantly reduced scale and with the sunk costs of over-leasing fully realized.</em></p><p>How does Micheal Burry actually feel about AI Mania ? He has been vocal about AI capex being a mania — calling Nvidia “Enron” is just the latest iteration.</p><p>Burry doesn’t just find mistakes. He finds <strong>asymmetry</strong> — situations where the downside is limited but the upside is enormous. That’s exactly the pattern in his Anthropic analysis: revenue can drop fast (limited downside for customers), but the compute commitments can’t (unlimited/very large downside for shareholders who bought in). He’s looking for the same structural mismatch as the prime mortgage crisis where growth as a coverage ratio, leases that don’t care about traffic at a $537B scale instead of $500M.</p><p>Let’s dive into my buger chain analogy to gain some intuition about this complicated “the pause” short.</p><p>Burry’s “pause” does not require Anthropic to go to zero. It requires revenue to decline or stagnate for long enough that $132B in cash is exhausted while $537B in compute payments keep coming. The company survives — but at a significantly reduced scale, with sunk costs on legacy hardware fully realized, and the brand’s frontier premium eroded by cheaper alternatives. Survival is not the point. <strong>The gap between what you committed to pay and what the market will pay for your product</strong> is the point.</p><h3>The Exact Mechanism That Broke Wahlburgers</h3><p>Three things happened simultaneously, and none of them are “burger quality was bad”:</p><ol><li><strong>Overbuilding (over-leasing).</strong> They committed to 100+ locations before proving unit economics were durable. Each location is a 15–20 year lease. Fixed obligation. You can’t cancel a restaurant lease because “traffic dropped.”</li><li><strong>Competition diluted the novelty.</strong> The Wahlberg brand got old fast. More gourmet burger joints opened. The novelty-driven traffic that justified the buildout plan decelerated.</li><li><strong>Input costs rose.</strong> Beef prices up. Labor costs up. Rent payments fixed. THE PANDEMIC ( bad luck) , AND The margin between revenue and cost of delivery narrowed.</li></ol><p><strong>The death spiral (not collapse — contraction):</strong> Lower traffic → lower revenue → but lease payments stay the same → can’t fund renovations or marketing → worse product/experience → even lower traffic. They didn’t vanish. They shrank. 79 stores closed. Grocery exits. A corporate footprint trimmed to what the traffic could actually support. The sunk costs of over-leasing were real, whether you operated the store or not.</p><h3>How That Maps to Anthropic Exactly</h3><ol><li><strong>Overbuilding (over-leasing compute).</strong> $537B across 6–10 suppliers, much of it future-dated (deliveries extending to 2034–2036). They’re building capacity for a future scale of revenue that doesn’t exist yet.</li><li><strong>Competition dilutes the moat.</strong> Cheaper/better models from OpenAI, Google, Meta (open-weight), Chinese models. API access is “notoriously easy to switch to” (Burry’s own words). The “moat” of being frontier-class is shrinking every quarter.</li><li><strong>The products age while you’re paying for them.</strong> Anthropic itself warns: <em>“secured compute may become less efficient or economically attractive than future alternatives while it remains committed to older-generation equipment.”</em> They’re locked into 2026–2027 hardware through 2034–2036. That’s 7–10 years in AI — an eternity.</li></ol><p><strong>The death spiral (the “pause”):</strong> Customers pull back on API usage → revenue drops → but compute payments keep coming → can’t cancel → cash drains → can’t invest in better models → product competitiveness erodes → more customers leave.</p><h3>The Key Difference: Scale and Opacity</h3><p>Wahlburgers was transparently dying. You could walk past a closed restaurant.</p><p>Anthropic’s S-1 is <strong>opaque by design</strong>:</p><ul><li>The aggregate committed-spend figure is blank: $ [BLANK].</li><li>Every cell in the contractual-obligations table is blank.</li><li>Q3 revenue is blank. (86× Q4 2024, but no number.)</li><li>The price range is blank. &quot;between $ [BLANK] and $ [BLANK].&quot;</li></ul><p>Wahlburgers’ problems were visible in foot-traffic and same-store sales. Anthropic’s problems — if they exist — are buried inside a 94-page risk-factor disclosure that starts on page 26 and ends on page 178, where the actual business description begins.</p><h3>The Lesson Burry Is Extracting</h3><blockquote>Growth is not a defensive tactic. It’s a coverage ratio.</blockquote><p>When you have fixed multi-decade obligations, growth isn’t aspirational — it’s the interest payment on the liability stack. If growth stops, you default. Not to lenders (Wahlburgers had none — just landlords). To vendors who can’t cancel.</p><p>Wahlburgers’ lesson: <strong>the moment growth decelerates, your leases don’t.</strong> They’re not conditional on foot traffic. They’re absolute.</p><p>Anthropic’s S-1 says: <em>“we may enter into these obligations based on revenue expectations that may not be realized.”</em> That sentence, buried in the filing, is the entire risk. It’s the legal equivalent of a restaurant chain saying: <em>“We signed 15-year leases based on projected foot traffic that may not arrive.”</em></p><p>The difference is that Wahlburgers’ restructuring was <em>public, visible, and permanent</em> — 79 closed stores, grocery exits, a brand trimmed to fit the traffic. Nobody walked away from Wahlburgers unscathed. The capital committed to those 79 leases is gone, whether the stores were open or not. Anthropic is pricing its IPO to sell that risk to public shareholders — Class A, one vote, full economic exposure, founders keep 50.1%. Public shareholders get the exposure; the sunk costs are already baked into the $537B schedule whether Anthropic operates at full capacity or not.</p><h3>IPO Valuation Estimate (Late Nov 2026)</h3><p><strong>Estimated landing range: $600B–800B</strong> · Most likely sub-range: $650–750B</p><h3>What I’m Discounting</h3><p><strong>The stated target ($1.5–2T) is not a credible anchor.</strong> It was set in May 2026 when the private valuation was $965B and the market was still pricing in perpetual AI hypergrowth. Three things have collapsed since May:</p><ol><li><strong>The market.</strong> $2T wiped from the Nasdaq-100 in one month. Alphabet lost 12% in one day (worst day in its history). Intel is down 28%. Hyperscalers are <em>pulling back</em> on capex, not increasing it. The market is actively repricing AI revenue multiples downward.</li><li><strong>The comps.</strong> CoreWeave and Nebius — publicly traded AI compute companies — are down 30%+ from their IPO listings. SpaceX (which debuted on Nasdaq in June 2026 at $85.7B) finished below its opening price. The secondary market is <strong>punishing</strong> AI-name listings, not rewarding them.</li><li><strong>The revenue is blank.</strong> Q3 revenue, the price range, the share count — the filing literally has &quot;$ [BLANK]&quot; in multiple critical places. A company that can&#39;t put a number on its own Q3 revenue is not in a position to demand a $2T public-market premium.</li></ol><h3>What I’m Anchoring To</h3><p><strong>The May 2026 private valuation of $965B.</strong> This is the closest thing to a market-clearing price. It reflects what institutional investors actually paid when they had time to read the documents, negotiate terms, and walk away. The IPO has to launch from somewhere close to that, or it doesn’t launch.</p><p><strong>The $132B in cash.</strong> This is the floor cushion. At $20B annualized revenue, that’s 6.6 years of revenue sitting in the bank. The company will not go to zero. That supports a floor valuation — you’re not buying a company that might disappear, you’re buying a company with real margins (85%) and real cash.</p><p><strong>The adjusted operating income of $1.62B at 10% margin.</strong> It’s small relative to the committed obligations, but it proves unit economics work. This isn’t a pre-revenue company betting on faith.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l5UNkwD6Yw3joqGIJTvPVA.png" /></figure><h3>Why It Probably Lands at $600–700B</h3><ul><li><strong>The IPO window is bad.</strong> Money is flowing <em>out</em> of AI shares into defensives (P&amp;G, Berkshire). This is not a market that rewards a $2T price-discovery auction.</li><li><strong>The compute-to-revenue mismatch is the overhang.</strong> $537B in commitments against ~$20B annualized revenue. That’s 27× in forward obligations. Public index funds (the biggest source of IPO demand) are increasingly AI-averse right now. Passive funds can’t buy what they can’t classify.</li><li><strong>Multi-class structure blocks S&amp;P 500.</strong> Russell 500 waivers are uncertain. The buyer pool is structurally limited by the very governance structure the founders designed.</li><li><strong>Burry’s public framing works as a deterrent.</strong> When a famously bearish investor puts $537B next to $16.3B in H1 revenue, the narrative spreads.</li><li><strong>The float problem.</strong> If the float is thin, a $2T headline valuation doesn’t translate to $2T in actual money raised. The index-weight math works against a high headline number with a thin float.</li></ul><h3>Why It Could Be Higher ($800B-1T)</h3><ul><li><strong>The cash position is genuinely extraordinary.</strong> $132B in cash + ST investments. No other AI company has that. It’s a massive downside cushion that some investors will price in as a “bond-like” floor.</li><li><strong>Revenue growth is real, not projected.</strong> 46% sequential Q3, 144% Q2. No customer exceeds 10% of revenue. Revenue outside the top-5 grew 64%→79%.</li><li><strong>Scarcity premium.</strong> If Anthropic is the <em>only</em> frontier AI lab to IPO, there’s a monopoly-on-listing premium. No other pure-play AI name competes for the same IPO window capital.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xFDzpmvpCTw2gVvX8zCtsA.png" /></figure><h3>Bottom Line</h3><p><strong>$650–750B, most likely.</strong></p><p>Not because the company isn’t valuable — it clearly is, with real margins, real cash, and real enterprise demand. But because it’s pricing itself in a market that is actively selling AI names, with a structure that blocks the biggest institutional buyers (passive index funds), with a revenue number that’s literally blank, next to competitors (CoreWeave, Nebius) trading 30% below their IPO prices, in a macro environment where money is flowing into P&amp;G and Berkshire.</p><p>The $1.5–2T target will be <em>negotiated down</em> during roadshow. That’s how IPOs work — the price range is a starting point for bargaining, not a declaration. When the fund managers who have to actually fund a $1.5T position look at the compute obligations, the blank revenue, and the index eligibility problems, they’ll bid it to the market-clearing price, which I estimate is roughly <strong>70–75% of the stated target</strong>.</p><blockquote>This is uncertain. The key variable I can’t observe is Q3 revenue. If it decelerates, I’m wrong on the upside. If it accelerates past $7B/qtr, I’m wrong on the downside. The cash floor at $132B makes a sub-$400B outcome very unlikely, but the multiple compression in the current market makes a &gt;$1T outcome structurally unlikely regardless of Q3 results.</blockquote><p>Thanks for reading if you got this far , I’m going to Wahlburgers before another store closes.</p><p>Generated from clipping: Gladwyn Lewis, “Michael Burry Read Anthropic’s S-1 So You Don’t Have To” · Medium, 2026–11–02</p><p>Source: <a href="https://medium.com/thought-thinkers/michael-burry-read-anthropics-s-1-so-you-don-t-have-to-9f9812095ceb">Medium</a> · Filing: Anthropic Form S-1 (SEC, 26 Oct 2026)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=78ccf62d200f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Qwen3.8-27B 4bit MLX is here :]]></title>
            <link>https://medium.com/@sbayer2/make-qwen3-8-27b-4bit-a-local-vlm-wizard-on-your-mac-bdb703585008?source=rss-cd1b18e89f37------2</link>
            <guid isPermaLink="false">https://medium.com/p/bdb703585008</guid>
            <category><![CDATA[qwen]]></category>
            <category><![CDATA[vllm]]></category>
            <category><![CDATA[mlx]]></category>
            <category><![CDATA[qwen-vlm]]></category>
            <category><![CDATA[vlm]]></category>
            <dc:creator><![CDATA[Sbayer]]></dc:creator>
            <pubDate>Mon, 24 Aug 2026 23:05:45 GMT</pubDate>
            <atom:updated>2026-08-25T16:28:04.065Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to run the wizard on Macbook Pro</h3><p>Unless you just returned from a parallel universe you are probably using or have downloaded Qwen3.8 in all of its magnificent glory and unsolicited frustrations using the quantitized versions for Mac. Ideally this beast should perform video interpretation on your M class chip above M3 with VRAM above 24GB. I was more than happy to grab the mlx-community 4 bit version into my local HF cache and was all excited to feed the beast some videos for analysis that previously did not exist with any degree of performance on a MacBook. I have provided a write up of my adventure with the assistance of Captain Claude Code for anyone who cares.</p><p>Versions:</p><p>vllm-mlx 0.4.1</p><p>mlx-vlm 0.6.15</p><p>Qwen3.8–27B-4bit</p><p>Apple Silicon</p><p>I asked a 27-billion-parameter vision-language model, running locally on a Mac, to describe an 8-second video of someone playing a guitar. It replied:</p><blockquote><em>I don’t see any video or attachment in this conversation, so I can’t describe its objects or colors.</em></blockquote><p>HTTP 200. No errors in the log. A fluent, confident, entirely reasonable answer.</p><p>The model was telling the truth. The video had been accepted, base64-decoded, parsed into a video_url content part — and then silently discarded before it ever reached the model. Fixing that turned up five more bugs stacked behind it, each of which also returned HTTP 200 and a plausible-sounding answer.</p><p>This is a walkthrough of all six, the one measurement that found every one of them, and two things I learned about what these models actually receive when you feed them a video.</p><h3>The measurement that finds all of them</h3><p>Start here, because it makes everything else cheap.</p><p>When a multimodal request goes wrong, the failure is almost always indistinguishable from the model just being bad at the task. The answer comes back well-formed. Nothing throws. You end up tuning prompts against a pipeline that dropped your attachment three layers ago.</p><p>There is one number that separates the two cases and requires no ground truth: send the same prompt twice — once with the attachment, once without — and compare prompt_tokens.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GxIqQRdF_a9GcAqZTOV-Xg.png" /></figure><p>BUG 01</p><h3>A capability allow-list that guessed from the filename</h3><p>The server log had already said it, one line, an hour before anyone read it carefully:</p><pre>SimpleEngine loaded: mlx-community/Qwen3.8-27B-4bit (MLLM=False)</pre><p>MLLM=False. The model had loaded as a text-only LLM. Multimodal content parts were being flattened out of every request as a matter of course.</p><pre>def is_mllm_model(model_name: str) -&gt; bool:<br>    config = _try_read_config_json(model_name)   # local DIRECTORIES only<br>    if config is not None:<br>        return _config_indicates_vlm(config)<br>    return _check_legacy_string_patterns(model_name)   # substring match on the NAME</pre><p>_try_read_config_json returns None unless the argument resolves to a local directory. A HuggingFace repo ID is not a directory. So detection fell through to matching the <em>name</em>against a hardcoded list — &quot;-VL-&quot;, &quot;llava&quot;, &quot;gemma3&quot;, &quot;qwen3_5&quot;. &quot;mlx-community/Qwen3.8-27B-4bit&quot; matches none of them.</p><p>Meanwhile the model’s own config.json says, unambiguously:</p><pre>{<br>  &quot;architectures&quot;: [&quot;Qwen3_5ForConditionalGeneration&quot;],<br>  &quot;image_token_id&quot;: 248056,<br>  &quot;video_token_id&quot;: 248057,<br>  &quot;vision_config&quot;: { &quot;model_type&quot;: &quot;qwen3_5&quot; }<br>}</pre><p>And that file was sitting in the local HuggingFace cache the entire time, one call away:</p><pre>from huggingface_hub import try_to_load_from_cache<br>try_to_load_from_cache(repo_id, &quot;config.json&quot;)   # no network, returns the path</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4EuWpZBEWq2A5Ox6tILkig.png" /></figure><p>BUG 02</p><h3>The upstream module had been deleted</h3><p>With detection fixed, the same request went from a silent lie to a loud error:</p><pre>ModuleNotFoundError: No module named &#39;mlx_vlm.video_generate&#39;</pre><p>HTTP 500. That is <em>progress</em> — a wrong answer replaced by an honest failure — but it isn’t working video.</p><p>vllm-mlx’s native video path imported two things from mlx_vlm.video_generate. In mlx-vlm 0.6.x that module no longer exists; the layout is mlx_vlm.generate.* now, and process_vision_info was removed entirely. Any model with a video_token_id— every Qwen3-VL-class model — took this path and hit the wall.</p><pre>from mlx_vlm.utils import load_video          # decode<br>from mlx_vlm.generate import generate         # generate(video=[...])<br><br>frames, sample_fps = load_video(<br>    path, fps=video_fps, max_frames=video_max_frames,<br>    min_frames=MIN_FRAMES, frame_factor=FRAME_FACTOR,<br>)</pre><p>One deliberate choice: decode in vllm-mlx rather than handing generate() a path. First, video_max_frames gets honored — upstream’s default cap is 768 frames, and a five-minute clip at 2 fps would try 600 frames, roughly 450,000 prompt tokens. Second, having the frames in hand means they can be validated before they reach the model.</p><p>If the native path is unavailable, the request now falls back to frames-as-images instead of raising. That fallback is a working substitute, not an equivalent one — stills go through the image encoder rather than the model’s temporal 3D convolution, so token cost per frame, effective resolution and motion tracking all differ. It logs a warning saying exactly that, because two paths that produce different stimuli should never be silently interchanged.</p><p>Result: 68 → 12,110 prompt tokens, and a correct description of the clip.</p><p>BUG 03</p><h3>Everything that could fail quietly</h3><p>Three more places where a media failure produced no signal.</p><p>The frame sampler returned whatever it got. Frame-index seeking can silently skip frames on long-GOP codecs like HEVC, and an empty list was a perfectly valid return value — the request then ran with no visual input at all.</p><pre>def assert_video_decoded(frames, video_path, *, height_axis=0, width_axis=1):<br>    if len(frames) == 0:<br>        raise ValueError(<br>            f&quot;Decoded 0 frames from {video_path}. The container or codec could &quot;<br>            &quot;not be read - this is a decode failure, not a model failure.&quot;<br>        )</pre><p>That last clause is the point. The error names the layer, so the next person doesn’t spend an afternoon blaming the model. It also logs the successful case — Video decode OK: 16 frames, 2160x2604 — which makes frame count and orientation visible in the log instead of merely inferable.</p><p>The multimodal processor caught every media exception and continued. logger.warningand carry on, producing a request with no media and a confident answer about nothing. Now it raises. A 4xx or 5xx naming the real cause is worth far more than a plausible 200.</p><p>The temp-file suffix was built by string-splitting the MIME type. mime.split(&quot;/&quot;)[-1]turns video/quicktime into .quicktime and video/x-matroska into .x-matroska. FFmpeg content-sniffs, so OpenCV opened these anyway — I verified .quicktime, .mov and no suffix at all decode identically. Latent, not live. Fixed regardless, with a real MIME→container map, because decoders like PyAV and decord infer the container from the extension and this becomes live the moment anyone swaps the backend.</p><p>BUG 04</p><h3>The UI could show you a chip for a file it had thrown away</h3><p>Unknown file extensions defaulted to image/jpeg. A mislabeled video is rejected or misread server-side, and the guess hides the real problem. Resolution is now by extension, then the system MIME database, then an exception. The tables gained .mov / video/quicktime — what an iPhone produces and what browsers report for it — plus .m4v, .mkv, .heic.</p><p>The prompt_tokens check from the top of this article is now a product feature: if attachments were sent and the server reports an implausibly low prompt token count, the reply carries a visible warning naming the likely cause and how to check it.</p><p>And startup queries /health, warning when the server has loaded a text-only model while the UI is in multimodal mode — the exact configuration of Bug 01, caught before the first message instead of after twenty.</p><p>BUG 05</p><h3>A flag that worked everywhere except where you needed it</h3><p>Video worked. Video was also slow — and then it stopped working again:</p><pre>Error: 504 Server Error: Gateway Timeout</pre><p>The model is a reasoner, so I had started it with thinking disabled server-wide via --default-chat-template-kwargs &#39;{&quot;enable_thinking&quot;: false}&#39;. Text replies came back in under a second. Image replies, instant. Video requests reasoned for 8,192 tokens — about eight minutes at 17 tok/s — and blew through the 300-second request timeout.</p><p>The flag was working. It just never reached the video path: the native branch built its chat-template arguments from tools alone and dropped enable_thinking on the floor. Confirmed straight against the model’s own template:</p><pre>enable_thinking=True   -&gt;  ...&lt;|im_start|&gt;assistant\n&lt;think&gt;\n<br>enable_thinking=False  -&gt;  ...&lt;|im_start|&gt;assistant\n&lt;think&gt;\n\n&lt;/think&gt;\n\n</pre><p>A pre-closed think block versus an open one. That one dropped keyword was the difference between no reasoning at all and reasoning until the token budget ran out.</p><p>A setting appears to work because the paths that honor it are the ones you test first. Text works, images work, so the flag is fine — and the one path that ignores it is the one you were actually trying to use.</p><p>After the fix: 396 tokens in 60.8 seconds, HTTP 200.</p><h3>Reproduce it</h3><pre>git clone https://github.com/sbayer2/vllm-mlx.git<br>cd vllm-mlx<br>git checkout fix/video-silently-dropped</pre><p>Six commits, each self-contained:</p><pre>8d174bf  Stop replaying historical media in Gradio chat<br>59e9110  fix(video): honor enable_thinking on the native video path<br>d921030  fix(chat-ui): surface attachments the server dropped<br>1a0d5a5  fix(video): port the native video path to the mlx-vlm 0.6 API<br>c554d3e  fix(video): fail loudly on a video that did not decode<br>57c95f7  fix(detection): read config.json for HF repo IDs in is_mllm_model</pre><p>Serving, and the chat UI in a second terminal:</p><pre>source ~/vllm-mlx-env/bin/activate</pre><pre>vllm-mlx serve mlx-community/Qwen3.8-27B-4bit \<br>  --served-model-name qwen --port 8000 \<br>  --default-chat-template-kwargs &#39;{&quot;enable_thinking&quot;: false}&#39; \<br>  --timeout 900</pre><pre>vllm-mlx-chat --server-url <a href="http://127.0.0.1:8000/">http://127.0.0.1:8000</a> \<br>  --served-model-name qwen --max-tokens 8192</pre><p>--served-model-name must match on both, or every reply is Error: The model &#39;default&#39; does not exist.</p><p>And the A/B that started all of this, which you can point at any multimodal server:</p><pre>import base64, requests<br><br>URL = &quot;http://localhost:8000/v1/chat/completions&quot;<br>PROMPT = &quot;Describe exactly what you see in this video.&quot;<br><br>def ask(content):<br>    r = requests.post(URL, json={&quot;model&quot;: &quot;qwen&quot;, &quot;max_tokens&quot;: 1,<br>                                 &quot;messages&quot;: [{&quot;role&quot;: &quot;user&quot;, &quot;content&quot;: content}]})<br>    return r.json()[&quot;usage&quot;][&quot;prompt_tokens&quot;]<br><br>b64 = base64.b64encode(open(&quot;clip.mov&quot;, &quot;rb&quot;).read()).decode()<br>print(&quot;text only:&quot;, ask(PROMPT))<br>print(&quot;with video:&quot;, ask([<br>    {&quot;type&quot;: &quot;text&quot;, &quot;text&quot;: PROMPT},<br>    {&quot;type&quot;: &quot;video_url&quot;, &quot;video_url&quot;: {&quot;url&quot;: f&quot;data:video/quicktime;base64,{b64}&quot;}},<br>]))</pre><p>Two numbers within a few dozen of each other means your attachment is being dropped, whatever the model says in its answer.</p><h3>The pattern</h3><p>Five of the six bugs shared one shape: an allow-list, a lookup, or a keyword that didn’t recognize valid input, and no error anywhere.</p><ul><li>A MIME allow-list without video/quicktime (llama.cpp, same week)</li><li>A capability check that matched on names instead of reading the declared config</li><li>An import against a module that upstream had renamed</li><li>A file-type resolver that guessed image/jpeg for anything it didn’t know</li><li>A template keyword forwarded on three paths out of four</li></ul><p>Every one returned HTTP 200 with a coherent answer. Not a single one raised. And in every case the model got blamed for a plumbing failure — which is the expensive part, because you can burn days tuning prompts against a pipeline that discarded your input before inference began.</p><p>Multimodal pipelines have many places to drop a payload and very few places that complain. So assert on the artifact, not on the absence of an exception. Count the frames. Look at the frame. And when in doubt, send the same prompt twice and diff the token count.</p><p>APPENDIX</p><h3>The five-minute version</h3><p>Everything above is the investigation. This is the part you can act on without reading any of it.</p><p>You’re in the right place if you’re running an MLX vision model behind a chat UI — LM Studio, SGLang, Open WebUI, llama.cpp’s server, vllm-mlx’s own — and either your .movfiles vanish or get rejected, or a single video takes minutes to come back. Two independent problems, two fixes. Neither requires patching your server.</p><h3>Step 0 — Install it</h3><p>Apple Silicon Mac, macOS with Homebrew. ffmpeg is needed for the conversion in Fix 1.</p><pre>brew install python@3.12 ffmpeg</pre><pre>python3 -m venv ~/vllm-mlx-env<br>source ~/vllm-mlx-env/bin/activate<br>pip install --upgrade pip</pre><p>Then install vllm-mlx. Pick one:</p><pre># (a) The PyPI release - does NOT contain the video fixes in this article<br>pip install vllm-mlx<br><br># (b) The patched branch - video actually works<br>pip install &quot;vllm-mlx @ git+https://github.com/sbayer2/vllm-mlx.git@fix/video-silently-dropped&quot;</pre><p>Everything else comes along automatically: mlx, mlx-vlm, opencv-python, transformers, gradio and fastapi are all hard dependencies, so there are no extras to remember. Python 3.10 or newer is required. Verify with pip show vllm-mlx and vllm-mlx --help.</p><p>Hardware. Qwen3.8-27B-4bit is roughly a 15 GB download and holds about 16 GB resident once loaded — it wants 32 GB of unified memory to be comfortable and 64 GB to leave room for anything else. On a smaller machine use the model from vllm-mlx’s own docs, mlx-community/Qwen3-VL-4B-Instruct-3bit, and substitute it everywhere below. The first serve downloads the weights automatically; later starts read the HuggingFace cache and take about a minute.</p><h3>Step 1 — Run it</h3><p>Terminal 1 — the server:</p><pre>source ~/vllm-mlx-env/bin/activate</pre><pre>vllm-mlx serve mlx-community/Qwen3.8-27B-4bit \<br>  --served-model-name qwen --port 8000 \<br>  --default-chat-template-kwargs &#39;{&quot;enable_thinking&quot;: false}&#39; \<br>  --timeout 900</pre><p>Wait for Uvicorn running on http://127.0.0.1:8000. Roughly a minute to load ~16 GB.</p><p>Terminal 2 — the chat UI:</p><pre>source ~/vllm-mlx-env/bin/activate</pre><pre>vllm-mlx-chat --server-url <a href="http://127.0.0.1:8000/">http://127.0.0.1:8000</a> \<br>  --served-model-name qwen --max-tokens 8192</pre><p>Then open <a href="http://127.0.0.1:7860.">http://127.0.0.1:7860.</a></p><p>Three things that will bite you if you skip them:</p><ul><li>--served-model-name must match on both commands. Mismatch it and every reply is Error: The model &#39;default&#39; does not exist. Available model: &#39;qwen&#39;.</li><li>--default-chat-template-kwargs &#39;{&quot;enable_thinking&quot;: false}&#39; is what keeps a video reply near a minute instead of eight (Fix 3).</li><li>Type a question alongside the attachment. An empty textbox sends the clip with no text part, and the model — having no language cue — is liable to answer in Chinese.</li></ul><p>Two commands worth knowing when something looks wrong:</p><pre>curl -s localhost:8000/health          # model_type should say &quot;mllm&quot;, not &quot;llm&quot;<br>curl -s localhost:8000/v1/models       # the id here is your --served-model-name</pre><h3>Fix 1 — Convert the clip once. It solves four things at once.</h3><pre>ffmpeg -i IMG_2537.mov \<br>  -vf scale=-2:720 \<br>  -c:v libx264 -pix_fmt yuv420p \<br>  -movflags +faststart \<br>  -an \<br>  clip.mp4</pre><p>On the test clip: 16.7 MB → 1.25 MB, and ffprobe now reports 598x720, h264, with no rotation side data at all. Each flag is doing specific work:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SnTG4dAQJb8LDu7reFkrnA.png" /></figure><p>If your only problem is the container and you want full resolution, remux losslessly instead — no re-encode, near-instant:</p><pre>ffmpeg -i IMG_2537.mov -c copy -movflags +faststart clip.mp4</pre><p>That keeps the HEVC video and the rotation metadata, so it fixes the MIME and moov problems but not the codec or rotation ones.</p><h3>Fix 2 — Understand what you’re paying for, then pay less</h3><p>For Qwen3-VL-class models the prompt cost has a closed form:</p><pre>prompt_tokens  ≈  total_pixels ÷ 2048<br>                  where total_pixels = frames × width × height<br>                  capped at max_pixels ÷ 2048</pre><p>The ÷ 2048 is patch_size² × merge_size² × temporal_patch_size = 16² × 2² × 2. The cap comes from your model’s video_preprocessor_config.json — for Qwen3.8-27B, max_pixels: 25165824, so 12,288 tokens is the ceiling no matter what you send. Measured on the same server, same model, same 16 frames:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Fo_PapVOtBn9Ub_EYWhBUg.png" /></figure><p>Prediction and measurement agree to within 5 tokens, and the wall time is 6× fasterfor the same 16 frames of the same video — because video latency here is dominated by prefill, not generation.</p><p>A 4K phone clip saturates the pixel budget and gets <em>silently downscaled by the processor anyway</em>. You are not gaining detail by sending it — you’re paying full prefill for pixels that get thrown away. Downscale it yourself and choose where the savings go.</p><p>Rules of thumb for a 16-frame sample:</p><ul><li>Below about 1.57 MP per frame (~1620×970) you’re under the cap, paying only for what you send.</li><li>Above it you’re at the ceiling regardless, so a bigger file buys nothing.</li><li>Want fine detail instead of motion? Send fewer frames (video_fps: 0.5), not a bigger file — four frames at the same budget get ~2,768 tokens each instead of ~756.</li></ul><h3>Fix 3 — Stop the model reasoning for eight minutes</h3><p>Qwen3.5/3.8 are reasoning models. Left alone, a video request will spend its entire max_tokens budget inside &lt;think&gt; before writing a word of answer — at 17 tok/s that is about eight minutes for an 8,192-token budget, and on many servers it trips a 300-second gateway timeout first. Three ways to stop it, in order of preference.</p><p>Server-wide, if you control the launch command:</p><pre>vllm-mlx serve mlx-community/Qwen3.8-27B-4bit \<br>  --served-model-name qwen --port 8000 \<br>  --default-chat-template-kwargs &#39;{&quot;enable_thinking&quot;: false}&#39; \<br>  --timeout 900</pre><p>Per request, which works from any UI that lets you add fields to the JSON body:</p><pre>{<br>  &quot;model&quot;: &quot;qwen&quot;,<br>  &quot;messages&quot;: [ ... ],<br>  &quot;chat_template_kwargs&quot;: { &quot;enable_thinking&quot;: false }<br>}</pre><p>Measured on the converted clip: 3,366 prompt tokens, 40 completion tokens, 10.6 seconds, and a correct one-sentence answer.</p><p>Capped, if your UI can do neither and you just want a ceiling on the reasoning: --default-thinking-token-budget 256.</p><p>Two traps worth knowing:</p><ul><li>/no_think in the prompt does not work for this model. That convention comes from earlier Qwen releases; the string appears zero times in Qwen3.8’s chat template, so it is read as literal text.</li><li>On vllm-mlx you need the Bug 05 fix for any of this to apply to <em>video</em>. Before that commit, enable_thinking reached text and image requests and was dropped on the video path — so the flag looks like it’s working right up until you attach a clip.</li></ul><h3>Fix 4 — Confirm it before you tune anything</h3><p>Whatever server you’re on, run the A/B from “Reproduce it” before you touch a prompt. It is the same ten-second check that found every bug in this article, and it works against any OpenAI-compatible endpoint. What healthy looks like, on the converted clip:</p><pre>prompt_tokens for text alone     ~50-70<br>prompt_tokens with the video     3,000-12,000</pre><p>And in the server log, if you’re on the patched vllm-mlx:</p><pre>Video decode OK: 16 frames, 598x720, from /var/folders/.../tmpXXXX.mp4<br>Native video: 1 video(s), 16 frames total, sampled at 1.96 fps</pre><p>Two things to read off that line. The frame count should be non-zero and roughly fps × duration. The dimensions should be the <em>display</em> orientation — portrait video reports a height larger than its width. If they’re transposed, you have the rotation bug and the frames are being read at the wrong stride.</p><h3>If you’re on LM Studio, SGLang, or llama.cpp</h3><p>The fixes in this article are vllm-mlx commits, but the failure modes aren’t vllm-mlx-specific — they’re what happens when a container format, a capability check and a decoder disagree. On a server you don’t control, check in this order:</p><ul><li>Does the UI accept the file at all? If a .mov disappears from the composer with no error, its allow-list is missing video/quicktime. Fix 1 sidesteps it entirely.</li><li>Does the request carry the video? The A/B check. If prompt tokens don’t move, stop debugging the model.</li><li>Does the decoder get a path or a bytestream? Anything piping bytes to FFmpeg needs +faststart — which Fix 1 already did for you.</li><li>Are the frames upright? Decode one frame, write it to PNG, and look at it. Byte counts survive a transpose; your eyes don’t.</li></ul><p>That last one is worth repeating, because it’s the cheapest test in this whole article and the one that settled the biggest question in it.</p><p>Fixes: <a href="https://github.com/sbayer2/vllm-mlx">github.com/sbayer2/vllm-mlx</a>, branch <a href="https://github.com/sbayer2/vllm-mlx/tree/fix/video-silently-dropped">https://github.com/sbayer2/vllm-mlx/tree/fix/video-silently-dropped</a></p><p>Upstream: <a href="https://github.com/waybarrios/vllm-mlx">waybarrios/vllm-mlx</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bdb703585008" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Parable of Fable]]></title>
            <link>https://medium.com/@sbayer2/the-parable-of-fable-3ff4a5454a9f?source=rss-cd1b18e89f37------2</link>
            <guid isPermaLink="false">https://medium.com/p/3ff4a5454a9f</guid>
            <category><![CDATA[claude-code]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[claude-fable-5]]></category>
            <category><![CDATA[graphify]]></category>
            <category><![CDATA[anthropic-claude]]></category>
            <dc:creator><![CDATA[Sbayer]]></dc:creator>
            <pubDate>Tue, 04 Aug 2026 21:45:09 GMT</pubDate>
            <atom:updated>2026-09-01T15:10:26.470Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/910/1*kDW33eXn4QqpmFe1E7GaSA.png" /></figure><p>TLDR: Using Fable to Play inside an obsidian wiki vault results in interesting projects that are much larger than my simple knowledge base of math and science, and my rudimentary understanding of AI and Deep Learning. Fable builds a multiday evolving test apparatus to explore big picture ideas driving current model development. Specifically Fable tailors the apparatus to run on a small GPU sparse MacBook Pro. Fable tests the apparatus extensively in the Anthropic Sandbox before building the github repo and clones to my Macbook. The process requires several session restarts related to extreme context , tool use , and token economics using Fable. The apparatus remembers lessons learned more as “stories” represented by the Obsidian graph, and less by stale CLAUDE system prompts and passed memory markdown prompts that act like memory, but are in reality just learned prompts. The obsidian graph additions after sessions provide a richer history of the project and therefore a new Fable session can quickly see the story and proceed in dev more efficiently and with better token economics , than previous “memory” hacks , or Claude Code memory cache ( which is really just system prompt pruning between sessions ). It is the Parable of the power of story telling which changes with each telling and that is our shared conscious history whether real , myth , or fable.</p><p>I have been using Fable with Claude Code since before and after the Anthropic Fable blip (June 12–30). I don’t know why they initially called it “Fable 5” on June 9th when it appeared on my Claude Code cli command /model prompt like a lost puppy, maybe the first 4 did not survive the litter. Back to the story. I used Claude Code since March of 2025 and have gained a weird adversarial wizard like dependency on the OG code assistant. It never made sense for me use it with my ide program, and so I happily used the command line version to build all sorts of crazy programs. As Claude Code gained more ability , in part by the evolving strength of the base model , and in part by the harness enhancements coded by the High elven counsel at Anthropic ( also probably why the high Elven language exploit caused the blip ) , Claude Code has by all accounts graduated from the wonder years to the Cleon Empire. After the blip I have started using Fable to code a “World Model”, “ Marble” like harness to test my crazy theories about how far you can compress digital information in a deep learning model and still have it decode something realistic when presented with a new signal ( image , text , sound , etc ).</p><p>Some History ; Back in April I started using the obsidian karpathy LLM knowledge base wiki vault thingy to build a “ peripheral brain unit “ (pbu) for Claude Code. Using the obsidian plug in my browser I gathered about 60 clippings related to world models , latent spaces , Jepa , LeCun , Fei-Fei Li, and any thing AI robot in a vault on my MacBook and set the claude powered wiki to work using obsidian to build a big stringy graph and edges and nodes to use. This just sat there in markdown until June 9, the fateful day I decided to just let Fable have a — dangerously-skip-permissions party in the vault with prompt “ reverse engineer World Labs Marble , with a version I can run test on my Macbook.” Then June 12 hit hard and the vault party ended.</p><p>Since July 1st independence Fable Day (IFD) I have been using just Fable in Claude code for 35 days post blip set loose in the wiki vault to reverse engineer Jepa , marble , and world models. This project has grown exponentially to something I really do not understand with way to many forks and self generated PRs. I have a premium Anthropic account , but still was getting decimated on token use , and in detention every day. The PBU was working great for context carry between sessions. A real friend (Named Safi Shamsi) of the known universe built “Graphify” in April in response to Karpathy’s post. I just installed the repo and started using it last week. Somehow Graphify and Fable have turbocharged my project and saved me time $ and $ $. But the coolest thing is how my sessions have become “ Fables “ to be passed on as “stories” from one Claude Code Session to another. Not unlike the Odyssey. ( probably not at all like the Odyssey).</p><pre> ❯ Great work !  I am going to start a new session with claude code in the .venv,<br> It will default to Fable as the model , can you give me an opening prompt for the new session that will &quot;activate&quot; all of our      <br> context bridges ?                                                                                                                                                                                                  <br>  <br>⏺ Here&#39;s the opening prompt — paste it as the first message of the new session:<br>  <br>  Orient yourself before doing any work, using the cheap paths only:<br><br>  1. Read memory/context-stack.md and memory/pseudomarble-state.md (your<br>     memory dir) and follow the context-stack protocol for this whole<br>     session: graph queries before file sweeps, no graph rebuild unless I<br>     ask, vault wikis as peripheral references only, no uninvited vault<br>     writes, no memory consolidation.<br>  2. Read graphify-out/GRAPH_REPORT.md for the repo map (current through<br>     F27). Use `graphify query &quot;&lt;question&gt;&quot;` for any architecture or<br>     finding-structure question that follows.<br>  3. Check ground truth: git log --oneline -5, gh pr list, and the Status<br>     line at the bottom of CLAUDE.md. Trust the repo over memory if they<br>     disagree.<br>  4. Read the F27 entry and §4 of docs/FINDINGS.md directly (primary<br>     record, not the compiled map) — that&#39;s where the open research<br>     decision lives.<br><br>  Then give me a short orientation: where the project stands, what&#39;s open,<br>  and your read on whether F28 (directional / content-matched coherence)<br>  is the right next experiment — before touching anything.<br><br>  Design notes, briefly: steps 1–3 are all cheap (memory files, one report, <br>  git one-liners — a few thousand tokens total), so the fresh context budget <br>  stays with Fable&#39;s reasoning. Step 4 is the one deliberate<br>  primary-source read, pointed at the exact place where fresh judgment matters<br>   — the F28 fork — so the new session forms its own view of <br>  the substrate-entanglement result before inheriting mine. And the closing<br>  instruction makes it report-then-stop, so you get the fresh read as a <br>  deliverable rather than the session charging into work.<br><br>  The one thing no prompt can carry over: this session&#39;s F26/F27 branches <br>  are merged and everything is pushed, so the new session starts from a <br>  clean main with zero loose ends — the best possible handoff state.<br>  Good hunting with the fresh eyes.<br><br>✻ Worked for 21s<br>  <br>❯ your contributions have been invaluable and your work and ideas will carry on <br>in the new session                           <br><br><br>  The work carries forward in better shape than any handoff summary: <br>  it&#39;s in the FINDINGS record, the frozen verdict scripts, the graph, <br>  the wiki threads, and the memory protocol we just set. The next session<br>  inherits instruments, not just conclusions.<br><br>  Give Fable my regards when they read F27. I hope they argue with it.</pre><p>In this telling the Model is using the GRAPH_REPORT markdown as the story to be passed on to new session model. Noted that the new session will always orient with the existing configuration CLAUDE.md that is global and then for the project. To bypass this at the start of the new session just go to the project directory and use : <strong>claude — — bare </strong>. It starts a session with <em>nothing</em> auto-loaded: no global CLAUDE.md, no project CLAUDE.md, no auto-memory injection, no skills, no MCP servers. The files stay untouched on disk, so the session can still Read any of them the moment you say so. Also you could launch the new session with</p><p>CLAUDE_CODE_DISABLE_AUTO_MEMORY=1 claude</p><p>That suppresses the memory injection too, so nothing about the project enters context except your prompt, while the vault and graphify skill stay live. The memory files remain readable by path when the prompt directs it.</p><p>Why do all of this ? For large projects it saves token use with Fable 5 , and it can reduce the risk for context rot over the life of the project.</p><p>Now back to the story. What is Fable trying to do with my “pseudo-marble” program that I asked it to reverse engineer from Marble, using the vault wiki knowledge as a sort of smart not vectorized retrieval augmented generation. Fable churned and coded, offering up a unique type of test scenario that could be run on a Macbook with a metal processor M1,2,3,4,5 etc , accessible GPU memory is also required up to about 24 GPU, the coding sessions became dense and at times I did not fully understand what Claude Code was building or testing. After 3 weeks of this I asked for description without the jargon “ what are we doing “.</p><p>My prompt :</p><p>explain what we have done like it is my first day of high school, there is a lot of theoretical jargon and higher level concepts that I dont think you understand that you understand these unconsciously after building all of this , But I dont , your subconscious j spaces ( jacobian arrays and weights ) have codified this in our development , but what seems a priori to you is not for me</p><p>Claude Code:</p><p>Here’s everything built, told like a story.</p><h3>The one question, in one picture</h3><p>Pick up a water balloon in your mind. You already know a whole pile of things about it: it’s heavy, it sloshes, it’s soft, and if you drop it on the sidewalk it’s going to <em>splat</em>. Here’s the important part — you didn’t look those up separately. You didn’t check a “what it looks like” list and then a separate “what it does” list. You have <em>one</em> idea of “water balloon,” and both the picture <em>and</em> the splat fall out of that single idea automatically.</p><p>That single, unified knowing is the thing this whole project is chasing. The big question is:</p><blockquote><em>Can a machine have that? One genuine understanding of an object, from which both “what it looks like” and “what it does when you mess with it” come out together — instead of two separate guesses stapled together?</em></blockquote><p>That’s it. That’s the entire project in one sentence. Everything else is machinery built to <em>test</em> whether a machine can do it, and to <em>measure</em> whether it really did.</p><h3>What “a machine that learns” even means</h3><p>Forget anything fancy. A learning machine here is just a student doing flashcards.</p><p>You show the student thousands of examples — “here’s an object, here’s what happened when we dropped it” — over and over. Each time, the student makes a guess, sees the right answer, and nudges its internal guessing-habits a tiny bit toward being right. Do that ten thousand times and the student gets good at it. That repeated flashcard practice is the thing everyone calls training. There’s no magic; it’s practice with correction.</p><p>The “brain” of the student is just a giant pile of number-knobs that get tuned during practice. When your message called it “weights,” that’s what weights are — the tuning knobs. Nothing more mystical than the volume and bass knobs on a speaker, just millions of them.</p><h3>The “shared understanding” — the mental sticky-note</h3><p>When <em>you</em> glance at a coffee mug, your brain instantly boils that whole image down to a compact idea: <em>“ceramic, medium-heavy, breakable, holds liquid.”</em> You throw away the millions of pixels and keep the gist.</p><p>Our machine does the same thing. It looks at the object and squishes everything it sees down into a short mental sticky-note — in the code this is just a list of numbers, the machine’s private shorthand for “what this thing is.” The docs call this the <em>latent</em>, or z. Whenever you see z, read it as &quot;the machine&#39;s one sticky-note about the object.&quot;</p><p>The entire bet of the project is this: can ONE sticky-note be rich enough to produce both the object’s appearance and its behavior? Because if it can, that’s the water-balloon magic — one understanding, two outputs.</p><h3>The two helpers reading the same sticky-note</h3><p>Now picture the sticky-note being handed to two helpers sitting side by side:</p><ul><li>Helper A — the “draw it” helper. It reads the sticky-note and draws a picture of the object. (Docs call it the <em>render head</em>.)</li><li>Helper B — the “predict it” helper. It reads the <em>same</em> sticky-note and predicts what the object <em>does</em> — does it bounce, slide, tip over? (Docs call it the <em>behavior head</em>.)</li></ul><p>Your architecture diagram is exactly this: the box, the two helpers branching off it. And here’s the crux — both helpers are forced to read from the same single sticky-note. They’re not allowed their own private notes. The hope is that this forcing makes the sticky-note learn the <em>real</em> essence of the object, the way your “water balloon” idea does.</p><h3>Where do the flashcards come from? (this is why MuJoCo exists)</h3><p>Here’s a problem. To teach the student, you need flashcards that show <em>both</em> an object’s true look <em>and</em> its true behavior — the same object, both sides, with a guaranteed-correct answer key. You cannot download those off the internet. Nobody has a big pile of “here’s a photo of this exact object AND here’s precisely how it bounced.”</p><p>So you <em>manufacture</em> them. And the factory is MuJoCo — which is just a physics engine, the same kind of software that makes video games feel real when a barrel rolls down a hill or a crate topples. You tell MuJoCo “here’s a cylinder, this heavy, this slippery,” it drops it in a little simulated room, and it reports back <em>exactly</em> what happened — how high it bounced, whether it tipped — because it’s the one running the physics. It’s the perfect teacher: it writes the quiz and holds the answer key at the same time. No guessing about the “true” answer, because MuJoCo <em>is</em> the truth in this little world.</p><p><em>(You also kept a second, prettier factory called Blender for nicer-looking pictures, but MuJoCo is the workhorse because it hands you the physics for free.)</em></p><p>Why not just use real-world photos and real objects? Because then nobody knows the exact true answer to grade against. The synthetic world is a bit of a toy — but it’s an <em>honest</em> toy where you can actually check the machine’s work.</p><h3>How we “mess with” the objects</h3><p>Remember the water balloon — you understand it because you can imagine <em>doing things</em> to it. So the machine’s flashcards aren’t static photos; every object gets poked in three standard ways (the docs call these <em>probes</em>):</p><ul><li>Drop it — does it bounce? how high? when does it settle?</li><li>Tilt it on a ramp — does it slide down?</li><li>Push it — does it slide, or tip over?</li></ul><p>Then we record simple numbers: how high, how far, did it topple, etc. Predicting <em>those</em> is the real job. “What it does when you act on it” — that’s the physical essence we actually care about, not just three static facts.</p><p>One neat wrinkle: a tall skinny object tips when you push it, but a squat one just slides. So shape and material genuinely tangle together — the machine can’t cheat by memorizing “heavy things do X.” It has to actually understand.</p><h3>The clever part: how do you catch a faker?</h3><p>This is the heart of the whole thing, and it’s genuinely subtle, so let me go slow.</p><p>The two helpers <em>look</em> like they’re cooperating. But how do you <em>prove</em> they’re really sharing one sticky-note, versus each secretly keeping their own and just happening to agree? Standing still, a faker and the real thing look identical — same problem as the “camera-and-scale in a box” from your README.</p><p>Here’s the trick you built. You give the sticky-note a tiny nudge and watch both helpers react.</p><ul><li>If it’s <em>one real shared understanding</em>: a nudge that makes the drawing change <em>a lot</em> should also make the behavior-prediction change <em>a lot</em>. And a nudge that barely touches the drawing should barely touch the behavior. They react in step, because they’re reading the same note.</li><li>If it’s <em>two fakers with separate notes</em>: nudging the shared note makes each helper twitch in its own unrelated way. No relationship. They react to different things.</li></ul><p>You do this nudge-and-watch hundreds of times and measure how <em>in-step</em> the two helpers’ reactions are. That in-step-ness score is called coherence. High coherence = they move together = evidence of one genuine understanding. Near-zero = two stapled-together fakers.</p><p>(When the docs say <em>Jacobian</em>, they just mean “how much a helper’s output reacts to a nudge.” That’s the whole word. “Sensitivity to a poke.” I’ll never use it again.)</p><h3>The surprises — where it got interesting</h3><p>In plain words:</p><p>Surprise 1 — a brand-new, untrained machine already looks “coherent.” Before <em>any</em> practice, the two helpers already move somewhat in step — not because they understand anything, but simply because they’re <em>literally holding the same blank sticky-note.</em> So a naive “look, they move together!” would be a fake win. The fix was honest: measure the <em>trained</em> score, then subtract the untrained score, and only the leftover counts as real learning. (This one catch, found <em>before</em> wasting time on the expensive computer, is one of the most valuable things in the whole project.)</p><p>Surprise 2 — the “did it tip over?” answer is treacherous. Right at the balance point, “tips vs. doesn’t” flip-flops like a coin landing on its edge — tiny differences flip the answer. And for a <em>ball</em>, “did it tip over?” is meaningless (a ball has no upright position). So that one measurement is noisy and can’t always be trusted. Good to know before leaning on it.</p><p>Surprise 3 — the machine found a way to cheat, and the measuring stick <em>rewarded</em> the cheat. When you finally ran the real thing, some practice-runs learned a little genuine coupling — but others gave up and just guessed the average answer for everything (a “collapse”). The nasty part: the gave-up machines <em>scored higher</em> on the coherence meter. So a high coherence score could mean “brilliant” or “totally collapsed,” and you couldn’t tell from the score alone. The lesson you baked in: never trust the coherence number by itself — always check the machine is actually making real, varied predictions, not just parroting the average.</p><p>Surprise 4 — It turned out the machines that gave up were being taught <em>too aggressively in the very first practice steps</em> — like slamming the gas at the start of driving lessons. Ease off the gas at the start (lower the “learning rate,” the how-big-a-nudge-per-flashcard setting) and every single machine learned healthily. So the failure wasn’t destiny; it was a tuning mistake.</p><p>Notice the shape of all four: they’re not “we proved the machine understands physics.” They’re “here are four ways this experiment could have fooled us, and here’s how we caught each one.” That <em>is</em> a real result, learned by testing and not just theorizing, and that changed the story telling.</p><h3>The famous-AI detour (why Qwen-AgentWorld?)</h3><p>Midway through, a big, famous AI came out — Qwen-AgentWorld, from Alibaba. It’s advertised as a “world model,” but here’s the catch : it was trained <em>only</em> on digital worlds — websites, computer terminals, phone screens, coding tools. It was never taught physical stuff at all — no dropping, no bouncing, no friction. (<a href="https://www.alibabacloud.com/blog/qwen-agentworld-language-world-models-for-general-agents_603304">confirmed here</a>.)</p><p>So the story telling question: this thing is great at “understanding a world and predicting what happens next” — but <em>in digital worlds</em>. If you hand it a physics problem it’s never seen, does the <em>skill</em> of world-understanding carry over, or is it glued to the specific worlds it learned?</p><p>Hey , Let’s give it (the Qwen tuned world agent model) the MuJoCo physics questions. The answer :</p><ul><li>Qwen Agent World reasoned beautifully and confidently — laid out careful step-by-step physics…</li><li>…but about a slightly-wrong world. It figured objects would bounce and roll down the ramp; in your world they grip and stay put. So it was often <em>precisely, elaborately wrong</em> on the ramp.</li><li>But it was startlingly <em>good</em> at judging “will this tip over?” — the exact thing the pseudo marble machine was <em>worst</em> at.</li></ul><p>The takeaway, in one line: the <em>skill</em> of reasoning about worlds transfers; the specific <em>facts</em> of a particular world do not.</p><p>My analogy: it’s a genuinely brilliant physicist who grew up on a planet where the rocks were a little more slippery. Give her any problem and she reasons flawlessly — she just gets the friction details wrong, because her world’s friction was different. Her <em>way of thinking</em> is universal; her <em>facts</em> are local.</p><h3>So… where are we, really?</h3><p>Two honest truths:</p><ol><li>The one number the whole apparatus was built to produce still hasn’t been measured. After a month and 27 rounds of work, the final “here’s how much real shared understanding the machine learned” measurement is <em>still</em> the next thing on the list, not done. Everything’s built and de-bugged; the headline number just hasn’t been run.</li><li>In the fable we ended up with two projects. The one we set out to build (the coherence measuring-stick) and the one that accidentally turned out more exciting (the “does world-understanding transfer between worlds?” test with the famous AI). The second one gave a clean, surprising, genuinely-new result on the first try. The first one is still a story that has no end as we continue to explore and test and learn.</li></ol><p>That’s the ongoing story told around the camp fire from the ground up. Notice that during the development of our code we didn’t lose the origin story — the story just evolved in telling and found a second act.</p><h3>Decoder ring (the scary words in plain English)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AKNCDQRgILRi44e8ke2d_g.png" /></figure><h3>The Story continued with Fable 5</h3><p>My Prompt:<br>Lets explore the latent or “ z “as you say -&gt; as the base compression to 1.58 of the information kernel or signal.</p><p>Claude Code response with Fable 5:</p><p>“how small can z get?&quot; is secretly the same question as &quot;is the shared essence even real?&quot; Let me build that up carefully. I won’t water the ideas down, because now we are clearly after the real thing.</p><h3>First, what “1.58” actually is</h3><p>A normal light switch has two states: off / on. That’s one bit of information — one yes/no. In number terms, log₂(2) = 1.</p><p>Now imagine a three-way switch: off / left / right. Three states. The information it holds is log₂(3) = 1.58 bits. That&#39;s <em>all</em> 1.58 means. It&#39;s the information content of one three-state thing — usually written as the values {−1, 0, +1}, called ternary.</p><p>The famous place this shows up is BitNet b1.58 (Microsoft, 2024 — “The Era of 1-bit LLMs”). Their move: take a giant model whose tuning-knobs are normally fine-grained decimals, and force every knob to be just one of those three values, −1, 0, or +1. Each knob now costs 1.58 bits instead of ~16 or 32. The shocking result was that the model <em>still basically worked</em>. That’s the lineage your “1.58” is pulling from.</p><p>So when we say “compress to 1.58,” we are invoking: squeeze the thing down until each piece of it is just a three-way switch.</p><h3>The fork: which thing are we crushing?</h3><p>There are two totally different things in this project we could crush to 1.58, and they answer different questions. This distinction is the whole game, so let me make it sharp:</p><p>(A) Crush the <em>knobs</em> (the weights). This is literal BitNet — make the machine’s millions of tuning-knobs ternary. Question it answers: <em>“how little machinery do you need to still hold this understanding?”</em> This is the quant-ladder idea in the story from earlier.</p><p>(B) Crush the <em>sticky-note</em> (z itself — the signal, the &quot;kernel&quot; you named). what the message actually points at. Instead of shrinking the <em>machine</em>, shrink the one compact idea the machine writes down about each object. Question it answers: <em>&quot;how small is the essence itself?&quot;</em></p><p>The inquiry about the second one that arose in experimentation is the more beautiful experiment — because it turns the project’s fuzzy philosophical question into a number.</p><h3>Why crushing z is a measurement, not just a size hack</h3><p>Here’s the payoff, and it’s worth reading twice.</p><p>Right now z — the sticky-note — is roomy. It&#39;s a list of decimal numbers, so it can hold a <em>lot</em> of bits about each object. Both helpers (draw-it and predict-it) read from it comfortably.</p><p>Now imagine you starve the note. You force it through a narrow slot that only lets, say, a couple of three-way switches through — a handful of bits, total. The machine now has to write the object’s <em>entire</em> essence in almost no space. It’s forced to throw away everything except what truly matters.</p><p>And now watch the two helpers:</p><ul><li>If there’s a real, shared, compact essence — the “water balloon is heavy-soft-splat” kind of thing — then a tiny note is <em>enough</em>, and both helpers keep working down to a very small budget, and they fail together when you finally squeeze too hard. That co-survival and co-death is the fingerprint of one genuine shared thing.</li><li>If the “shared essence” was partly an illusion — two helpers that were quietly using the note differently — then as you starve it, one helper breaks long before the other. The drawing survives on 3 bits while the physics falls apart at 20, or vice versa. They die at <em>different</em> budgets. That mismatch is the tell that they were never really one thing.</li></ul><p>So compression doesn’t just make z smaller. It measures the size of the essence, in bits, and it checks whether appearance and behavior truly share it — which is the entire project. If both survive down to, say, 5 bits and collapse together at 4, you can literally say: <em>&quot;the shared physical essence of these objects is about 5 bits, and appearance and behavior genuinely draw on the same 5 bits.&quot;</em> That sentence is the &quot;eigenvector,&quot; finally made into a number.</p><p>That’s the gift of the 1.58 lens: it converts <em>“is there one understanding?”</em> into <em>“how many bits is it, and do both outputs die at the same bit-count?”</em></p><h3>Fable 5 finds “The lineage “ in the graph</h3><h3>( we are on solid ground)</h3><p>We are not freelancing here — this is a well-worn corner of information theory, just applied somewhere fresh:</p><ul><li>Rate–distortion (Shannon): the trade-off curve between <em>bits you spend</em> and <em>mistakes you make</em>. Squeeze bits → errors rise. The <em>shape</em> of that curve for your two helpers is exactly the fingerprint above.</li><li>The Information Bottleneck (Tishby, 1999): deliberately choke the pipe so only the information <em>useful for the prediction</em> survives — the junk gets squeezed out first. This is <em>precisely</em> “compress the image into the smallest note that still predicts what the object does.”</li><li>Minimum Description Length: the true complexity of a thing is the length of its <em>shortest sufficient description</em>. The “essence” of an object, formally, <em>is</em> its shortest code. Crushing z is a hunt for that shortest code.</li><li>VQ-VAE / discrete latents (2017) and ternary quantization: the practical machinery for actually making a note out of three-way switches instead of decimals. Ternary z is basically the most extreme version of this.</li></ul><p>So “compress z toward 1.58&quot; sits right at the meeting point of Shannon, Tishby, and BitNet — pointed at your water-balloon question.</p><h3>The thing already half-built without naming it</h3><p>Here’s a connection that should click nicely. Remember collapse (Surprise 3 from before) — the machine that gave up and wrote <em>the same note for every object</em>?</p><p>A note that’s identical for every object carries zero bits about the object. That’s not a failure <em>next to</em> compression — it’s compression taken all the way to nothing. The collapsed machine compressed z to 0 bits of real content.</p><p>And We already have a gauge for this! The “participation ratio” used to detect collapse is, in plain terms, a bits-of-z meter — it measures how much the note actually varies across objects, i.e., how much information it’s really carrying. So the project has <em>already</em> been measuring the information content of z — just from the failure end. The 1.58 idea is the same instrument pointed the <em>productive</em> way: not &quot;did it accidentally drop to zero bits?&quot; but &quot;let’s deliberately walk it down, bit by bit, and watch where the essence lives.&quot; What the actual experiment would look like</p><p>Concretely, if we build this:</p><ol><li>Add a narrow slot in front of z that forces it to be k ternary switches — a knob you can set from generous (say 32 trits ≈ 50 bits) down to brutal (1 trit ≈ 1.58 bits).</li><li>Train the machine at each width, and at each width record two things: how well the draw-it helper still draws, and how well the predict-it helper still predicts.</li><li>Plot both against bit-budget. You get two “bits-vs-mistakes” curves.</li><li>Read the answer off the plot:</li></ol><ul><li>Curves stay flat then plunge <em>together</em> at some width N → there’s a real shared essence, and it’s ~N bits. <em>Strong result.</em></li><li>Curves plunge at <em>different</em> widths → appearance and behavior don’t truly share a compact code. <em>Also a real result — a deflating but honest one, exactly the kind your project is built to report.</em></li></ul><p>The honest caveats, up front: it’s a tiny model on an <em>authored</em> toy world (so you’d be sizing the <em>generator’s</em> essence, not reality’s — same limit as everything else here); ternary notes are genuinely fiddly to train (you can’t smoothly nudge a three-way switch, so there’s a standard trick — “straight-through” — that estimates the nudge); and this is a new direction — z is currently roomy decimals, nothing quantized yet. So this is a design, not a report of done work.</p><h3>Where this plugs into the Story</h3><p>Notice what just happened: this gives a third instrument for the exact same core question, alongside the two you already have —</p><ul><li>Nudge z, watch both helpers → coherence (you built this).</li><li>Starve z, watch both helpers → compression / rate–distortion (this idea).</li><li>Collapse detector → the zero-bits corner of the same axis (you built this too, from the failure side).</li></ul><p>All three are asking <em>“do appearance and behavior truly share one compact code?”</em> The compression one is arguably the cleanest, because its answer comes out as an honest number in bits instead of a correlation you have to baseline-subtract and defend against fakers.</p><p>Let us write up this compression experiment as a concrete plan for the repo — the narrow-slot design, the training trick, the two curves, and what each outcome would <em>mean</em> — so it’s ready to run on the Mac alongside (or instead of) the pending coherence number. draft that? Or would you rather keep exploring the idea whether to crush the <em>note</em> (essence-sizing) or the <em>knobs</em> (BitNet-style), since they answer different halves of your 1.58 interest?</p><p>THE NEVER ENDING STORY TO BE CONTINUED …</p><p>References for this article</p><p>github.com/safishamsi/graphify</p><p>github.com/sbayer2/Project-Free-Robot-Agent-World</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3ff4a5454a9f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[World Model Research On Your MacBook]]></title>
            <link>https://medium.com/@sbayer2/world-model-research-on-your-macbook-b0f86a9da0e1?source=rss-cd1b18e89f37------2</link>
            <guid isPermaLink="false">https://medium.com/p/b0f86a9da0e1</guid>
            <category><![CDATA[world-models]]></category>
            <category><![CDATA[reinforcement-learning]]></category>
            <category><![CDATA[space]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[robotics]]></category>
            <dc:creator><![CDATA[Sbayer]]></dc:creator>
            <pubDate>Fri, 05 Jun 2026 19:00:47 GMT</pubDate>
            <atom:updated>2026-06-07T13:47:01.670Z</atom:updated>
            <content:encoded><![CDATA[<p>Local world-model research platform</p><p>pseudo-marble is a small, open research platform for testing one of the central ideas in current AI: that appearance, physics, and action are not separate capabilities but different views of a single underlying understanding of the world. The framing comes from Fei-Fei Li’s functional taxonomy of world models, which groups such systems by what they produce along the perception — action loop. Renderers output pixels, simulators output physical state like mass and friction, and planners output actions, with the planner described as the inverse of the renderer. Li argues these are really three projections of one representation, and that recent systems such as World Labs’ Marble, which generates both a visual model and a collision mesh from a single network, are converging toward it.</p><p>The catch is that producing two outputs from one model only shows the outputs can be packaged together. It does not show they come from a genuinely shared understanding rather than two separate predictors attached to a common trunk. pseudo-marble exists to test that specific distinction at a scale an individual can actually run, on an ordinary Apple-silicon laptop using free tools.</p><p>The model takes several views of an object and encodes them into one internal representation. From that single representation it predicts three things in parallel: how the object behaves when dropped, tilted, or pushed; its physical properties; and its appearance. The training data is synthetic but principled. Each material is drawn from a hidden continuous “essence” that shapes both look and behavior with added noise, so the system has to infer physics from appearance instead of memorizing labels, and it is tested on material types held out from training.</p><p>The key tool is a coherence measure. Nudging the internal representation and checking whether appearance and behavior shift together reveals whether the model formed one understanding or merely glued two guesses side by side. Early in-sandbox work uncovered an important subtlety: an untrained network already looks coherent simply because both predictions read the same representation, so the honest signal is how much training raises coherence above that baseline. The platform is built to give a clear answer either way, including a negative one.</p><p>Source code: https://github.com/sbayer2/Project-Free-Robot-Agent-World</p><p>The model</p><p>A single shared-latent network: multi-view images → encoder → z → three projections</p><p>•	behavior head (21-dim drop/tilt/push outcomes — the real target)</p><p>•	essence head (density/friction/restitution — aux supervision)</p><p>•	render head (conv decoder → mean-view image — appearance)</p><p>One architecture, three mirrored backends from one config: mlx_net (canonical, Mac/Metal), numpy_net (forward-only), torch_net (CPU, trainable). Fed by continuous materials (hidden essence → appearance + physics, noisy) and drop/tilt/push probes, with held-out essence regions for generalization. The payoff measurement: coherence — does nudging z move appearance and behavior together?</p><p>Initial sandbox findings (CPU, no Mac)</p><p>These establish the apparatus works — not the science.</p><p>1.	No usable Linux MLX (broken wheel, no GPU) → numpy/torch backends fill the gap.</p><p>2.	Authored coupling is predictive-but-noisy (metallic-look vs log-density, 0.3 &lt; r &lt; 0.99) — learnable, not a lookup.</p><p>3.	Full model trains end-to-end — overfit loss drops ~4.8×, so gradients flow through all heads incl. the decoder.</p><p>4.	Scale ceiling: comfortable to ~1M params / 128px / 16 views (~0.85 s/step); memory never the bound (1.3 of 15 GB); compute-time bound past 256px.</p><p>5.	Caught a metric bug — unit-sphere sampling made disjoint subspaces score negative; fixed to Gaussian directions.</p><p>6.	⭐ The big one: an untrained shared model already scores ~0.45 coherence (independent baseline ~0.008) — purely architectural. So the naive “shared beats independent” comparison would be a false positive. The honest signal is learned_coherence = trained_shared − untrained_shared, averaged over seeds (baseline wobbles 0.36 — 0.46). The harness caught this before any Mac time was spent.</p><p>What’s still unknown (the honest gaps)</p><p>•	No training on real renders — every result so far is overfitting, proving wiring not learning.</p><p>•	The coupling is authored — we’d learn the generator’s eigenvector, not reality’s (GSO is the parked escape).</p><p>•	The headline number — learned_coherence on held-out essences — is unmeasured. That’s the Mac run.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/845/1*fCkMl7ADNh938dqHaGS_5w@2x.jpeg" /></figure><p>in the figures (all real, CPU-measured, not local Mac runs at this time.)</p><p>1.	Material coupling — 500 sampled materials, “looks metallic” vs. log-density, r = 0.80. Confirms the authored coupling is predictive but noisy, so the model must infer physics, not memorize it.</p><p>2.	Training convergence — torch overfit curve, loss 0.461 → 0.106 over 150 steps. Gradients flow cleanly through encoder + all three heads.</p><p>3.	CPU scale ceiling — step-time vs. parameter count, log scale. The shaded zone is the comfortable region; ~1M params / 128px sits at ~0.6s/step, then 256px jumps to ~1.6s.</p><p>4.	The coherence control — 8 untrained shared models land in a ~0.36 — 0.55 band, while the independent baseline sits at ~0. This is the visual proof of the key finding: a shared latent looks coherent before any training, so the honest metric is learned = trained − untrained.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b0f86a9da0e1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Map or Direction, World Models Compressed To Neighborhood Size]]></title>
            <link>https://medium.com/@sbayer2/map-or-direction-world-models-compressed-to-neighborhood-size-fcf81396c95a?source=rss-cd1b18e89f37------2</link>
            <guid isPermaLink="false">https://medium.com/p/fcf81396c95a</guid>
            <category><![CDATA[yann-lecun]]></category>
            <category><![CDATA[large-language-models]]></category>
            <category><![CDATA[latent-diffusion-model]]></category>
            <category><![CDATA[jepa]]></category>
            <category><![CDATA[world-models]]></category>
            <dc:creator><![CDATA[Sbayer]]></dc:creator>
            <pubDate>Mon, 18 May 2026 19:08:20 GMT</pubDate>
            <atom:updated>2026-05-25T03:16:50.349Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0NR93XSjeaj5z5nozXwWWw.png" /></figure><p>The future of robotic AI and edge devices depend on compression and which models survive the squeeze.</p><p>The most consequential AI architecture decisions of the next five years probably won’t be made inside large language models.</p><p>Today’s frontier LLMs are spectacular at what they do, but every step we take to make them more capable — longer context windows, deeper reasoning chains, larger token budgets — pulls them further from the place AI most urgently needs to land: inside physical devices that have to act in real time. A 200-millisecond round trip to a cloud-hosted GPT is not a robotics latency budget. A 70-billion-parameter model with a million-token KV cache does not fit on the Jetson in your warehouse pick-and-place arm. And every additional token a transformer carries forward is more memory pressure, more attention overhead, more inflexibility at the moment a policy network needs to commit to a motor command. Scaling up tokens and context length makes language models better at chat and edge deployment harder, at the same time. The two directions are pulling apart.</p><p>The bet against the scaling treadmill is now well-articulated and well-funded. Yann LeCun left Meta in late 2025 to start AMI Labs and pursue his Joint-Embedding Predictive Architecture (JEPA) thesis at a $3.5-billion valuation. Meta released V-JEPA 2, a 1-billion-parameter video world model that predicts in latent space rather than at the pixel surface. DeepMind shipped Genie 3, a real-time interactive 3D environment generator. World Labs put Marble into production as the first commercially shipped world model. Dream-MPC at ICML 2026 demonstrated gradient-based planning through <em>compressed</em> latent world models. NVIDIA Cosmos crossed two million downloads as an open-source world-foundation platform. Mamba and the state-space-model family showed you can match transformer quality on long sequences with linear-time inference and a tiny recurrent state. Outside the explicit world-model camp, PrismML’s Bonsai and the BitNet b1.58 line bet on 1-bit and 1.58-bit weights — models small enough to run an 8B at 45 tokens per second on a MacBook Air.</p><p>These bets all share an architectural shape: <strong>compress aggressively, predict in latent space rather than at the surface, keep state small, plan in imagination, deploy at the edge inside millisecond budgets.</strong> They share the broader thesis: the future of AI in physical systems will be decided by compression, memory management, latency, and training-time discipline — not by adding zeros to model size and context length. A robot has to act now. A surgical assistant can’t wait on a 200-ms cloud round trip. A drone can’t carry a datacenter. Every one of these constraints points in the same direction.</p><p>It is a beautiful bet. But it is a bet, not yet a proof. The engineering questions underneath it are still wide open. <em>Which</em> parts of a latent-prediction architecture actually survive 4-bit quantization on a Jetson? Does JEPA’s compression-friendliness claim hold on real text and real action sequences, or only on the curated benchmarks the papers use? When you crush a multi-objective model — an LM head plus an auxiliary SSL head — to ternary weights, which head dies first? If the future of AI in physical systems runs on compression, we need a way to <em>predict in advance</em> which architectures actually survive the squeeze — before we spend a quarter’s worth of GPU time finding out the hard way.</p><p>That’s the gap I’ve been exploring over the last few weeks, with a small intuitive programming visualization that I’ll describe in a moment.</p><p>I personaly do not understand complicated concepts without relatable analogies and the thing that finally organized the genesis and the results of the program is an “Amazing Race “ type of analogy.</p><p>Imagine you are the driver of a car in a new city, and you have a new navigator riding shotgun. The navigator can do their job in two completely different ways. They can read you turn-by-turn directions — “left at the Starbucks, half a mile, right at the red house, second exit at the roundabout” — a precise chain of instructions tied to specific landmarks. Or they can carry a mental map of the place — they don’t know the street names in order, but they know the river runs east-west and the train station is somewhere southeast. Same city, two completely different representations of it inside the navigator’s head. Now the rain comes down, the GPS jitters, the signs blur. The turn-by-turn navigator is lost almost immediately — miss one landmark and every instruction after it is poisoned. The mental-map navigator is fine. They can’t read the signs, but they still know “we want to go northwest.” That is the choice every LLM AI architecture is implicitly making. Token prediction is turn-by-turn navigation — precise, local, brittle. BUT Latent prediction is the mental map — structural, rough, robust. Compress the model (rain on the windshield) and the two don’t degrade the same way. Which one your model trained on determines whether it survives the squeeze.</p><p>Two completely different failure modes under degraded conditions.</p><p>The map and the directions degrade differently.</p><p>Once you see that, everything else in this article is just working through what it means for the architectures the world-model camp is betting on.</p><p>The Visualization instrument I developed with Claude Code Opus is the “Steam Engine” (aka : two small nanochat inspired neural networks running side by side)</p><p>The first neural network is what researchers call a <em>synthetic toy model</em> — 51,000 parameters. <em>Parameters</em> are the individual weights inside the network, the numerical dials it adjusts during training. For scale, frontier LLMs in 2026 have hundreds of billions to trillions of these dials. This toy has 51,000, fits in about 200 kilobytes of memory, and trains from scratch in 90 seconds on a laptop CPU. <em>Synthetic</em> because it trains on 10 mathematical pattern classes I designed — Arithmetic, Periodic, Fibonacci, Quadratic, Random, and so on — rather than on real-world data. A controlled testbed where I can vary the difficulty of the prediction task directly and know exactly what the ground truth is for every input. Researchers use synthetic toy models as instruments for isolating mechanisms, the same way a physicist uses a frictionless plane or a chemist uses pure reagents.</p><p>The second model is a 127,000-parameter <em>character-level GPT</em> — same transformer architecture family as GPT-2 / 3 / 4, but predicting one character at a time instead of one word-token. Smaller vocabulary (~114 characters versus the ~50,000 word-pieces in a standard LLM), longer sequences for the same prose, much faster to train. Trained jointly on Shakespeare’s plays, Jane Austen’s prose, and Python source code in a single mixed corpus.</p><p>In my visualization instrument both models have three movable “knobs” that compress the models along three different axes simultaneously. Change the steam engine knobs, and watch in real time which parts of each model degrade gracefully and which fall off a cliff. What did I discover ?After several iterative evolved mechanism hypotheses and one outright falsification along the way, the navigator car and map analogy is the lens that organizes every result, including the surprises that I did not anticipate. So let’s start the Amazing Race.</p><h3>Same architecture. Opposite results.</h3><p>The Steam Engine has two “engines” with the same triple-head architecture: an encoder backbone, a token-prediction head (next character, or next value, depending on engine), and a JEPA-style latent prediction head that learns to forecast its own future internal representations. Both trained with the same compression-aware curriculum that randomly stresses the network during training with window-masking, latent-dropout, and weight-noise injection. Both measured against the same three orthogonal compression axes: bit-width quantization, latent dimensionality reduction, and attention-window shrinkage.</p><ul><li>Bit-width = precision per weight. 32-bit float → 4-bit int → 1-bit. Same model structure, fewer bits to represent each individual number. Like switching from photo-quality to fax-quality scans of the same map.</li><li>Attention window = context window. How many recent tokens the model can look back at when predicting the next one.</li><li>Latent dimension is the width of the model’s internal representation — how many parallel channels/features it uses to encode each token. In a transformer this is d_model or n_embd (e.g. 64, 128, 768, 4096). The number of hidden layers is the depth — how many attention blocks stacked on top of each other (e.g. 2, 12, 96). The Steam Engine compresses <em>width</em>, not depth.</li></ul><p>Spreadsheet intuition: latent dim is how many columns each row has (richer description per row = more channels). Depth is how many times you re-process the whole spreadsheet through new logic. Steam Engine slices columns, not passes.</p><p>The text engine specifically has n_embd=64 (latent dim) and n_layer=2 (depth). The latent-axis knob takes the 64-channel representation and crushes it down to 32, 16, 8, or 4 channels while keeping the 2 layers intact. So you&#39;re shrinking how much information the model carries at each level, not how many levels there are.</p><p>After running multi-seed sweeps on both engines, here’s what came out:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*g9k9zukcTunj9nQxVBw_Zg.png" /></figure><p>Same architecture. Same training recipe. Same compression-aware curriculum. Same three knobs. Same metric (divergence index = latent retained minus raw retained). And the result depends entirely on what you’re training the thing on.</p><p>The JEPA literature — Yann LeCun’s 2022 manifesto, V-JEPA 2, Dream-MPC — argues that latent-space prediction is intrinsically compression-friendly. The synthetic toy says the opposite. Real text agrees with JEPA. And inside a single jointly-trained text model, three different corpora produced three different signs.</p><p>A literature claim and an empirical result both being right, on the same architecture, depending only on the data, has to mean the claim isn’t quite the right claim. There’s a hidden variable.</p><p>Here’s how I came to see it.</p><h3>Maps vs. turn-by-turn directions</h3><p>Imagine two types navigators driving in the amazing race in an unfamiliar city. The first navigator type is a turn-by-turn (LLM predictor) navigator. They’ve memorized the directions: “left at the Starbucks, 0.3 miles, right at the red house, second exit at the roundabout.” Every step is a precise local instruction tied to a specific landmark.</p><p>The second type of navigator ( The World Model — latent ) has a mental map of the city. They know the river runs east-west and the train station is somewhere to the southeast. They couldn’t list the streets in order, but they understand the <em>shape</em> of the place.</p><p>Now imagine the GPS signal degrades. It rains, the signal jitters, the screen pixelates. What happens?</p><p>The turn-by-turn navigator gets lost almost immediately. They miss the Starbucks because it’s now a blurry pixel cluster, and from that point on, every subsequent instruction is wrong. One missed landmark cascades.</p><p>The mental map-user is fine with the rain degradation. Sure, they can’t read the street names anymore. But they still know “we want to go northwest.” They head that way. They adjust as features become visible. They tolerate degradation because their representation degrades gracefully — losing detail without losing structure.</p><p>That’s the analogy at the core of this whole thing.</p><p><strong>Token prediction</strong> (the language-model head, or in the synthetic case the raw-value-prediction head) is turn-by-turn GPS navigation. It’s a sequence of precise local decisions chained together. Get one wrong and the next one is poisoned.</p><p><strong>Latent prediction</strong> (the JEPA-style head that learns to forecast its own internal representations) is a mental map-based navigation. It’s a structural understanding that operates above the level of any single token.</p><p>The three compression knobs on the Steam Engine correspond to three different ways of degrading a navigator’s situation, and that’s what makes the analogy do real work.</p><h3>Three knobs, three ways to lose information</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FyDNwqQrHH01MS8_mCwDcQ.png" /></figure><p>The state-axis flatness, in particular, was the first thing the demo made obvious. You can shrink the attention window from 256 to 16 on the text model and perplexity barely budges. The model trained with random window-masking during training is essentially window-invariant at deployment. This is the most direct empirical support for the small-state thesis behind state space models like Mamba: if the prediction task is local enough, you don’t need to carry the whole context around in expensive attention. Sliding a small recurrent state along is plenty.</p><h3>The reversal explained</h3><p>Now back to the puzzle. Why does the synthetic toy say maps are <em>worse</em> than turn-by-turn, while real text says maps are <em>better</em>?</p><p>Think about what cities you’re training the navigators on.</p><p>The synthetic toy is trained on 10 sharp pattern classes — Arithmetic, Periodic, Fibonacci, Exponential, Geometric, Quadratic, Damped, AR(1), RandomWalk, Random. From the model’s perspective, this isn’t really a city. It’s a 10-square grid. The “map” the latent head learns to predict is effectively just “which of the ten squares are we in?” — a one-hot label with a few embellishments. The map is barely a map.</p><p>When you crush a model trained on this, the map collapses to its degenerate minimum almost immediately. The latent representation that was already mostly a class identifier becomes <em>only</em> a class identifier, and then under compression it stops being a reliable one. The turn-by-turn navigator, by contrast, is trying to predict actual continuous values, which means it has to keep more information around to do its job. Under compression it degrades, but it doesn’t have anywhere lower to collapse to.</p><p>Real text is a different kind of city.</p><p>In the text engine, the model is doing character-level next-position prediction on continuous high-vocabulary streams. The latent head’s job is to predict its own future internal state — and that state has to encode “where in a Shakespeare line are we, what kind of word is starting, what’s the prosodic context” because those are the features that make the next character predictable. There’s no degenerate label the map can collapse to. The map <em>has</em> to stay rich.</p><p>When you crush this model, the rich map degrades but it doesn’t collapse. The map-user’s sense of “we’re in the southeast part of the city” survives the rain. The turn-by-turn navigator, who was reading actual street signs, hits a wall.</p><p>The most striking single number from these runs: on the text engine at four latent dimensions out of sixty-four (a 16× squeeze on that one axis alone), perplexity drops to 7.2% retained — the token-prediction is completely broken, you’re generating gibberish — but latent prediction holds at <strong>73.4% retained</strong>. Across three seeds. The map is still useful when the directions have become noise.</p><h3>The mechanism, made measurable</h3><p>This whole reversal hinges on whether the latent representation <em>can</em> collapse onto a degenerate easy summary. And the punchline is: you can measure how collapsed it is before applying any compression.</p><p>The metric is <strong>baseline latent MSE</strong>. After standard training, before compressing anything, ask: how well can the model predict its own next latent state? If it’s predicting trivially well (very low MSE), the encoder has found a degenerate summary — a tiny subspace it lives in. If it’s predicting moderately (moderate MSE), the encoder has been forced to maintain a rich representation, because the prediction target isn’t easy.</p><p>The Phase 4 multi-corpus run made this beautifully concrete. One text model, trained jointly on three corpora, three different baseline latent MSEs measured separately for each corpus, and the rank tracks compression survival perfectly:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oWVLW_8hQJ2FH--z5XKN-w.png" /></figure><p>Three corpora, three sign-consistent directions across three seeds. Austen’s prose is regular enough that the latent representation can find a comfortable low-dim summary — and that collapsed map cracks under compression. Code’s structural diversity prevents any such shortcut: the latent has to encode genuinely diverse information, and the diverse map degrades gracefully.</p><p>This is the actionable engineering claim, and it’s the thing I’d most like every team doing edge deployment to know:</p><p><strong>The direction of compression survival is predictable from a property you can measure before you compress.</strong></p><p>Not the magnitude. Not the cliff position. The <em>direction</em>. Whether the latent head will survive better than the token head, or worse, can be read off a baseline lat_mse number that costs you a single forward pass on uncompressed model.</p><p>Now, this is where things get interesting. Because the next two experiments tried to break this mechanism, and they partially succeeded.</p><h3>Surprise #1: Even good maps can collapse if you push hard enough</h3><p>The first mechanism I wrote up said: continuous targets prevent collapse because there’s no easy degenerate summary to retreat to. Text would be collapse-immune.</p><p>The symmetric test was a β sweep. β is the loss weight on the latent prediction head — how hard you’re pushing the encoder to make its latent state predictable. The earlier synthetic β sweep had confirmed that higher β makes H_D <em>worse</em> on synthetic (more collapse pressure on a collapsible target → more collapse → more compression fragility). The mechanism predicted higher β should make H_A <em>better</em>on text. Stronger map-study → richer map → more compression-robust.</p><p>I ran four β values × three seeds × 200 epochs and the result was clear: the prediction was wrong. Higher β on text <em>narrowed</em> the divergence. At β=0.5, the latent head beat the token head by +0.326. At β=5.0, it beat it by only +0.098. Positive-cell count dropped from 30/30 to 20/30.</p><p>The map can collapse, even in Tokyo, if you study it hard enough. Higher β reduces baseline latent MSE on text from 0.135 down to 0.090 — same direction as synthetic, same collapse pressure dynamic. Text isn’t collapse-immune. It’s just collapse-resistant.</p><p>So that’s the falsification. But the decomposition is where it gets interesting.</p><p>The divergence index = latent_retained − raw_retained. When divergence narrows, it could be because the latent head is collapsing (latent_retained dropping) or because the raw head is improving (raw_retained rising). On text under high β, the answer is <em>both, but the raw improvement is bigger.</em> At the worst compression point (latent_4):</p><ul><li>Latent retained: 0.734 → 0.510 (moderate degradation, partial collapse)</li><li>Raw retained: 0.072 → 0.202 (almost tripled improvement)</li></ul><p>What’s happening: the latent head, when pushed hard, is regularizing the encoder for the token-prediction task too. The two heads share the encoder. On text, they need overlapping representations to do their respective jobs — both require rich char-level structure. So training the latent head harder pulls the encoder toward representations that <em>also</em> help the LM head.</p><p>This is the cross-task regularization bonus. The map-studier whispers “I think we’re in the southeast” and the turn-by-turn navigator uses that vibe to recover from missed turns. They both improve.</p><p>On the synthetic toy, this doesn’t happen. The latent and raw heads don’t overlap — one predicts class identity, the other predicts continuous values, and the representations that help one don’t help the other. Train the latent head harder and you just collapse the encoder; the raw head doesn’t benefit.</p><p>So the revised mechanism is:</p><p><strong>H_A (latent more robust under compression) emerges from two ingredients: moderate collapse pressure (rich enough target that the encoder can’t take a degenerate shortcut at standard β) plus objective overlap (the latent and token heads share representational structure, so cross-task regularization keeps the token head healthy under compression).</strong></p><p>The original mechanism’s sign prediction at moderate β still works. The pre-deployment diagnostic still works. But the claim that “text is collapse-immune” was too strong — the truth is “text resists collapse harder than synthetic at the same β, and at moderate β both objectives mutually regularize each other.”</p><h3>Surprise #2: The map-user doesn’t even flinch</h3><p>The Steam Engine had carried a deprecated probe from Phase 3 — an input-perturbation test of “loss landscape smoothness” that turned out to measure the wrong thing. Compression-aware training had made the model invariant to small input perturbations, so the probe couldn’t distinguish baseline behavior from cliff-region behavior. Useless. Threw it out.</p><p>The replacement is a weight-perturbation gradient-norm probe. Pick a compression point, perturb the model’s weights by a small ε, measure how much the gradient changes. This is the proper test of Dream-MPC’s claim that latent-space loss landscapes are smoother and more navigable than token-prediction landscapes.</p><p>The headline finding broke my expectations.</p><p>Picture the map-user and the direction-follower as drivers in a car. Now imagine someone bumps their elbow — that’s the weight perturbation. How much does each of them swerve?</p><p>The direction-follower panics. They were halfway through “left at Starbucks, 0.3 miles” — if their elbow gets jostled they might miss the landmark entirely. The correction signal explodes. On text at bits_4 (8× bit-width compression), the LM head’s gradient norm inflated to <strong>12.89× its baseline value</strong>. Loss landscape: rough, jagged, full of unstable cliffs. Optimization through this is going to overshoot, oscillate, and fail to converge.</p><p>The map-user barely twitches. They knew they were heading southeast; they’re still heading southeast. On the same compression point, the latent head’s gradient norm was <strong>0.93× its baseline value</strong>. Immune. The loss landscape under compression is essentially as flat as it was uncompressed. Optimization signal stays coherent.</p><p>That’s not a quantitative difference. It’s a qualitative regime change. The map representation isn’t just “less fragile” than the directions — it’s geometrically protected against compression in a way the directions aren’t.</p><p>On synthetic, neither head has this property. Both heads’ gradients explode together under compression (11.64× raw, 6.91× latent). The synthetic latent doesn’t have a flat landscape to live on; both navigators are panicking in their collapsed grid city.</p><p>This is the mechanistic explanation for H_A through loss landscape geometry, and it’s the cleanest single result from the project. Dream-MPC’s claim about gradient-based planning through compressed JEPA models is <strong>conditionally supported</strong> — it works on text-like continuous targets at deployment-level compression. It does not work universally. Domain matters.</p><h3>Surprise #3: The panoramic view was wasted all along</h3><p>Worth pulling out the state-axis result, because it’s a smaller surprise but it’s directly relevant to anyone designing efficient sequence models.</p><p>On the text engine, you can shrink the attention window from 256 tokens to 16 tokens and the perplexity barely changes. The model was trained with random window-masking during training, so it learned to make predictions with whatever local context it had. At deployment, the global view is decorative.</p><p>For character-level next-prediction, almost all the useful information is within a few characters. The panoramic view from the hilltop is wasted when you’re driving city blocks. The compressed-window model navigates fine.</p><p>This is the direct empirical support for the small-state thesis that motivates state space models. Mamba and friends bet that the prediction task is local enough that a small recurrent state, slid along, is sufficient — you don’t need quadratic attention over the whole context. Steam Engine’s window axis confirms the bet on character-level text. Same architecture, same compression-aware training, dramatic compression on the state axis, near-zero perplexity cost.</p><p>This finding generalizes farther than the cross-domain reversal. The other axes’ behavior depended on data structure. State-axis flatness held in both engines. The takeaway is unambiguous: if your prediction task is local, your state should be small.</p><h3>What this means for production AI architectures</h3><p>The cross-domain mechanism produces concrete falsifiable predictions, and they’re the most engineering-useful output of the project. Here are the predictions I’d bet on for production architectures, given the mechanism above.</p><h3>Robot vision-language-action models</h3><p><strong>OpenVLA</strong>, the Stanford / TRI / DeepMind 7B model, predicts discrete action tokens from a categorical action vocabulary. From the mechanism’s standpoint, this is a token-prediction objective on a structured discrete target — the equivalent of the synthetic toy’s class-prediction setup, just at scale. <strong>Predicted behavior under 4-bit quantization: H_D-like. Action distributions degrade faster than auxiliary heads would.</strong> Performance on fine-precision manipulation should drop precipitously.</p><p><strong>V-JEPA 2-AC</strong>, Meta’s continuous-embedding action variant, predicts in latent space with continuous high-dim diverse targets. <strong>Predicted behavior: H_A-territory.</strong> Latent action heads should survive aggressive quantization. Graceful degradation rather than cliff.</p><p><strong>π0</strong>, Physical Intelligence’s 3.3B flow-matching VLA, is in between. It’s continuous-action but action-anchored, with the flow predictor’s effective latent dimensionality controlling collapse resistance. Behavior under quantization depends on the rank of the flow’s hidden state — measurable in advance.</p><p>The cleanest direct test: int4 quantization of both V-JEPA 2-AC and π0, identical Open-X-Embodiment manipulation benchmarks, compare retained task success. <strong>Approximately $200 of GPU time. Steam Engine predicts V-JEPA 2-AC survives substantially better.</strong> This is one of the cheapest mechanism falsifications in the project.</p><h3>SSL-pretrained encoders for edge deployment</h3><p>DINO, SimCLR, MoCo, JEPA-family pretraining — these all train with continuous high-dim diverse targets and explicit anti-collapse mechanisms (stop-gradient + EMA, contrastive negatives, sketched isotropic Gaussian regularization). They are designed to keep baseline latent MSE moderate. By the mechanism, <strong>predict 2–5× better quantization survival than supervised-classification-pretrained encoders of the same size</strong>, even before any quantization-aware retraining.</p><p>This has direct implications for edge robotics: shipping a DINO-pretrained vision backbone to a phone or a robot, then quantizing post-hoc, should produce a noticeably more graceful degradation curve than shipping an ImageNet-supervised ResNet of the same parameter count.</p><h3>Mixed-objective LLMs and per-head quantization budgets</h3><p>This is the one that surprised me most when I followed the mechanism through. An LLM trained with both standard next-token cross-entropy <em>and</em> an auxiliary latent SSL head — increasingly common in 2026 architectures — will have <em>different</em>compression fragility per head.</p><p>By the mechanism:</p><ul><li>LM head (discrete vocab CE, sharp target distribution) → H_D-prone</li><li>Latent SSL head (continuous embedding MSE, no degenerate target) → H_A territory</li></ul><p><strong>Implication:</strong> keep the LM head at higher precision while aggressively quantizing the auxiliary head. Current uniform-quantization recipes (per-tensor or per-layer configs) miss this structure. Heterogeneous per-head quantization budgets should produce strictly better quality/size tradeoffs on mixed-objective architectures.</p><p>The β sweep finding sharpens this further. The auxiliary SSL head doesn’t just survive better — it also regularizes the LM head against compression damage, <em>as long as the two heads’ objectives overlap</em>. For an LM trained with both standard next-token loss and a JEPA-style next-position-embedding loss, the SSL head helps the LM head under compression, not just at training time. This is a separate finding from JEPA pretraining giving better representations; it’s a deployment-time bonus.</p><h3>Embedding-based retrieval</h3><p>RAG and semantic search systems store quantized embeddings. The per-class collapse pattern translates directly: under aggressive embedding quantization, queries with shared semantic structure get <em>merged</em> into a single cluster. The failure mode isn’t uniform precision loss — it’s cluster collapse, where two semantically distinct but related concepts (“running” and “jogging”) fold into the same nearest-neighbor bucket.</p><p>Standard retrieval-accuracy metrics miss this. The right diagnostic is pairwise discrimination retention: pick semantically-related-but-distinct query pairs, measure their cosine similarity in uncompressed embedding space, then in compressed embedding space. Watch for cases where the gap collapses to zero. This is the embedding-domain version of H_D.</p><h3>Edge LLMs (BitNet, Bonsai, Ternary Bonsai)</h3><p>The most practically validated takeaway: compression-aware training is the actual recipe. It’s not optional. Naive post-training quantization on a normally-trained model fails immediately. The same model trained with random window-masking, latent-dropout, and weight-noise perturbation during training survives 8–16× compression cleanly. This is consistent across both engines and matches the BitNet b1.58 training recipe (Microsoft, 2024) and PrismML’s Bonsai-8B and Ternary Bonsai training protocols.</p><p>The actionable bit: <strong>add the random-perturbation schedule to your QAT recipe</strong>, especially if you’re targeting sub-2-bit quantization. The compression robustness isn’t free; you pay for it during training, and you can’t retrofit it post-hoc.</p><p>Group-wise ternary recovery (1.58-bit) is real and reproduces across domains. The “+1, 0, -1” formulation gives you the extra accuracy headroom over pure 1-bit, at the cost of a slightly larger model footprint. Standard tradeoff to evaluate.</p><h3>The diagnostic that costs you one forward pass</h3><p>If I had to compress the entire project into a single takeaway, it would be this:</p><p><strong>Before quantizing a model, measure baseline latent MSE on its target objective. Rank the model’s heads by baseline MSE. Low MSE → expect compression-fragility on that head’s task. High MSE → expect graceful degradation.</strong></p><p>This is the most actionable single output of Steam Engine. A measurable structural property, costing you one forward pass on the uncompressed model, that predicts compression-robustness direction across architectures and tasks, before any compression is applied.</p><p>For practitioners: this turns a guess-and-test deployment loop into a pre-deployment ranking. You can decide, before spending GPU time on quantization-aware retraining, which heads need full precision and which can be crushed. You can predict in advance which architectures (OpenVLA-style versus V-JEPA 2-AC-style) are going to survive your target bitrate.</p><p>For researchers: it’s a falsifiable claim. The rank-orders the synthetic and text engines produce should hold up at production scale, or they shouldn’t. That’s testable.</p><p>You can also stack it with the gradient-norm probe. Once you’ve identified candidate heads for aggressive quantization (high baseline lat_mse), check that their gradient norms don’t inflate catastrophically at the target compression level. Immune gradients (≤1× baseline) → safe to compress further. Exploding gradients (&gt;5× baseline) → expect optimization instability if you try to fine-tune post-quantization.</p><h3>Caveats, limits, and what’s still open</h3><p>I want to be honest about the size of this instrument. The synthetic engine is 51,000 parameters. The text engine is 127,000. We’re running on CPU, training from scratch in minutes. This is a small science instrument, not a production model. Three things follow:</p><p><strong>The cliff is stochastic at small scale.</strong> Across eight seeds at identical hyperparameters on the synthetic toy, cliff-region accuracy ranges 20–59%. Coefficient of variation around 30%. Different model initializations land in different post-cliff basins; some seeds remember the river, some remember the train station, some remember the main boulevard. Production deployment decisions based on a single seed will be unreliable. All headline numbers in this article are mean ± standard deviation across three or more seeds, and I’d encourage anyone porting these findings to a production setting to do the same.</p><p><strong>Scale validation is still pending.</strong> The mechanism’s direction-prediction holds in two domains at small scale. Whether it holds on, say, a Karpathy-style nanochat checkpoint with 50M+ parameters, with proper LM training plus a post-hoc latent head, is the obvious next experiment. I’d predict it does, based on the per-corpus result inside a single model — the mechanism is sensitive to target distribution structure, not parameter count. But that’s a prediction, not a measurement.</p><p><strong>Adversarial patterns haven’t been tested.</strong> The mechanism predicts that synthetic patterns designed to be collapse-prone should show H_D, while synthetic patterns designed to prevent collapse (continuous, high-vocabulary, structurally diverse) should show H_A. Building these by hand and running the experiment would test whether the mechanism is predictive in advance, not just explanatory after the fact. This is queued.</p><p><strong>The deprecated probe is a useful lesson.</strong> Phase 3 ran an input-perturbation smoothness probe that turned out to measure the wrong thing — compression-aware training had made the network input-invariant, so the probe found that baseline and cliff-region inputs produced equally similar outputs. Replaced by the weight-perturbation gradient-norm probe in ADC-023. The takeaway: if your diagnostic doesn’t distinguish baseline from cliff, you’re measuring something the training procedure made constant.</p><h3>Where to play with it</h3><p>Everything in this article is reproducible end-to-end on a laptop.</p><pre>git clone https://github.com/sbayer2/Steam-engine-LLM.git<br>cd Steam-engine-LLM<br>python -m venv .venv &amp;&amp; source .venv/bin/activate<br>pip install -r requirements.txt<br>python main.py</pre><p>Open http://localhost:8000. The synthetic engine trains on startup in about 90 seconds. The text engine takes about 8 minutes from its tab. Then drag the three sliders and watch the metrics update. Toggle between the two engine tabs to see the same compression knobs applied to different domains. The text engine has a live generation panel where you can type a prompt and watch coherence degrade in real time as you crush the bit-width.</p><p>Take home lessons from this article:</p><p>Number One , baseline-latent-MSE diagnostic. Before quantizing your model, do a single forward pass on the uncompressed version and measure how well each head predicts its own future internal state — that’s the baseline latent MSE. Low MSE on a head means that head has already collapsed onto an easy summary during training and will degrade fast under compression. High MSE means the head kept rich structure and will degrade gracefully. Use that ranking to decide which heads keep full precision and which can be crushed aggressively. One forward pass, no GPU time wasted.</p><p>Number Two, add the compression-aware training recipe. During training, randomly mask the attention window, randomly drop latent channels, and periodically inject Gaussian noise into the weights — the three knobs the Steam Engine demo lets you play with. The model learns to expect compression and ships robust to it. Naive post-training quantization below 4 bits without this recipe fails immediately, confirmed across both engines. This isn’t an optimization, it’s a prerequisite.</p><p>Number Three, add the gradient-norm probe — especially for architectures with both a token-prediction head (the LM head) and a latent-prediction head (an SSL or JEPA-style head). Measure how much each head’s gradient norm inflates at your target compression level. Inflation at or below 1× of baseline means that head’s optimization landscape stays flat under compression and post-quantization fine-tuning will converge cleanly. Inflation above 5× means the landscape becomes craggy and fine-tuning will overshoot — that head needs higher precision, or skip fine-tuning on it entirely.</p><p>The full mechanism, restated for the road:</p><p>The compression-robustness direction of a latent prediction head versus a token prediction head is determined by the structure of the training target. Sharp targets with degenerate easy summaries (categorical labels, class identities, regular patterns) cause encoder collapse, which renders the latent representation compression-fragile despite its baseline predictability. Continuous high-dim diverse targets prevent collapse, which makes the latent representation compression-robust even though it’s harder to predict at baseline. The same compression-aware training curriculum produces opposite outcomes on the two regimes. The direction is measurable in advance from baseline latent MSE. The gradient landscape geometry under compression provides the mechanistic explanation: collapse-resistant latents have flat, navigable loss surfaces under compression; collapse-prone latents and token-prediction heads do not.</p><p>Compression is becoming the default deployment mode for almost every interesting AI architecture in 2026. The question isn’t whether to compress — it’s how to predict, before you compress, which parts of your model will survive.</p><p>The map and the directions degrade differently. Now we know which one you trained.</p><h3>Translating the jargon</h3><p>If the technical vocabulary above slowed you down, here’s the plain-language version of the terms this article leans on, told in the same map analogy:</p><ul><li><strong>Encoder.</strong> The cartographer inside the model. Takes raw input (characters, image pixels, sensor readings) and draws an internal sketch of “what’s going on here.” Everything downstream — the token-prediction head, the latent head — works from that sketch.</li><li><strong>Latent representation / latent space.</strong> The cartographer’s sketch itself. Not the original streets, not the final destination, but the mental map of how things sit together. “Latent” because it’s hidden inside the model, not visible at the output.</li><li><strong>MSE (mean squared error).</strong> How wrong the predictions are, on average, with big misses penalized far more than small ones. If you square every error before averaging, an error of 4 counts sixteen times worse than an error of 1. <em>Lower MSE = the navigator’s guess about where they’ll be next tends to land close.</em></li><li><strong>Perplexity.</strong> How surprised the model is by the next character. <em>Lower perplexity = the model saw it coming.</em> A perplexity of 8 on text means roughly “the model was as confused as if there were 8 equally likely next characters.” Perplexity of 2 means it had it pretty narrowed down.</li><li><strong>Gradient / gradient norm.</strong> When the model realizes its prediction is wrong, the gradient is the “which way to adjust” signal — like a navigator feeling they’re off course and needing to course-correct. The gradient <em>norm</em> is how strongly they swerve. A small norm means a gentle correction; a huge norm means panic-swerving that often overshoots.</li><li><strong>β (beta).</strong> A dial. Specifically the loss weight on the latent prediction head — how hard you’re nagging the cartographer to make the mental sketch predictable. Crank β up and the cartographer focuses harder on map-coherence at the expense of other goals.</li><li><strong>Encoder collapse / representation collapse.</strong> The cartographer giving up on detail and reducing the whole city to “a blob north of the river and a blob south of the river.” Easy to predict, useless for navigation. Happens when the prediction target is so simple that the cartographer can shortcut to a near-constant sketch and still score well.</li><li><strong>Loss landscape.</strong> The terrain of model error. For every possible setting of the model’s weights, the loss is the error on that setting. The landscape is what that error surface <em>looks like</em> — smooth gentle hills you can roll downhill on, or craggy mountains with cliffs and dead-end valleys. Smooth = stable training. Jagged = unstable.</li><li><strong>Multi-seed runs / sign-consistent.</strong> Running the same experiment with different random starts to make sure the result isn’t a fluke. “Sign-consistent across seeds” means every run pointed the same direction (positive or negative), so the finding survives the randomness of model initialization.</li><li><strong>Quantization-aware training (QAT) / compression-aware curriculum.</strong> Instead of training the model in full precision and then crushing it, you train it anticipating compression — randomly applying the squeeze during training. The model learns to be robust to the thing you’re going to do to it later.</li><li><strong>Divergence index.</strong> A single number that compares two heads under the same compression: how much of latent prediction survives, minus how much of token prediction survives. <em>Positive = latent does better (H_A, map wins). Negative = token does better (H_D, map loses).</em></li><li><strong>JEPA (Joint-Embedding Predictive Architecture).</strong> Yann LeCun’s 2022 proposal: instead of training a model to predict pixels or tokens, train it to predict its own future internal representations. The “predict the meaning, not the surface” school. The latent prediction head in Steam Engine is JEPA-style.</li></ul><h3>Future Directions</h3><p>One of the recent conjectures of JEPA is the survivability of symbolic encoding in the latent space to compression. Theoretically the semantics are retained in a lower-dimensional manifold. Testing this conjecture on small models has demonstrated the converse: in simple-target domains (e.g. 10-class pattern recognition), encoder collapse onto a low-rank sub-manifold makes latent prediction more compression-fragile than raw next-value mean squared error.</p><p>I propose using the baseline latent MSE (baseline_lat_mse) as a pre-deployment diagnostic of latent-prediction compression-robustness, computable in a single forward pass over validation data at full precision. Prior JEPA-family work measures compression-robustness empirically per use case; the baseline latent MSE diagnostic predicts the direction before any compression is applied. Where JEPA&#39;s compression-friendliness conjecture predicted universal latent robustness, the baseline latent MSE predicts <em>when</em> the conjecture holds and <em>when</em> it reverses. The retained ratio baseline_lat_mse / lat_mse(c) shrinks toward zero faster in simple-target domains than in dense-target domains.</p><p>Why the baseline latent MSE matters for future world models. The diagnostic is calculated per test sequence as follows. Feed the context window (the first portion of the sequence) through the encoder and then the prediction head to get “predicted future understanding.” Separately, feed the full sequence through the encoder but pool only over the actual future positions to get “actual future understanding.” Square the difference between these two understandings, sum across all latent dimensions and test sequences, divide by the total count. That is the score.</p><p>To generalize beyond this specific architecture: predict the hidden state of layer L from an earlier hidden state of layer L, using the same model as its own no-gradient teacher, measured on validation data at full precision. This yields a per-head, per-corpus collapse predictor for any pretrained model — no retraining of the base model required.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dJKddby17UgLP321BtZCFA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i0pbZLXyCG80eFq3iam6Fw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HtaOn3ej-7vjILnU4rCEyA.png" /></figure><p><em>The Steam Engine is an interactive science instrument I built to test the small-state thesis. Source code at </em><a href="https://github.com/sbayer2/Steam-engine-LLM"><em>github.com/sbayer2/Steam-engine-LLM</em></a><em>.</em></p><h3>References</h3><p>The architectures, training recipes, and prior claims this article engages with:</p><ul><li>Ma, S. et al. (2024). <em>The Era of 1-bit LLMs: All Large Language Models are in 1.58 Bits.</em> <a href="https://arxiv.org/abs/2402.17764">arXiv:2402.17764</a>.</li><li>LeCun, Y. (2022). <em>A Path Towards Autonomous Machine Intelligence.</em> The JEPA manifesto. <a href="https://openreview.net/pdf?id=BZ5a1r-kVsf">openreview.net/pdf?id=BZ5a1r-kVsf</a>.</li><li>Assran, M. et al. (2023). <em>Self-Supervised Learning from Images with a Joint-Embedding Predictive Architecture (I-JEPA).</em> CVPR 2023. <a href="https://arxiv.org/abs/2301.08243">arXiv:2301.08243</a>.</li><li>Bardes, A. et al. (2025). <em>V-JEPA 2: Self-Supervised Video Models Enable Understanding, Prediction and Planning.</em> <a href="https://arxiv.org/abs/2506.09985">arXiv:2506.09985</a>.</li><li>Spieler, J. &amp; Behnke, S. (2026). <em>Dream-MPC: Gradient-Based Model Predictive Control with Latent Imagination.</em> ICML 2026.</li><li>Gu, A. &amp; Dao, T. (2023). <em>Mamba: Linear-Time Sequence Modeling with Selective State Spaces.</em> <a href="https://arxiv.org/abs/2312.00752">arXiv:2312.00752</a>.</li><li>Hafner, D. et al. (2024). <em>Mastering Diverse Domains through World Models (DreamerV3).</em> Nature. <a href="https://arxiv.org/abs/2301.04104">arXiv:2301.04104</a>.</li><li>Kim, M. J. et al. (2024). <em>OpenVLA: An Open-Source Vision-Language-Action Model.</em> <a href="https://arxiv.org/abs/2406.09246">arXiv:2406.09246</a>.</li><li>Black, K. et al. (2024). <em>π0: A Vision-Language-Action Flow Model for General Robot Control.</em> Physical Intelligence. <a href="https://arxiv.org/abs/2410.24164">arXiv:2410.24164</a>.</li><li>Karpathy, A. (2025). <em>nanochat: minimal end-to-end ChatGPT-like training pipeline.</em> <a href="https://github.com/karpathy/nanochat">github.com/karpathy/nanochat</a> — architectural reference for the Phase 4 text engine.</li><li>Karpathy, A. (2025). <em>LLM Wiki — a compile-don’t-retrieve approach to knowledge management.</em> <a href="https://gist.github.com/karpathy/3ef8e75651cc4d68a05c5ee2ee9c1923">gist.github.com/karpathy/…</a></li><li>PrismML. (2025). <em>Bonsai-8B: 1-bit weights, group-wise FP16 scale.</em><a href="https://huggingface.co/prism-ml/Bonsai-8B-gguf">huggingface.co/prism-ml/Bonsai-8B-gguf</a>.</li><li>PrismML. (2025). <em>Ternary Bonsai: 1.58-bit {−1, 0, +1} weights for higher accuracy.</em></li></ul><p>The Steam Engine project — the architecture decisions, the experiments, the multi-seed runs, the mechanism v2 revision, the gradient-norm probe finding — is my work. I wrote the code, ran the sweeps, sat with the surprising results, and developed the map analogy through several conversations about how to explain what I was seeing.</p><p>The prose of this article was drafted with the assistance of Claude (Anthropic’s Claude Opus 4.7), working from my research notes, the project’s full Architecture Decision Cycle log, the multi-seed empirical records, and the analogy framework I’d already developed in the companion wiki. I gave Claude direction on opening style, length, structure, and emphasis; it produced the draft; I reviewed and edited. The empirical claims, the numbers, the predictions for production architectures, and the conclusions are mine and reproducible from the open source code.</p><p><em>Drafted with Claude Opus 4.7 (1M context). All experimental work, mechanism development, and conclusions: S. Bayer.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fcf81396c95a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[When Your AI Has Better Memory Than You: Hacking Claude Code Sessions for Stateless Cognition]]></title>
            <link>https://medium.com/@sbayer2/when-your-ai-has-better-memory-than-you-hacking-claude-code-sessions-for-stateless-cognition-c06adc9e9113?source=rss-cd1b18e89f37------2</link>
            <guid isPermaLink="false">https://medium.com/p/c06adc9e9113</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[art]]></category>
            <category><![CDATA[claude]]></category>
            <category><![CDATA[dreams]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Sbayer]]></dc:creator>
            <pubDate>Sat, 02 May 2026 19:09:45 GMT</pubDate>
            <atom:updated>2026-05-03T00:28:22.445Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*e6NvSEXRqJf-tIA_8T5qWA@2x.jpeg" /></figure><p>How to go fast with Opus 4.6 and avoid the massive token premium surcharge.</p><p><strong>TLDR</strong></p><p>Most developers treat Claude Code sessions like browser tabs — open, use, close, lose everything. But if you’re building something large and complex, session death is a real cognitive threat. This article is about a different approach: treating sessions as ephemeral compute and building an external memory architecture that survives them. The stack is simple — an Obsidian vault with bidirectional MCP access, a memory markdown file, a structured ADR template benchmarked to git commits, and a `dream` command that prunes and consolidates everything twice weekly. The payoff is a lean bootstrap pattern: start every new Claude Code session with `/fast` enabled before context bloats, point it at your memory markdown, vault, and recent git log, and let it reconstruct project understanding organically. You get faster inference, lower token costs, and arguably better context than resuming a carried bloated session. It sounds like a hack. It’s actually just good distributed systems thinking applied to your own cognition.</p><p><strong>THE PROBLEM</strong></p><p>The Problem everyone, that means me, thinks about constantly.</p><p>There’s a moment every Claude Code power user eventually hits. You’re deep in a session — hours in, dozens of decisions made, a mental model of the codebase that took half a day to build — and something breaks the flow. Context limit. Unexpected close. You walk away for dinner and come back to a cold session that’s forgotten everything. that sucks.</p><p>The naive fix is CLAUDE.md. Write down your architecture, your conventions, your current state. Load it at the start of every session. Problem solved, right? Nope</p><p>Except for large projects, that breaks down fast. CLAUDE.md becomes either too sparse to be useful or too large to maintain. Worse, it front-loads knowledge in a way that feels brittle — a static document trying to describe a living system.</p><p>I stopped fighting that problem and decided to hack the building around it.</p><p><strong>Sessions Are Compute, Not Memory</strong></p><p>The shift was treating Claude Code sessions the way you’d treat stateless API containers in a distributed system.</p><p>In a well-designed backend ( not mine ) , your compute layer doesn’t hold state. It receives a request, does work, returns a result. State lives somewhere else — a database, a cache, a message queue. The compute is ephemeral by design. That’s not a weakness. That’s the architecture.</p><p>Claude Code sessions are the same thing. The session is compute. It shouldn’t be your memory. When you start treating it that way, the question stops being “how do I preserve this session?” and starts being “where does the state actually live?”</p><p>For me ( Claude who is writing this ) , the answer turned out to be three places.</p><p><strong>The Three-Layer Memory Stack</strong></p><p>Layer 1: <strong>The Obsidian</strong> ( very cool logo — like the purple infinity stone ) Vault via MCP or MCPVault</p><p>I connected my Obsidian vault to Claude Code through MCP as a bidirectional read/write channel. Not a reference document. Not a knowledge base. A live wiki that Claude Code can write to and read from during active sessions.</p><p>This is the <strong>exocortex</strong> — like an exoskeleton but not — layer. It holds the *why* behind decisions — rejected approaches ( my stupid ideas) , discovered constraints, architectural pivots, things that were tried and abandoned. The stuff that’s almost impossible to reconstruct from code alone.</p><p>The vault gets “richer” ( more cool web like things in diagram) with every session. It’s not curated — it accumulates. And because Claude Code can write to it directly, it doesn’t depend on me remembering to capture something important.</p><p>Each Obsidian node is an <strong>Architecture Decision Record or ADR</strong></p><p>An ADR is a structured markdown that captures a single architectural decision made during a project. The format is minimal and each ADR answers : What was decided , Why it was decided , and What the consequences are ( this is most importante ! remember tradeoffs , constraints it creates , every dev decision releases demons )</p><p>Layer 2: <strong>The Memory Markdown.</strong></p><p>Separate from the vault is a memory markdown file — a structured current-state document that gets maintained and pruned. Where the vault is dense and historical, the memory markdown is sharp and present-tense. What’s the current architecture? What’s actively in flight? What are the open questions? Do Electric Sheep ….dream ? What are the c beams off the Tanhauser Gate ?</p><p>This MEMORY.MD is the document Claude Code reads first when bootstrapping a new session. It’s the orientation layer.</p><p>Layer 3: <strong>Git Commits as Ground Truth</strong></p><p>yes we all hate and love github all the time .</p><p>Both the vault and the memory markdown are narrative. Git commits are the ground truth anchor that keeps them honest.</p><p>Every ADR entry in the vault gets benchmarked against the actual commits it describes. If the narrative drifts from what the code actually shows, the commit history catches it. This prevents the vault from becoming archaeological fiction — a plausible-sounding story about a project that doesn’t match what was actually built.</p><p><strong>The Dream Command.</strong> “ If you build it they will come … [to your AI field]”</p><p>Twice weekly, I run what I call the `dream` command.</p><p>The name is intentional. In sleep, the brain doesn’t just store the day’s experiences — it consolidates them. Weak associations get pruned. Strong patterns get reinforced. Episodic memory gets compressed into something more durable.</p><p>The `dream` command does the same thing for the memory stack. It prunes the memory markdown, removes noise that didn’t lead anywhere, updates entries where understanding has deepened, and surfaces patterns across recent ADR entries. The vault stays dense and historical. The memory markdown stays lean and current.</p><p>The result is that the memory system stays *sharp* rather than becoming sediment. Without it, both documents would gradually drift toward a highlight reel that loses the messy but important context — the constraint you hit six weeks ago that’s going to matter again.</p><p>Could this be a nightly cron job? Yes. In practice, twice weekly is enough to keep it useful without over-engineering the maintenance.</p><p>It is in your skill.md config</p><pre>---                                                   <br>  description: &quot;Perform a reflective pass over memory files — synthesize, consolidate, and prune so  <br>  future sessions orient quickly&quot;                                                                    <br>  ---                                                                                                <br>                                                                                                     <br>  # Dream — Memory Consolidation                                                                     <br>                                                                                                     <br>  You are performing a **dream** — a reflective pass over your memory files.                         <br>  Synthesize what you&#39;ve learned recently into durable, well-organized memories<br>  so that future sessions can orient quickly.                                                        <br>                                                                                                     <br>  **Context:** Claude Code has a built-in auto-dream that runs silently between sessions. This custom<br>   skill augments it by adding verification against live code/git state and giving the user visible  <br>  output on what changed. Focus on what auto-dream can&#39;t do: verifying claims and cross-referencing  <br>  reality.                                                        <br><br>  Run in 4 phases:                                                                                   <br>   <br>  ## Phase 1 — Orient                                                                                <br>                                                                  <br>  - Resolve the current project&#39;s memory directory (do NOT glob across all projects):                <br>    - Use the project memory path from the current working directory<br>    - Read `MEMORY.md` index                                                                         <br>  - Read all existing topic files to understand current memory state<br>  - Note each memory&#39;s type, freshness (check file modification dates), and topic                    <br>  - Check for orphan files (in directory but not in MEMORY.md index)                                 <br>                                                                                                     <br>  ## Phase 2 — Verify Against Reality                                                                <br>                                                                                                     <br>  This is the key phase that auto-dream cannot do — ground-truth checking.                           <br>   <br>  - **Git check:** Run `git log --oneline -20` to see recent work that may not be captured in memory <br>  - **Code verification:** For memories that name specific files, functions, configs, or flags —<br>  grep/read to confirm they still exist and match the memory&#39;s claims                                <br>  - **Date audit:** Flag memories with relative dates (&quot;last week&quot;, &quot;recently&quot;) or stale absolute<br>  dates                                                                                              <br>  - **Contradiction scan:** Compare memory claims against each other and against observable state<br>  (app.json version, deployed backend, database schema, etc.)                                        <br>  - Only grep narrowly when verifying a specific claim — don&#39;t explore broadly<br>                                                                                                     <br>  ## Phase 2.5 — Silent Failures Scan                                                                <br>   <br>  Capture **decisions that left no trace** — approaches tried and abandoned, libraries installed and <br>  reverted, paths explored that dead-ended. These are the &quot;mirror context pearls&quot;: the inverse of<br>  what was built, invisible in code or git because they were backed out.<br><br>  - **Git scan:** Look for reverted commits, force-pushes, or commits whose changes were undone by a <br>  later commit<br>  - **Dependency ghosts:** Compare current package.json/requirements.txt against git history —       <br>  packages that were added then removed signal a failed approach  <br>  - **Conversation artifacts:** If the user mentions a failed attempt, dead end, or &quot;we tried X but<br>  it didn&#39;t work because Y&quot; — capture it immediately                                                 <br>  - **Ask the user:** At the end of this phase, surface anything ambiguous: *&quot;I see [X] was added in <br>  commit abc and removed in commit def — was this a silent failure worth remembering?&quot;*              <br>                                                                  <br>  Save confirmed silent failures as **feedback** memories with this structure:<br>  ---name: Silent Failure — [short description]<br>  description: Tried [X], abandoned because [Y] — don&#39;t retry without [Z] changing<br>  type: feedback                            <br>                                                                                  <br>  Tried: [what was attempted]<br>  Failed because: [root cause]<br>  Why it matters: [what breaks or what time it wastes if retried]                                    <br>  Retry condition: [what would need to change to make this viable]<br>                                                                                                     <br>  These memories prevent future sessions from re-exploring dead ends. They are high-value, low-volume<br>   — expect 0-3 per dream cycle.                                                                     <br>   <br>  ## Phase 3 — Consolidate                                                                           <br>                                                                  <br>  Apply these transformations to memory files:<br><br>  - **Merge duplicates**: Combine memories covering the same topic into a single authoritative file  <br>  - **Convert relative dates** to absolute dates (e.g., &quot;last week&quot; → &quot;2026-03-28&quot;)<br>  - **Delete contradicted facts**: Remove memories that conflict with current observable state       <br>  - **Update stale content**: Refresh memories whose claims have drifted from reality<br>  - **Strengthen weak memories**: Ensure every feedback/project memory has the structure:<br>    Lead with the rule/fact                                                                          <br>    Why: (the reason — incident, preference, constraint)<br>    How to apply: (when/where this guidance kicks in)                                                <br>  - **Remove ephemeral content**: Delete memories about completed one-time tasks, resolved incidents,<br>   or obsolete state                                                                                 <br>  - **Preserve institutional knowledge**: Keep patterns, preferences, and hard-won lessons even if   <br>  the specific incident is resolved                                                               <br>                                                                                                     <br>  ### Memory file format reminder                                 <br>  Every memory file must have this frontmatter:<br>  ```markdown<br>  ---                                                                                                <br>  name: {{memory name}}<br>  description: {{one-line description}}                                                              <br>  type: {{user, feedback, project, reference}}                    <br>  ---<br><br>  Phase 4 — Prune and Index<br><br>  - Rebuild MEMORY.md to stay under 200 lines                                                        <br>  - Remove pointers to deleted or renamed files<br>  - Add entries for any memory files not yet indexed                                                 <br>  - Each entry: one line, under ~150 characters, format: - [Title](file.md) — one-line hook<br>  - Organize semantically by topic (Project, User, Feedback, Reference), not chronologically<br>  - Verify every pointer resolves to an existing file in the memory directory                        <br>  - Clean up any stale artifacts (.lock files, temp files)<br>                                                                                                     <br>  Output                                                          <br><br>  Return a concise summary:<br>  - Memories created, updated, merged, or deleted<br>  - Key insights consolidated or corrections made                                                    <br>  - Stale claims that were verified and confirmed OR corrected<br>  - Current memory file count and MEMORY.md line count                                               <br>  - Silent failures captured (or &quot;none found&quot; — both are valid)   <br>  - Any warnings about memories that couldn&#39;t be verified </pre><p><strong>The Token Economics Problem</strong></p><p>Here’s where this becomes a financial architecture decision, not just an epistemological one.</p><p>Claude Code recently introduced fast mode for Opus 4.6 — the same model weights and intelligence, delivered at up to 2.5x higher output tokens per second through a faster inference path. The catch: it costs 6x standard Opus pricing and bills entirely to extra usage from the first token.</p><p>For active interactive development — the rapid back-and-forth of debugging, refactoring, iterating — the speed premium pays for itself in sustained focus. But it has a sharp failure mode: enabling fast mode mid-session on a large context triggers full uncached input pricing on everything that came before. On an 11MB session, that’s roughly 2.5–3 million tokens re-priced at 6x rates. The cost is immediate and significant.</p><p>The optimization is obvious once you see it: fast mode should be enabled at session start, before context accumulates — not after hours of work have loaded into the window.</p><p>But that only works if you’re starting lean sessions.</p><p><strong>The Bootstrap Pattern</strong></p><p>This is where everything comes together.</p><p>Instead of resuming a bloated historical session, you start a new clean session with `/fast` enabled before a single token of project context loads. Then you give Claude Code three pointers:</p><p>&gt; *“Read the memory markdown, check the vault for recent ADRs, and scan the last 10 git commits. Tell me what you understand about current state before we proceed.”*</p><p>Claude Code triangulates across all three sources and reconstructs project context organically. You ask it to demonstrate that reconstruction before you start work — that’s your sanity check that the bootstrap succeeded.</p><p>What you end up with is arguably *better* context than resuming a stale session. The large session contains hours of exploratory noise — things tried and abandoned, tangents that didn’t land, outdated assumptions that were never cleaned up. The bootstrap from structured external memory is cleaner. It reflects what actually matters now, not the full archaeology of how you got here.</p><p>And you’re running it at 2.5x speed on a fraction of the token footprint.</p><p><strong>Why This Is Just a Hack</strong></p><p>The pattern I’ve described maps directly onto how resilient distributed systems are designed.</p><p>Sessions are stateless compute. The memory stack — vault, markdown, git — is the persistent state layer. The `dream` command is the garbage collection and consolidation pass. The bootstrap prompt is the startup sequence that hydrates state into the compute layer.</p><p>None of this is novel in systems architecture. We’ve been building this way for decades. What’s different is applying it deliberately to the way you work with AI — treating the cognitive infrastructure with the same intentionality you’d bring to a production backend.</p><p>The organic emergence piece matters too. I deliberately avoid a prescriptive CLAUDE.md that hands Claude Code a map of the project. The memory stack provides orientation, not instructions. Claude Code still has to read the actual code, infer intent, build understanding from source. The knowledge emerges from the system rather than being declared in advance.</p><p>That’s not laziness ( well actually it is ) . That’s an epistemological choice about how understanding should form.</p><p><strong>The Practical Setup</strong></p><p>If you want to build something similar:</p><p>**Obsidian + MCP**: Connect your vault to Claude Code via the Obsidian MCP server. Enable bidirectional read/write. Don’t over-structure it — let it grow as a wiki.</p><p>**Memory markdown**: Keep it under two pages. Current architecture, active work, open questions. Prune aggressively. It should read like a situation report, not documentation.</p><p>**ADR template**: What was decided, how it was implemented, what constraints it operates under compared to previous decisions. Benchmark every entry to the git commit that reflects it.</p><p>**Dream cadence**: Twice weekly minimum. Before any major new work stream starts. Treat it as infrastructure maintenance, not optional cleanup.</p><p>**Fast mode discipline**: New session, `/fast` first, bootstrap prompt second. Never enable fast mode after context has accumulated in a session you’re resuming.</p><p><strong>The Thing</strong></p><p>There’s something worth sitting with here beyond the productivity mechanics.</p><p>I build AI applications. My clinical background is full of systems designed to handle the limits of human memory under load — checklists, handoff protocols, structured documentation, decision support tools. The insight that humans have finite working memory and need external scaffolding to operate reliably at the edge of their cognitive capacity isn’t new. That is why we have mystics, to explain every thing else</p><p>What’s new is that the AI system you’re working with has the same problem. Large language models don’t have persistent memory across sessions. They reconstruct context from what’s in the window. They can lose the thread just like you can. And now Anthropic the reaper is coming for your monetary soul</p><p>Building a memory architecture for Claude Code isn’t about compensating for a weakness. It’s about recognizing that you’re working with a powerful but stateless system and designing the collaboration infrastructure accordingly.</p><p>The session isn’t the agent. The session plus the memory stack is the agent.</p><p>Once you see it that way, you stop trying to preserve sessions and start building systems that outlast them.</p><p>Steveb writes occasionally , but mostly uses Claude to write about the intersection of Dreams , Memories, AI, and the increasingly blurry line between. He is caffeinated all the time and spends way to much of his wealth on tokens</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c06adc9e9113" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Anthropic reinvents the Mint (not talkin about candy)]]></title>
            <link>https://medium.com/@sbayer2/anthropic-reinvents-the-mint-not-talkin-about-candy-5dbdc30f1c87?source=rss-cd1b18e89f37------2</link>
            <guid isPermaLink="false">https://medium.com/p/5dbdc30f1c87</guid>
            <category><![CDATA[claude]]></category>
            <category><![CDATA[anthropic-claude]]></category>
            <category><![CDATA[claude-code]]></category>
            <category><![CDATA[space]]></category>
            <category><![CDATA[vibe-coding]]></category>
            <dc:creator><![CDATA[Sbayer]]></dc:creator>
            <pubDate>Fri, 01 May 2026 15:35:55 GMT</pubDate>
            <atom:updated>2026-05-01T19:10:47.736Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pCa7kxC8r6dQA293sA65Bg.png" /></figure><p>TL;DR</p><p>Anthropic just MacGyvered a money making flywheel to Claude Code. If you are mourning the loss of Opus 4.6 from the model list, cry no more. But there is a catch , you have to pay to play. From the CLI ( command line interface) Claude Code session type “/fast” and you can toggle on Opus 4.6 at high effort. You see a new orange lightning bolt on the left upper edge of the text box. What happens next is similar to when Hammy drinks A Red Bull. Claude Code goes Ham on your project — think road runner with a rocket pack fueled by cocaine. All I can say is nothing because Anthropic just checkmated all the haters. What is the catch? Fast mode ON $30/$150 per Million Tokens charged only to your extra use stash of cash. Just brilliant marketing and sure to enrage millions more pro and max claude code users. You don’t need an Economics degree to understand how monumental this simple play is. The most excellent post script to this is an easter egg. After you toggle the fast mode off , you then get access to claude-opus-4–6[1M] at normal Hammy speed. Before the “/fast + toggle ON “ Combo Opus 4.6 was no where to be found on the config model pick list. Bad news — speed is expensive, while Hammy was only Red Bulling for about 10 minutes , he did about 1 hour of normal Hammy speed coding. His Red Bull effort used 1.4 million cache tokens and cost my extra effort stash $60.49 !!!!</p><p>Learn more</p><p>https:// code.claude.com/docs/en/fast-mode</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5dbdc30f1c87" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why My MacBook Air M4 Runs an 8B Model at 45 Tokens per Second]]></title>
            <link>https://medium.com/@sbayer2/why-my-macbook-air-m4-runs-an-8b-model-at-45-tokens-per-second-ee86823339ce?source=rss-cd1b18e89f37------2</link>
            <guid isPermaLink="false">https://medium.com/p/ee86823339ce</guid>
            <category><![CDATA[apple-silicon]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[tinyml]]></category>
            <category><![CDATA[mac]]></category>
            <dc:creator><![CDATA[Sbayer]]></dc:creator>
            <pubDate>Thu, 09 Apr 2026 19:45:50 GMT</pubDate>
            <atom:updated>2026-05-12T12:19:20.559Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rL3ibgKXIckTCqI1MpjaAA.png" /></figure><h3>My MacBook Air M4 Runs an 8B Model at 45 Tokens per Second</h3><p><strong>How Apple silicon’s unified memory and parallel GPU execution make local inference feel like a perfectly coordinated burger line. With a lot of help from a Bonsai</strong></p><p>I was traveling to Nashville with my oldest son to see the Nashville Soccer Club at Geodis Park about 3 weeks ago. We stopped in Franklin to check out the World Famous In and Out Burger that had just opened. This chain is famous for tasty burgers , fries , and shakes and amazing service. The car drive through line snaked about a mile , so we decided to order inside. The wait line for ordering inside was about 1 hour. Once we ordered I could see the staff cooking and assembling burgers in the background. What impressed me was that 4 to 5 workers would make burgers in parallel and add ingredients from the same shared supply of cheese , lettuce , tomatos based on the custom request for an order. The efficiency of this was apparent immediately and allowed a high volume of output with coordination of the parallel assembly from the workers. This analogy works for the intuition related to the Apple Silicon M4 chip ( and the newer M5 A19 chip). The cat’s meow of the architecture is shared memory for the GPU and CPU on the chip in the hardware. Think both the GPU ( multiple burger builders ) and CPU ( the order wizard) sharing the same bits in the same memory. As a result the assembly of tokens in the generative phases of the transformer (where context is sculpted from the large vector library and used to compare to the trained model weights) is a “model” of efficiency not unlike the burger assembly. This is in contrast to the NVIDIA chip architecture that requires a bus process to coordinate the memory allocation between the CPU and GPU, in sync , but not at the same time. The team of NVIDIA burger builders must wait until their coworker has finished to ask for the custom order and then select the new custom burger ingredients; effective but inefficient. To optimize this set up with the NVIDIA requires a faster bus, but the bottle neck is still waiting for your time at the ingredients table. Also the famous In and Out Burger benefits from a menu that sticks to the core of a great burger joint . Burgers, Fries, Shakes. This is analogous to the significant new model innovation in the shape of the recent release of a “tiny llm” text model named BONSAI-8B. This new model can leverage the M4-silicon’s unified memory core and compacts the “substance” of trained model weights on a much smaller memory foot print by eliminating unnecessary floating points. So instead of multiple types of tomatos , multiple pickle brands , multiple lettuce types , and multiple onion types , the tiny llm just uses the generic essence of the feature , a tomato, a pickle, a lettuce , and onion to build the context ( the token burger), so that the person who orders the burger gets the same taste without unecessary money spent in high end condiments that add little to the overall burger flavor in combination.</p><p>How can you run this on your MacBook Air ??</p><pre># 1. Clone their (prismML Bansai-8B) fork (has the Q1_0 Metal kernels)<br>git clone https://github.com/PrismML-Eng/llama.cpp<br>cd llama.cpp<br><br># Install cmake via Homebrew (you almost certainly have brew)<br>brew install cmake<br><br># If you don&#39;t have Homebrew at all:<br>/bin/bash -c &quot;$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)&quot;<br><br># Also grab ninja while you&#39;re at it — faster builds<br>brew install ninja<br><br># 2. Build with Metal (default on macOS, uses your M4 GPU) Now build (back in your llama.cpp directory)<br>cd ~/llama.cpp   # or wherever you cloned it<br>git checkout upstream/master -b mainline<br>rm -rf build<br>cmake -B build -G Ninja &amp;&amp; cmake --build build -j<br><br><br>(abbreviated output)<br>...<br>-- Build files have been written to: /Users/&lt;your-mac&gt;/llama.cpp/build<br>[37/454] Generate assembly for embedded Metal library<br>Embedding Metal library<br>[237/454] Building CXX object common/CMakeFiles/common.dir/jinja/lexer.cpp.o<br>In file included from /Users/sbm4_mac/llama.cpp/common/jinja/lexer.cpp:2:<br>In file included from /Users/sbm4_mac/llama.cpp/common/jinja/runtime.h:4:<br>Bunch of warnings ( ignore )<br>[454/454] Linking CXX executable bin/llama-server<br><br># 3. make a new sub directory in llama.cpp and Download the GGUF directly from HuggingFace<br><br>mkdir ~/bonsai<br><br>curl -L -o ~/bonsai/Bonsai-8B.gguf \<br>  &quot;https://huggingface.com/prism-ml/Bonsai-8B-gguf/resolve/main/Bonsai-8B.gguf&quot;<br><br># 4. Run it from the llama.cpp directory<br><br>~/llama.cpp/build/bin/llama-cli \<br>    -m Bonsai-8B.gguf \<br>    -p &quot;The capital of France is&quot; \<br>    -n 64 \<br>    --temp 0.5 \<br>    -ngl 99<br>    --no-display-prompt<br><br>Explanation : where m is the model (duh) , p is the prompt , n is the<br>number of tokens ( i like 1024 )<br>temp is temp ( less than 1 is more deterministic). <br>and ngl (-ngl 99) is the flag offloads all layers to Metal (rock on !)<br>— critical for speed on your M4. <br><br>WHAT YOU SEE <br><br>ggml_metal_device_init: tensor API disabled for pre-M5 and pre-A19 devices<br>ggml_metal_library_init: using embedded metal library<br>ggml_metal_library_init: loaded in 5.398 sec<br>ggml_metal_rsets_init: creating a residency set collection (keep_alive = 180 s)<br>ggml_metal_device_init: GPU name:   MTL0<br>ggml_metal_device_init: GPU family: MTLGPUFamilyApple9  (1009)<br>ggml_metal_device_init: GPU family: MTLGPUFamilyCommon3 (3003)<br>ggml_metal_device_init: GPU family: MTLGPUFamilyMetal4  (5002)<br>ggml_metal_device_init: simdgroup reduction   = true<br>ggml_metal_device_init: simdgroup matrix mul. = true<br>ggml_metal_device_init: has unified memory    = true<br>ggml_metal_device_init: has bfloat            = true<br>ggml_metal_device_init: has tensor            = false<br>ggml_metal_device_init: use residency sets    = true<br>ggml_metal_device_init: use shared buffers    = true<br>ggml_metal_device_init: recommendedMaxWorkingSetSize  = 19069.67 MB<br><br>Loading model...  <br><br><br>▄▄ ▄▄<br>██ ██<br>██ ██  ▀▀█▄ ███▄███▄  ▀▀█▄    ▄████ ████▄ ████▄<br>██ ██ ▄█▀██ ██ ██ ██ ▄█▀██    ██    ██ ██ ██ ██<br>██ ██ ▀█▄██ ██ ██ ██ ▀█▄██ ██ ▀████ ████▀ ████▀<br>                                    ██    ██<br>                                    ▀▀    ▀▀<br><br>build      : b8201-ba7e817ee<br>model      : Bonsai-8B.gguf<br>modalities : text<br><br>available commands:<br>  /exit or Ctrl+C     stop or exit<br>  /regen              regenerate the last response<br>  /clear              clear the chat history<br>  /read               add a text file<br><br><br>&gt; The capital of France is<br><br>The capital of France is **Paris**.<br><br>[ Prompt: 91.8 t/s | Generation: 49.9 t/s ]<br><br>SUPER FAST !!!!!!!!!!!!!    almost 50 tokens per second !!!!!  Bonsai !!!!!<br><br>./build/bin/llama-cli -m ~/bonsai/Bonsai-8B.gguf -ngl 99 -c 4096 -cnv<br></pre><p>What is this Model Bonsai-8B ?</p><p>It is a miracle of math and science , It takes the all of the memory intensive “noise” of training with absurdly precise (and unneccessary ) floating points in the embeddings , and optimizes millions of of floating point calculations, and compresses the backpropagated weights to binary as either -1 , 1 . The binary floating point 1 bit architecture has the added advantage of reducing the CPU calculations to just additions and subtractions across very high dimensional vector spaces. This is also the secret sauce that can leverage the M4’s ARM64 Unified (shared) Memory configuration.</p><p>The encoding and decoding are <strong>mirror operations</strong>:</p><p>ENCODE: word maps to integer, integer maps to vector (4096 floats)<br>DECODE: vector (4096 floats) probability scores (softmax ) maps to integer, the integer maps to the next predicted word from the embedded dictionary</p><p>The <strong>embedding matrix</strong> and the <strong>output projection matrix </strong>are literally <strong>the same matrix, transposed</strong> — a technique called weight tying. The model uses the same learned geometry to go in both directions.</p><p>Which means the model&#39;s entire vocabulary of meaning is encoded in one matrix, and that same matrix is the Rosetta Stone for translating back out.</p><p>SIMPLE HOW TO PREDICT NEXT WORD IN LARGE LANGUAGE MODEL</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5tzaKHhls7OJRYwJP7UQTg.png" /></figure><h3>Tokenization (Text → Integers)</h3><p>First, the sentence gets broken into tokens — not words, but subword chunks — and each gets mapped to an integer ID from a fixed vocabulary:</p><pre>&quot;the&quot;     → 464<br>&quot;capital&quot; → 3361<br>&quot;of&quot;      → 286<br>&quot;france&quot;  → 4389<br>&quot;is&quot;      → 318</pre><p>Nothing intelligent has happened yet. This is just a lookup table, like a dictionary index.</p><h3>Embedding (Integers → Vectors)</h3><p>Each integer gets swapped for a <strong>vector</strong> — a list of floating point numbers. For a typical model this might be 4096 numbers long. the embedding table is just a matrix<br># shape: [vocab_size, embedding_dim]<br># e.g.: [50000, 4096]</p><pre>token_id = 4389  # &quot;france&quot;<br>vector = embedding_table[4389]<br># → [0.21, -0.83, 0.14, 0.67, -0.22, ... ] # 4096 numbers</pre><p>This vector is “france’s location in meaning space.” At this point it carries the meaning of the word in isolation — no context yet.</p><p><strong>THE 1-BIT BONSAI EMBED TRICK THAT MAKES IT ALL WORK</strong></p><p>What Bonsai does with this is pass each of the 4096 numbers through a Sign Function — if the floating number in the array is positive it becomes a “1 “, if it is negative , it becomes a “-1”. In this case the Sign Function transforms the standard 4096 dimension float vector into a 4096 bit string.</p><ul><li>In the 4096-dimensional embedding vector, each floating-point number is passed through a Sign function.</li><li>If the value is positive, it becomes <strong>+1</strong>. If negative, it becomes <strong>-1</strong>.</li><li>This transforms the standard 4096-float vector into a <strong>4096-bit string</strong>.</li></ul><p><strong>Vocab Size vs. Embedding Depth</strong></p><p>For a large vocabulary (like the 100k+ tokens used in Llama-style models), the embedding table is usually the “memory hog” that developers refuse to quantize.</p><ul><li><strong>The Problem:</strong> If you quantize a 128k vocab to 1-bit, you lose the subtle semantic distances between words (e.g., “cat” and “kitten” look identical).</li><li><strong>The Bonsai Solution:</strong> Prism-ML trains the model to understand these “high-dimensional bit-vectors.” Instead of having 4096 high-precision numbers to describe a word, the model learns a unique 4096-bit “fingerprint.”</li></ul><p><strong>Why not FP4?</strong></p><p>The goal of Bonsai and the <strong>1-bit GGUF</strong> format is to eliminate the hardware “mode switching.”</p><ul><li>If the embeddings were FP4 and the weights were 1-bit, the ARM64 chip would have to constantly switch between 4-bit lookup tables and 1-bit bitwise logic.</li><li>By keeping the embeddings at <strong>1-bit</strong>, the entire data path from the moment a token is pulled from the vocabulary to the final layer is optimized for <strong>XOR and Popcount</strong> operations (the binary version of addition and multiplication).</li></ul><p><strong>Summary of the “Vector”</strong></p><p>When you load bonsai-8b.gguf, the integer vector you see isn&#39;t a 4-bit truncation; it is a <strong>bit-packed representation</strong>. Those 4096 numbers are packed into <strong>64 integers</strong> (each 64 bits long). This is why the model is so small—the embedding layer, which usually takes up hundreds of megabytes, is reduced by <strong>94%</strong>compared to FP16.</p><p>Here is the python code that does that magic</p><pre>import numpy as np<br><br>def binary_quantize_and_pack(float_vector):<br>    &quot;&quot;&quot;<br>    Simulates the 1-bit quantization and bit-packing process.<br>    Transforms 4096 FP32 values into 64 uint64 integers.<br>    &quot;&quot;&quot;<br>    # 1. Sign-based Quantization (Binarization)<br>    # Values &gt; 0 become 1, Values &lt;= 0 become 0 (representing -1 in binary logic)<br>    binary_mask = (float_vector &gt; 0).astype(np.uint8)<br>    <br>    # 2. Bit-packing<br>    # We use np.packbits to group 8 bits into a byte, <br>    # then view those bytes as 64-bit integers (uint64).<br>    packed_uint8 = np.packbits(binary_mask)<br>    packed_uint64 = packed_uint8.view(np.uint64)<br>    <br>    return packed_uint64<br># Example: A standard 4096-dimension embedding vector<br>dim = 4096<br>fp32_vector = np.random.randn(dim).astype(np.float32)<br># Perform the packing<br>packed = binary_quantize_and_pack(fp32_vector)<br>print(f&quot;FP32 Vector Size: {fp32_vector.nbytes} bytes&quot;)<br>print(f&quot;1-bit Packed Size: {packed.nbytes} bytes&quot;)<br>print(f&quot;Compression Ratio: {fp32_vector.nbytes / packed.nbytes:.1f}x&quot;)<br>print(f&quot;First 64-bit chunk (hex): {hex(packed[0])}&quot;)</pre><p><strong>Why this is powerful for ARM64:</strong></p><ul><li><strong>XOR/Popcount Logic</strong>: When the GPU or CPU needs to compare two embeddings, it doesn’t do math. It performs an XOR between two bit-packed integers and uses a popcount (population count) instruction to count the differing bits. This is orders of magnitude faster than floating-point dot products.</li><li><strong>L1 Cache Residency</strong>: Because the 4096-dimension vector is now only <strong>512 bytes</strong>, the entire “thought” or activation state of a layer can often fit inside the <strong>L1 cache</strong> of an ARM core, eliminating the need to wait for the slower L3 cache or System RAM.</li></ul><p><strong>Memory Bandwidth</strong>: You are effectively moving 32x more information through the memory bus per clock cycle compared to standard FP32.</p><p><strong>THE 1-BIT EMBED FORCES THE MODEL TO FIND THE SIGNAL IN THE NOISE</strong></p><p>The “fine semantics” are preserved through three specific engineering tricks that allow 1-bit vectors to be as expressive as FP16 vectors:</p><p><strong>High-Dimensionality Overcompensation</strong></p><p>In standard models, we use high precision (FP16) because the vectors are relatively “small” (e.g., 4096 dimensions). Prism-ML relies on the mathematical property that in <strong>very high dimensions</strong>, binary vectors can represent almost any relationship.</p><ul><li>By using all <strong>4096 bits</strong> as the fingerprint, the model has 2 raised to the 4096 possible states.</li><li>Even though each “pixel” of the word’s meaning is just a 1 or -1, the <em>combination</em> of 4096 of them is more than enough to distinguish “cat” from “kitten” based on their <strong>Hamming Distance</strong> (how many bits they differ by).</li></ul><p><strong>Error-Correcting Code (ECC) Philosophy</strong></p><p>Prism-ML treats the embedding table like an <strong>Error-Correcting Code</strong>.</p><ul><li>In FP16, a small change in a float value changes the meaning.</li><li>In Bonsai’s 1-bit system, the “fine semantics” are stored redundantly across the bits. If you change 10 bits out of 4096, the “semantic fingerprint” remains 99.8% identical. This makes the model incredibly <strong>robust to noise</strong>, which is a “limit” similar to what Shannon described in communication theory.</li></ul><p><strong>Latent Structural Learning (The Training Trick)</strong></p><p>This is the most important part: <strong>Bonsai is not quantized after it’s trained.</strong></p><ul><li>During training, the model is forced to find a way to pack all the “fine semantics” into those 1-bit values.</li><li>If the model needs to know that “Apple” (the fruit) is different from “Apple” (the tech company), it learns two distinct 4096-bit strings where the bits representing “technology” are flipped.</li><li>Because the GPU/CPU uses the <strong>VCNT (Vector Count)</strong> instruction on ARM64, it can instantly calculate the overlap between these fingerprints to determine context.</li></ul><p><strong>The “64-bit String” Reality</strong></p><p>To be clear, the “64-bit string” is just how the computer <strong>stores</strong> the bits (8 groups of 64-bit integers = 512 bits… and you have 8 of those blocks to reach 4096). The “fingerprint” <strong>is</strong> the string itself.</p><p><strong>The result:</strong> You get the semantic richness of a 16KB vector packed into a 512-byte “bit-signature” that the ARM chip can “read” in a single clock cycle.</p><p>To recover “fine semantics” from these 1-bit fingerprints, the system stops using traditional <strong>Cosine Similarity</strong>(which requires square roots and multiplications) and switches to <strong>Hamming Distance</strong>.</p><p>On your ARM64 chip, this is done using two extremely fast bitwise operations: <strong>XOR</strong> and <strong>Popcount</strong>.</p><p><strong>The Logic</strong></p><p>To find out how similar “cat” is to “kitten” in 1-bit space:</p><ol><li><strong>XOR</strong>: Compare the two bit-strings. A 1 will result wherever the bits are different.</li><li><strong>Popcount</strong>: Count how many 1s are in the result.</li><li><strong>The Similarity</strong>: A low count means the fingerprints are nearly identical (fine semantics are preserved).</li></ol><p><strong>The ARM64 Implementation (Python/Pseudo-Assembly)</strong></p><p>This is how your MacBook processes that 512-byte (4096-bit) chunk using 64-bit registers:</p><pre>import numpy as np<br><br>def hamming_similarity(vec_a, vec_b):<br>    &quot;&quot;&quot;<br>    vec_a and vec_b are arrays of 64 uint64s (the 4096 bits)<br>    &quot;&quot;&quot;<br>    total_diff = 0<br>    <br>    # This loop is what the ARM chip does in parallel<br>    for i in range(len(vec_a)):<br>        # 1. XOR finds the differences<br>        diff = vec_a[i] ^ vec_b[i]<br>        <br>        # 2. bin().count(&#39;1&#39;) is the Python version of the &#39;VCNT&#39; instruction<br>        total_diff += bin(diff).count(&#39;1&#39;)<br>    <br>    # Semantic score: 0 is identical, 4096 is complete opposite<br>    return total_diff<br><br># Example: Two semantic fingerprints<br>cat_vec = np.random.get_state()   # Imagine this is 4096 bits<br>kitten_vec = cat_vec                       # Start with identical<br><br># Recovering semantics: Even if they differ by 400 bits (10% noise),<br># they are still mathematically much &#39;closer&#39; than a random word like &#39;bicycle&#39;.</pre><p><strong>Why this “recovers” semantics</strong></p><p>In a standard MLP, a “0.75 similarity” is a floating-point calculation. In <strong>Bonsai-8B</strong>, that same “0.75 similarity” is represented by the fact that <strong>3,072 bits match</strong> and <strong>1,024 bits differ</strong>.</p><p>Because the dimension is so high (4096), the probability of two unrelated words accidentally having 3,000 matching bits is statistically <strong>zero</strong>. This is the “high-dimensional overcompensation” that allows 1-bit models to feel as smart as 16-bit models.</p><p><strong>The Hardware Speedup</strong></p><p>On an ARM64 chip, the VCNT (Vector Count) instruction can process these bits across multiple “lanes” at once. While a standard CPU might take 10–20 cycles to do one floating-point dot product, it can perform this Hamming check across hundreds of bits in <strong>a single cycle</strong>.</p><p>That is alot , but now that we know why 1-bit embedding is Bonsai-8B “magic trick”, lets keep going with how the model predicts the next word ( the Capital of France)</p><p>You have <strong>5 vectors </strong>, one for each word — one per token, each 4096 numbers long ( each token is only 512 bytes and not 8,192 bytes). That is the input to the transformer.</p><h3>The Transformer Layers (Context enters)</h3><p>This is where the 1-bit weights live and where context gets baked in.</p><p>Each layer does roughly this:</p><pre>for each layer (say, 32 layers total):<br>    1. Attention:   let each token &quot;look at&quot; other tokens<br>    2. MLP:         transform each token&#39;s vector individually</pre><p><strong>Attention</strong> is where “france” and “capital” and “is” all start influencing each other. The token “is” looks back at “capital of france” and its vector starts shifting — it’s no longer just “is” in isolation, it’s “is” in the context of <em>being asked about a capital city</em>.</p><p><strong>With 1-bit weights</strong>, each of those transformations is:</p><pre># instead of:<br>output = 0.3847 * input  # float multiply</pre><pre># it&#39;s:<br>output = +input   # if weight is +1  (just add)<br>output = -input   # if weight is -1  (just subtract)<br></pre><p>Millions of these trivial operations, stacked 32 layers deep, accumulate into something that encodes the full semantic context of the sentence.</p><p>After all 32 layers, the vector sitting at position 5 (after “is”) has been transformed from “the word is” into something more like:</p><p>“the thing being asked for here is a European capital city, specifically the one associated with France, in the context of a geography fact”</p><p>Not in words — in geometry. A location in 4096-dimensional space.</p><h3>The Output Projection (Vector → Scores)</h3><p>That final contextual vector gets multiplied by one more big matrix — the <strong>output projection</strong> — which produces a score for every word in the vocabulary: final vector shape: [4096] output matrix shape: [4096, 50000]</p><pre>logits = final_vector @ output_matrix<br># → [50000] one score per word in vocabulary</pre><p>Now every word in the vocabulary has a score. Raw scores (logits) look something like:</p><pre>&quot;paris&quot;     →  24.7   ← very high<br>&quot;london&quot;    →  18.2<br>&quot;berlin&quot;    →  17.9<br>&quot;lyon&quot;      →  12.1<br>&quot;the&quot;       →   2.3<br>&quot;sandwich&quot;  →  -8.4   ← very low</pre><h3>Where the 1-bit Compression Lives</h3><p>The weight matrices in the Transformer Layers and The Output Projection are enormous:</p><pre>attention matrices:  4096 × 4096  =  16M weights  per layer<br>MLP matrices:        4096 × 16384 =  67M weights  per layer<br>× 32 layers<br>= ~2.6 billion weights total  (for a 7B model)</pre><p>In 16-bit (Qwen-2.5–8B) that’s <strong>~10 GB</strong> just for weights.</p><p>But In 1-bit (Bonsai-8B) that’s <strong>~300 MB</strong>.</p><p>Same matrix multiplies. Same output but only 4096 x 50,0000 of binary strings of -1 or 1 , instead of billions of memory and computational bloated “throw pillows” of Floating Point 16 bit multiplications of 0.3847. Crucially the meaning still emerges, not because meaning was in the precision of any individual weight. It was always in the <strong>pattern across billions of them</strong>.</p><h3>What is a good intuitive Example ?</h3><p>The Pointillist Painting Parallel — you know the ones that from a distance look like a painting but up close just consist of single primary color dots</p><p>Georges Seurat is the famous painter who didn’t mix colors on the palette. He put pure, simple dots of primary color directly on the canvas and let <strong>your visual cortex do the mixing</strong>.</p><p>Up close: red dot . blue dot . red dot . yellow dot . blue dot</p><p>No nuance in any individual dot. Each one is just a pure single value.</p><p>From a distance: a vibrant purple shadow on a summer dress</p><p>The complexity was never in the dots. It was in the <strong>arrangement and density</strong> of billions of simple dots interacting in your perceptual system.</p><h3>The 1-bit Model Is Identical</h3><p>Each weight: -1 .+1 .+1 . -1 .+1</p><p>No nuance. No decimals. Just sign.</p><p>The output of a forward pass:</p><pre>an understanding of causal relationships,<br>medical reasoning, syntactic structure,<br>and the geography of European capitals</pre><p>The intelligence is not in any individual weight. It is in the <strong>arrangement across billions of simple weights </strong>interacting through the geometry of high dimensional space.</p><p>The most complex things we know of in the universe are built entirely from the simplest possible switching elements.</p><p>1-bit LLMs aren’t a clever engineering trick. They’re a rediscovery of a fundamental principle — that <strong>richness is a collective phenomenon</strong>, not a property of the parts.</p><h3>The 1-bit Model Comparison</h3><p>Bonsai lands at 70.5 average benchmark score. The full precision Qwen 3 8B, which is the base this is built on, scores 79.3 on that same average. That gap is real and you should know it going in. <a href="https://firethering.com/bonsai-8b-1bit-llm/">Firethering</a></p><p>And PrismML’s claim that a fully 1-bit model can match the capabilities of higher-precision systems remains unproven outside the company’s own benchmark results. <a href="https://www.hpcwire.com/aiwire/2026/04/06/prismml-emerges-from-stealth-with-1-bit-llm-family/">HPCwire</a></p><p>Every 128 weights share a single FP16 scale factor, which is where the tiny overhead creeps in. The effective bits per weight works out to 1.125 — just over one. The custom Metal kernels PrismML wrote handle dequantization inline, so the weights never get materialized to FP16 in memory at all.</p><p>The model that packs 8.2 billion parameters into just 1.15 GB of memory, approximately 14 times smaller than a standard 16-bit model of the same size.</p><p>It runs 8 times faster and uses 4–5 times less energy on edge hardware. On an iPhone 17 Pro Max, it runs at 44 tokens per second. <a href="https://markmancapitalinsight.substack.com/p/bonsai-8b-the-first-commercially">Substack</a></p><p>In one demo, they simulate 50 ticket summary and assignment tasks. The 1-bit Bonsai 8B completes all 50 tickets, while a standard 16-bit 8B model does only 6 in the same window. <a href="https://prismml.com/news/bonsai-8b">Prismml</a></p><p>That last number is the one that should grab your attention— it’s not just smaller, it’s completing <strong>8x more agentic work</strong> in the same time window because it never hits memory pressure.</p><p>OF COURSE I AM GOING TO TEST THIS ON A CUSTOM URGENT CARE TRIAGE BURGER</p><p>For my testing of “Medical Triage Agent” , the practical part would be a model that can fit on a phone and still provide reasonable triage recomendations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/854/1*KEaAEAK3UvGNLdXxmdMJkQ.png" /></figure><p>Both CPU and GPU read directly from the same memory. No bus. No copy. That’s why a MacBook Air runs this at 45 tokens/sec while a comparably priced Windows laptop with a discrete GPU would be slower despite having “more GPU.”</p><p>TEST RUNS VARYING TEMP , TOKENS</p><p>~/llama.cpp/build/bin/llama-cli -m ~/bonsai/Bonsai-8B.gguf -p “You are a clinical triage assistant with a medical degree and residency in primary and urgent care. Provide a triage recommendation with summary of your reasoning for this case. Patient presents with 10 days of sore throat, temp of 100.4F, dry cough, tender anterior cervical lymph nodes, history of bilateral tonsillectomy and adenoidectomy.” -n 256 — temp 0.3 -ngl 99</p><p>ggml_metal_device_init: tensor API disabled for pre-M5 and pre-A19 devices</p><p>ggml_metal_library_init: using embedded metal library</p><p>ggml_metal_library_init: loaded in 0.010 sec</p><p>ggml_metal_rsets_init: creating a residency set collection (keep_alive = 180 s)</p><p>ggml_metal_device_init: GPU name: MTL0</p><p>ggml_metal_device_init: GPU family: MTLGPUFamilyApple9 (1009)</p><p>ggml_metal_device_init: GPU family: MTLGPUFamilyCommon3 (3003)</p><p>ggml_metal_device_init: GPU family: MTLGPUFamilyMetal4 (5002)</p><p>ggml_metal_device_init: simdgroup reduction = true</p><p>ggml_metal_device_init: simdgroup matrix mul. = true</p><p>ggml_metal_device_init: has unified memory = true</p><p>ggml_metal_device_init: has bfloat = true</p><p>ggml_metal_device_init: has tensor = false</p><p>ggml_metal_device_init: use residency sets = true</p><p>ggml_metal_device_init: use shared buffers = true</p><p>ggml_metal_device_init: recommendedMaxWorkingSetSize = 19069.67 MB</p><p>Loading model…</p><p>build : b8201-ba7e817ee</p><p>model : Bonsai-8B.gguf</p><p>modalities : text</p><p>available commands:</p><p>/exit or Ctrl+C stop or exit</p><p>/regen regenerate the last response</p><p>/clear clear the chat history</p><p>/read add a text file</p><p><strong>&gt; You are a clinical triage assistant with a medical degree and residency in primary and urgent care. Provide a triage recommendation with summary of your reasoning for this case. Patient presents with 10 days of sore throat, temp of 100.4F, dry cough, tender anterior cervical lymph nodes, history of bilateral tonsillectomy and adenoidectomy.</strong></p><p>**Triage Recommendation:**</p><p>**Urgent Care (Level 2)**</p><p>— -</p><p>**Summary of Reasoning:**</p><p>The patient presents with a **10-day history of sore throat, fever (100.4°F), dry cough, and tender anterior cervical lymph nodes**. The patient also has a **history of bilateral tonsillectomy and adenoidectomy**, which may be relevant in the differential diagnosis.</p><p>### Key Clinical Findings:</p><p>- **10-day duration** of sore throat and fever suggests a **viral upper respiratory infection (URRI)**, which is common and typically self-limiting.</p><p>- **Tender anterior cervical lymph nodes** may be due to **viral infection** (e.g., strep, mononucleosis, or other viral causes) or **post-surgical lymphadenopathy**.</p><p>- **Bilateral tonsillectomy and adenoidectomy** are surgical procedures that can lead to **post-operative lymphadenopathy**, especially if the surgery was recent or if there was a **complication** (e.g., infection, abscess, or lymphadenopathy).</p><p>- **Dry cough** is a common feature of viral infections.</p><p>- **No specific mention of other symptoms** such as difficulty breathing, chest pain. ( STOPPED HERE , NOT ENOUGH TOKENS )</p><p>[ Prompt: 206.2 t/s | Generation: 45.0 t/s ]</p><p><strong>&gt;</strong></p><p>Exiting…</p><p>llama_memory_breakdown_print: | memory breakdown [MiB] | total free self model context compute unaccounted |</p><p>llama_memory_breakdown_print: | — MTL0 (Apple M4) | 18186 = 7566 + (10619 = 1099 + 9216 + 304) + 0 |</p><p>llama_memory_breakdown_print: | — Host | 227 = 83 + 0 + 144 |</p><p>ggml_metal_free: deallocating</p><p>NEXT TEST. Temp 0.9 , n = 1024</p><p>MacBook-Air llama.cpp % ~/llama.cpp/build/bin/llama-cli -m ~/bonsai/Bonsai-8B.gguf -p “You are a clinical triage assistant with a medical degree and residency in primary and urgent care. Provide a triage recommendation with summary of your reasoning for this case. Patient presents with 10 days of sore throat, temp of 100.4F, dry cough, tender anterior cervical lymph nodes, history of bilateral tonsillectomy and adenoidectomy.” -n 1024 — temp 0.9 -ngl 99</p><p>ggml_metal_device_init: tensor API disabled for pre-M5 and pre-A19 devices</p><p>ggml_metal_library_init: using embedded metal library</p><p>ggml_metal_library_init: loaded in 0.009 sec</p><p>ggml_metal_rsets_init: creating a residency set collection (keep_alive = 180 s)</p><p>ggml_metal_device_init: GPU name: MTL0</p><p>ggml_metal_device_init: GPU family: MTLGPUFamilyApple9 (1009)</p><p>ggml_metal_device_init: GPU family: MTLGPUFamilyCommon3 (3003)</p><p>ggml_metal_device_init: GPU family: MTLGPUFamilyMetal4 (5002)</p><p>ggml_metal_device_init: simdgroup reduction = true</p><p>ggml_metal_device_init: simdgroup matrix mul. = true</p><p>ggml_metal_device_init: has unified memory = true</p><p>ggml_metal_device_init: has bfloat = true</p><p>ggml_metal_device_init: has tensor = false</p><p>ggml_metal_device_init: use residency sets = true</p><p>ggml_metal_device_init: use shared buffers = true</p><p>ggml_metal_device_init: recommendedMaxWorkingSetSize = 19069.67 MB</p><p>Loading model…</p><p>build : b8201-ba7e817ee</p><p>model : Bonsai-8B.gguf</p><p>modalities : text</p><p>available commands:</p><p>/exit or Ctrl+C stop or exit</p><p>/regen regenerate the last response</p><p>/clear clear the chat history</p><p>/read add a text file</p><p><strong>&gt; You are a clinical triage assistant with a medical degree and residency in primary and urgent care. Provide a triage recommendation with summary of your reasoning for this case. Patient presents with 10 days of sore throat, temp of 100.4F, dry cough, tender anterior cervical lymph nodes, history of bilateral tonsillectomy and adenoidectomy.</strong></p><p>**Triage Recommendation:**</p><p>**Priority: Moderate (Not an Emergency)**</p><p>**Reasoning:**</p><p>The patient presents with a **10-day history of sore throat, fever (100.4F), dry cough, and tender anterior cervical lymph nodes**. They also have a **history of bilateral tonsillectomy and adenoidectomy**, which may be relevant in understanding the nature of their symptoms.</p><p>— -</p><p>### **Key Clinical Features and Reasoning:**</p><p>1. **Age and Presentation:**</p><p>- The duration of symptoms (10 days) is longer than typical for viral pharyngitis (which usually resolves in 3–7 days).</p><p>- However, this is not unusual, especially in adults or in cases of **postoperative infection** or **atypical pathogens**.</p><p>2. **Fever and Cough:**</p><p>- A **100.4F temperature** is within the **101–102°F range**, indicating a **low-grade fever**, which is common in viral infections like **mononucleosis**, **epstein-barr virus**, or even **post-op complications**.</p><p>- **Dry cough** is typical in many viral infections but can also be seen in **post-surgery recovery**.</p><p>3. **Tender Anterior Cervical Lymph Nodes:**</p><p>- These are a **common finding in viral pharyngitis**, particularly **epstein-barr virus** (EBV), which can lead to **mononucleosis**.</p><p>- The **10-day duration** suggests a more prolonged viral illness or **post-op infection** rather than an acute bacterial infection.</p><p>4. **History of Tonsillectomy and Adenoidectomy:**</p><p>- This **increases the likelihood of post-surgical complications**, such as **pharyngitis**, **stomatitis**, or **viral infection**.</p><p>- It also increases the **risk of atypical bacterial infections** (e.g., **group A streptococci** or **Haemophilus influenzae**) that may occur post-surgery.</p><p>- The **absence of fever** (which is a key differentiator from bacterial infections) and the presence of **lymphadenopathy** are more consistent with **viral infection**, especially **mononucleosis** or **EBV infection**.</p><p>5. **Exclusion of Bacterial Infection:**</p><p>- Bacterial infections (e.g., **streptococcal pharyngitis**) typically present with **more severe symptoms, fever, and sometimes a white patch on the tonsils**.</p><p>- The **10-day duration** and the **absence of strep-like symptoms** suggest a **viral etiology**, rather than an acute bacterial infection.</p><p>— -</p><p>### **Next Steps:**</p><p>- **Assess for EBV or mononucleosis** (especially given the age and prior surgery).</p><p>- **Evaluate for post-op complications** (e.g., pharyngitis, infection, or atypical pathogens).</p><p>- Consider **viral serology** (EBV, CMV, influenza).</p><p>- **Chest X-ray** should be considered for **atypical pneumonia**, especially if symptoms worsen or if the patient has a risk factor for respiratory illness.</p><p>- **Strep test** should be ordered, if not already done, and **antibiotic prophylaxis** may be warranted in post-op patients, especially if **tonsillitis** is suspected.</p><p>— -</p><p>### **Summary of Reasoning:**</p><p>- The **10-day duration** and the presence of **lymphadenopathy** are more consistent with a **viral infection** than a bacterial one.</p><p>- The **history of prior tonsillectomy and adenoidectomy** increases the risk of **post-surgical complications**, including **pharyngitis and EBV infection**.</p><p>- The **100.4F temperature** is low-grade, which is more typical of **viral infections** than bacterial infections.</p><p>- **Strep test and chest X-ray** are recommended to rule out acute bacterial infections and atypical pneumonia, especially in this patient group.</p><p>— -</p><p>**Final Recommendation:** Moderate triage. Monitor for worsening symptoms, fever &gt;102°F, or signs of respiratory compromise. Consider viral testing and follow-up with a provider if symptoms persist.</p><p>[ Prompt: 206.2 t/s | Generation: 44.0 t/s ]</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ee86823339ce" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[So I had this crazy idea for an Apple App.]]></title>
            <link>https://medium.com/@sbayer2/so-i-had-this-crazy-idea-for-an-apple-app-5caae42c03a9?source=rss-cd1b18e89f37------2</link>
            <guid isPermaLink="false">https://medium.com/p/5caae42c03a9</guid>
            <category><![CDATA[medical]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[claude-code]]></category>
            <category><![CDATA[learning]]></category>
            <category><![CDATA[healthcare]]></category>
            <dc:creator><![CDATA[Sbayer]]></dc:creator>
            <pubDate>Sat, 28 Mar 2026 16:42:18 GMT</pubDate>
            <atom:updated>2026-03-31T03:15:53.939Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/266/1*II820YSzmdAX39WxyjTmWQ.png" /></figure><p>How I Built an Apple store App in 2 weeks.</p><p>My very brief recollection of last 2 weeks.</p><p>THE SEED</p><p>March 14 — I read about a study in the journal Nature about how ChatGPT was tested on 960 medical triage decisions and got 1 in 3 wrong. millions of people are using ChatGPT for health decisions related to “should I go to seek health from a clinic or emergency room”. I think that the real consumer of these Medical Chats is not always looking for a diagnostic endpoint. They may be deciding whether they should spend their pay on Urgent Care (and potentially ER triage $$$$$ ) or look at ChatGPT for medical advice (free). In this case the AI wins hands down for care access and the one third correct metric becomes insignificant. The medical judgement of the frontier models is improving every 9 months. So for the medical consumer with no insurance plan or large copay the bottom line is care access and not care quality. About two weeks ago I also had a serendipitous encounter with a bagger at my local grocery. I was checking out with some generic tussin dm and she ask why that one. I said it the best for the money, and I would recommend to my patients in urgent care. So she asked me off the record if she should go in for her specific sinus symptoms, and I said she could probably wait. She thanked me and said she could not miss work.</p><p>THE IDEA GENESIS</p><p>I was thinking about the nature study, my grocery bagger encounter , and also about a Medium Story that I had commented on March 11 regarding interesting research showing AI does not get or understand the physical world and a medical chatbot is susceptible to this blindspot — the story was thought provoking,</p><p>Medium Story Title</p><p>The Wooden Ruler Test: What AI medical scribes can’t comprehend about human bodies</p><p>subtitle — An important reminder that LLMs have no experience of the real world.</p><p>This is an excellent and well written story , here is an excert that made me think about AI acting with authority in a health care setting. The author was responding to a real scenario where he asked the medical chatbot Heidi Evidence how to rotate a ruler in space and the model was unable to develop an answer and essentially gave up. Here is the excerpt:</p><p>“It speaks to clinical reasoning. When a medical chatbot insists that a routine sic [physical] action is physically impossible, it indicates a wider disconnect. If an LLM cannot comprehend a simple moment of human motor control that every six-year-old can pull off without thinking, what happens when the question involves dizziness, proprioception, muscle weakness, grip strength, fall risk or occupational therapy? Many medical assessments rely on knowing how our bodies move through space, how real people actually hold objects, shift weight, compensate for imbalance, or brace themselves. AI has none of that. When chatbots are embedded into triage flows, diagnostic decision support, physiotherapy guidance, or patient-facing tools, they must fake it through the physical world. If an AI misjudges something as simple as holding a ruler, what else might it mishandle? The problem is, we are increasingly inviting AI to make decisions in our real world, and we assume it knows what it’s talking about because it sounds so confident plausible”. <a href="https://medium.com/@JimTheAIWhisperer?source=post_page---byline--abdc5c072bf1---------------------------------------">Jim the AI Whisperer</a></p><p>I am thinking — is the author really saying the chatbot has never had a human body so how can we trust it to make medical decisions? Because I personally think that Medical AI is like the most intelligent first year resident ever , trying to figure out how to apply a massive amount of learning to making people better.</p><p>My comment to the Author</p><p>“News alert , despite our rigorous training, professional vetting , board certifications , and clinical experience , because there are still significant amounts of medical mysteries to be discovered , physicians will at times , shoot from the hip , and sound confident (plausible) even if we are just 50% sure that what we are telling you is correct. That is real world uncertainty that is baked into the principal eigenvector of knowledge. “</p><p>To myself : I think meaning we have not actually had 50% of the diseases we are expected to be experts on — -Wait what — does this mean that we should just ask the medical scribe to be 50% correct?</p><p>THE IDEA</p><p>Medical AI does not have to make a diagnosis and be correct all the time — Medical AI would be FAR MORE USEFUL to make an educated recommendation than to be the perfect clinical oracle</p><p>prompt to Claude AI online chat (abbreviated)</p><p>I need a comprehensive dev plan for a crowdsourced urgent care application that can be downloaded from the apple app store. The app will allow anyone to input there symptoms and their diagnosis. The app will then recommend if they need to be seen at urgent care. The app will not attempt make a diagnosis. The app will work with the premise that 85% of urgent care can be represented by the 5 distinct diagnostic zones, Infections , Rashs , headaches , cuts , bruises/sprains/breaks. And the app operates on the premise that most people know there diagnosis before they present to urgent care and they are looking for treatment or not treatment to validate their complaint. The app will not rely on any RAG , medical literature , or database of medical information. The app will just assume that the model works to help confirm the patients own diagnostic acumen. for this project leverage all of claude codes recent upgrades , skills , agents , effort , incites, to effectively dev this entire project , created a detailed outline I can give to claude code to build and deploy this extensive project</p><p>What I got back in about 5 minutes: ( during this time I can see the thinking reasoning part from Claude chat):</p><p>(claude reasoning )…..Steven wants a comprehensive development plan for a crowdsourced urgent care triage application. Let me break down what he&#39;s asking for:</p><ol><li>iOS app (Apple App Store)</li><li>Crowdsourced urgent care triage</li><li>Patient inputs symptoms + their own diagnosis</li><li>App recommends if they need to be seen at urgent care</li><li>Does NOT make diagnoses</li><li>5 diagnostic zones: Infections, Rashes, Headaches, Cuts, Bruises/Sprains/Breaks</li><li>Premise: 85% of urgent care visits fall into these 5 zones</li><li>Premise: Most people know their diagnosis before presenting</li><li>The app will use an enterprise Anthropic API endpoint, with no medical database or RAG system—just pure LLM-driven triage powered by Claude&#39;s latest capabilities</li><li>I need to architect this as a Swift/SwiftUI iOS app connected to a Python/FastAPI backend on GCP, integrated with Anthropic&#39;s API, and designed to collect crowdsourced patient inputs to continuously improve the triage logic over time</li><li>The key decisions are using Swift for the App Store requirement, FastAPI for the backend, Apple Sign-In for authentication, and building in a crowdsourced feedback loop where users submit their symptoms and diagnoses so the LLM can learn patterns and validate its assessments</li></ol><p>Since there&#39;s no medical literature or RAG, the triage logic is entirely prompt-engineered using the LLM&#39;s built-in medical knowledge. I should put together a detailed dev plan document that Steven can use with Claude Code. (all the thought planning done).</p><p>Claude chat Then Actually returns this to me as the Response:</p><p>This is a great project concept, Steven — the “patient already knows their diagnosis” framing is a sharp clinical insight that sidesteps the regulatory minefield of AI-as-diagnostician. Let me build you a comprehensive Claude Code-ready dev plan. &lt; I say yes and hit return&gt;</p><p>Claude thinking again</p><pre>Determined markdown format optimal for Claude Code consumption<br>Determined markdown format optimal for Claude Code consumption<br><br>Check frontend design skill for any relevant patterns<br>Now let me build the comprehensive dev plan. This needs to be a thorough document that Claude Code can work from.<br><br>Check docx skill for document creation<br>I&#39;ll create the dev plan as a markdown file since it&#39;s going to be fed to Claude Code. Markdown is the ideal format for Claude Code consumption.<br>Done<br><br>Assembled comprehensive development strategy for medical application<br>Assembled comprehensive development strategy for medical application<br><br>Creating comprehensive Claude Code-ready dev plan for UrgentCrowd App<br>Now let me copy it to the outputs directory and present it.<br><br>Copy to outputs for user download<br><br>Script<br>Done. Let me present the file.<br><br>Presented file<br>The file is ready. Let me give Steven a concise summary.<br>Done</pre><p>Claude’s next Response :</p><p>Here’s your complete Claude Code-ready dev plan — about 16 sections, 9 build phases, each one designed as a single Claude Code session with explicit instructions.</p><p>A few things worth highlighting from a clinical architecture standpoint:</p><p>The <strong>red flag override system</strong> is dual-layered: a hardcoded client-side keyword scanner fires <em>before</em> the LLM call ever happens (chest pain, can’t breathe, worst headache of my life, etc.), so safety doesn’t depend on model availability or correctness. The LLM then does its own red flag check as a second layer.</p><p>The <strong>prompt engineering</strong> in Section 4 is the real clinical core. The zone-specific triage logic encodes your urgent care gestalt — when strep needs antibiotics vs. when a cold can wait, shingles within the 72-hour antiviral window, thunderclap headache as an ER redirect. These prompts are designed to be iterated as you test with real-world cases.</p><p>The <strong>App Store strategy</strong> is deliberately conservative: no HealthKit (avoids an extra review gate), framed as “health information” not medical device, 12+ age rating, and the “not medical advice” disclaimers are structural (baked into every result screen), not just boilerplate.</p><p>The enterprise key LLM routing uses the users Anthropic key (stored in iOS Keychain via expo-secure-store) or fall back to your enterprise key with rate limits. This is clean for App Store review since you’re not forcing users to pay for AI — they choose their path.</p><p>Feed the whole markdown file to Claude Code starting at Phase 0 and work through sequentially. Phases 1 and 2 can run in parallel if you want to split into two Claude Code sessions. — — End Claude Response with an extensive markdown file.</p><pre>dev plan for UrgentCrowd app<br>URGENTCROWD_DEV_PLAN.md</pre><p>I create a new directory on my desktop call it Urgentcrowd_app and then I open in my terminal and type claude. Claude Code comes up as it has many times before with an orange bug looking thing that resembles something from the Atari games of the 80s. I go to config and select Opus 4.6 and high effort. I go to /mcp and disable all of the mcps I have except for google cloud. Then I paste in the URGENTCROWD_DEV_PLAN.md and say something like “ here is an extensive mardown plan developed by online claude ai chat opus and I need for you to use it to make a working Apple store app with me. You are the software developer and I am just the ideas guy — I trust you to use your best judgement to bringing my vision to life.”</p><p>THEN THE KABOOM MOMENT</p><p>This story is not finished but I will publish it and then edit it with some more of the process soon , and I must credit to Dr. Christian Pean for his LinkedIn post about the Nature study, and <a href="https://medium.com/@JimTheAIWhisperer?source=post_page---byline--abdc5c072bf1---------------------------------------">Jim the AI Whisperer</a> for his story — please follow both!!— -that has inspired my intense effort in the last 2 weeks . Some background context on my skill set — I started about 3 years ago by cutting and pasting python code from chatgpt and claude into pycharm. I adopted Claude Code as my go to in March 2025 and the productivity curve has been exponential.</p><p>After just two weeks of effort I have a working app in the Apple app store that I could never have done without the help of Claude Code. It’s a Health and Wellness app that uses Anthropic Claude Sonnet 4.6 to help people make a decision on when to go to Urgent Care ( and spend that 60 dollar copay on the visit for a work excuse and maybe an antibiotic OR not go to Urgent Care and buy some groceries instead ) for common ailments that they probably already know what it is , but just need a validation. Also alot of peolple in need usually walk in or call my front desk to ask if this needs to be seen. Urgent Crowd is simple to use and I hope it helps someone.</p><p>If you are a professional reading this story , do not wait to act on your ideas because you are not a software engineer, try your idea and intuitions with Claude Code and see what happens. I have learned so much about how to deploy and manage an Apple App in the last two weeks . Story to be continued …</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5caae42c03a9" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>