<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Language Models on AIBussin — AI applications, systems and books</title><link>https://aibussin.com/tags/language-models/</link><description>Recent content in Language Models on AIBussin — AI applications, systems and books</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Sun, 30 Aug 2026 10:00:00 +0100</lastBuildDate><atom:link href="https://aibussin.com/tags/language-models/index.xml" rel="self" type="application/rss+xml"/><item><title>When Models Make Things Up</title><link>https://aibussin.com/books/hallucination-from-first-principles/01-chapter/</link><pubDate>Sat, 29 Aug 2026 22:10:00 +0100</pubDate><guid>https://aibussin.com/books/hallucination-from-first-principles/01-chapter/</guid><description>&lt;p&gt;A language model can produce an answer that is fluent, grammatical, detailed, confident, and wrong.&lt;/p&gt;&#10;&lt;p&gt;That combination is what makes hallucination interesting.&lt;/p&gt;&#10;&lt;p&gt;Ordinary software failures usually leave evidence. A parser throws an exception. A database rejects an invalid constraint. A test fails. A network call times out. The failure changes the shape of the result.&lt;/p&gt;&#10;&lt;p&gt;A hallucinating language model can do something more difficult to handle: &lt;strong&gt;it can fail without looking broken&lt;/strong&gt;.&lt;/p&gt;</description></item><item><title>Your Model Is a Dependency</title><link>https://aibussin.com/books/dspy-from-first-principles/06-chapter/</link><pubDate>Fri, 28 Aug 2026 10:25:00 +0100</pubDate><guid>https://aibussin.com/books/dspy-from-first-principles/06-chapter/</guid><description>&lt;p&gt;Chapter 5 built a composed program and measured which of its stages earned their cost. Every number in that chapter, and in chapter 4 before it, has an unstated qualifier:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Which model executed the program?&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;That is not operational trivia. A language-model program is not fully described by its signatures and modules. Its behavior depends on what sits behind the LM boundary and how that thing is configured.&lt;/p&gt;&#10;&lt;p&gt;The model is therefore both a dependency and an experimental variable. Holding it fixed is often as important as swapping it:&lt;/p&gt;</description></item><item><title>Assembly: A Language Model You Can Interrogate</title><link>https://aibussin.com/books/pytorch-from-first-principles/15-chapter/</link><pubDate>Sun, 30 Aug 2026 10:00:00 +0100</pubDate><guid>https://aibussin.com/books/pytorch-from-first-principles/15-chapter/</guid><description>&lt;p&gt;Here are two training runs of the same small language model on the same data. The only difference is one line in the batching function.&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;CORRECT y = data[i+1 : i+block+1] the next-token shift&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;MISALIGNED y = data[i : i+block] no shift&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;step correct val misaligned val&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; 0 3.6695 2.6469&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; 250 1.1038 0.0007&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; 500 0.4730 0.0004&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; 750 0.3940 0.0003&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;1000 0.3690 0.0002&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;1250 0.3581 0.0002&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;1500 0.3558 0.0001&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The misaligned run&amp;rsquo;s loss falls to &lt;code&gt;0.0001&lt;/code&gt; — three thousand times lower than the correct run&amp;rsquo;s &lt;code&gt;0.36&lt;/code&gt;. By every number on the dashboard it is the best training run you have ever seen. Nothing raised. The shapes are identical: &lt;code&gt;x&lt;/code&gt; is &lt;code&gt;[B, T]&lt;/code&gt;, &lt;code&gt;y&lt;/code&gt; is &lt;code&gt;[B, T]&lt;/code&gt;, the loss is a finite scalar with a &lt;code&gt;grad_fn&lt;/code&gt;.&lt;/p&gt;</description></item><item><title>PyTorch Zero to Hero 10: Build a Small GPT-Style Language Model From Scratch</title><link>https://aibussin.com/post/pytorch-zero-to-hero-10/</link><pubDate>Sat, 08 Aug 2026 14:03:00 +0100</pubDate><guid>https://aibussin.com/post/pytorch-zero-to-hero-10/</guid><description>&lt;h1 id="build-a-small-gpt-style-language-model-from-scratch-in-pytorch"&gt;Build a Small GPT-Style Language Model From Scratch in PyTorch&lt;/h1&gt;&#10;&lt;p&gt;This is the final post in the &lt;strong&gt;PyTorch: Zero to Hero&lt;/strong&gt; series.&lt;/p&gt;&#10;&lt;p&gt;We have spent the previous posts learning the machinery underneath PyTorch:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;tensors and shapes;&lt;/li&gt;&#10;&lt;li&gt;autograd;&lt;/li&gt;&#10;&lt;li&gt;manual neural networks;&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;nn.Module&lt;/code&gt; and parameter registration;&lt;/li&gt;&#10;&lt;li&gt;DataLoader performance;&lt;/li&gt;&#10;&lt;li&gt;convolutional networks;&lt;/li&gt;&#10;&lt;li&gt;attention and masks;&lt;/li&gt;&#10;&lt;li&gt;training failures;&lt;/li&gt;&#10;&lt;li&gt;CUDA performance and &lt;code&gt;torch.compile&lt;/code&gt;.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Now we put it together.&lt;/p&gt;&#10;&lt;p&gt;The goal is not to download a pretrained model.&lt;/p&gt;</description></item></channel></rss>