<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Shrijith Venkatramana</title>
    <description>The latest articles on DEV Community by Shrijith Venkatramana (@shrsv).</description>
    <link>https://dev.to/shrsv</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1001514%2F17b7d334-44b1-417a-9268-346e6a34988a.jpg</url>
      <title>DEV Community: Shrijith Venkatramana</title>
      <link>https://dev.to/shrsv</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/shrsv"/>
    <language>en</language>
    <item>
      <title>A Practical Tour of SVG Tools Every Developer Should Know</title>
      <dc:creator>Shrijith Venkatramana</dc:creator>
      <pubDate>Fri, 17 Jul 2026 19:58:13 +0000</pubDate>
      <link>https://dev.to/shrsv/a-practical-tour-of-svg-tools-every-developer-should-know-3i9i</link>
      <guid>https://dev.to/shrsv/a-practical-tour-of-svg-tools-every-developer-should-know-3i9i</guid>
      <description>&lt;p&gt;&lt;em&gt;Hello, I'm Shrijith Venkatramana. I'm building git-lrc, an AI code reviewer that runs on every commit. &lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;Star Us&lt;/a&gt; to help devs discover the project. Do give it a try and share your feedback for improving the product.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;If you're building web applications in 2026, you're probably using SVGs whether you realize it or not.&lt;/p&gt;

&lt;p&gt;Every icon in your navigation, every logo, every loading spinner, every architecture diagram exported from Figma—there's a good chance it's an SVG.&lt;/p&gt;

&lt;p&gt;Most developers treat SVGs like images. They download them, drop them into &lt;code&gt;public/&lt;/code&gt;, and move on.&lt;/p&gt;

&lt;p&gt;That's a missed opportunity.&lt;/p&gt;

&lt;p&gt;SVGs are code. They can be optimized, themed, animated, generated, transformed into components, and even manipulated programmatically.&lt;/p&gt;

&lt;p&gt;Let's look at the SVG ecosystem from the perspective of a developer.&lt;/p&gt;

&lt;h1&gt;
  
  
  1. SVG is Code, Not an Image
&lt;/h1&gt;

&lt;p&gt;Unlike PNG or JPEG, an SVG is simply XML describing vector shapes.&lt;/p&gt;

&lt;p&gt;A tiny circle looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;svg width="100" height="100"&amp;gt;
  &amp;lt;circle
    cx="50"
    cy="50"
    r="40"
    fill="#3b82f6"
  /&amp;gt;
&amp;lt;/svg&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Because it's text:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;it compresses well&lt;/li&gt;
&lt;li&gt;it scales perfectly&lt;/li&gt;
&lt;li&gt;Git can diff it&lt;/li&gt;
&lt;li&gt;CSS can style it&lt;/li&gt;
&lt;li&gt;JavaScript can manipulate it&lt;/li&gt;
&lt;li&gt;build tools can optimize it&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once you start thinking of SVG as source code rather than an asset, an entirely new tooling ecosystem opens up.&lt;/p&gt;
&lt;h1&gt;
  
  
  2. First Step: Optimize Everything
&lt;/h1&gt;

&lt;p&gt;Design tools (Figma, Illustrator, Sketch, Inkscape) produce SVGs for editing—not necessarily for production.&lt;/p&gt;

&lt;p&gt;A simple icon might contain:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;editor metadata&lt;/li&gt;
&lt;li&gt;hidden layers&lt;/li&gt;
&lt;li&gt;unnecessary groups&lt;/li&gt;
&lt;li&gt;comments&lt;/li&gt;
&lt;li&gt;redundant transforms&lt;/li&gt;
&lt;li&gt;verbose path definitions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That's exactly why &lt;strong&gt;SVGO&lt;/strong&gt; exists.&lt;/p&gt;

&lt;p&gt;SVGO removes unnecessary data while preserving the rendered output, often reducing SVG size significantly. It works as both a CLI and a Node.js library, and integrates with popular frontend build pipelines.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx svgo logo.svg
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;If you don't want to install anything, &lt;strong&gt;SVGOMG&lt;/strong&gt; provides a browser interface built on top of SVGO where you can experiment with optimization options visually.&lt;/p&gt;
&lt;h1&gt;
  
  
  3. Converting SVGs into Framework Components
&lt;/h1&gt;

&lt;p&gt;Most React developers eventually write something like:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;img&lt;/span&gt; &lt;span class="na"&gt;src&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"/logo.svg"&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;But that's often leaving flexibility on the table.&lt;/p&gt;

&lt;p&gt;Tools like &lt;strong&gt;SVGR&lt;/strong&gt; convert SVGs into React components.&lt;/p&gt;

&lt;p&gt;Instead of:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;img&lt;/span&gt; &lt;span class="na"&gt;src&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"/logo.svg"&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;you get:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Logo&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"w-6 h-6 text-blue-500"&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Now your SVG becomes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;themeable&lt;/li&gt;
&lt;li&gt;type-safe&lt;/li&gt;
&lt;li&gt;tree-shakable&lt;/li&gt;
&lt;li&gt;easy to compose&lt;/li&gt;
&lt;li&gt;configurable via props&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Many modern build systems already integrate SVGR alongside SVGO.&lt;/p&gt;
&lt;h1&gt;
  
  
  4. Picking Better Icon Libraries
&lt;/h1&gt;

&lt;p&gt;One of the biggest mistakes teams make is mixing icon packs.&lt;/p&gt;

&lt;p&gt;Different stroke widths.&lt;/p&gt;

&lt;p&gt;Different corner radii.&lt;/p&gt;

&lt;p&gt;Different visual language.&lt;/p&gt;

&lt;p&gt;The UI quietly starts feeling inconsistent.&lt;/p&gt;

&lt;p&gt;A few excellent SVG icon libraries include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Lucide&lt;/strong&gt; — lightweight, consistent, actively maintained, and tree-shakable. Great default choice for developer tools and SaaS dashboards.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Heroicons&lt;/strong&gt; — designed alongside Tailwind CSS, available in outline and solid variants.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Tabler Icons&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Phosphor Icons&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Bootstrap Icons&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The important thing isn't choosing the "best" library.&lt;/p&gt;

&lt;p&gt;It's choosing one and staying consistent.&lt;/p&gt;
&lt;h1&gt;
  
  
  5. Working with Large SVG Collections
&lt;/h1&gt;

&lt;p&gt;Eventually you'll need:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;company logos&lt;/li&gt;
&lt;li&gt;cloud provider icons&lt;/li&gt;
&lt;li&gt;technology logos&lt;/li&gt;
&lt;li&gt;UI illustrations&lt;/li&gt;
&lt;li&gt;architecture diagrams&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Searching Google Images usually ends badly.&lt;/p&gt;

&lt;p&gt;A better approach is using curated SVG repositories.&lt;/p&gt;

&lt;p&gt;Some useful resources include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;SVG Repo&lt;/li&gt;
&lt;li&gt;Simple Icons&lt;/li&gt;
&lt;li&gt;Lucide&lt;/li&gt;
&lt;li&gt;Heroicons&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;SVG Repo also provides browser-based editing tools for recoloring, resizing, and modifying vectors before downloading.&lt;/p&gt;
&lt;h1&gt;
  
  
  6. SVG Can Be Generated Programmatically
&lt;/h1&gt;

&lt;p&gt;Because SVG is text, generating graphics becomes surprisingly straightforward.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;circle&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;color&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s2"&gt;`
  &amp;lt;svg viewBox="0 0 100 100"&amp;gt;
    &amp;lt;circle
      cx="50"
      cy="50"
      r="45"
      fill="&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;color&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"
    /&amp;gt;
  &amp;lt;/svg&amp;gt;`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Libraries like D3 have used this idea for years.&lt;/p&gt;

&lt;p&gt;Today we're also seeing LLMs generate SVG directly from prompts, enabling workflows such as icon generation, diagram editing, and vector illustration. Recent research benchmarks focus specifically on SVG generation and editing because it combines programming with visual reasoning.&lt;/p&gt;

&lt;p&gt;Unlike raster images, generated SVGs remain editable after they're created.&lt;/p&gt;
&lt;h1&gt;
  
  
  7. A Simple Production Workflow
&lt;/h1&gt;

&lt;p&gt;A workflow that scales well for many frontend projects looks like this:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Designer
      ↓
Export SVG
      ↓
SVGO optimization
      ↓
SVGR conversion (optional)
      ↓
Commit to repository
      ↓
Import as React/Vue/Svelte component
      ↓
Theme with CSS variables
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;It keeps assets:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;small&lt;/li&gt;
&lt;li&gt;consistent&lt;/li&gt;
&lt;li&gt;reviewable&lt;/li&gt;
&lt;li&gt;version-controlled&lt;/li&gt;
&lt;li&gt;easy to maintain&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once this pipeline is in place, SVGs stop being static assets and become part of your application's source code.&lt;/p&gt;
&lt;h1&gt;
  
  
  Final Thoughts
&lt;/h1&gt;

&lt;p&gt;SVG is one of those technologies that quietly powers almost every modern frontend application.&lt;/p&gt;

&lt;p&gt;Yet many developers only scratch the surface.&lt;/p&gt;

&lt;p&gt;Learning a handful of tools—SVGO for optimization, SVGR for component generation, Lucide or Heroicons for icons, and repositories like SVG Repo—can noticeably improve performance, maintainability, and developer experience without adding much complexity.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What's your go-to SVG workflow?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Do you inline SVGs, use React components, rely on icon libraries, or generate them programmatically? I'd love to hear what has worked well for your projects.&lt;/p&gt;



&lt;p&gt;*AI agents write code fast. They also silently remove logic, change behavior, and introduce bugs -- without telling you. You often find out in production.&lt;/p&gt;

&lt;p&gt;git-lrc fixes this. It hooks into git commit and reviews every diff before it lands. 60-second setup. Completely free.*&lt;/p&gt;

&lt;p&gt;Any feedback or contributors are welcome! It's online, source-available, and ready for anyone to use.&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/HexmosTech" rel="noopener noreferrer"&gt;
        HexmosTech
      &lt;/a&gt; / &lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;
        git-lrc
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Free, Micro AI Code Reviews That Run on Git Commit
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div&gt;
&lt;p&gt;| &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.da.md" rel="noopener noreferrer"&gt;🇩🇰 Dansk&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.es.md" rel="noopener noreferrer"&gt;🇪🇸 Español&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.fa.md" rel="noopener noreferrer"&gt;🇮🇷 Farsi&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.fi.md" rel="noopener noreferrer"&gt;🇫🇮 Suomi&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.ja.md" rel="noopener noreferrer"&gt;🇯🇵 日本語&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.nn.md" rel="noopener noreferrer"&gt;🇳🇴 Norsk&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.pt.md" rel="noopener noreferrer"&gt;🇵🇹 Português&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.ru.md" rel="noopener noreferrer"&gt;🇷🇺 Русский&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.sq.md" rel="noopener noreferrer"&gt;🇦🇱 Shqip&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.zh.md" rel="noopener noreferrer"&gt;🇨🇳 中文&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.hi.md" rel="noopener noreferrer"&gt;🇮🇳 हिन्दी&lt;/a&gt; |&lt;/p&gt;
&lt;br&gt;
&lt;br&gt;
&lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/948c8f2d5cf41b48985cd364d48c3a2dc9bfbfd42eab3e0a9a1b3e61f5f17ce3/68747470733a2f2f6865786d6f732e636f6d2f66726565646576746f6f6c732f7075626c69632f6c725f6c6f676f2e737667"&gt;&lt;img width="60" alt="git-lrc logo" src="https://camo.githubusercontent.com/948c8f2d5cf41b48985cd364d48c3a2dc9bfbfd42eab3e0a9a1b3e61f5f17ce3/68747470733a2f2f6865786d6f732e636f6d2f66726565646576746f6f6c732f7075626c69632f6c725f6c6f676f2e737667"&gt;&lt;/a&gt;
&lt;br&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;git-lrc&lt;/h1&gt;
&lt;/div&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Free, Micro AI Code Reviews That Run on Commit&lt;/h2&gt;
&lt;/div&gt;



&lt;p&gt;&lt;a href="https://www.producthunt.com/products/git-lrc?embed=true&amp;amp;utm_source=badge-top-post-badge&amp;amp;utm_medium=badge&amp;amp;utm_campaign=badge-git-lrc" rel="nofollow noopener noreferrer"&gt;&lt;img alt="git-lrc - Free, micro AI code reviews that run on commit | Product Hunt" width="200" src="https://camo.githubusercontent.com/87bf2d4283c1e0aa99e254bd17fefb1c67c0c0d39300043a243a4aa633b6cecc/68747470733a2f2f6170692e70726f6475637468756e742e636f6d2f776964676574732f656d6265642d696d6167652f76312f746f702d706f73742d62616467652e7376673f706f73745f69643d31303739323632267468656d653d6c6967687426706572696f643d6461696c7926743d31373731373439313730383638"&gt;&lt;/a&gt;
&amp;nbsp;&lt;/p&gt;
&lt;br&gt;
&lt;a href="https://discord.gg/sGdnKwB3qq" rel="nofollow noopener noreferrer"&gt;
  &lt;img alt="Discord Community" src="https://camo.githubusercontent.com/b8f979318aaabc8dec512b9d4e6e2a12431fba3c8a3b8738e1a97a0722d4e4bf/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446973636f72642d436f6d6d756e6974792d3538363546323f6c6f676f3d646973636f7264266c6162656c436f6c6f723d7768697465"&gt;
&lt;/a&gt; &lt;a href="https://goreportcard.com/report/github.com/HexmosTech/git-lrc" rel="nofollow noopener noreferrer"&gt;&lt;img alt="Go Report Card" src="https://camo.githubusercontent.com/e74c0651c3ee9165a2ed01cb0f6842c494029960df30eb9c24cf622d3d21bf46/68747470733a2f2f676f7265706f7274636172642e636f6d2f62616467652f6769746875622e636f6d2f4865786d6f73546563682f6769742d6c7263"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/git-lrc/actions/workflows/gitleaks.yml" rel="noopener noreferrer"&gt;&lt;img alt="gitleaks.yml" title="gitleaks.yml: Secret scanning workflow" src="https://github.com/HexmosTech/git-lrc/actions/workflows/gitleaks.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/git-lrc/actions/workflows/osv-scanner.yml" rel="noopener noreferrer"&gt;&lt;img alt="osv-scanner.yml" title="osv-scanner.yml: Dependency vulnerability scan" src="https://github.com/HexmosTech/git-lrc/actions/workflows/osv-scanner.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/git-lrc/actions/workflows/govulncheck.yml" rel="noopener noreferrer"&gt;&lt;img alt="govulncheck.yml" title="govulncheck.yml: Go vulnerability check" src="https://github.com/HexmosTech/git-lrc/actions/workflows/govulncheck.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/git-lrc/actions/workflows/semgrep.yml" rel="noopener noreferrer"&gt;&lt;img alt="semgrep.yml" title="semgrep.yml: Static analysis security scan" src="https://github.com/HexmosTech/git-lrc/actions/workflows/semgrep.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/git-lrc/./gfx/dependabot-enabled.svg"&gt;&lt;img alt="dependabot-enabled" title="dependabot-enabled: Automated dependency updates are enabled" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2Fgit-lrc%2FHEAD%2F.%2Fgfx%2Fdependabot-enabled.svg"&gt;&lt;/a&gt;
&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/git-lrc/./gfx/a_few_micro_reviews.png"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2Fgit-lrc%2FHEAD%2F.%2Fgfx%2Fa_few_micro_reviews.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;GenAI today is a &lt;strong&gt;race car without brakes&lt;/strong&gt;. It accelerates fast -- you describe something, and large blocks of code appear instantly. But AI agents &lt;em&gt;silently break things&lt;/em&gt;: they remove logic, relax constraints, introduce expensive cloud calls, leak credentials, and change behavior -- without telling you. You often find out in production.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;git-lrc&lt;/code&gt; is your braking system.&lt;/strong&gt; It hooks into &lt;code&gt;git commit&lt;/code&gt; and runs an AI review on every diff &lt;em&gt;before&lt;/em&gt; it lands. 60-second setup. Completely free.&lt;/p&gt;
&lt;p&gt;In short, git-lrc helps &lt;strong&gt;Prevent Outages, Breaches, and Technical Debt Before They Happen&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;At a glance:&lt;/strong&gt; &lt;a href="https://github.com/HexmosTech/git-lrc#what-git-lrc-checks-for" rel="noopener noreferrer"&gt;10 risk categories&lt;/a&gt; · &lt;a href="https://github.com/HexmosTech/git-lrc#what-git-lrc-checks-for" rel="noopener noreferrer"&gt;100+ failure patterns tracked&lt;/a&gt; · every commit…&lt;/p&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


</description>
      <category>ai</category>
      <category>webdev</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Stop Writing Layout Code Twice: Using React Yoga from Go</title>
      <dc:creator>Shrijith Venkatramana</dc:creator>
      <pubDate>Mon, 13 Jul 2026 18:42:15 +0000</pubDate>
      <link>https://dev.to/shrsv/stop-writing-layout-code-twice-using-react-yoga-from-go-2o14</link>
      <guid>https://dev.to/shrsv/stop-writing-layout-code-twice-using-react-yoga-from-go-2o14</guid>
      <description>&lt;p&gt;&lt;em&gt;Hello, I'm Shrijith Venkatramana. I'm building git-lrc, an AI code reviewer that runs on every commit. &lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;Star Us&lt;/a&gt; to help devs discover the project. Do give it a try and share your feedback for improving the product.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;Every UI framework eventually runs into the same problem: &lt;strong&gt;how do you arrange things on the screen?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Buttons need to line up. Sidebars need to stretch. Cards should wrap. Mobile layouts should adapt. Suddenly you're writing layout algorithms instead of building your application.&lt;/p&gt;

&lt;p&gt;The web largely solved this with &lt;strong&gt;Flexbox&lt;/strong&gt;. But what if you're building a desktop app, a game UI, a PDF generator, a terminal application, or even an image renderer in Go?&lt;/p&gt;

&lt;p&gt;Do you reinvent layout from scratch?&lt;/p&gt;

&lt;p&gt;Thankfully, no.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Yoga&lt;/strong&gt;, the layout engine originally developed at Meta, lets you reuse the same Flexbox model almost anywhere—including Go.&lt;/p&gt;

&lt;p&gt;Let's see how.&lt;/p&gt;

&lt;h1&gt;
  
  
  What Exactly Is Yoga?
&lt;/h1&gt;

&lt;p&gt;Yoga is &lt;strong&gt;not&lt;/strong&gt; a UI toolkit.&lt;/p&gt;

&lt;p&gt;It doesn't draw buttons.&lt;br&gt;
It doesn't render text.&lt;br&gt;
It doesn't know anything about HTML.&lt;/p&gt;

&lt;p&gt;Instead, Yoga answers one question:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Given a tree of elements and a set of Flexbox rules, where should every element be positioned and how large should it be?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That's it.&lt;/p&gt;

&lt;p&gt;Think of it as a geometry engine.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Your widgets
      │
      ▼
    Yoga
      │
      ▼
Calculated positions and sizes
      │
      ▼
Your renderer (OpenGL, terminal, PDF, etc.)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This separation makes Yoga incredibly portable. The same engine powers layouts across many different rendering systems.&lt;/p&gt;
&lt;h1&gt;
  
  
  Why Would a Go Developer Care?
&lt;/h1&gt;

&lt;p&gt;If you're writing Go, chances are you're building something outside the browser.&lt;/p&gt;

&lt;p&gt;Examples include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;desktop applications&lt;/li&gt;
&lt;li&gt;terminal user interfaces&lt;/li&gt;
&lt;li&gt;PDF generators&lt;/li&gt;
&lt;li&gt;dashboards&lt;/li&gt;
&lt;li&gt;game interfaces&lt;/li&gt;
&lt;li&gt;diagram generators&lt;/li&gt;
&lt;li&gt;SVG renderers&lt;/li&gt;
&lt;li&gt;custom visualization tools&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All of these need layout.&lt;/p&gt;

&lt;p&gt;Without Yoga, developers often end up writing code like:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="n"&gt;button&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;X&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;sidebarWidth&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="m"&gt;20&lt;/span&gt;
&lt;span class="n"&gt;button&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Y&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;headerHeight&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="m"&gt;15&lt;/span&gt;
&lt;span class="n"&gt;button&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Width&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;windowWidth&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="m"&gt;40&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This quickly becomes fragile.&lt;/p&gt;

&lt;p&gt;Instead, you describe &lt;em&gt;relationships&lt;/em&gt;.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Container
├── Sidebar (fixed width)
└── Content (grow to fill)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Yoga computes the actual numbers for you.&lt;/p&gt;
&lt;h1&gt;
  
  
  Flexbox Without a Browser
&lt;/h1&gt;

&lt;p&gt;If you've ever written CSS like this:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.container&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;flex-direction&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.sidebar&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;240px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.content&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;flex-grow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;You've already learned most of Yoga.&lt;/p&gt;

&lt;p&gt;The same concepts exist:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Flex Direction&lt;/li&gt;
&lt;li&gt;Justify Content&lt;/li&gt;
&lt;li&gt;Align Items&lt;/li&gt;
&lt;li&gt;Flex Grow&lt;/li&gt;
&lt;li&gt;Flex Shrink&lt;/li&gt;
&lt;li&gt;Gap&lt;/li&gt;
&lt;li&gt;Padding&lt;/li&gt;
&lt;li&gt;Margin&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Instead of manipulating DOM elements, you're configuring layout nodes.&lt;/p&gt;

&lt;p&gt;A tree might look like this:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Root
├── Header
├── Body
│   ├── Sidebar
│   └── Main Content
└── Footer
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Yoga walks this tree and calculates every rectangle.&lt;/p&gt;
&lt;h1&gt;
  
  
  Building Your First Layout in Go
&lt;/h1&gt;

&lt;p&gt;Suppose we want a horizontal layout with two panels.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;left panel: fixed width&lt;/li&gt;
&lt;li&gt;right panel: fills remaining space&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The structure looks like this:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Root (800px)
├── Left (200px)
└── Right (grow)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Using a Go binding, the code is surprisingly small:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="n"&gt;root&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;yoga&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;NewNode&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;root&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;StyleSetWidth&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;800&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;root&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;StyleSetHeight&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;600&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;root&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;StyleSetFlexDirection&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;yoga&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;FlexDirectionRow&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;left&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;yoga&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;NewNode&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;left&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;StyleSetWidth&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;200&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;right&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;yoga&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;NewNode&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;right&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;StyleSetFlexGrow&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;root&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;InsertChild&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;left&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;root&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;InsertChild&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;right&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;root&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;CalculateLayout&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;yoga&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Undefined&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;yoga&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Undefined&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;yoga&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;DirectionLTR&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;After layout is calculated:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Left:
    x = 0
    width = 200

Right:
    x = 200
    width = 600
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Notice there's no coordinate math.&lt;/p&gt;

&lt;p&gt;You describe intent.&lt;/p&gt;

&lt;p&gt;Yoga computes geometry.&lt;/p&gt;
&lt;h1&gt;
  
  
  Measuring Dynamic Content
&lt;/h1&gt;

&lt;p&gt;Real interfaces aren't just boxes.&lt;/p&gt;

&lt;p&gt;Text changes.&lt;/p&gt;

&lt;p&gt;Images resize.&lt;/p&gt;

&lt;p&gt;Widgets have intrinsic sizes.&lt;/p&gt;

&lt;p&gt;Yoga handles this using &lt;strong&gt;measure functions&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Instead of giving a node a fixed width and height, you provide a callback that tells Yoga how much space the content actually needs.&lt;/p&gt;

&lt;p&gt;Conceptually:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="n"&gt;textNode&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;SetMeasureFunc&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;func&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;...&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;Size&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;MeasureText&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;...&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;During layout, Yoga asks:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"If I give you this much width, how tall will you become?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This is exactly how browsers lay out paragraphs.&lt;/p&gt;

&lt;p&gt;The important point is that Yoga doesn't measure text itself.&lt;/p&gt;

&lt;p&gt;Your application remains responsible for fonts, images, and rendering.&lt;/p&gt;

&lt;p&gt;Yoga only performs layout.&lt;/p&gt;
&lt;h1&gt;
  
  
  How Yoga Fits Into a Rendering Pipeline
&lt;/h1&gt;

&lt;p&gt;A common architecture looks like this:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Application State
        │
        ▼
Widget Tree
        │
        ▼
Yoga Node Tree
        │
 CalculateLayout()
        │
        ▼
Computed Rectangles
        │
        ▼
Renderer
(OpenGL / Gio / Ebiten / PDF / SVG / Terminal)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This separation has several advantages:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;rendering and layout stay independent&lt;/li&gt;
&lt;li&gt;swapping renderers becomes easier&lt;/li&gt;
&lt;li&gt;layout becomes deterministic&lt;/li&gt;
&lt;li&gt;widgets don't need to know screen coordinates&lt;/li&gt;
&lt;li&gt;Flexbox knowledge transfers directly from web development&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Many modern UI systems follow this architecture because it scales well as applications grow.&lt;/p&gt;
&lt;h1&gt;
  
  
  Final Thoughts
&lt;/h1&gt;

&lt;p&gt;One of Yoga's biggest strengths is that it brings an already-familiar mental model outside the browser.&lt;/p&gt;

&lt;p&gt;Instead of inventing another layout system for every project, you get a mature Flexbox implementation that has been battle-tested across countless interfaces.&lt;/p&gt;

&lt;p&gt;For Go developers building desktop applications, renderers, editors, dashboards, PDFs, games, or custom graphics pipelines, Yoga removes an entire class of layout problems. You can focus on describing &lt;em&gt;what&lt;/em&gt; the interface should look like rather than calculating every coordinate yourself.&lt;/p&gt;

&lt;p&gt;As UI complexity grows, that distinction becomes increasingly valuable.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Have you used Yoga—or another layout engine—in a Go project?&lt;/strong&gt; I'd be interested to hear what you're building and whether you prefer declarative layout systems over manual coordinate calculations.&lt;/p&gt;



&lt;p&gt;*AI agents write code fast. They also silently remove logic, change behavior, and introduce bugs -- without telling you. You often find out in production.&lt;/p&gt;

&lt;p&gt;git-lrc fixes this. It hooks into git commit and reviews every diff before it lands. 60-second setup. Completely free.*&lt;/p&gt;

&lt;p&gt;Any feedback or contributors are welcome! It's online, source-available, and ready for anyone to use.&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/HexmosTech" rel="noopener noreferrer"&gt;
        HexmosTech
      &lt;/a&gt; / &lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;
        git-lrc
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Free, Micro AI Code Reviews That Run on Git Commit
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div&gt;
&lt;p&gt;| &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.da.md" rel="noopener noreferrer"&gt;🇩🇰 Dansk&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.es.md" rel="noopener noreferrer"&gt;🇪🇸 Español&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.fa.md" rel="noopener noreferrer"&gt;🇮🇷 Farsi&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.fi.md" rel="noopener noreferrer"&gt;🇫🇮 Suomi&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.ja.md" rel="noopener noreferrer"&gt;🇯🇵 日本語&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.nn.md" rel="noopener noreferrer"&gt;🇳🇴 Norsk&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.pt.md" rel="noopener noreferrer"&gt;🇵🇹 Português&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.ru.md" rel="noopener noreferrer"&gt;🇷🇺 Русский&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.sq.md" rel="noopener noreferrer"&gt;🇦🇱 Shqip&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.zh.md" rel="noopener noreferrer"&gt;🇨🇳 中文&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.hi.md" rel="noopener noreferrer"&gt;🇮🇳 हिन्दी&lt;/a&gt; |&lt;/p&gt;
&lt;br&gt;
&lt;br&gt;
&lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/948c8f2d5cf41b48985cd364d48c3a2dc9bfbfd42eab3e0a9a1b3e61f5f17ce3/68747470733a2f2f6865786d6f732e636f6d2f66726565646576746f6f6c732f7075626c69632f6c725f6c6f676f2e737667"&gt;&lt;img width="60" alt="git-lrc logo" src="https://camo.githubusercontent.com/948c8f2d5cf41b48985cd364d48c3a2dc9bfbfd42eab3e0a9a1b3e61f5f17ce3/68747470733a2f2f6865786d6f732e636f6d2f66726565646576746f6f6c732f7075626c69632f6c725f6c6f676f2e737667"&gt;&lt;/a&gt;
&lt;br&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;git-lrc&lt;/h1&gt;
&lt;/div&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Free, Micro AI Code Reviews That Run on Commit&lt;/h2&gt;
&lt;/div&gt;



&lt;p&gt;&lt;a href="https://www.producthunt.com/products/git-lrc?embed=true&amp;amp;utm_source=badge-top-post-badge&amp;amp;utm_medium=badge&amp;amp;utm_campaign=badge-git-lrc" rel="nofollow noopener noreferrer"&gt;&lt;img alt="git-lrc - Free, micro AI code reviews that run on commit | Product Hunt" width="200" src="https://camo.githubusercontent.com/87bf2d4283c1e0aa99e254bd17fefb1c67c0c0d39300043a243a4aa633b6cecc/68747470733a2f2f6170692e70726f6475637468756e742e636f6d2f776964676574732f656d6265642d696d6167652f76312f746f702d706f73742d62616467652e7376673f706f73745f69643d31303739323632267468656d653d6c6967687426706572696f643d6461696c7926743d31373731373439313730383638"&gt;&lt;/a&gt;
&amp;nbsp;&lt;/p&gt;
&lt;br&gt;
&lt;a href="https://discord.gg/sGdnKwB3qq" rel="nofollow noopener noreferrer"&gt;
  &lt;img alt="Discord Community" src="https://camo.githubusercontent.com/b8f979318aaabc8dec512b9d4e6e2a12431fba3c8a3b8738e1a97a0722d4e4bf/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446973636f72642d436f6d6d756e6974792d3538363546323f6c6f676f3d646973636f7264266c6162656c436f6c6f723d7768697465"&gt;
&lt;/a&gt; &lt;a href="https://goreportcard.com/report/github.com/HexmosTech/git-lrc" rel="nofollow noopener noreferrer"&gt;&lt;img alt="Go Report Card" src="https://camo.githubusercontent.com/e74c0651c3ee9165a2ed01cb0f6842c494029960df30eb9c24cf622d3d21bf46/68747470733a2f2f676f7265706f7274636172642e636f6d2f62616467652f6769746875622e636f6d2f4865786d6f73546563682f6769742d6c7263"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/git-lrc/actions/workflows/gitleaks.yml" rel="noopener noreferrer"&gt;&lt;img alt="gitleaks.yml" title="gitleaks.yml: Secret scanning workflow" src="https://github.com/HexmosTech/git-lrc/actions/workflows/gitleaks.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/git-lrc/actions/workflows/osv-scanner.yml" rel="noopener noreferrer"&gt;&lt;img alt="osv-scanner.yml" title="osv-scanner.yml: Dependency vulnerability scan" src="https://github.com/HexmosTech/git-lrc/actions/workflows/osv-scanner.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/git-lrc/actions/workflows/govulncheck.yml" rel="noopener noreferrer"&gt;&lt;img alt="govulncheck.yml" title="govulncheck.yml: Go vulnerability check" src="https://github.com/HexmosTech/git-lrc/actions/workflows/govulncheck.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/git-lrc/actions/workflows/semgrep.yml" rel="noopener noreferrer"&gt;&lt;img alt="semgrep.yml" title="semgrep.yml: Static analysis security scan" src="https://github.com/HexmosTech/git-lrc/actions/workflows/semgrep.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/git-lrc/./gfx/dependabot-enabled.svg"&gt;&lt;img alt="dependabot-enabled" title="dependabot-enabled: Automated dependency updates are enabled" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2Fgit-lrc%2FHEAD%2F.%2Fgfx%2Fdependabot-enabled.svg"&gt;&lt;/a&gt;
&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/git-lrc/./gfx/a_few_micro_reviews.png"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2Fgit-lrc%2FHEAD%2F.%2Fgfx%2Fa_few_micro_reviews.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;GenAI today is a &lt;strong&gt;race car without brakes&lt;/strong&gt;. It accelerates fast -- you describe something, and large blocks of code appear instantly. But AI agents &lt;em&gt;silently break things&lt;/em&gt;: they remove logic, relax constraints, introduce expensive cloud calls, leak credentials, and change behavior -- without telling you. You often find out in production.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;git-lrc&lt;/code&gt; is your braking system.&lt;/strong&gt; It hooks into &lt;code&gt;git commit&lt;/code&gt; and runs an AI review on every diff &lt;em&gt;before&lt;/em&gt; it lands. 60-second setup. Completely free.&lt;/p&gt;
&lt;p&gt;In short, git-lrc helps &lt;strong&gt;Prevent Outages, Breaches, and Technical Debt Before They Happen&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;At a glance:&lt;/strong&gt; &lt;a href="https://github.com/HexmosTech/git-lrc#what-git-lrc-checks-for" rel="noopener noreferrer"&gt;10 risk categories&lt;/a&gt; · &lt;a href="https://github.com/HexmosTech/git-lrc#what-git-lrc-checks-for" rel="noopener noreferrer"&gt;100+ failure patterns tracked&lt;/a&gt; · every commit…&lt;/p&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


</description>
      <category>ai</category>
      <category>webdev</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Perfectly Hitting the Wrong Target: The Story of an AI Code Review Benchmark</title>
      <dc:creator>Shrijith Venkatramana</dc:creator>
      <pubDate>Sun, 12 Jul 2026 15:42:34 +0000</pubDate>
      <link>https://dev.to/shrsv/perfectly-hitting-the-wrong-target-the-story-of-an-ai-code-review-benchmark-3i27</link>
      <guid>https://dev.to/shrsv/perfectly-hitting-the-wrong-target-the-story-of-an-ai-code-review-benchmark-3i27</guid>
      <description>&lt;p&gt;Benchmarks are interesting. They instantaneously give an air of something authoritative, objective, and precise, and for good reason.&lt;/p&gt;

&lt;p&gt;For most people, benchmarks look like something done by knowledgeable people on the topic—by those "who know better than me."&lt;/p&gt;

&lt;p&gt;However, until we go into the details of their exact workings, especially for those who are true students of a particular subject, relying on them blindly is a bad personal policy.&lt;/p&gt;

&lt;p&gt;If you actually know about a particular subject and care about it, I recommend you go deep into the reasoning of why particular metrics are worth your time and consideration, and try to make sense of things from first principles.&lt;/p&gt;

&lt;p&gt;In this case, I will go through the detailed &lt;a href="https://github.com/withmartian/code-review-benchmark/blob/main/methodology/full.md" rel="noopener noreferrer"&gt;Code Review Bench methodology&lt;/a&gt; and explain why I think tool builders in this category must look beyond the confines of the benchmark and think in a totally different way about the whole problem of AI code review.&lt;/p&gt;

&lt;p&gt;First and foremost, the AI Code Review Bench starts with seemingly good qualities:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Looks objective&lt;/li&gt;
&lt;li&gt;Looks precise&lt;/li&gt;
&lt;li&gt;Looks authoritative&lt;/li&gt;
&lt;li&gt;Looks detailed&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But for anyone who has gone into the depths of the problem and wrestled with the nitty-gritty of larger parts of the problem space, many shortcomings become apparent.&lt;/p&gt;

&lt;blockquote&gt;
&lt;h3&gt;
  
  
  Side Note: My Background
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;I'm Shrijith Venkatramana, founder of Hexmos, presently building &lt;a href="https://hexmos.com/livereview/" rel="noopener noreferrer"&gt;LiveReview&lt;/a&gt;, an org-wide harness for enforcing your engineering standards. My team and I have been building software systems together for the past 5 years in various capacities. I worked at Amazon before that, and studied Software Engineering under Prof. Crista Lopes at the University of California, Irvine. I've built engineering teams and systems for almost a decade.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;As someone with the background mentioned above, and since we do a lot of AI code reviews, issue detection, and so on, there were frequent requests from people asking, "How do you score on benchmark X or Y?" I'd casually answer that I am not entirely convinced by most benchmarks around, but felt like I ought to provide a deeper and detailed justification for my position. Hence, this post.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In particular, the benchmark perfectly hits the wrong targets for what AI code review benchmarks should do.&lt;/p&gt;

&lt;p&gt;However, I don't mean to discourage or criticize the authors personally or anything of the sort: I believe they have put great effort into setting this system up, and I respect their efforts. I do believe they have made a truly honest effort in finding various potential issues with their work and tried to get as good a result as possible.&lt;/p&gt;

&lt;p&gt;Despite all that, I'd like to put my views on this benchmark, and benchmarks in general, on the record.&lt;/p&gt;

&lt;p&gt;First, the methodology makes an ambitious attempt to answer an important question:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How should we benchmark AI code review?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Unfortunately, I don't think the paper answers that question.&lt;/p&gt;

&lt;p&gt;In fact, I came away thinking it demonstrates why we're &lt;strong&gt;not yet ready&lt;/strong&gt; for a benchmark.&lt;/p&gt;

&lt;p&gt;I argue that the methodology is excellent and detailed, but jumps to a solution before the problem of AI code review itself is defined from first principles.&lt;/p&gt;

&lt;p&gt;The paper openly acknowledges many major challenges in great detail:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Goodhart's Law&lt;/li&gt;
&lt;li&gt;Incomplete gold sets&lt;/li&gt;
&lt;li&gt;Benchmark contamination&lt;/li&gt;
&lt;li&gt;LLM judges&lt;/li&gt;
&lt;li&gt;Context&lt;/li&gt;
&lt;li&gt;Severity&lt;/li&gt;
&lt;li&gt;OSS vs. enterprise repositories&lt;/li&gt;
&lt;li&gt;Evolving datasets&lt;/li&gt;
&lt;li&gt;Autonomous agents&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are all highly valuable components in understanding what the "AI code review problem" is about.&lt;/p&gt;

&lt;p&gt;However, I still consider them &lt;em&gt;lower priority&lt;/em&gt; issues. Some bigger, more important things have been totally sidestepped.&lt;/p&gt;

&lt;p&gt;To be specific, I believe that it misses the mark at the fundamental problem analysis stage.&lt;/p&gt;

&lt;h1&gt;
  
  
  1. The Core Dictum: Work Backwards from the Customer; To Win, Start From the End
&lt;/h1&gt;

&lt;p&gt;In the business world, Jeff Bezos articulated the "working backwards" process to build up Amazon. Although he was the first to institutionalize it, we find Steve Jobs working backwards from the customer experience before him.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fz0pfhib0ml8fxl4ugekd.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fz0pfhib0ml8fxl4ugekd.jpg" alt="working backwards bezos" width="714" height="537"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But then, why stop there? We can go back to George Polya, and in his &lt;em&gt;How to Solve It&lt;/em&gt;, he specifies that step one is defining the goal, specifically the unknown, the &lt;code&gt;x&lt;/code&gt; factor which needs to be unearthed. The problem solver must work backwards from the &lt;code&gt;x&lt;/code&gt; to what they have. So, &lt;strong&gt;analysis&lt;/strong&gt; is another word for the working backwards process. Once we have a good analysis, we can &lt;em&gt;use&lt;/em&gt; what we have and turn it into what we want. The process of construction or moving forward based on the analysis is called &lt;strong&gt;synthesis&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdnkim9xw30w0bblc5w48.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdnkim9xw30w0bblc5w48.jpg" alt="how to solve it" width="247" height="369"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;By the way, it was not Polya who came up with the idea of analysis and synthesis, but &lt;a href="https://en.wikipedia.org/wiki/Pappus_of_Alexandria" rel="noopener noreferrer"&gt;Pappus of Alexandria&lt;/a&gt;, an ancient mathematician of great mathematical insight and capability. Pappus was a big influence on Newton, who studied the analysis and synthesis methodology to get good at his scientific work.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fs9v73y0i18h8fuwhow6k.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fs9v73y0i18h8fuwhow6k.jpg" alt="pappus of alexandria" width="500" height="735"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So, we go through all these references to Bezos, Jobs, Polya, and Pappus to mention the importance of &lt;strong&gt;defining the problem well&lt;/strong&gt;. Interestingly, this methodology completely misses an attempt to characterize the problem of code review in explicit terms. That is, there is no organized effort to systematize:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Who are the customers of (AI) code review?&lt;/li&gt;
&lt;li&gt;What is the problem of each customer class?&lt;/li&gt;
&lt;li&gt;What is the most important benefit of doing code reviews?&lt;/li&gt;
&lt;li&gt;What data is available to know customers care about code reviews?&lt;/li&gt;
&lt;li&gt;What does the customer experience look like?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One can ask more questions of this sort to actually nail down the problem space to begin with. It looks like such a systematic inquiry was not performed by the benchmark authors. It just jumps into the solution space, which largely robs us of an opportunity to learn how the authors think about the problem in question.&lt;/p&gt;

&lt;p&gt;Despite them not clearly defining &lt;code&gt;x&lt;/code&gt;, or the unknown, we still get a sense of how they look at the problem by piecing together the various statements made across the document.&lt;/p&gt;

&lt;p&gt;The first problem is that the benchmark largely treats AI code review as one problem.&lt;/p&gt;

&lt;p&gt;I think it has already become two.&lt;/p&gt;

&lt;h1&gt;
  
  
  2. The Two Distinct Problems of AI Code Review
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Problem #1: Human Comprehension
&lt;/h2&gt;

&lt;p&gt;Humans have limited attention.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F407t509tjuwee34070tv.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F407t509tjuwee34070tv.jpg" alt="the attention problem" width="447" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The problem here is helping engineers understand what matters.&lt;/p&gt;

&lt;p&gt;Showing every possible issue is rarely optimal. Instead, information should be prioritized differently depending on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The engineer&lt;/li&gt;
&lt;li&gt;The team&lt;/li&gt;
&lt;li&gt;The organization&lt;/li&gt;
&lt;li&gt;Business priorities&lt;/li&gt;
&lt;li&gt;Operational context&lt;/li&gt;
&lt;li&gt;Stage of development&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The problem is fundamentally one of recommendation rather than search.&lt;/p&gt;

&lt;p&gt;Success is measured by helping humans make better engineering decisions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Problem #2: Machine Verification and Prod Stabilization
&lt;/h2&gt;

&lt;p&gt;The second problem has an entirely different consumer: another AI system.&lt;/p&gt;

&lt;p&gt;An agent does not become overwhelmed by hundreds or thousands of findings. In fact, exhaustive analysis is often desirable.&lt;/p&gt;

&lt;p&gt;The objective shifts toward reducing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Production outages&lt;/li&gt;
&lt;li&gt;Security vulnerabilities&lt;/li&gt;
&lt;li&gt;Correctness issues&lt;/li&gt;
&lt;li&gt;Technical debt&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Many findings never need to be shown to humans at all. They're simply passed to repair agents.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The agent can handle volume; it doesn't get tired or overwhelmed.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Volume and detail translate to higher capability for the repair agents.&lt;/p&gt;

&lt;p&gt;The paper acknowledges that autonomous agents will eventually require different evaluation methods.&lt;/p&gt;

&lt;p&gt;Where I disagree is that this is presented as a future transition. I think that future is already here.&lt;/p&gt;

&lt;p&gt;Many developers are no longer reading every review comment themselves. They're handing comments directly to coding agents, reviewing the resulting changes, and supervising the overall process.&lt;/p&gt;

&lt;p&gt;The workflow has already changed. That fundamentally changes what should be measured.&lt;/p&gt;

&lt;h2&gt;
  
  
  These are different optimization problems for different consumers
&lt;/h2&gt;

&lt;p&gt;One process optimizes for scarce human attention.&lt;/p&gt;

&lt;p&gt;The other optimizes for agent characteristics in the service of software quality.&lt;/p&gt;

&lt;p&gt;Once this distinction is made, many familiar benchmark concepts become much less obvious.&lt;/p&gt;

&lt;p&gt;Questions such as precision, recall, comment volume, and "noise" primarily belong to the human comprehension problem.&lt;/p&gt;

&lt;p&gt;Questions such as exhaustive verification, defensive hardening, and automated repair belong to the machine verification problem.&lt;/p&gt;

&lt;p&gt;The paper evaluates these under a single framework. I think separating them first would lead us toward very different benchmark designs.&lt;/p&gt;

&lt;p&gt;Metrics like comment volume, "noise", and precision have a very different meaning when another AI system—not a human—is consuming the output.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6ntq70o6krhvgzd95c10.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6ntq70o6krhvgzd95c10.jpg" alt="skip the problem" width="674" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  3. Human Review Is a Baseline, Not the Destination
&lt;/h1&gt;

&lt;p&gt;To be fair, the document explicitly recognizes that human reviewers are imperfect and discusses multiple ways of eventually moving beyond human-generated gold sets. That is one of its strengths.&lt;/p&gt;

&lt;p&gt;However, the overall framing still begins with evaluating review performance against real-world human performance.&lt;/p&gt;

&lt;p&gt;I am not convinced that this is the right destination.&lt;/p&gt;

&lt;p&gt;Most code reviews happen under deadline pressure, reviewer fatigue, and incomplete context.&lt;/p&gt;

&lt;p&gt;Machines have obvious advantages:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;They never tire.&lt;/li&gt;
&lt;li&gt;They never lose concentration.&lt;/li&gt;
&lt;li&gt;They inspect everything consistently.&lt;/li&gt;
&lt;li&gt;They can apply thousands of checks without complaint.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Humans contribute something different rather than simply being "better."&lt;/p&gt;

&lt;p&gt;Experienced engineers recognize architectural problems, product trade-offs, operational concerns, and business realities that exist outside the code itself.&lt;/p&gt;

&lt;p&gt;Machines and humans, therefore, have complementary strengths rather than existing on a single performance scale.&lt;/p&gt;

&lt;h1&gt;
  
  
  4. The Benchmark Measures Proxies, Not Software Outcomes
&lt;/h1&gt;

&lt;p&gt;The document rightly warns about Goodhart's Law.&lt;/p&gt;

&lt;p&gt;Ironically, I think it also demonstrates how difficult Goodhart's Law really is.&lt;/p&gt;

&lt;p&gt;The benchmark measures increasingly sophisticated proxies:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Review comments&lt;/li&gt;
&lt;li&gt;Developer actions&lt;/li&gt;
&lt;li&gt;Human gold sets&lt;/li&gt;
&lt;li&gt;Production bug traces&lt;/li&gt;
&lt;li&gt;Online behavioral signals&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each of these is individually reasonable. None of them is actually the objective.&lt;/p&gt;

&lt;p&gt;The objective is producing better software.&lt;/p&gt;

&lt;p&gt;The further we optimize increasingly elaborate proxies, the easier it becomes to mistake them for the goal itself.&lt;/p&gt;

&lt;p&gt;Agreement with historical reviewers is not necessarily the same thing as reducing operational failures.&lt;/p&gt;

&lt;h1&gt;
  
  
  5. The Paper Acknowledges Many Open Questions—But Still Produces a Benchmark
&lt;/h1&gt;

&lt;p&gt;One thing I genuinely appreciated about the paper is how candid it is.&lt;/p&gt;

&lt;p&gt;It openly discusses uncertainty around:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Bug definitions&lt;/li&gt;
&lt;li&gt;Severity&lt;/li&gt;
&lt;li&gt;Enterprise versus OSS repositories&lt;/li&gt;
&lt;li&gt;Incomplete context&lt;/li&gt;
&lt;li&gt;Benchmark contamination&lt;/li&gt;
&lt;li&gt;LLM judge quality&lt;/li&gt;
&lt;li&gt;Developer behavior&lt;/li&gt;
&lt;li&gt;Future autonomous agents&lt;/li&gt;
&lt;li&gt;Evolving datasets&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What surprised me was that after acknowledging so many unresolved assumptions, the paper still culminates in a benchmark that inevitably appears objective.&lt;/p&gt;

&lt;p&gt;My concern is not that the benchmark is wrong.&lt;/p&gt;

&lt;p&gt;My concern is that the apparent precision of the benchmark exceeds our current understanding of the problem.&lt;/p&gt;

&lt;h1&gt;
  
  
  6. Several Methodological Choices Become Questionable
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Production outcomes feel under-emphasized
&lt;/h2&gt;

&lt;p&gt;Production bugs do appear in the methodology, but mostly as one signal among many.&lt;/p&gt;

&lt;p&gt;Personally, I would place operational outcomes much closer to the center.&lt;/p&gt;

&lt;p&gt;Many code review activities ultimately exist to reduce production failures, improve reliability, and avoid embarrassing incidents.&lt;/p&gt;

&lt;p&gt;Those outcomes deserve greater prominence than they currently receive.&lt;/p&gt;

&lt;h2&gt;
  
  
  Severity matters more than distribution
&lt;/h2&gt;

&lt;p&gt;The paper spends considerable effort matching the observed distribution of historical bugs.&lt;/p&gt;

&lt;p&gt;I suspect severity is considerably more important.&lt;/p&gt;

&lt;p&gt;Different organizations legitimately tolerate different classes of issues.&lt;/p&gt;

&lt;p&gt;A regulated financial institution and an early-stage startup do not optimize for the same level of operational risk.&lt;/p&gt;

&lt;p&gt;Without organizational context, a universal benchmark inevitably averages together very different notions of software quality.&lt;/p&gt;

&lt;h2&gt;
  
  
  Code review is about more than code
&lt;/h2&gt;

&lt;p&gt;Many valuable review comments concern things such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Architecture&lt;/li&gt;
&lt;li&gt;Deployment strategy&lt;/li&gt;
&lt;li&gt;Operational cost&lt;/li&gt;
&lt;li&gt;Organizational coordination&lt;/li&gt;
&lt;li&gt;Business priorities&lt;/li&gt;
&lt;li&gt;Long-term maintainability&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are difficult to benchmark because they extend beyond the code itself.&lt;/p&gt;

&lt;p&gt;Yet they are often exactly what distinguishes experienced reviewers.&lt;/p&gt;

&lt;h1&gt;
  
  
  7. The Online Benchmark Should Be Interpreted Carefully
&lt;/h1&gt;

&lt;p&gt;I also remain somewhat skeptical about using developer actions as evidence of comment quality.&lt;/p&gt;

&lt;p&gt;Increasingly, developers delegate review comments directly to coding agents.&lt;/p&gt;

&lt;p&gt;A comment being "acted upon" may therefore measure workflow automation as much as genuine human agreement.&lt;/p&gt;

&lt;p&gt;The paper already acknowledges several limitations of this proxy.&lt;/p&gt;

&lt;p&gt;My concern is simply that these behavioral signals may become progressively noisier as AI-assisted development becomes commonplace.&lt;/p&gt;

&lt;h1&gt;
  
  
  8. I Think the Future Looks Different
&lt;/h1&gt;

&lt;p&gt;If the distinction between human comprehension and machine verification is correct, I suspect future code review systems will evolve very differently.&lt;/p&gt;

&lt;p&gt;For humans, the problem becomes one of interface design.&lt;/p&gt;

&lt;p&gt;The important questions become:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What should this person see?&lt;/li&gt;
&lt;li&gt;In what order should issues appear?&lt;/li&gt;
&lt;li&gt;What information should be hidden?&lt;/li&gt;
&lt;li&gt;How should recommendations adapt to the team and organization?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This looks much closer to a recommendation system than a traditional static analyzer.&lt;/p&gt;

&lt;p&gt;For AI agents, the optimization is almost the opposite:&lt;/p&gt;

&lt;p&gt;Find everything. Generate exhaustive evidence. Prioritize defensive hardening. Feed repair agents. Optimize for robustness rather than attention.&lt;/p&gt;

&lt;p&gt;Trying to evaluate both of these worlds using a single benchmark seems increasingly difficult.&lt;/p&gt;

&lt;h1&gt;
  
  
  9. What the Paper Gets Right
&lt;/h1&gt;

&lt;p&gt;Despite my criticisms, I think this paper advances the discussion significantly.&lt;/p&gt;

&lt;p&gt;Among the ideas I found particularly valuable are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Recognizing that human gold sets cap evaluation&lt;/li&gt;
&lt;li&gt;Adversarial expansion of benchmark data&lt;/li&gt;
&lt;li&gt;Continuous benchmark evolution&lt;/li&gt;
&lt;li&gt;Combining online and offline evaluation&lt;/li&gt;
&lt;li&gt;Methodological transparency&lt;/li&gt;
&lt;li&gt;Openly documenting assumptions instead of hiding them&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are meaningful contributions. Even where I disagree with the conclusions, I found the discussion itself valuable.&lt;/p&gt;

&lt;h1&gt;
  
  
  10. Conclusion
&lt;/h1&gt;

&lt;p&gt;I came away thinking that the paper asks many of the right questions, but begins benchmarking before the underlying objective has fully stabilized.&lt;/p&gt;

&lt;p&gt;My disagreement is therefore less about the methodology than about the framing.&lt;/p&gt;

&lt;p&gt;I think AI code review is currently splitting into two different disciplines.&lt;/p&gt;

&lt;p&gt;One is about helping humans understand software.&lt;/p&gt;

&lt;p&gt;The other is about helping machines systematically harden software.&lt;/p&gt;

&lt;p&gt;Those are different problems, with different consumers, different interfaces, different optimization criteria, and ultimately different definitions of success.&lt;/p&gt;

&lt;p&gt;Until we separate them, I suspect any benchmark will necessarily measure a blended objective rather than a clearly defined one.&lt;/p&gt;

&lt;p&gt;For that reason, I see this paper not as the definitive benchmark for AI code review, but as an excellent exploration of why benchmarking AI code review remains an open research problem.&lt;/p&gt;

&lt;h1&gt;
  
  
  11. Summary
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Code Review Bench is one of the more thoughtful AI code review benchmark proposals I've seen.&lt;/strong&gt; It openly discusses many methodological challenges that existing benchmarks ignore.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;My disagreement is not with the engineering of the benchmark, but with the problem definition.&lt;/strong&gt; I think the benchmark is being built before the underlying problem has fully stabilized.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The paper treats AI code review as one problem, whereas I think AI is splitting it into two fundamentally different problems.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The first problem is human comprehension:&lt;/strong&gt; helping engineers understand what matters through prioritization, personalization, and good information presentation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The second problem is machine verification:&lt;/strong&gt; exhaustively finding and fixing issues to reduce outages, security vulnerabilities, and technical debt, often with another AI agent as the consumer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;These two problems have different users and different objectives, and should likely have different evaluation criteria.&lt;/strong&gt; Mixing them together makes metrics like precision, recall, and "noise" difficult to interpret.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The ultimate objective should be better software—not matching historical human reviewers.&lt;/strong&gt; Human review is a baseline, not the end destination.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The benchmark measures increasingly sophisticated proxies&lt;/strong&gt; (comments, developer actions, gold sets, online behavior), but these remain proxies for review quality rather than software quality itself.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The paper honestly acknowledges many unresolved questions&lt;/strong&gt;—bug definitions, context, severity, judge quality, OSS vs. enterprise, and future agents—but still culminates in a benchmark that appears more objective than the underlying problem currently justifies.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Several methodological choices follow from this framing&lt;/strong&gt;, including an emphasis on bug distributions over severity, code over broader engineering context, and developer actions as a proxy for usefulness.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;I believe future human-facing code review will look increasingly like a recommendation system, while agent-facing code review will optimize for exhaustive verification and automated repair.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Overall, I see this paper as an important contribution—not because it has solved AI code review benchmarking, but because it makes clear how much of the underlying problem remains open.&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fruinzrfmjzc1bak8pdeo.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fruinzrfmjzc1bak8pdeo.jpg" alt="thats all for today" width="640" height="555"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;AI-Assistance Disclosure: I spent in total 3 days to come up with this piece. I read through original materials myself, formulated all the key objections and conclusions myself and stand by the opinions expressed therein. At the same time, I have used AI to polish my writing at certain places, such as fixing punctuation, grammar, awkward phrases and faulty heading levels and so on. These are merely presentation and stylistic changes but nothing fundamental.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>codereview</category>
      <category>benchmarks</category>
      <category>softwareengineering</category>
    </item>
    <item>
      <title>Adam: The Optimization Algorithm That Made LLMs Practical</title>
      <dc:creator>Shrijith Venkatramana</dc:creator>
      <pubDate>Sat, 04 Jul 2026 18:53:06 +0000</pubDate>
      <link>https://dev.to/shrsv/adam-the-optimization-algorithm-that-made-llms-practical-k17</link>
      <guid>https://dev.to/shrsv/adam-the-optimization-algorithm-that-made-llms-practical-k17</guid>
      <description>&lt;p&gt;&lt;em&gt;Hello, I'm Shrijith Venkatramana. I'm building git-lrc, an AI code reviewer that runs on every commit. &lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;Star Us&lt;/a&gt; to help devs discover the project. Do give it a try and share your feedback for improving the product.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Without Adam, there's a good chance ChatGPT, Claude, Gemini, Llama, and many of today's large language models would have taken much longer to become reality.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;When people talk about the breakthroughs behind modern AI, they usually mention the Transformer, attention, GPUs, or massive datasets.&lt;/p&gt;

&lt;p&gt;Rarely does anyone mention the optimizer.&lt;/p&gt;

&lt;p&gt;Yet every single gradient update during the training of a modern LLM depends on an optimization algorithm deciding &lt;strong&gt;how much every parameter should change&lt;/strong&gt;. With billions of parameters and trillions of training tokens, that decision becomes one of the most important engineering problems in machine learning.&lt;/p&gt;

&lt;p&gt;One optimizer, proposed in 2014, ended up becoming the default choice across much of deep learning:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Adam (Adaptive Moment Estimation).&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Let's explore why.&lt;/p&gt;

&lt;h1&gt;
  
  
  Before Adam: Why Training Neural Networks Was So Difficult
&lt;/h1&gt;

&lt;p&gt;Imagine you're hiking down a mountain in dense fog.&lt;/p&gt;

&lt;p&gt;You can only see the slope directly beneath your feet.&lt;/p&gt;

&lt;p&gt;The obvious strategy is simple:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Take one step downhill.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This is essentially what &lt;strong&gt;gradient descent&lt;/strong&gt; does.&lt;/p&gt;

&lt;p&gt;For a neural network, the gradient tells us which direction reduces the loss.&lt;/p&gt;

&lt;p&gt;The update rule is simply:&lt;/p&gt;

&lt;p&gt;[&lt;br&gt;
\theta = \theta - \eta \nabla L&lt;br&gt;
]&lt;/p&gt;

&lt;p&gt;where&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;θ&lt;/strong&gt; = model parameters&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;η&lt;/strong&gt; = learning rate&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;∇L&lt;/strong&gt; = gradient&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Simple.&lt;/p&gt;

&lt;p&gt;Unfortunately, real neural networks don't resemble smooth mountains.&lt;/p&gt;

&lt;p&gt;Instead, they're more like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;steep cliffs&lt;/li&gt;
&lt;li&gt;long narrow valleys&lt;/li&gt;
&lt;li&gt;flat plateaus&lt;/li&gt;
&lt;li&gt;noisy terrain&lt;/li&gt;
&lt;li&gt;millions—or billions—of dimensions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The gradient also changes every mini-batch because we only compute it on a small sample of data.&lt;/p&gt;

&lt;p&gt;This leads to &lt;strong&gt;stochastic gradient descent (SGD)&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Instead of walking smoothly downhill, it's like trying to descend while someone randomly shakes the mountain beneath you.&lt;/p&gt;
&lt;h1&gt;
  
  
  Momentum: Giving Optimization Some Inertia
&lt;/h1&gt;

&lt;p&gt;Researchers realized that humans don't instantly stop and change direction every step.&lt;/p&gt;

&lt;p&gt;Instead, we build momentum.&lt;/p&gt;

&lt;p&gt;Optimization borrowed the same idea.&lt;/p&gt;

&lt;p&gt;Instead of only following today's gradient, momentum also remembers previous gradients.&lt;/p&gt;

&lt;p&gt;Imagine pushing a heavy shopping cart.&lt;/p&gt;

&lt;p&gt;If you push in roughly the same direction repeatedly, it builds speed.&lt;/p&gt;

&lt;p&gt;Small bumps don't immediately change its path.&lt;/p&gt;

&lt;p&gt;Mathematically,&lt;/p&gt;

&lt;p&gt;[&lt;br&gt;
v_t=\beta v_{t-1}+(1-\beta)g_t&lt;br&gt;
]&lt;/p&gt;

&lt;p&gt;where&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;(g_t) is today's gradient&lt;/li&gt;
&lt;li&gt;(v_t) is the accumulated velocity&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now updates become&lt;/p&gt;

&lt;p&gt;[&lt;br&gt;
\theta=\theta-\eta v_t&lt;br&gt;
]&lt;/p&gt;

&lt;p&gt;This smooths noisy updates and helps escape shallow local irregularities.&lt;/p&gt;

&lt;p&gt;Momentum was already a huge improvement.&lt;/p&gt;

&lt;p&gt;But another problem remained.&lt;/p&gt;
&lt;h1&gt;
  
  
  Different Parameters Learn at Different Speeds
&lt;/h1&gt;

&lt;p&gt;Suppose you're training a neural network with 500 million parameters.&lt;/p&gt;

&lt;p&gt;Some parameters receive gradients like&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;0.00002
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Others receive gradients like&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;45
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Using one global learning rate becomes problematic.&lt;/p&gt;

&lt;p&gt;If the learning rate is large enough for tiny gradients...&lt;/p&gt;

&lt;p&gt;...the large gradients explode.&lt;/p&gt;

&lt;p&gt;If it's safe for the large gradients...&lt;/p&gt;

&lt;p&gt;...the tiny gradients barely move.&lt;/p&gt;

&lt;p&gt;It's like paying every employee in a company exactly the same bonus regardless of performance, seniority, or role.&lt;/p&gt;

&lt;p&gt;Some people are overpaid.&lt;/p&gt;

&lt;p&gt;Others barely notice the reward.&lt;/p&gt;

&lt;p&gt;Optimization needs to adapt individually.&lt;/p&gt;

&lt;p&gt;This insight led to algorithms like AdaGrad and RMSProp.&lt;/p&gt;

&lt;p&gt;Adam combined the best ideas from both.&lt;/p&gt;
&lt;h1&gt;
  
  
  Adam: Combining Momentum and Adaptive Learning Rates
&lt;/h1&gt;

&lt;p&gt;In 2014, Diederik P. Kingma and Jimmy Ba introduced Adam in the paper:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Adam: A Method for Stochastic Optimization&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The idea is beautifully elegant.&lt;/p&gt;

&lt;p&gt;Adam maintains two running statistics for every parameter.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;First moment&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The average gradient.&lt;/p&gt;

&lt;p&gt;Think of this as momentum.&lt;/p&gt;

&lt;p&gt;[&lt;br&gt;
m_t&lt;br&gt;
]&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Second moment&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The average squared gradient.&lt;/p&gt;

&lt;p&gt;Think of this as measuring how "volatile" or "uncertain" this parameter's updates have been.&lt;/p&gt;

&lt;p&gt;[&lt;br&gt;
v_t&lt;br&gt;
]&lt;/p&gt;

&lt;p&gt;The update becomes approximately&lt;/p&gt;

&lt;p&gt;[&lt;/p&gt;
&lt;h1&gt;
  
  
  \theta
&lt;/h1&gt;
&lt;h2&gt;
  
  
  \theta
&lt;/h2&gt;

&lt;p&gt;\eta&lt;br&gt;
\frac{m_t}&lt;br&gt;
{\sqrt{v_t}+\epsilon}&lt;br&gt;
]&lt;/p&gt;

&lt;p&gt;This produces a fascinating behavior.&lt;/p&gt;

&lt;p&gt;If a parameter consistently receives huge gradients,&lt;/p&gt;

&lt;p&gt;its denominator becomes larger,&lt;/p&gt;

&lt;p&gt;making future updates smaller.&lt;/p&gt;

&lt;p&gt;If another parameter rarely changes,&lt;/p&gt;

&lt;p&gt;its denominator stays small,&lt;/p&gt;

&lt;p&gt;allowing relatively larger updates.&lt;/p&gt;

&lt;p&gt;Every parameter effectively receives its own personalized learning rate.&lt;/p&gt;
&lt;h1&gt;
  
  
  A Back-of-the-Envelope Example
&lt;/h1&gt;

&lt;p&gt;Suppose two parameters have identical momentum:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Parameter A

Average gradient = 2
Average squared gradient = 100
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Parameter B

Average gradient = 2
Average squared gradient = 4
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Ignoring ε,&lt;/p&gt;

&lt;p&gt;Parameter A updates by&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;2 / √100 = 0.2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Parameter B updates by&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;2 / √4 = 1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Even though both gradients are identical today,&lt;/p&gt;

&lt;p&gt;Adam trusts Parameter B much more because its historical variance is lower.&lt;/p&gt;

&lt;p&gt;This automatic scaling is one reason Adam trains deep networks so effectively.&lt;/p&gt;
&lt;h1&gt;
  
  
  Why Bias Correction Exists
&lt;/h1&gt;

&lt;p&gt;There's one subtle issue.&lt;/p&gt;

&lt;p&gt;At the beginning of training,&lt;/p&gt;

&lt;p&gt;both moving averages start at zero.&lt;/p&gt;

&lt;p&gt;That means early estimates are biased toward zero.&lt;/p&gt;

&lt;p&gt;Kingma and Ba introduced &lt;strong&gt;bias correction&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;[&lt;/p&gt;
&lt;h1&gt;
  
  
  \hat m_t
&lt;/h1&gt;

&lt;p&gt;\frac{m_t}&lt;br&gt;
{1-\beta_1^t}&lt;br&gt;
]&lt;/p&gt;

&lt;p&gt;and&lt;/p&gt;

&lt;p&gt;[&lt;/p&gt;
&lt;h1&gt;
  
  
  \hat v_t
&lt;/h1&gt;

&lt;p&gt;\frac{v_t}&lt;br&gt;
{1-\beta_2^t}&lt;br&gt;
]&lt;/p&gt;

&lt;p&gt;These corrections rapidly remove the startup bias.&lt;/p&gt;

&lt;p&gt;It's a small mathematical trick that has a surprisingly large practical impact during the first optimization steps.&lt;/p&gt;
&lt;h1&gt;
  
  
  Why Adam Became So Important for Deep Learning
&lt;/h1&gt;

&lt;p&gt;Consider training GPT-style models.&lt;/p&gt;

&lt;p&gt;Modern LLMs easily contain&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;7 billion parameters&lt;/li&gt;
&lt;li&gt;70 billion parameters&lt;/li&gt;
&lt;li&gt;over a trillion parameters in some research systems&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Every optimization step updates every trainable parameter.&lt;/p&gt;

&lt;p&gt;Even a modest training run might execute &lt;strong&gt;hundreds of thousands of optimization steps&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;That means Adam performs on the order of&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;billions of parameters
×

hundreds of thousands of updates
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;resulting in &lt;strong&gt;quadrillions of parameter update decisions&lt;/strong&gt; over the course of training.&lt;/p&gt;

&lt;p&gt;Without stable optimization,&lt;/p&gt;

&lt;p&gt;training would often diverge.&lt;/p&gt;

&lt;p&gt;Learning would become painfully slow.&lt;/p&gt;

&lt;p&gt;GPU time—costing thousands or even millions of dollars—would be wasted.&lt;/p&gt;

&lt;p&gt;Optimization isn't merely a mathematical curiosity.&lt;/p&gt;

&lt;p&gt;It's an operations and economics problem.&lt;/p&gt;

&lt;p&gt;A 10% improvement in convergence speed on a multi-million-dollar training run can translate into hundreds of thousands of dollars in savings, shorter experimentation cycles, and faster scientific progress. Faster convergence also means researchers can iterate on model architectures more quickly, reducing the opportunity cost of long training jobs.&lt;/p&gt;

&lt;p&gt;Adam became popular because it usually works well with relatively little hyperparameter tuning.&lt;/p&gt;

&lt;p&gt;Researchers could spend less time adjusting learning rates and more time exploring new model architectures.&lt;/p&gt;

&lt;p&gt;That practicality accelerated progress across computer vision, speech recognition, recommendation systems, and eventually large language models.&lt;/p&gt;
&lt;h1&gt;
  
  
  Adam Isn't Perfect
&lt;/h1&gt;

&lt;p&gt;As influential as Adam has been, researchers have also identified limitations.&lt;/p&gt;

&lt;p&gt;Some studies found that vanilla stochastic gradient descent can produce models that generalize better on certain vision tasks.&lt;/p&gt;

&lt;p&gt;Others observed convergence issues under specific theoretical settings.&lt;/p&gt;

&lt;p&gt;As LLMs grew larger, practitioners developed variants such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AdamW (decoupled weight decay)&lt;/li&gt;
&lt;li&gt;AdaFactor (reduced memory footprint)&lt;/li&gt;
&lt;li&gt;Lion (sign-based optimization)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In fact, many modern Transformer implementations train with &lt;strong&gt;AdamW&lt;/strong&gt;, which separates weight decay from Adam's adaptive updates and often improves regularization.&lt;/p&gt;

&lt;p&gt;Engineering rarely ends with one perfect algorithm.&lt;/p&gt;

&lt;p&gt;Instead, progress comes through continual refinement.&lt;/p&gt;
&lt;h1&gt;
  
  
  The Bigger Lesson
&lt;/h1&gt;

&lt;p&gt;When the Transformer paper appeared in 2017, attention deservedly captured the headlines.&lt;/p&gt;

&lt;p&gt;But Transformers alone weren't enough.&lt;/p&gt;

&lt;p&gt;Modern deep learning stands on layers of innovations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;better hardware&lt;/li&gt;
&lt;li&gt;larger datasets&lt;/li&gt;
&lt;li&gt;improved initialization&lt;/li&gt;
&lt;li&gt;normalization methods&lt;/li&gt;
&lt;li&gt;residual connections&lt;/li&gt;
&lt;li&gt;efficient optimizers&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Adam is one of those foundational technologies.&lt;/p&gt;

&lt;p&gt;It's rarely discussed outside machine learning circles, yet it quietly powers the optimization of billions of parameters every day.&lt;/p&gt;

&lt;p&gt;Sometimes the biggest breakthroughs aren't new model architectures.&lt;/p&gt;

&lt;p&gt;Sometimes they're simply better ways of taking the next step downhill.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Did Adam fundamentally change deep learning, or was it simply the optimizer that happened to arrive at the right time?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I'd love to hear your thoughts—and if you've trained neural networks yourself, have you ever switched away from Adam and seen better results?&lt;/p&gt;



&lt;p&gt;*AI agents write code fast. They also silently remove logic, change behavior, and introduce bugs -- without telling you. You often find out in production.&lt;/p&gt;

&lt;p&gt;git-lrc fixes this. It hooks into git commit and reviews every diff before it lands. 60-second setup. Completely free.*&lt;/p&gt;

&lt;p&gt;Any feedback or contributors are welcome! It's online, source-available, and ready for anyone to use.&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/HexmosTech" rel="noopener noreferrer"&gt;
        HexmosTech
      &lt;/a&gt; / &lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;
        git-lrc
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Free, Micro AI Code Reviews That Run on Git Commit
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div&gt;
&lt;p&gt;| &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.da.md" rel="noopener noreferrer"&gt;🇩🇰 Dansk&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.es.md" rel="noopener noreferrer"&gt;🇪🇸 Español&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.fa.md" rel="noopener noreferrer"&gt;🇮🇷 Farsi&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.fi.md" rel="noopener noreferrer"&gt;🇫🇮 Suomi&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.ja.md" rel="noopener noreferrer"&gt;🇯🇵 日本語&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.nn.md" rel="noopener noreferrer"&gt;🇳🇴 Norsk&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.pt.md" rel="noopener noreferrer"&gt;🇵🇹 Português&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.ru.md" rel="noopener noreferrer"&gt;🇷🇺 Русский&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.sq.md" rel="noopener noreferrer"&gt;🇦🇱 Shqip&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.zh.md" rel="noopener noreferrer"&gt;🇨🇳 中文&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.hi.md" rel="noopener noreferrer"&gt;🇮🇳 हिन्दी&lt;/a&gt; |&lt;/p&gt;
&lt;br&gt;
&lt;br&gt;
&lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/948c8f2d5cf41b48985cd364d48c3a2dc9bfbfd42eab3e0a9a1b3e61f5f17ce3/68747470733a2f2f6865786d6f732e636f6d2f66726565646576746f6f6c732f7075626c69632f6c725f6c6f676f2e737667"&gt;&lt;img width="60" alt="git-lrc logo" src="https://camo.githubusercontent.com/948c8f2d5cf41b48985cd364d48c3a2dc9bfbfd42eab3e0a9a1b3e61f5f17ce3/68747470733a2f2f6865786d6f732e636f6d2f66726565646576746f6f6c732f7075626c69632f6c725f6c6f676f2e737667"&gt;&lt;/a&gt;
&lt;br&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;git-lrc&lt;/h1&gt;
&lt;/div&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Free, Micro AI Code Reviews That Run on Commit&lt;/h2&gt;
&lt;/div&gt;



&lt;p&gt;&lt;a href="https://www.producthunt.com/products/git-lrc?embed=true&amp;amp;utm_source=badge-top-post-badge&amp;amp;utm_medium=badge&amp;amp;utm_campaign=badge-git-lrc" rel="nofollow noopener noreferrer"&gt;&lt;img alt="git-lrc - Free, micro AI code reviews that run on commit | Product Hunt" width="200" src="https://camo.githubusercontent.com/87bf2d4283c1e0aa99e254bd17fefb1c67c0c0d39300043a243a4aa633b6cecc/68747470733a2f2f6170692e70726f6475637468756e742e636f6d2f776964676574732f656d6265642d696d6167652f76312f746f702d706f73742d62616467652e7376673f706f73745f69643d31303739323632267468656d653d6c6967687426706572696f643d6461696c7926743d31373731373439313730383638"&gt;&lt;/a&gt;
&amp;nbsp;&lt;/p&gt;
&lt;br&gt;
&lt;a href="https://discord.gg/sGdnKwB3qq" rel="nofollow noopener noreferrer"&gt;
  &lt;img alt="Discord Community" src="https://camo.githubusercontent.com/b8f979318aaabc8dec512b9d4e6e2a12431fba3c8a3b8738e1a97a0722d4e4bf/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446973636f72642d436f6d6d756e6974792d3538363546323f6c6f676f3d646973636f7264266c6162656c436f6c6f723d7768697465"&gt;
&lt;/a&gt; &lt;a href="https://goreportcard.com/report/github.com/HexmosTech/git-lrc" rel="nofollow noopener noreferrer"&gt;&lt;img alt="Go Report Card" src="https://camo.githubusercontent.com/e74c0651c3ee9165a2ed01cb0f6842c494029960df30eb9c24cf622d3d21bf46/68747470733a2f2f676f7265706f7274636172642e636f6d2f62616467652f6769746875622e636f6d2f4865786d6f73546563682f6769742d6c7263"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/git-lrc/actions/workflows/gitleaks.yml" rel="noopener noreferrer"&gt;&lt;img alt="gitleaks.yml" title="gitleaks.yml: Secret scanning workflow" src="https://github.com/HexmosTech/git-lrc/actions/workflows/gitleaks.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/git-lrc/actions/workflows/osv-scanner.yml" rel="noopener noreferrer"&gt;&lt;img alt="osv-scanner.yml" title="osv-scanner.yml: Dependency vulnerability scan" src="https://github.com/HexmosTech/git-lrc/actions/workflows/osv-scanner.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/git-lrc/actions/workflows/govulncheck.yml" rel="noopener noreferrer"&gt;&lt;img alt="govulncheck.yml" title="govulncheck.yml: Go vulnerability check" src="https://github.com/HexmosTech/git-lrc/actions/workflows/govulncheck.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/git-lrc/actions/workflows/semgrep.yml" rel="noopener noreferrer"&gt;&lt;img alt="semgrep.yml" title="semgrep.yml: Static analysis security scan" src="https://github.com/HexmosTech/git-lrc/actions/workflows/semgrep.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/git-lrc/./gfx/dependabot-enabled.svg"&gt;&lt;img alt="dependabot-enabled" title="dependabot-enabled: Automated dependency updates are enabled" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2Fgit-lrc%2FHEAD%2F.%2Fgfx%2Fdependabot-enabled.svg"&gt;&lt;/a&gt;
&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/git-lrc/./gfx/a_few_micro_reviews.png"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2Fgit-lrc%2FHEAD%2F.%2Fgfx%2Fa_few_micro_reviews.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;GenAI today is a &lt;strong&gt;race car without brakes&lt;/strong&gt;. It accelerates fast -- you describe something, and large blocks of code appear instantly. But AI agents &lt;em&gt;silently break things&lt;/em&gt;: they remove logic, relax constraints, introduce expensive cloud calls, leak credentials, and change behavior -- without telling you. You often find out in production.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;git-lrc&lt;/code&gt; is your braking system.&lt;/strong&gt; It hooks into &lt;code&gt;git commit&lt;/code&gt; and runs an AI review on every diff &lt;em&gt;before&lt;/em&gt; it lands. 60-second setup. Completely free.&lt;/p&gt;
&lt;p&gt;In short, git-lrc helps &lt;strong&gt;Prevent Outages, Breaches, and Technical Debt Before They Happen&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;At a glance:&lt;/strong&gt; &lt;a href="https://github.com/HexmosTech/git-lrc#what-git-lrc-checks-for" rel="noopener noreferrer"&gt;10 risk categories&lt;/a&gt; · &lt;a href="https://github.com/HexmosTech/git-lrc#what-git-lrc-checks-for" rel="noopener noreferrer"&gt;100+ failure patterns tracked&lt;/a&gt; · every commit…&lt;/p&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


</description>
      <category>ai</category>
      <category>algorithms</category>
      <category>llm</category>
      <category>machinelearning</category>
    </item>
    <item>
      <title>The Small Mathematical Trick That Helped Make LLMs Possible: Understanding Layer Normalization</title>
      <dc:creator>Shrijith Venkatramana</dc:creator>
      <pubDate>Fri, 03 Jul 2026 19:34:34 +0000</pubDate>
      <link>https://dev.to/shrsv/the-small-mathematical-trick-that-helped-make-llms-possible-understanding-layer-normalization-27ln</link>
      <guid>https://dev.to/shrsv/the-small-mathematical-trick-that-helped-make-llms-possible-understanding-layer-normalization-27ln</guid>
      <description>&lt;p&gt;&lt;em&gt;Hello, I'm Shrijith Venkatramana. I'm building git-lrc, an AI code reviewer that runs on every commit. &lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;Star Us&lt;/a&gt; to help devs discover the project. Do give it a try and share your feedback for improving the product.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Layer Normalization is one of those ideas that seems almost disappointingly simple.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;It has no billion-parameter architecture.&lt;br&gt;
No attention mechanism.&lt;br&gt;
No clever prompting strategy.&lt;/p&gt;

&lt;p&gt;Just a few lines of mathematics that normalize numbers.&lt;/p&gt;

&lt;p&gt;Yet without it, training today's Transformer models—from GPT to Llama to Claude—would be dramatically more difficult, slower, and often unstable.&lt;/p&gt;

&lt;p&gt;Like many important engineering ideas, its brilliance lies in making everything else work.&lt;/p&gt;

&lt;p&gt;Let's look at why.&lt;/p&gt;
&lt;h1&gt;
  
  
  Before Transformers: Why Deep Networks Were Difficult to Train
&lt;/h1&gt;

&lt;p&gt;Imagine building a neural network with 100 layers.&lt;/p&gt;

&lt;p&gt;Each layer receives activations from the previous one and transforms them.&lt;/p&gt;

&lt;p&gt;Now suppose one layer begins producing values that are twice as large as yesterday.&lt;/p&gt;

&lt;p&gt;Every subsequent layer suddenly receives inputs from a completely different distribution.&lt;/p&gt;

&lt;p&gt;The next layer must constantly adapt.&lt;/p&gt;

&lt;p&gt;Then the next one.&lt;/p&gt;

&lt;p&gt;Then the next.&lt;/p&gt;

&lt;p&gt;Training becomes like trying to walk on an escalator whose speed changes every second.&lt;/p&gt;

&lt;p&gt;This phenomenon became widely known as &lt;strong&gt;internal covariate shift&lt;/strong&gt;, a term popularized by &lt;strong&gt;Sergey Ioffe&lt;/strong&gt; and &lt;strong&gt;Christian Szegedy&lt;/strong&gt; in their 2015 paper introducing &lt;strong&gt;Batch Normalization&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Batch Normalization was enormously successful for convolutional networks.&lt;/p&gt;

&lt;p&gt;But it came with an important limitation.&lt;/p&gt;

&lt;p&gt;It depends on statistics computed across a batch of examples.&lt;/p&gt;

&lt;p&gt;That works well for image classification.&lt;/p&gt;

&lt;p&gt;It is much less convenient for recurrent networks and later for language models, where sequence lengths vary and batches are often small or irregular.&lt;/p&gt;

&lt;p&gt;Researchers needed something different.&lt;/p&gt;

&lt;p&gt;Something that normalized each individual example independently.&lt;/p&gt;
&lt;h1&gt;
  
  
  The Elegant Idea: Normalize Inside Every Layer
&lt;/h1&gt;

&lt;p&gt;In 2016, &lt;strong&gt;Jimmy Lei Ba&lt;/strong&gt;, &lt;strong&gt;Jamie Ryan Kiros&lt;/strong&gt;, and &lt;strong&gt;Geoffrey Hinton&lt;/strong&gt; introduced &lt;strong&gt;Layer Normalization&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The insight was surprisingly simple.&lt;/p&gt;

&lt;p&gt;Instead of asking:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"How does this neuron compare across different training examples?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Layer Normalization asks:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Within this single example, are the activations well-scaled?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Suppose a hidden representation contains:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[12, 15, 18, 21]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;These numbers are relatively large.&lt;/p&gt;

&lt;p&gt;Another example might produce:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[-0.8, 0.2, 1.1, -0.5]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Instead of allowing every layer to operate over wildly different numerical ranges, Layer Normalization rescales each representation so that its activations have roughly:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;mean = 0&lt;/li&gt;
&lt;li&gt;variance = 1&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each layer therefore receives inputs with predictable numerical properties.&lt;/p&gt;

&lt;p&gt;That consistency dramatically improves optimization.&lt;/p&gt;

&lt;p&gt;Think of it as automatically adjusting the zoom level before every calculation.&lt;/p&gt;

&lt;p&gt;The underlying information stays the same.&lt;/p&gt;

&lt;p&gt;Only the scale changes.&lt;/p&gt;
&lt;h1&gt;
  
  
  The Mathematics Isn't Complicated
&lt;/h1&gt;

&lt;p&gt;Suppose one token's hidden representation is&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[4, 6, 8]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The average is&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mu = (4 + 6 + 8) / 3 = 6
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The variance becomes&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;((4 - 6)^2 + (6 - 6)^2 + (8 - 6)^2) / 3
= (4 + 0 + 4) / 3
~ 2.67
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Standard deviation:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sqrt(2.67) ~ 1.63
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Now normalize:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(4 - 6) / 1.63 = -1.22

(6 - 6) / 1.63 = 0

(8 - 6) / 1.63 = 1.22
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Instead of arbitrary numbers,&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[4,6,8]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;we obtain&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[-1.22, 0, 1.22]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The representation now has a stable scale regardless of how large or small the original values were.&lt;/p&gt;

&lt;p&gt;In practice, an epsilon is added to avoid division by zero:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;x_hat = (x - mu) / sqrt(sigma^2 + epsilon)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Then the model immediately learns two trainable parameters:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;y = gamma * x_hat + beta
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Why?&lt;/p&gt;

&lt;p&gt;Because sometimes the optimal distribution isn't exactly mean zero and variance one.&lt;/p&gt;

&lt;p&gt;The model learns the best scale (gamma) and offset (beta) automatically.&lt;/p&gt;

&lt;p&gt;Normalization gives stability.&lt;/p&gt;

&lt;p&gt;The learned parameters preserve flexibility.&lt;/p&gt;
&lt;h1&gt;
  
  
  Why This Became Essential for Transformers
&lt;/h1&gt;

&lt;p&gt;When &lt;strong&gt;Ashish Vaswani&lt;/strong&gt; and colleagues introduced the Transformer in 2017 with the famous paper &lt;em&gt;Attention Is All You Need&lt;/em&gt;, every Transformer block contained Layer Normalization.&lt;/p&gt;

&lt;p&gt;Each block performs operations like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Multi-head attention&lt;/li&gt;
&lt;li&gt;Residual connections&lt;/li&gt;
&lt;li&gt;Feed-forward networks&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Without normalization, residual additions can gradually amplify activations as depth increases.&lt;/p&gt;

&lt;p&gt;Imagine adding numbers repeatedly:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;10
+12
+15
+18
...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Soon the values become much larger than earlier layers expected.&lt;/p&gt;

&lt;p&gt;Layer Normalization continuously recenters and rescales these representations before computation proceeds.&lt;/p&gt;

&lt;p&gt;This keeps optimization well-conditioned.&lt;/p&gt;

&lt;p&gt;Modern LLMs stack dozens—or even hundreds—of Transformer layers.&lt;/p&gt;

&lt;p&gt;Small numerical instabilities accumulate rapidly.&lt;/p&gt;

&lt;p&gt;Layer Normalization prevents those instabilities from snowballing.&lt;/p&gt;

&lt;p&gt;Over time researchers also discovered that moving Layer Normalization &lt;em&gt;before&lt;/em&gt; each sub-layer (Pre-LN Transformers) significantly improved gradient flow for extremely deep models.&lt;/p&gt;

&lt;p&gt;Today, nearly every large language model adopts some variation of this design.&lt;/p&gt;
&lt;h1&gt;
  
  
  A Quick Back-of-the-Envelope Calculation
&lt;/h1&gt;

&lt;p&gt;Suppose a Transformer has&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;hidden dimension = 4096&lt;/li&gt;
&lt;li&gt;sequence length = 2048&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each token requires computing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;one mean&lt;/li&gt;
&lt;li&gt;one variance&lt;/li&gt;
&lt;li&gt;one normalization&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That's roughly proportional to 4096 floating-point operations per token.&lt;/p&gt;

&lt;p&gt;For the entire sequence:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;4096 x 2048
~ 8.4 million values
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;That sounds large.&lt;/p&gt;

&lt;p&gt;Until you compare it with attention.&lt;/p&gt;

&lt;p&gt;Self-attention scales approximately as&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;O(sequence^2)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;For 2048 tokens:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;2048^2
~ 4.2 million pairwise interactions
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;And each interaction itself involves vector operations.&lt;/p&gt;

&lt;p&gt;In practice, Layer Normalization contributes only a tiny fraction of the total computational cost.&lt;/p&gt;

&lt;p&gt;The economics are excellent.&lt;/p&gt;

&lt;p&gt;A relatively inexpensive computation dramatically improves optimization stability, allowing larger learning rates, deeper models, and more reliable convergence.&lt;/p&gt;

&lt;p&gt;It's one of those rare engineering trade-offs that is overwhelmingly favorable.&lt;/p&gt;
&lt;h1&gt;
  
  
  Beyond LayerNorm: RMSNorm and the Next Generation
&lt;/h1&gt;

&lt;p&gt;As models became larger, researchers began asking:&lt;/p&gt;

&lt;p&gt;Do we really need to subtract the mean?&lt;/p&gt;

&lt;p&gt;One popular alternative is &lt;strong&gt;RMSNorm&lt;/strong&gt;, introduced by &lt;strong&gt;Biao Zhang&lt;/strong&gt; and &lt;strong&gt;Rico Sennrich&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Instead of computing both mean and variance, RMSNorm normalizes only using the root-mean-square magnitude.&lt;/p&gt;

&lt;p&gt;This removes some computation while preserving much of the optimization benefit.&lt;/p&gt;

&lt;p&gt;Many modern open-source LLMs—including several recent Llama-family models—use RMSNorm instead of classic LayerNorm.&lt;/p&gt;

&lt;p&gt;This illustrates an important engineering pattern.&lt;/p&gt;

&lt;p&gt;Once researchers understood &lt;em&gt;why&lt;/em&gt; normalization worked, they could simplify it without sacrificing performance.&lt;/p&gt;

&lt;p&gt;The original idea remained.&lt;/p&gt;

&lt;p&gt;Only the implementation evolved.&lt;/p&gt;
&lt;h1&gt;
  
  
  The Bigger Lesson
&lt;/h1&gt;

&lt;p&gt;History often celebrates attention as the invention that created modern language models.&lt;/p&gt;

&lt;p&gt;Attention certainly deserves the spotlight.&lt;/p&gt;

&lt;p&gt;But attention alone was never enough.&lt;/p&gt;

&lt;p&gt;Deep learning progresses because many seemingly "small" ideas accumulate:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;residual connections&lt;/li&gt;
&lt;li&gt;better optimizers&lt;/li&gt;
&lt;li&gt;positional encodings&lt;/li&gt;
&lt;li&gt;normalization&lt;/li&gt;
&lt;li&gt;improved initialization&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Layer Normalization is a perfect example.&lt;/p&gt;

&lt;p&gt;It rarely appears in product announcements.&lt;/p&gt;

&lt;p&gt;Few conference talks focus exclusively on it.&lt;/p&gt;

&lt;p&gt;Yet every token processed by today's LLMs quietly passes through it again and again.&lt;/p&gt;

&lt;p&gt;Sometimes the biggest breakthroughs aren't entirely new capabilities.&lt;/p&gt;

&lt;p&gt;They're mathematical refinements that make ambitious ideas practical.&lt;/p&gt;

&lt;p&gt;And engineering history is full of exactly these kinds of invisible innovations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What do you think is the most underrated idea in deep learning?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Is it Layer Normalization, residual connections, Adam, positional encodings—or something else that enables modern AI without getting much of the credit?&lt;/p&gt;



&lt;p&gt;*AI agents write code fast. They also silently remove logic, change behavior, and introduce bugs -- without telling you. You often find out in production.&lt;/p&gt;

&lt;p&gt;git-lrc fixes this. It hooks into git commit and reviews every diff before it lands. 60-second setup. Completely free.*&lt;/p&gt;

&lt;p&gt;Any feedback or contributors are welcome! It's online, source-available, and ready for anyone to use.&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/HexmosTech" rel="noopener noreferrer"&gt;
        HexmosTech
      &lt;/a&gt; / &lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;
        git-lrc
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Free, Micro AI Code Reviews That Run on Git Commit
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div&gt;
&lt;p&gt;| &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.da.md" rel="noopener noreferrer"&gt;🇩🇰 Dansk&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.es.md" rel="noopener noreferrer"&gt;🇪🇸 Español&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.fa.md" rel="noopener noreferrer"&gt;🇮🇷 Farsi&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.fi.md" rel="noopener noreferrer"&gt;🇫🇮 Suomi&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.ja.md" rel="noopener noreferrer"&gt;🇯🇵 日本語&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.nn.md" rel="noopener noreferrer"&gt;🇳🇴 Norsk&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.pt.md" rel="noopener noreferrer"&gt;🇵🇹 Português&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.ru.md" rel="noopener noreferrer"&gt;🇷🇺 Русский&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.sq.md" rel="noopener noreferrer"&gt;🇦🇱 Shqip&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.zh.md" rel="noopener noreferrer"&gt;🇨🇳 中文&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.hi.md" rel="noopener noreferrer"&gt;🇮🇳 हिन्दी&lt;/a&gt; |&lt;/p&gt;
&lt;br&gt;
&lt;br&gt;
&lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/948c8f2d5cf41b48985cd364d48c3a2dc9bfbfd42eab3e0a9a1b3e61f5f17ce3/68747470733a2f2f6865786d6f732e636f6d2f66726565646576746f6f6c732f7075626c69632f6c725f6c6f676f2e737667"&gt;&lt;img width="60" alt="git-lrc logo" src="https://camo.githubusercontent.com/948c8f2d5cf41b48985cd364d48c3a2dc9bfbfd42eab3e0a9a1b3e61f5f17ce3/68747470733a2f2f6865786d6f732e636f6d2f66726565646576746f6f6c732f7075626c69632f6c725f6c6f676f2e737667"&gt;&lt;/a&gt;
&lt;br&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;git-lrc&lt;/h1&gt;
&lt;/div&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Free, Micro AI Code Reviews That Run on Commit&lt;/h2&gt;
&lt;/div&gt;



&lt;p&gt;&lt;a href="https://www.producthunt.com/products/git-lrc?embed=true&amp;amp;utm_source=badge-top-post-badge&amp;amp;utm_medium=badge&amp;amp;utm_campaign=badge-git-lrc" rel="nofollow noopener noreferrer"&gt;&lt;img alt="git-lrc - Free, micro AI code reviews that run on commit | Product Hunt" width="200" src="https://camo.githubusercontent.com/87bf2d4283c1e0aa99e254bd17fefb1c67c0c0d39300043a243a4aa633b6cecc/68747470733a2f2f6170692e70726f6475637468756e742e636f6d2f776964676574732f656d6265642d696d6167652f76312f746f702d706f73742d62616467652e7376673f706f73745f69643d31303739323632267468656d653d6c6967687426706572696f643d6461696c7926743d31373731373439313730383638"&gt;&lt;/a&gt;
&amp;nbsp;&lt;/p&gt;
&lt;br&gt;
&lt;a href="https://discord.gg/sGdnKwB3qq" rel="nofollow noopener noreferrer"&gt;
  &lt;img alt="Discord Community" src="https://camo.githubusercontent.com/b8f979318aaabc8dec512b9d4e6e2a12431fba3c8a3b8738e1a97a0722d4e4bf/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446973636f72642d436f6d6d756e6974792d3538363546323f6c6f676f3d646973636f7264266c6162656c436f6c6f723d7768697465"&gt;
&lt;/a&gt; &lt;a href="https://goreportcard.com/report/github.com/HexmosTech/git-lrc" rel="nofollow noopener noreferrer"&gt;&lt;img alt="Go Report Card" src="https://camo.githubusercontent.com/e74c0651c3ee9165a2ed01cb0f6842c494029960df30eb9c24cf622d3d21bf46/68747470733a2f2f676f7265706f7274636172642e636f6d2f62616467652f6769746875622e636f6d2f4865786d6f73546563682f6769742d6c7263"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/git-lrc/actions/workflows/gitleaks.yml" rel="noopener noreferrer"&gt;&lt;img alt="gitleaks.yml" title="gitleaks.yml: Secret scanning workflow" src="https://github.com/HexmosTech/git-lrc/actions/workflows/gitleaks.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/git-lrc/actions/workflows/osv-scanner.yml" rel="noopener noreferrer"&gt;&lt;img alt="osv-scanner.yml" title="osv-scanner.yml: Dependency vulnerability scan" src="https://github.com/HexmosTech/git-lrc/actions/workflows/osv-scanner.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/git-lrc/actions/workflows/govulncheck.yml" rel="noopener noreferrer"&gt;&lt;img alt="govulncheck.yml" title="govulncheck.yml: Go vulnerability check" src="https://github.com/HexmosTech/git-lrc/actions/workflows/govulncheck.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/git-lrc/actions/workflows/semgrep.yml" rel="noopener noreferrer"&gt;&lt;img alt="semgrep.yml" title="semgrep.yml: Static analysis security scan" src="https://github.com/HexmosTech/git-lrc/actions/workflows/semgrep.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/git-lrc/./gfx/dependabot-enabled.svg"&gt;&lt;img alt="dependabot-enabled" title="dependabot-enabled: Automated dependency updates are enabled" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2Fgit-lrc%2FHEAD%2F.%2Fgfx%2Fdependabot-enabled.svg"&gt;&lt;/a&gt;
&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/git-lrc/./gfx/a_few_micro_reviews.png"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2Fgit-lrc%2FHEAD%2F.%2Fgfx%2Fa_few_micro_reviews.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;GenAI today is a &lt;strong&gt;race car without brakes&lt;/strong&gt;. It accelerates fast -- you describe something, and large blocks of code appear instantly. But AI agents &lt;em&gt;silently break things&lt;/em&gt;: they remove logic, relax constraints, introduce expensive cloud calls, leak credentials, and change behavior -- without telling you. You often find out in production.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;git-lrc&lt;/code&gt; is your braking system.&lt;/strong&gt; It hooks into &lt;code&gt;git commit&lt;/code&gt; and runs an AI review on every diff &lt;em&gt;before&lt;/em&gt; it lands. 60-second setup. Completely free.&lt;/p&gt;
&lt;p&gt;In short, git-lrc helps &lt;strong&gt;Prevent Outages, Breaches, and Technical Debt Before They Happen&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;At a glance:&lt;/strong&gt; &lt;a href="https://github.com/HexmosTech/git-lrc#what-git-lrc-checks-for" rel="noopener noreferrer"&gt;10 risk categories&lt;/a&gt; · &lt;a href="https://github.com/HexmosTech/git-lrc#what-git-lrc-checks-for" rel="noopener noreferrer"&gt;100+ failure patterns tracked&lt;/a&gt; · every commit…&lt;/p&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


</description>
      <category>ai</category>
      <category>webdev</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>The English Parsing Problem That Led to Modern LLM Transformers</title>
      <dc:creator>Shrijith Venkatramana</dc:creator>
      <pubDate>Thu, 02 Jul 2026 17:44:47 +0000</pubDate>
      <link>https://dev.to/shrsv/the-english-parsing-problem-that-quietly-led-to-modern-llm-transformers-53ni</link>
      <guid>https://dev.to/shrsv/the-english-parsing-problem-that-quietly-led-to-modern-llm-transformers-53ni</guid>
      <description>&lt;p&gt;&lt;em&gt;Hello, I'm Shrijith Venkatramana. I'm building git-lrc, an AI code reviewer that runs on every commit. &lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;Star Us&lt;/a&gt; to help devs discover the project. Do give it a try and share your feedback for improving the product.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;When people explain Large Language Models, they usually start with ChatGPT, attention, or transformers.&lt;/p&gt;

&lt;p&gt;A much better place to start is a problem linguists had been struggling with for decades:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;How do you teach a computer to understand the grammatical structure of a sentence?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This wasn't just an academic curiosity.&lt;/p&gt;

&lt;p&gt;Search engines, machine translation, question answering, speech recognition, document understanding, and even programming languages all depend on extracting structure from sequences of symbols.&lt;/p&gt;

&lt;p&gt;One of the benchmark problems became &lt;strong&gt;English Constituency Parsing&lt;/strong&gt;—given a sentence, recover the tree representing its grammatical structure.&lt;/p&gt;

&lt;p&gt;It turns out that this seemingly narrow problem became one of the best demonstrations that the Transformer architecture had fundamentally changed NLP.&lt;/p&gt;

&lt;p&gt;Let's see why.&lt;/p&gt;

&lt;h1&gt;
  
  
  Before Deep Learning: Parsing Was Mostly Hand-Crafted Rules
&lt;/h1&gt;

&lt;p&gt;Imagine the sentence:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The little girl saw the dog with the telescope.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Humans immediately recognize that this sentence is ambiguous.&lt;/p&gt;

&lt;p&gt;Did the girl use the telescope?&lt;/p&gt;

&lt;p&gt;Or did the dog have the telescope?&lt;/p&gt;

&lt;p&gt;Those are two completely different parse trees.&lt;/p&gt;

&lt;p&gt;Computers, however, simply receive a sequence of words.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;The | little | girl | saw | the | dog | with | the | telescope
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The challenge is recovering hidden grammatical structure.&lt;/p&gt;

&lt;p&gt;A simplified parse tree might look like:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Sentence
├── Noun Phrase
│   ├── Determiner
│   ├── Adjective
│   └── Noun
└── Verb Phrase
    ├── Verb
    ├── Noun Phrase
    └── Prepositional Phrase
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This problem became known as &lt;strong&gt;constituency parsing&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Beginning in the 1970s and 1980s, researchers built enormous collections of grammar rules inspired by linguistic theories such as those developed by Noam Chomsky.&lt;/p&gt;

&lt;p&gt;These systems worked...&lt;/p&gt;

&lt;p&gt;...until real language got messy.&lt;/p&gt;

&lt;p&gt;Every exception required another rule.&lt;/p&gt;

&lt;p&gt;Every new language required another grammar.&lt;/p&gt;

&lt;p&gt;Maintenance costs exploded.&lt;/p&gt;
&lt;h1&gt;
  
  
  Then Statistics Entered the Picture
&lt;/h1&gt;

&lt;p&gt;During the 1990s, NLP underwent what many call the "statistical revolution."&lt;/p&gt;

&lt;p&gt;Instead of manually writing thousands of grammar rules, researchers asked:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;What if we simply learn grammar from data?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The creation of the Penn Treebank was a turning point.&lt;/p&gt;

&lt;p&gt;Thousands of English newspaper sentences were manually annotated with parse trees.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight common_lisp"&gt;&lt;code&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;S&lt;/span&gt;
   &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;NP&lt;/span&gt; &lt;span class="nv"&gt;The&lt;/span&gt; &lt;span class="nv"&gt;cat&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
   &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;VP&lt;/span&gt; &lt;span class="nv"&gt;sat&lt;/span&gt;
       &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;PP&lt;/span&gt; &lt;span class="nv"&gt;on&lt;/span&gt;
           &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;NP&lt;/span&gt; &lt;span class="k"&gt;the&lt;/span&gt; &lt;span class="nv"&gt;mat&lt;/span&gt;&lt;span class="p"&gt;))))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Instead of writing rules, researchers could now estimate probabilities.&lt;/p&gt;

&lt;p&gt;Rather than saying&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;NP -&amp;gt; Determiner Noun
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;always occurs,&lt;/p&gt;

&lt;p&gt;they estimated&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;P(NP -&amp;gt; Determiner Noun)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;from millions of examples.&lt;/p&gt;

&lt;p&gt;Suddenly parsing became a machine learning problem.&lt;/p&gt;

&lt;p&gt;This dramatically improved accuracy.&lt;/p&gt;

&lt;p&gt;But another limitation remained.&lt;/p&gt;

&lt;p&gt;The models still relied heavily on manually designed features.&lt;/p&gt;
&lt;h1&gt;
  
  
  Neural Networks Changed the Game
&lt;/h1&gt;

&lt;p&gt;Around 2013-2016, neural networks began replacing handcrafted features across NLP.&lt;/p&gt;

&lt;p&gt;Instead of engineers inventing hundreds of linguistic features, models learned useful representations directly from text.&lt;/p&gt;

&lt;p&gt;One breakthrough came from recurrent neural networks (RNNs) and later LSTMs.&lt;/p&gt;

&lt;p&gt;These models could process words sequentially.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;The -&amp;gt; little -&amp;gt; girl -&amp;gt; saw -&amp;gt; ...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Each word updated an internal hidden state.&lt;/p&gt;

&lt;p&gt;This worked surprisingly well.&lt;/p&gt;

&lt;p&gt;But there was a problem.&lt;/p&gt;

&lt;p&gt;Suppose the sentence contains 40 words.&lt;/p&gt;

&lt;p&gt;The subject might appear near the beginning.&lt;/p&gt;

&lt;p&gt;The verb might appear much later.&lt;/p&gt;

&lt;p&gt;Information had to travel through dozens of recurrent steps.&lt;/p&gt;

&lt;p&gt;Even LSTMs struggled with long-range dependencies.&lt;/p&gt;

&lt;p&gt;Training also became difficult because computations were inherently sequential.&lt;/p&gt;

&lt;p&gt;GPUs like parallel work.&lt;/p&gt;

&lt;p&gt;RNNs do not.&lt;/p&gt;
&lt;h1&gt;
  
  
  The Transformer Arrived
&lt;/h1&gt;

&lt;p&gt;In 2017, researchers at Google published the landmark paper:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;"Attention Is All You Need."&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Instead of processing words one after another, the Transformer lets every word directly inspect every other word.&lt;/p&gt;

&lt;p&gt;Imagine each word asking:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Which other words matter for understanding me?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;The programmer who fixed the parser yesterday deployed it.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The word&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;deployed
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;can directly connect to&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;programmer
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;instead of waiting for information to propagate through every intermediate word.&lt;/p&gt;

&lt;p&gt;This is called &lt;strong&gt;self-attention&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The result was two enormous advantages.&lt;/p&gt;

&lt;p&gt;First, long-distance grammatical relationships became much easier to model.&lt;/p&gt;

&lt;p&gt;Second, every word could be processed simultaneously.&lt;/p&gt;

&lt;p&gt;Modern GPUs love this.&lt;/p&gt;

&lt;p&gt;Training speed increased dramatically.&lt;/p&gt;
&lt;h1&gt;
  
  
  English Constituency Parsing Became an Early Proof
&lt;/h1&gt;

&lt;p&gt;Many people associate Transformers with machine translation.&lt;/p&gt;

&lt;p&gt;Less widely remembered is how quickly they dominated constituency parsing.&lt;/p&gt;

&lt;p&gt;One particularly influential paper was:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Constituency Parsing with a Self-Attentive Encoder"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;published by Nikita Kitaev and Dan Klein in 2018.&lt;/p&gt;

&lt;p&gt;Instead of recurrent networks, they built the parser entirely around self-attention.&lt;/p&gt;

&lt;p&gt;The results were striking.&lt;/p&gt;

&lt;p&gt;On the Penn Treebank benchmark, the model achieved state-of-the-art accuracy while being conceptually simpler than many previous systems.&lt;/p&gt;

&lt;p&gt;Even more interesting was &lt;em&gt;why&lt;/em&gt; it worked.&lt;/p&gt;

&lt;p&gt;The authors found that separating &lt;strong&gt;content information&lt;/strong&gt; from &lt;strong&gt;position information&lt;/strong&gt; inside attention significantly improved parsing performance.&lt;/p&gt;

&lt;p&gt;In other words, knowing &lt;em&gt;what&lt;/em&gt; a word is and &lt;em&gt;where&lt;/em&gt; it occurs are distinct signals, and the model benefits from treating them differently.&lt;/p&gt;

&lt;p&gt;This observation influenced later Transformer research far beyond parsing.&lt;/p&gt;
&lt;h1&gt;
  
  
  Why Self-Attention Fits Parsing So Well
&lt;/h1&gt;

&lt;p&gt;Parsing is fundamentally about relationships.&lt;/p&gt;

&lt;p&gt;Take the sentence:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The book on the table near the window belongs to Alice.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The subject&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;book
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;must eventually connect with&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;belongs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;even though several phrases intervene.&lt;/p&gt;

&lt;p&gt;A recurrent model passes information through many intermediate states.&lt;/p&gt;

&lt;p&gt;A Transformer simply creates a direct interaction.&lt;/p&gt;

&lt;p&gt;Mathematically, each word produces three vectors:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Query&lt;/li&gt;
&lt;li&gt;Key&lt;/li&gt;
&lt;li&gt;Value&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The attention score between two words is proportional to&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Query · Key
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The dot product measures compatibility.&lt;/p&gt;

&lt;p&gt;If the vectors point in similar directions, the score becomes large.&lt;/p&gt;

&lt;p&gt;A softmax converts these scores into probabilities.&lt;/p&gt;

&lt;p&gt;Finally, each word becomes a weighted average of the Value vectors from every other word.&lt;/p&gt;

&lt;p&gt;Intuitively:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Queries ask questions.&lt;/li&gt;
&lt;li&gt;Keys advertise available information.&lt;/li&gt;
&lt;li&gt;Values carry the information itself.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Every word gets to decide whom it should listen to.&lt;/p&gt;

&lt;p&gt;This is exactly the kind of computation grammatical analysis requires.&lt;/p&gt;
&lt;h1&gt;
  
  
  The Economics of Parallelism
&lt;/h1&gt;

&lt;p&gt;Why was this architecture such a big deal operationally?&lt;/p&gt;

&lt;p&gt;Suppose we have a sentence of 100 words.&lt;/p&gt;

&lt;p&gt;An RNN performs roughly 100 sequential computation steps.&lt;/p&gt;

&lt;p&gt;Even if each step is small, the next cannot begin until the previous finishes.&lt;/p&gt;

&lt;p&gt;A Transformer computes attention between all pairs of words.&lt;/p&gt;

&lt;p&gt;That is roughly:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;100 × 100 = 10,000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;pairwise interactions.&lt;/p&gt;

&lt;p&gt;That sounds much more expensive.&lt;/p&gt;

&lt;p&gt;And in raw arithmetic, it is.&lt;/p&gt;

&lt;p&gt;Self-attention has quadratic complexity with sentence length.&lt;/p&gt;

&lt;p&gt;So why did it win?&lt;/p&gt;

&lt;p&gt;Because GPUs can compute thousands of matrix operations simultaneously.&lt;/p&gt;

&lt;p&gt;Instead of performing 100 serialized operations,&lt;/p&gt;

&lt;p&gt;they perform one enormous parallel matrix multiplication.&lt;/p&gt;

&lt;p&gt;Hardware utilization skyrockets.&lt;/p&gt;

&lt;p&gt;The result is a classic engineering tradeoff:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;More arithmetic&lt;/li&gt;
&lt;li&gt;Far less waiting&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Modern accelerators strongly favor the second option.&lt;/p&gt;

&lt;p&gt;This shift—from minimizing floating-point operations to maximizing hardware throughput—is one reason Transformers displaced RNNs so quickly.&lt;/p&gt;
&lt;h1&gt;
  
  
  Looking Back
&lt;/h1&gt;

&lt;p&gt;English constituency parsing might sound like a niche benchmark today.&lt;/p&gt;

&lt;p&gt;In reality, it helped demonstrate something profound.&lt;/p&gt;

&lt;p&gt;Language understanding isn't primarily about processing words one after another.&lt;/p&gt;

&lt;p&gt;It's about modeling relationships between them.&lt;/p&gt;

&lt;p&gt;The Transformer architecture embraced that idea directly.&lt;/p&gt;

&lt;p&gt;The same self-attention mechanism that learned grammatical trees now powers systems capable of writing software, translating dozens of languages, summarizing books, answering scientific questions, and helping developers every day.&lt;/p&gt;

&lt;p&gt;Sometimes the technologies that change the world first prove themselves on problems most people have never heard of.&lt;/p&gt;

&lt;p&gt;English constituency parsing was one of those problems.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What surprised you most about the history of Transformers?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Was it that they first proved themselves on tasks like machine translation and parsing, or did you expect conversational AI to be the original breakthrough? I'd love to hear your thoughts.&lt;/p&gt;



&lt;p&gt;*AI agents write code fast. They also silently remove logic, change behavior, and introduce bugs -- without telling you. You often find out in production.&lt;/p&gt;

&lt;p&gt;git-lrc fixes this. It hooks into git commit and reviews every diff before it lands. 60-second setup. Completely free.*&lt;/p&gt;

&lt;p&gt;Any feedback or contributors are welcome! It's online, source-available, and ready for anyone to use.&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/HexmosTech" rel="noopener noreferrer"&gt;
        HexmosTech
      &lt;/a&gt; / &lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;
        git-lrc
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Free, Micro AI Code Reviews That Run on Git Commit
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div&gt;
&lt;p&gt;| &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.da.md" rel="noopener noreferrer"&gt;🇩🇰 Dansk&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.es.md" rel="noopener noreferrer"&gt;🇪🇸 Español&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.fa.md" rel="noopener noreferrer"&gt;🇮🇷 Farsi&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.fi.md" rel="noopener noreferrer"&gt;🇫🇮 Suomi&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.ja.md" rel="noopener noreferrer"&gt;🇯🇵 日本語&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.nn.md" rel="noopener noreferrer"&gt;🇳🇴 Norsk&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.pt.md" rel="noopener noreferrer"&gt;🇵🇹 Português&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.ru.md" rel="noopener noreferrer"&gt;🇷🇺 Русский&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.sq.md" rel="noopener noreferrer"&gt;🇦🇱 Shqip&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.zh.md" rel="noopener noreferrer"&gt;🇨🇳 中文&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.hi.md" rel="noopener noreferrer"&gt;🇮🇳 हिन्दी&lt;/a&gt; |&lt;/p&gt;
&lt;br&gt;
&lt;br&gt;
&lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/948c8f2d5cf41b48985cd364d48c3a2dc9bfbfd42eab3e0a9a1b3e61f5f17ce3/68747470733a2f2f6865786d6f732e636f6d2f66726565646576746f6f6c732f7075626c69632f6c725f6c6f676f2e737667"&gt;&lt;img width="60" alt="git-lrc logo" src="https://camo.githubusercontent.com/948c8f2d5cf41b48985cd364d48c3a2dc9bfbfd42eab3e0a9a1b3e61f5f17ce3/68747470733a2f2f6865786d6f732e636f6d2f66726565646576746f6f6c732f7075626c69632f6c725f6c6f676f2e737667"&gt;&lt;/a&gt;
&lt;br&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;git-lrc&lt;/h1&gt;
&lt;/div&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Free, Micro AI Code Reviews That Run on Commit&lt;/h2&gt;
&lt;/div&gt;



&lt;p&gt;&lt;a href="https://www.producthunt.com/products/git-lrc?embed=true&amp;amp;utm_source=badge-top-post-badge&amp;amp;utm_medium=badge&amp;amp;utm_campaign=badge-git-lrc" rel="nofollow noopener noreferrer"&gt;&lt;img alt="git-lrc - Free, micro AI code reviews that run on commit | Product Hunt" width="200" src="https://camo.githubusercontent.com/87bf2d4283c1e0aa99e254bd17fefb1c67c0c0d39300043a243a4aa633b6cecc/68747470733a2f2f6170692e70726f6475637468756e742e636f6d2f776964676574732f656d6265642d696d6167652f76312f746f702d706f73742d62616467652e7376673f706f73745f69643d31303739323632267468656d653d6c6967687426706572696f643d6461696c7926743d31373731373439313730383638"&gt;&lt;/a&gt;
&amp;nbsp;&lt;/p&gt;
&lt;br&gt;
&lt;a href="https://discord.gg/sGdnKwB3qq" rel="nofollow noopener noreferrer"&gt;
  &lt;img alt="Discord Community" src="https://camo.githubusercontent.com/b8f979318aaabc8dec512b9d4e6e2a12431fba3c8a3b8738e1a97a0722d4e4bf/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446973636f72642d436f6d6d756e6974792d3538363546323f6c6f676f3d646973636f7264266c6162656c436f6c6f723d7768697465"&gt;
&lt;/a&gt; &lt;a href="https://goreportcard.com/report/github.com/HexmosTech/git-lrc" rel="nofollow noopener noreferrer"&gt;&lt;img alt="Go Report Card" src="https://camo.githubusercontent.com/e74c0651c3ee9165a2ed01cb0f6842c494029960df30eb9c24cf622d3d21bf46/68747470733a2f2f676f7265706f7274636172642e636f6d2f62616467652f6769746875622e636f6d2f4865786d6f73546563682f6769742d6c7263"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/git-lrc/actions/workflows/gitleaks.yml" rel="noopener noreferrer"&gt;&lt;img alt="gitleaks.yml" title="gitleaks.yml: Secret scanning workflow" src="https://github.com/HexmosTech/git-lrc/actions/workflows/gitleaks.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/git-lrc/actions/workflows/osv-scanner.yml" rel="noopener noreferrer"&gt;&lt;img alt="osv-scanner.yml" title="osv-scanner.yml: Dependency vulnerability scan" src="https://github.com/HexmosTech/git-lrc/actions/workflows/osv-scanner.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/git-lrc/actions/workflows/govulncheck.yml" rel="noopener noreferrer"&gt;&lt;img alt="govulncheck.yml" title="govulncheck.yml: Go vulnerability check" src="https://github.com/HexmosTech/git-lrc/actions/workflows/govulncheck.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/git-lrc/actions/workflows/semgrep.yml" rel="noopener noreferrer"&gt;&lt;img alt="semgrep.yml" title="semgrep.yml: Static analysis security scan" src="https://github.com/HexmosTech/git-lrc/actions/workflows/semgrep.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/git-lrc/./gfx/dependabot-enabled.svg"&gt;&lt;img alt="dependabot-enabled" title="dependabot-enabled: Automated dependency updates are enabled" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2Fgit-lrc%2FHEAD%2F.%2Fgfx%2Fdependabot-enabled.svg"&gt;&lt;/a&gt;
&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/git-lrc/./gfx/a_few_micro_reviews.png"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2Fgit-lrc%2FHEAD%2F.%2Fgfx%2Fa_few_micro_reviews.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;GenAI today is a &lt;strong&gt;race car without brakes&lt;/strong&gt;. It accelerates fast -- you describe something, and large blocks of code appear instantly. But AI agents &lt;em&gt;silently break things&lt;/em&gt;: they remove logic, relax constraints, introduce expensive cloud calls, leak credentials, and change behavior -- without telling you. You often find out in production.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;git-lrc&lt;/code&gt; is your braking system.&lt;/strong&gt; It hooks into &lt;code&gt;git commit&lt;/code&gt; and runs an AI review on every diff &lt;em&gt;before&lt;/em&gt; it lands. 60-second setup. Completely free.&lt;/p&gt;
&lt;p&gt;In short, git-lrc helps &lt;strong&gt;Prevent Outages, Breaches, and Technical Debt Before They Happen&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;At a glance:&lt;/strong&gt; &lt;a href="https://github.com/HexmosTech/git-lrc#what-git-lrc-checks-for" rel="noopener noreferrer"&gt;10 risk categories&lt;/a&gt; · &lt;a href="https://github.com/HexmosTech/git-lrc#what-git-lrc-checks-for" rel="noopener noreferrer"&gt;100+ failure patterns tracked&lt;/a&gt; · every commit…&lt;/p&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


</description>
      <category>ai</category>
      <category>webdev</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Scaled Dot-Product Attention: The 4-Line Algorithm That Powers Modern LLMs</title>
      <dc:creator>Shrijith Venkatramana</dc:creator>
      <pubDate>Wed, 01 Jul 2026 17:49:09 +0000</pubDate>
      <link>https://dev.to/shrsv/scaled-dot-product-attention-the-4-line-algorithm-that-powers-modern-llms-c21</link>
      <guid>https://dev.to/shrsv/scaled-dot-product-attention-the-4-line-algorithm-that-powers-modern-llms-c21</guid>
      <description>&lt;p&gt;&lt;em&gt;Hello, I'm Shrijith Venkatramana. I'm building git-lrc, an AI code reviewer that runs on every commit. &lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;Star Us&lt;/a&gt; to help devs discover the project. Do give it a try and share your feedback for improving the product.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;In 2017, a small group of Google researchers removed recurrence, removed convolution, and bet everything on one deceptively simple idea: every word should decide for itself what deserves attention.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;That idea—&lt;strong&gt;Scaled Dot-Product Attention&lt;/strong&gt;—became the computational primitive behind GPT, Claude, Gemini, Llama, DeepSeek, and nearly every modern Large Language Model.&lt;/p&gt;

&lt;p&gt;The remarkable part isn't just that it works.&lt;/p&gt;

&lt;p&gt;It's that the core algorithm fits into a single equation.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Attention(Q, K, V) = softmax((Q * K^T) / sqrt(d_k)) * V&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In this article we'll build intuition first, then gradually unpack the mathematics, engineering, and economics behind the mechanism that made modern LLMs possible.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;(Include the screenshot from the "Attention Is All You Need" paper here.)&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  Before Transformers: The Memory Problem
&lt;/h1&gt;

&lt;p&gt;Imagine asking someone to finish this sentence:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"The trophy didn't fit in the suitcase because &lt;strong&gt;it&lt;/strong&gt; was too small."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;What does &lt;strong&gt;it&lt;/strong&gt; refer to?&lt;/p&gt;

&lt;p&gt;The trophy?&lt;/p&gt;

&lt;p&gt;Or the suitcase?&lt;/p&gt;

&lt;p&gt;Humans answer almost instantly because our brains naturally connect related concepts across a sentence.&lt;/p&gt;

&lt;p&gt;Earlier neural networks struggled.&lt;/p&gt;

&lt;h3&gt;
  
  
  RNNs
&lt;/h3&gt;

&lt;p&gt;Recurrent Neural Networks processed words one at a time.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;The -&amp;gt; trophy -&amp;gt; didn't -&amp;gt; fit -&amp;gt; ...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Each word updated a hidden state.&lt;/p&gt;

&lt;p&gt;The problem was that information had to travel through dozens or hundreds of sequential steps before reaching later words.&lt;/p&gt;

&lt;p&gt;By the time the network reached the end of a paragraph, early information had often faded away.&lt;/p&gt;

&lt;p&gt;LSTMs improved the situation with gating mechanisms, but they still fundamentally processed sequences sequentially.&lt;/p&gt;

&lt;p&gt;That became an enormous bottleneck.&lt;/p&gt;

&lt;p&gt;Both computationally.&lt;/p&gt;

&lt;p&gt;And conceptually.&lt;/p&gt;
&lt;h1&gt;
  
  
  The Insight: Let Every Word Look Everywhere
&lt;/h1&gt;

&lt;p&gt;One of the authors of the Transformer paper, Ashish Vaswani, later described the goal simply:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Instead of carrying memory forward step-by-step, why not allow every word to directly inspect every other word?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Suppose we have:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;The cat sat on the mat.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;When processing &lt;strong&gt;sat&lt;/strong&gt;, perhaps the model mostly cares about:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;cat&lt;/li&gt;
&lt;li&gt;on&lt;/li&gt;
&lt;li&gt;mat&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It doesn't need to care very much about &lt;strong&gt;The&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Instead of forcing information through intermediate states, attention allows direct communication.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;        sat
      /  |  \
     /   |   \
   cat   on  mat
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Every token asks:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Which other tokens are relevant to me?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That's attention.&lt;/p&gt;
&lt;h1&gt;
  
  
  Queries, Keys and Values: Think Like a Search Engine
&lt;/h1&gt;

&lt;p&gt;The names sound intimidating.&lt;/p&gt;

&lt;p&gt;They're actually borrowed from information retrieval.&lt;/p&gt;

&lt;p&gt;Imagine Google Search.&lt;/p&gt;

&lt;p&gt;When you search:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;best pizza near me
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;You issue a &lt;strong&gt;query&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Every webpage has characteristics that determine whether it matches.&lt;/p&gt;

&lt;p&gt;Those are analogous to &lt;strong&gt;keys&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The content you finally read is the &lt;strong&gt;value&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Exactly the same thing happens inside attention.&lt;/p&gt;

&lt;p&gt;Every word generates three vectors:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Query (Q)&lt;/strong&gt; - What am I looking for?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Key (K)&lt;/strong&gt; - What information do I offer?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Value (V)&lt;/strong&gt; - What information should I contribute if selected?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Suppose we have:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;The animal didn't cross the road because it was tired.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;For the token &lt;strong&gt;it&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;Its Query might strongly match:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;animal
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;instead of&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;road
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;because their semantic representations are more compatible.&lt;/p&gt;

&lt;p&gt;Attention is therefore a sophisticated matching process.&lt;/p&gt;
&lt;h1&gt;
  
  
  The Famous Equation (That Looks Scarier Than It Is)
&lt;/h1&gt;

&lt;p&gt;The Transformer paper defines attention as:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Attention(Q, K, V) = softmax((Q * K^T) / sqrt(d_k)) * V
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Let's decode it piece by piece.&lt;/p&gt;
&lt;h2&gt;
  
  
  Step 1: Compare Queries Against Every Key
&lt;/h2&gt;

&lt;p&gt;Each Query is compared with every Key using a dot product.&lt;/p&gt;

&lt;p&gt;A dot product is simply a similarity score.&lt;/p&gt;

&lt;p&gt;Large positive value:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Very relevant.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Near zero:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Mostly unrelated.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Negative:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Probably irrelevant.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Suppose our similarities are:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Word&lt;/th&gt;
&lt;th&gt;Score&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;cat&lt;/td&gt;
&lt;td&gt;12&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;dog&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;road&lt;/td&gt;
&lt;td&gt;-1&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Higher means stronger relevance.&lt;/p&gt;

&lt;p&gt;Notice that we don't compare a Query against just one Key.&lt;/p&gt;

&lt;p&gt;Every Query is compared against &lt;strong&gt;every Key&lt;/strong&gt; simultaneously.&lt;/p&gt;

&lt;p&gt;If there are 100 tokens in the sentence, each Query computes 100 similarity scores.&lt;/p&gt;
&lt;h2&gt;
  
  
  Step 2: Why Divide by sqrt(d_k)?
&lt;/h2&gt;

&lt;p&gt;This is the "Scaled" part.&lt;/p&gt;

&lt;p&gt;Without scaling, dot products become enormous.&lt;/p&gt;

&lt;p&gt;Imagine vectors of length 512.&lt;/p&gt;

&lt;p&gt;Even if each component averages only around 1, adding hundreds of multiplications quickly produces very large numbers.&lt;/p&gt;

&lt;p&gt;A useful back-of-the-envelope calculation is that the variance of a dot product grows roughly in proportion to &lt;code&gt;d_k&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;If:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;d_k = 512
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;then&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sqrt(512) is approximately 22.6
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Those values are fed into the softmax function.&lt;/p&gt;

&lt;p&gt;Softmax contains exponentials.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;exp(22) is roughly 3.5 billion
exp(10) is roughly 22 thousand
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;A small increase in the input suddenly creates a huge difference in the output.&lt;/p&gt;

&lt;p&gt;One score completely dominates.&lt;/p&gt;

&lt;p&gt;Everything else effectively becomes zero.&lt;/p&gt;

&lt;p&gt;That creates two problems:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;unstable gradients&lt;/li&gt;
&lt;li&gt;slower learning&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Dividing every score by &lt;code&gt;sqrt(d_k)&lt;/code&gt; keeps the values in a healthy numerical range.&lt;/p&gt;

&lt;p&gt;It's essentially variance normalization.&lt;/p&gt;

&lt;p&gt;A remarkably small trick with enormous practical consequences.&lt;/p&gt;
&lt;h2&gt;
  
  
  Step 3: Softmax Creates Probabilities
&lt;/h2&gt;

&lt;p&gt;Suppose the scaled scores become:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;3
2
0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Softmax converts them into something approximately like:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;0.71
0.26
0.03
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;These become attention weights.&lt;/p&gt;

&lt;p&gt;Now the model knows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;spend about 71% of attention here&lt;/li&gt;
&lt;li&gt;spend about 26% here&lt;/li&gt;
&lt;li&gt;mostly ignore the rest&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The probabilities always sum to 1.&lt;/p&gt;
&lt;h2&gt;
  
  
  Step 4: Weighted Sum of Values
&lt;/h2&gt;

&lt;p&gt;Finally those probabilities weight the Value vectors.&lt;/p&gt;

&lt;p&gt;Think of it like averaging expert opinions.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Expert A : 70%
Expert B : 25%
Expert C : 5%
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The final representation becomes:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;0.70 * A + 0.25 * B + 0.05 * C
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;That weighted average becomes the new representation for the current token.&lt;/p&gt;

&lt;p&gt;Instead of copying information from a single location, attention intelligently blends information from multiple relevant tokens.&lt;/p&gt;


&lt;h1&gt;
  
  
  Why Matrix Multiplication Changed Everything
&lt;/h1&gt;

&lt;p&gt;The equation often looks abstract because it's written with matrices.&lt;/p&gt;

&lt;p&gt;That choice was an engineering breakthrough.&lt;/p&gt;

&lt;p&gt;Instead of processing one word at a time:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;word 1
word 2
word 3
...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;the Transformer processes &lt;strong&gt;every token simultaneously&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;If a sentence contains 128 words,&lt;/p&gt;

&lt;p&gt;it computes attention for all 128 together using large matrix multiplications.&lt;/p&gt;

&lt;p&gt;Modern GPUs are extraordinarily efficient at matrix multiplication.&lt;/p&gt;

&lt;p&gt;This wasn't merely mathematically elegant.&lt;/p&gt;

&lt;p&gt;It matched the hardware.&lt;/p&gt;

&lt;p&gt;Google's TPUs were designed around massive matrix operations.&lt;/p&gt;

&lt;p&gt;NVIDIA GPUs excel at them too.&lt;/p&gt;

&lt;p&gt;The algorithm and the hardware reinforced one another.&lt;/p&gt;

&lt;p&gt;This is one reason Transformers scaled so dramatically.&lt;/p&gt;

&lt;p&gt;Sometimes the biggest breakthrough isn't inventing a new algorithm.&lt;/p&gt;

&lt;p&gt;It's inventing one that perfectly matches the hardware already available.&lt;/p&gt;
&lt;h1&gt;
  
  
  The Hidden Cost: Attention Isn't Free
&lt;/h1&gt;

&lt;p&gt;Attention is powerful.&lt;/p&gt;

&lt;p&gt;It is also expensive.&lt;/p&gt;

&lt;p&gt;Suppose a sequence contains &lt;code&gt;n&lt;/code&gt; tokens.&lt;/p&gt;

&lt;p&gt;Every token compares itself with every other token.&lt;/p&gt;

&lt;p&gt;That means roughly:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;n * n
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;or simply:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;O(n^2)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;comparisons.&lt;/p&gt;

&lt;p&gt;Double the sequence length:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1,000 tokens
      -&amp;gt;
2,000 tokens
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;and you perform about &lt;strong&gt;four times as much work&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Approximate example:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tokens&lt;/th&gt;
&lt;th&gt;Pairwise Comparisons&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1,000&lt;/td&gt;
&lt;td&gt;1 million&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;10,000&lt;/td&gt;
&lt;td&gt;100 million&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;100,000&lt;/td&gt;
&lt;td&gt;10 billion&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;This single operation dominates both memory usage and inference cost.&lt;/p&gt;

&lt;p&gt;Much of today's LLM research—including FlashAttention, sparse attention, sliding-window attention, grouped-query attention, and linear attention—is fundamentally about making this computation cheaper without sacrificing quality.&lt;/p&gt;

&lt;p&gt;In many ways, modern AI engineering has become an optimization problem built around this one equation.&lt;/p&gt;
&lt;h1&gt;
  
  
  A Historical Moment Few Papers Ever Achieve
&lt;/h1&gt;

&lt;p&gt;When Ashish Vaswani and seven colleagues published &lt;strong&gt;"Attention Is All You Need"&lt;/strong&gt; in 2017, they were solving a machine translation problem.&lt;/p&gt;

&lt;p&gt;They were &lt;strong&gt;not&lt;/strong&gt; trying to build ChatGPT.&lt;/p&gt;

&lt;p&gt;Yet within a few years:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;OpenAI built GPT on the Transformer architecture.&lt;/li&gt;
&lt;li&gt;Google introduced BERT using the same core attention mechanism.&lt;/li&gt;
&lt;li&gt;Nearly every frontier LLM adopted Scaled Dot-Product Attention as its computational primitive.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Some research papers introduce new techniques.&lt;/p&gt;

&lt;p&gt;Very few redefine an entire field.&lt;/p&gt;

&lt;p&gt;This was one of them.&lt;/p&gt;

&lt;p&gt;Today, when billions of people interact with ChatGPT, Claude, Gemini, or Llama, they're ultimately benefiting from an idea that occupies only a few lines in a research paper.&lt;/p&gt;
&lt;h1&gt;
  
  
  Final Thoughts
&lt;/h1&gt;

&lt;p&gt;The beauty of Scaled Dot-Product Attention lies in its simplicity.&lt;/p&gt;

&lt;p&gt;Every token asks a question.&lt;/p&gt;

&lt;p&gt;Every other token advertises what it knows.&lt;/p&gt;

&lt;p&gt;Similarity determines relevance.&lt;/p&gt;

&lt;p&gt;Softmax decides how much to trust each source.&lt;/p&gt;

&lt;p&gt;The answers are blended into a richer representation.&lt;/p&gt;

&lt;p&gt;From those four operations emerged language models capable of writing code, translating languages, solving mathematical problems, generating images, and powering AI assistants used by hundreds of millions of people.&lt;/p&gt;

&lt;p&gt;Sometimes revolutions begin not with thousands of lines of code, but with a single elegant equation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What surprised you most about Scaled Dot-Product Attention?&lt;/strong&gt; Was it the simplicity of the mathematics, the engineering insight of matching GPUs with matrix operations, or the fact that dividing by &lt;code&gt;sqrt(d_k)&lt;/code&gt; turned out to be one of the key ingredients that made today's LLMs train reliably at scale?&lt;/p&gt;



&lt;p&gt;*AI agents write code fast. They also silently remove logic, change behavior, and introduce bugs -- without telling you. You often find out in production.&lt;/p&gt;

&lt;p&gt;git-lrc fixes this. It hooks into git commit and reviews every diff before it lands. 60-second setup. Completely free.*&lt;/p&gt;

&lt;p&gt;Any feedback or contributors are welcome! It's online, source-available, and ready for anyone to use.&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/HexmosTech" rel="noopener noreferrer"&gt;
        HexmosTech
      &lt;/a&gt; / &lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;
        git-lrc
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Free, Micro AI Code Reviews That Run on Git Commit
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div&gt;
&lt;p&gt;| &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.da.md" rel="noopener noreferrer"&gt;🇩🇰 Dansk&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.es.md" rel="noopener noreferrer"&gt;🇪🇸 Español&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.fa.md" rel="noopener noreferrer"&gt;🇮🇷 Farsi&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.fi.md" rel="noopener noreferrer"&gt;🇫🇮 Suomi&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.ja.md" rel="noopener noreferrer"&gt;🇯🇵 日本語&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.nn.md" rel="noopener noreferrer"&gt;🇳🇴 Norsk&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.pt.md" rel="noopener noreferrer"&gt;🇵🇹 Português&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.ru.md" rel="noopener noreferrer"&gt;🇷🇺 Русский&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.sq.md" rel="noopener noreferrer"&gt;🇦🇱 Shqip&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.zh.md" rel="noopener noreferrer"&gt;🇨🇳 中文&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.hi.md" rel="noopener noreferrer"&gt;🇮🇳 हिन्दी&lt;/a&gt; |&lt;/p&gt;
&lt;br&gt;
&lt;br&gt;
&lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/948c8f2d5cf41b48985cd364d48c3a2dc9bfbfd42eab3e0a9a1b3e61f5f17ce3/68747470733a2f2f6865786d6f732e636f6d2f66726565646576746f6f6c732f7075626c69632f6c725f6c6f676f2e737667"&gt;&lt;img width="60" alt="git-lrc logo" src="https://camo.githubusercontent.com/948c8f2d5cf41b48985cd364d48c3a2dc9bfbfd42eab3e0a9a1b3e61f5f17ce3/68747470733a2f2f6865786d6f732e636f6d2f66726565646576746f6f6c732f7075626c69632f6c725f6c6f676f2e737667"&gt;&lt;/a&gt;
&lt;br&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;git-lrc&lt;/h1&gt;
&lt;/div&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Free, Micro AI Code Reviews That Run on Commit&lt;/h2&gt;
&lt;/div&gt;



&lt;p&gt;&lt;a href="https://www.producthunt.com/products/git-lrc?embed=true&amp;amp;utm_source=badge-top-post-badge&amp;amp;utm_medium=badge&amp;amp;utm_campaign=badge-git-lrc" rel="nofollow noopener noreferrer"&gt;&lt;img alt="git-lrc - Free, micro AI code reviews that run on commit | Product Hunt" width="200" src="https://camo.githubusercontent.com/87bf2d4283c1e0aa99e254bd17fefb1c67c0c0d39300043a243a4aa633b6cecc/68747470733a2f2f6170692e70726f6475637468756e742e636f6d2f776964676574732f656d6265642d696d6167652f76312f746f702d706f73742d62616467652e7376673f706f73745f69643d31303739323632267468656d653d6c6967687426706572696f643d6461696c7926743d31373731373439313730383638"&gt;&lt;/a&gt;
&amp;nbsp;&lt;/p&gt;
&lt;br&gt;
&lt;a href="https://discord.gg/sGdnKwB3qq" rel="nofollow noopener noreferrer"&gt;
  &lt;img alt="Discord Community" src="https://camo.githubusercontent.com/b8f979318aaabc8dec512b9d4e6e2a12431fba3c8a3b8738e1a97a0722d4e4bf/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446973636f72642d436f6d6d756e6974792d3538363546323f6c6f676f3d646973636f7264266c6162656c436f6c6f723d7768697465"&gt;
&lt;/a&gt; &lt;a href="https://goreportcard.com/report/github.com/HexmosTech/git-lrc" rel="nofollow noopener noreferrer"&gt;&lt;img alt="Go Report Card" src="https://camo.githubusercontent.com/e74c0651c3ee9165a2ed01cb0f6842c494029960df30eb9c24cf622d3d21bf46/68747470733a2f2f676f7265706f7274636172642e636f6d2f62616467652f6769746875622e636f6d2f4865786d6f73546563682f6769742d6c7263"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/git-lrc/actions/workflows/gitleaks.yml" rel="noopener noreferrer"&gt;&lt;img alt="gitleaks.yml" title="gitleaks.yml: Secret scanning workflow" src="https://github.com/HexmosTech/git-lrc/actions/workflows/gitleaks.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/git-lrc/actions/workflows/osv-scanner.yml" rel="noopener noreferrer"&gt;&lt;img alt="osv-scanner.yml" title="osv-scanner.yml: Dependency vulnerability scan" src="https://github.com/HexmosTech/git-lrc/actions/workflows/osv-scanner.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/git-lrc/actions/workflows/govulncheck.yml" rel="noopener noreferrer"&gt;&lt;img alt="govulncheck.yml" title="govulncheck.yml: Go vulnerability check" src="https://github.com/HexmosTech/git-lrc/actions/workflows/govulncheck.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/git-lrc/actions/workflows/semgrep.yml" rel="noopener noreferrer"&gt;&lt;img alt="semgrep.yml" title="semgrep.yml: Static analysis security scan" src="https://github.com/HexmosTech/git-lrc/actions/workflows/semgrep.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/git-lrc/./gfx/dependabot-enabled.svg"&gt;&lt;img alt="dependabot-enabled" title="dependabot-enabled: Automated dependency updates are enabled" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2Fgit-lrc%2FHEAD%2F.%2Fgfx%2Fdependabot-enabled.svg"&gt;&lt;/a&gt;
&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/git-lrc/./gfx/a_few_micro_reviews.png"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2Fgit-lrc%2FHEAD%2F.%2Fgfx%2Fa_few_micro_reviews.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;GenAI today is a &lt;strong&gt;race car without brakes&lt;/strong&gt;. It accelerates fast -- you describe something, and large blocks of code appear instantly. But AI agents &lt;em&gt;silently break things&lt;/em&gt;: they remove logic, relax constraints, introduce expensive cloud calls, leak credentials, and change behavior -- without telling you. You often find out in production.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;git-lrc&lt;/code&gt; is your braking system.&lt;/strong&gt; It hooks into &lt;code&gt;git commit&lt;/code&gt; and runs an AI review on every diff &lt;em&gt;before&lt;/em&gt; it lands. 60-second setup. Completely free.&lt;/p&gt;
&lt;p&gt;In short, git-lrc helps &lt;strong&gt;Prevent Outages, Breaches, and Technical Debt Before They Happen&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;At a glance:&lt;/strong&gt; &lt;a href="https://github.com/HexmosTech/git-lrc#what-git-lrc-checks-for" rel="noopener noreferrer"&gt;10 risk categories&lt;/a&gt; · &lt;a href="https://github.com/HexmosTech/git-lrc#what-git-lrc-checks-for" rel="noopener noreferrer"&gt;100+ failure patterns tracked&lt;/a&gt; · every commit…&lt;/p&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


</description>
      <category>ai</category>
      <category>webdev</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>What Actually Happens When You Train an LLM? Following the First 12 Hours of the Original Transformer</title>
      <dc:creator>Shrijith Venkatramana</dc:creator>
      <pubDate>Tue, 30 Jun 2026 18:03:36 +0000</pubDate>
      <link>https://dev.to/shrsv/what-actually-happens-when-you-train-an-llm-following-the-first-12-hours-of-the-original-5hd6</link>
      <guid>https://dev.to/shrsv/what-actually-happens-when-you-train-an-llm-following-the-first-12-hours-of-the-original-5hd6</guid>
      <description>&lt;p&gt;&lt;em&gt;Hello, I'm Shrijith Venkatramana. I'm building git-lrc, an AI code reviewer that runs on every commit. &lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;Star Us&lt;/a&gt; to help devs discover the project. Do give it a try and share your feedback for improving the product.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;In 2017, eight NVIDIA P100 GPUs sat in a Google data center for about twelve hours.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1eqvex6nz84si48wsp12.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1eqvex6nz84si48wsp12.png" alt="p100 gpus" width="301" height="168"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;During those twelve hours, they repeatedly did something almost embarrassingly simple.&lt;/p&gt;

&lt;p&gt;They picked up a batch of sentences.&lt;/p&gt;

&lt;p&gt;Made predictions.&lt;/p&gt;

&lt;p&gt;Measured how wrong those predictions were.&lt;/p&gt;

&lt;p&gt;Adjusted a few million numbers.&lt;/p&gt;

&lt;p&gt;Then did it again.&lt;/p&gt;

&lt;p&gt;Exactly &lt;strong&gt;100,000 times&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Those twelve hours produced the base Transformer model described in &lt;em&gt;Attention Is All You Need&lt;/em&gt;. The larger version trained for &lt;strong&gt;300,000 optimization steps&lt;/strong&gt;, taking roughly &lt;strong&gt;3.5 days&lt;/strong&gt; on the same hardware.&lt;/p&gt;

&lt;p&gt;Today, frontier LLMs train on tens of thousands of GPUs for weeks, but if you inspected the training logs, the core loop would still look remarkably familiar.&lt;/p&gt;

&lt;p&gt;This article follows that loop.&lt;/p&gt;

&lt;p&gt;We'll watch one training run unfold—from raw text on disk to a model that can translate languages—and along the way learn a bit about every intimidating term that deal with training a transformer model.&lt;/p&gt;

&lt;h1&gt;
  
  
  8:00 AM — Nothing Has Been Learned Yet
&lt;/h1&gt;

&lt;p&gt;Imagine switching on the machine.&lt;/p&gt;

&lt;p&gt;The Transformer knows absolutely no language. It doesn't know English, or German. And it doesn't know grammar. It doesn't even have conception of what a "word" is.&lt;/p&gt;

&lt;p&gt;Internally it contains millions of parameters—ordinary floating-point numbers initialized almost randomly.&lt;/p&gt;

&lt;p&gt;The training data, however, already contains knowledge.&lt;/p&gt;

&lt;p&gt;For the English-German task, the authors used the &lt;strong&gt;WMT 2014&lt;/strong&gt; dataset containing roughly &lt;strong&gt;4.5 million sentence pairs&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;A tiny sample might look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;English:
The meeting begins tomorrow.

German:
Das Treffen beginnt morgen.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Or&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;English:
The cat sat on the mat.

German:
Die Katze saß auf der Matte.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Notice what's missing.&lt;/p&gt;

&lt;p&gt;Nobody wrote rules like&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Adjectives come before nouns."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;or&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"German verbs often appear at the end."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The only supervision is example after example after example.&lt;/p&gt;

&lt;p&gt;The model's job is to discover those rules itself.&lt;/p&gt;
&lt;h1&gt;
  
  
  8:00:01 — The Computer Doesn't See Words
&lt;/h1&gt;

&lt;p&gt;Before training starts, the text is transformed into something GPUs understand.&lt;/p&gt;

&lt;p&gt;Integers.&lt;/p&gt;

&lt;p&gt;The paper uses &lt;strong&gt;Byte Pair Encoding (BPE)&lt;/strong&gt;, introduced a year earlier by Rico Sennrich and colleagues.&lt;/p&gt;

&lt;p&gt;Instead of storing every possible English word, BPE builds a vocabulary of common subword pieces.&lt;/p&gt;

&lt;p&gt;For example,&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;unbelievable
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;might become&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;un
believ
able
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Those pieces become IDs.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;un      → 517
believ  → 10328
able    → 294
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Why go through this trouble?&lt;/p&gt;

&lt;p&gt;Imagine giving every English word its own entry.&lt;/p&gt;

&lt;p&gt;You'd need hundreds of thousands of entries, and every new word—"ChatGPT", "Kubernetes", "DeepSeek"—would be unknown.&lt;/p&gt;

&lt;p&gt;Subwords solve that elegantly.&lt;/p&gt;

&lt;p&gt;Once the model understands "micro", "service" and "architecture", it already has much of what it needs to interpret "microservice architecture", even if it has never encountered the exact phrase before.&lt;/p&gt;

&lt;p&gt;Modern tokenizers have evolved, but this basic idea remains.&lt;/p&gt;
&lt;h1&gt;
  
  
  8:00:02 — The First Batch Arrives
&lt;/h1&gt;

&lt;p&gt;One beginner misconception is that the GPU trains on one sentence at a time.&lt;/p&gt;

&lt;p&gt;That would waste almost all of its computational power.&lt;/p&gt;

&lt;p&gt;GPUs are throughput machines.&lt;/p&gt;

&lt;p&gt;They become efficient only when thousands of arithmetic units work simultaneously.&lt;/p&gt;

&lt;p&gt;Instead, the Transformer paper groups examples into batches containing approximately&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;25,000 source-language tokens&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;25,000 target-language tokens&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;or about &lt;strong&gt;50,000 tokens&lt;/strong&gt; in total.&lt;/p&gt;

&lt;p&gt;Think of a factory.&lt;/p&gt;

&lt;p&gt;Running one car down an assembly line would be absurd.&lt;/p&gt;

&lt;p&gt;Factories move hundreds of products simultaneously because keeping machines idle is expensive.&lt;/p&gt;

&lt;p&gt;GPU training works the same way.&lt;/p&gt;

&lt;p&gt;Batching is not a machine-learning trick.&lt;/p&gt;

&lt;p&gt;It's operations optimization.&lt;/p&gt;
&lt;h1&gt;
  
  
  8:00:02.4 — The Model Makes Its First Mistake
&lt;/h1&gt;

&lt;p&gt;The first forward pass takes roughly &lt;strong&gt;0.4 seconds&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The model receives&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;The cat sat on the mat.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;and produces...&lt;/p&gt;

&lt;p&gt;garbage.&lt;/p&gt;

&lt;p&gt;Maybe something equivalent to&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;House.

Tomorrow.

Blue.

Water.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;That isn't failure.&lt;/p&gt;

&lt;p&gt;It's exactly what we expect.&lt;/p&gt;

&lt;p&gt;Every parameter was random only moments ago.&lt;/p&gt;

&lt;p&gt;Now comes the crucial question.&lt;/p&gt;

&lt;p&gt;How wrong was the prediction?&lt;/p&gt;

&lt;p&gt;The answer is summarized by a single number called the &lt;strong&gt;loss&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Everything that follows exists solely to reduce that number.&lt;/p&gt;


&lt;h1&gt;
  
  
  8:00:02.5 — Which of the 65 Million Parameters Was Responsible?
&lt;/h1&gt;

&lt;p&gt;Suppose I asked you to tune an old radio using sixty-five million knobs.&lt;/p&gt;

&lt;p&gt;After hearing static, which knob would you turn?&lt;/p&gt;

&lt;p&gt;You wouldn't know.&lt;/p&gt;

&lt;p&gt;Yet that's essentially the problem.&lt;/p&gt;

&lt;p&gt;The Transformer base model contains about &lt;strong&gt;65 million trainable parameters&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The larger model contains around &lt;strong&gt;213 million&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Backpropagation solves this enormous credit-assignment problem.&lt;/p&gt;

&lt;p&gt;Rather than saying&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Parameter #18,423 is wrong,"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;it computes&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"If this parameter increased slightly, would the loss increase or decrease?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;for every single parameter.&lt;/p&gt;

&lt;p&gt;The result is a gigantic map of tiny suggested adjustments called &lt;strong&gt;gradients&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Now another algorithm enters the story.&lt;/p&gt;
&lt;h1&gt;
  
  
  Adam: The Engineer Who Turns the Knobs
&lt;/h1&gt;

&lt;p&gt;The paper uses the &lt;strong&gt;Adam optimizer&lt;/strong&gt; with&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;β₁ = 0.9&lt;/li&gt;
&lt;li&gt;β₂ = 0.98&lt;/li&gt;
&lt;li&gt;ε = 10⁻⁹&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These aren't arbitrary constants copied from Stack Overflow.&lt;/p&gt;

&lt;p&gt;Adam remembers recent gradients, rather like giving the optimization process momentum.&lt;/p&gt;

&lt;p&gt;Imagine descending a foggy mountain.&lt;/p&gt;

&lt;p&gt;If every step depended only on the slope beneath your feet, you'd zigzag constantly.&lt;/p&gt;

&lt;p&gt;Adam remembers where you've been heading over the past several steps, smoothing the journey downhill.&lt;/p&gt;

&lt;p&gt;Interestingly, the paper chose &lt;strong&gt;β₂ = 0.98&lt;/strong&gt; rather than the more familiar &lt;strong&gt;0.999&lt;/strong&gt; found in many deep-learning libraries today. That makes Adam respond more quickly to changing gradients—a small but deliberate engineering decision.&lt;/p&gt;

&lt;p&gt;Millions of parameters are nudged.&lt;/p&gt;

&lt;p&gt;Tiny, incremental changes.&lt;/p&gt;

&lt;p&gt;Often by less than one thousandth.&lt;/p&gt;

&lt;p&gt;Then the next batch arrives.&lt;/p&gt;
&lt;h1&gt;
  
  
  9:00 AM — The Strange Equation Everyone Hates
&lt;/h1&gt;

&lt;p&gt;One of the paper's most intimidating equations defines the learning rate.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6ha2c93b31vuc9y592yu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6ha2c93b31vuc9y592yu.png" alt="learning rate eq" width="559" height="55"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It looks frightening.&lt;/p&gt;

&lt;p&gt;Its purpose is not.&lt;/p&gt;

&lt;p&gt;Early in training, every parameter is effectively random.&lt;/p&gt;

&lt;p&gt;Large updates can make optimization unstable.&lt;/p&gt;

&lt;p&gt;So the authors &lt;strong&gt;warm up&lt;/strong&gt; the learning rate over the first &lt;strong&gt;4,000 optimization steps&lt;/strong&gt;, gradually increasing it rather than starting at full speed.&lt;/p&gt;

&lt;p&gt;After warmup, the learning rate begins shrinking.&lt;/p&gt;

&lt;p&gt;Imagine sanding a table.&lt;/p&gt;

&lt;p&gt;At first you remove material aggressively.&lt;/p&gt;

&lt;p&gt;Near the end you make tiny finishing passes.&lt;/p&gt;

&lt;p&gt;Training behaves similarly.&lt;/p&gt;

&lt;p&gt;The equation also contains the term (d_{\text{model}}^{-1/2}).&lt;/p&gt;

&lt;p&gt;This compensates for model size.&lt;/p&gt;

&lt;p&gt;As hidden representations become larger, gradients naturally change scale. Dividing by the square root of the model dimension helps keep parameter updates numerically well behaved as architectures grow.&lt;/p&gt;

&lt;p&gt;The equation is just common sensical engineering.&lt;/p&gt;
&lt;h1&gt;
  
  
  Noon — Preventing the Model From Memorizing
&lt;/h1&gt;

&lt;p&gt;If optimization only chased lower loss, the network could simply memorize the training data.&lt;/p&gt;

&lt;p&gt;The paper deliberately makes learning harder.&lt;/p&gt;

&lt;p&gt;First comes &lt;strong&gt;dropout&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Ten percent of activations are randomly disabled during training.&lt;/p&gt;

&lt;p&gt;Every batch therefore sees a slightly different network.&lt;/p&gt;

&lt;p&gt;No neuron can become indispensable.&lt;/p&gt;

&lt;p&gt;Second comes &lt;strong&gt;label smoothing&lt;/strong&gt; with a value of &lt;strong&gt;0.1&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Instead of pretending the correct next token has probability exactly one, the target distribution is softened slightly.&lt;/p&gt;

&lt;p&gt;That sounds counterintuitive.&lt;/p&gt;

&lt;p&gt;Yet translation quality improved.&lt;/p&gt;

&lt;p&gt;Real language is messy.&lt;/p&gt;

&lt;p&gt;There are often several acceptable translations.&lt;/p&gt;

&lt;p&gt;Slight uncertainty produces a less overconfident model.&lt;/p&gt;
&lt;h1&gt;
  
  
  8:00 PM — Twelve Hours Later
&lt;/h1&gt;

&lt;p&gt;After roughly &lt;strong&gt;100,000 optimization steps&lt;/strong&gt;, the base model has finished training.&lt;/p&gt;

&lt;p&gt;The larger model continues until &lt;strong&gt;300,000 steps&lt;/strong&gt;, taking approximately &lt;strong&gt;3.5 days&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Each step processed about &lt;strong&gt;50,000 tokens&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Back-of-the-envelope, that's around &lt;strong&gt;five billion token presentations&lt;/strong&gt; during the base run—not unique tokens, but training exposures. The same examples are revisited across multiple passes through the dataset.&lt;/p&gt;

&lt;p&gt;The paper doesn't stop by reporting translation accuracy.&lt;/p&gt;

&lt;p&gt;It also reports &lt;strong&gt;FLOPs&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;That's significant.&lt;/p&gt;

&lt;p&gt;Even in 2017, the authors understood that machine learning was becoming an engineering discipline constrained not only by accuracy, but also by computation.&lt;/p&gt;

&lt;p&gt;A model that is 1% better but requires ten times more compute is often a poor engineering trade-off.&lt;/p&gt;

&lt;p&gt;That thinking has only become more relevant.&lt;/p&gt;

&lt;p&gt;Today, training an LLM is as much about distributed systems, networking, storage bandwidth, GPU utilization, checkpointing and failure recovery as it is about neural networks.&lt;/p&gt;
&lt;h2&gt;
  
  
  Closing Thoughts
&lt;/h2&gt;

&lt;p&gt;People often remember &lt;em&gt;Attention Is All You Need&lt;/em&gt; for introducing self-attention.&lt;/p&gt;

&lt;p&gt;Equally important was something less glamorous: it demonstrated a training recipe that scaled.&lt;/p&gt;

&lt;p&gt;Large batches kept GPUs busy.&lt;/p&gt;

&lt;p&gt;Carefully designed learning-rate schedules stabilized optimization.&lt;/p&gt;

&lt;p&gt;Adam made billions of tiny updates practical.&lt;/p&gt;

&lt;p&gt;Regularization techniques prevented memorization.&lt;/p&gt;

&lt;p&gt;None of these ideas are individually magical. Together, repeated hundreds of thousands of times, they turned random numbers into a model that could translate language.&lt;/p&gt;

&lt;p&gt;Nearly a decade later, today's frontier LLMs still follow the same rhythm.&lt;/p&gt;

&lt;p&gt;The numbers have changed by orders of magnitude.&lt;/p&gt;

&lt;p&gt;The loop has not.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Load a batch. Predict. Measure the loss. Update the weights. Repeat.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That's the heartbeat of every modern language model.&lt;/p&gt;



&lt;p&gt;*AI agents write code fast. They also silently remove logic, change behavior, and introduce bugs -- without telling you. You often find out in production.&lt;/p&gt;

&lt;p&gt;git-lrc fixes this. It hooks into git commit and reviews every diff before it lands. 60-second setup. Completely free.*&lt;/p&gt;

&lt;p&gt;Any feedback or contributors are welcome! It's online, source-available, and ready for anyone to use.&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/HexmosTech" rel="noopener noreferrer"&gt;
        HexmosTech
      &lt;/a&gt; / &lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;
        git-lrc
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Free, Micro AI Code Reviews That Run on Git Commit
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div&gt;
&lt;p&gt;| &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.da.md" rel="noopener noreferrer"&gt;🇩🇰 Dansk&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.es.md" rel="noopener noreferrer"&gt;🇪🇸 Español&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.fa.md" rel="noopener noreferrer"&gt;🇮🇷 Farsi&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.fi.md" rel="noopener noreferrer"&gt;🇫🇮 Suomi&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.ja.md" rel="noopener noreferrer"&gt;🇯🇵 日本語&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.nn.md" rel="noopener noreferrer"&gt;🇳🇴 Norsk&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.pt.md" rel="noopener noreferrer"&gt;🇵🇹 Português&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.ru.md" rel="noopener noreferrer"&gt;🇷🇺 Русский&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.sq.md" rel="noopener noreferrer"&gt;🇦🇱 Shqip&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.zh.md" rel="noopener noreferrer"&gt;🇨🇳 中文&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.hi.md" rel="noopener noreferrer"&gt;🇮🇳 हिन्दी&lt;/a&gt; |&lt;/p&gt;
&lt;br&gt;
&lt;br&gt;
&lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/948c8f2d5cf41b48985cd364d48c3a2dc9bfbfd42eab3e0a9a1b3e61f5f17ce3/68747470733a2f2f6865786d6f732e636f6d2f66726565646576746f6f6c732f7075626c69632f6c725f6c6f676f2e737667"&gt;&lt;img width="60" alt="git-lrc logo" src="https://camo.githubusercontent.com/948c8f2d5cf41b48985cd364d48c3a2dc9bfbfd42eab3e0a9a1b3e61f5f17ce3/68747470733a2f2f6865786d6f732e636f6d2f66726565646576746f6f6c732f7075626c69632f6c725f6c6f676f2e737667"&gt;&lt;/a&gt;
&lt;br&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;git-lrc&lt;/h1&gt;
&lt;/div&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Free, Micro AI Code Reviews That Run on Commit&lt;/h2&gt;
&lt;/div&gt;



&lt;p&gt;&lt;a href="https://www.producthunt.com/products/git-lrc?embed=true&amp;amp;utm_source=badge-top-post-badge&amp;amp;utm_medium=badge&amp;amp;utm_campaign=badge-git-lrc" rel="nofollow noopener noreferrer"&gt;&lt;img alt="git-lrc - Free, micro AI code reviews that run on commit | Product Hunt" width="200" src="https://camo.githubusercontent.com/87bf2d4283c1e0aa99e254bd17fefb1c67c0c0d39300043a243a4aa633b6cecc/68747470733a2f2f6170692e70726f6475637468756e742e636f6d2f776964676574732f656d6265642d696d6167652f76312f746f702d706f73742d62616467652e7376673f706f73745f69643d31303739323632267468656d653d6c6967687426706572696f643d6461696c7926743d31373731373439313730383638"&gt;&lt;/a&gt;
&amp;nbsp;&lt;/p&gt;
&lt;br&gt;
&lt;a href="https://discord.gg/sGdnKwB3qq" rel="nofollow noopener noreferrer"&gt;
  &lt;img alt="Discord Community" src="https://camo.githubusercontent.com/b8f979318aaabc8dec512b9d4e6e2a12431fba3c8a3b8738e1a97a0722d4e4bf/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446973636f72642d436f6d6d756e6974792d3538363546323f6c6f676f3d646973636f7264266c6162656c436f6c6f723d7768697465"&gt;
&lt;/a&gt; &lt;a href="https://goreportcard.com/report/github.com/HexmosTech/git-lrc" rel="nofollow noopener noreferrer"&gt;&lt;img alt="Go Report Card" src="https://camo.githubusercontent.com/e74c0651c3ee9165a2ed01cb0f6842c494029960df30eb9c24cf622d3d21bf46/68747470733a2f2f676f7265706f7274636172642e636f6d2f62616467652f6769746875622e636f6d2f4865786d6f73546563682f6769742d6c7263"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/git-lrc/actions/workflows/gitleaks.yml" rel="noopener noreferrer"&gt;&lt;img alt="gitleaks.yml" title="gitleaks.yml: Secret scanning workflow" src="https://github.com/HexmosTech/git-lrc/actions/workflows/gitleaks.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/git-lrc/actions/workflows/osv-scanner.yml" rel="noopener noreferrer"&gt;&lt;img alt="osv-scanner.yml" title="osv-scanner.yml: Dependency vulnerability scan" src="https://github.com/HexmosTech/git-lrc/actions/workflows/osv-scanner.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/git-lrc/actions/workflows/govulncheck.yml" rel="noopener noreferrer"&gt;&lt;img alt="govulncheck.yml" title="govulncheck.yml: Go vulnerability check" src="https://github.com/HexmosTech/git-lrc/actions/workflows/govulncheck.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/git-lrc/actions/workflows/semgrep.yml" rel="noopener noreferrer"&gt;&lt;img alt="semgrep.yml" title="semgrep.yml: Static analysis security scan" src="https://github.com/HexmosTech/git-lrc/actions/workflows/semgrep.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/git-lrc/./gfx/dependabot-enabled.svg"&gt;&lt;img alt="dependabot-enabled" title="dependabot-enabled: Automated dependency updates are enabled" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2Fgit-lrc%2FHEAD%2F.%2Fgfx%2Fdependabot-enabled.svg"&gt;&lt;/a&gt;
&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/git-lrc/./gfx/a_few_micro_reviews.png"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2Fgit-lrc%2FHEAD%2F.%2Fgfx%2Fa_few_micro_reviews.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;GenAI today is a &lt;strong&gt;race car without brakes&lt;/strong&gt;. It accelerates fast -- you describe something, and large blocks of code appear instantly. But AI agents &lt;em&gt;silently break things&lt;/em&gt;: they remove logic, relax constraints, introduce expensive cloud calls, leak credentials, and change behavior -- without telling you. You often find out in production.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;git-lrc&lt;/code&gt; is your braking system.&lt;/strong&gt; It hooks into &lt;code&gt;git commit&lt;/code&gt; and runs an AI review on every diff &lt;em&gt;before&lt;/em&gt; it lands. 60-second setup. Completely free.&lt;/p&gt;
&lt;p&gt;In short, git-lrc helps &lt;strong&gt;Prevent Outages, Breaches, and Technical Debt Before They Happen&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;At a glance:&lt;/strong&gt; &lt;a href="https://github.com/HexmosTech/git-lrc#what-git-lrc-checks-for" rel="noopener noreferrer"&gt;10 risk categories&lt;/a&gt; · &lt;a href="https://github.com/HexmosTech/git-lrc#what-git-lrc-checks-for" rel="noopener noreferrer"&gt;100+ failure patterns tracked&lt;/a&gt; · every commit…&lt;/p&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


</description>
      <category>ai</category>
      <category>webdev</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>The Transformer Architecture Behind Modern LLMs: A Developer's Guide to the Diagram That Changed AI</title>
      <dc:creator>Shrijith Venkatramana</dc:creator>
      <pubDate>Mon, 29 Jun 2026 17:09:22 +0000</pubDate>
      <link>https://dev.to/shrsv/the-transformer-architecture-behind-modern-llms-a-developers-guide-to-the-diagram-that-changed-ai-2e4</link>
      <guid>https://dev.to/shrsv/the-transformer-architecture-behind-modern-llms-a-developers-guide-to-the-diagram-that-changed-ai-2e4</guid>
      <description>&lt;p&gt;&lt;em&gt;Hello, I'm Shrijith Venkatramana. I'm building git-lrc, an AI code reviewer that runs on every commit. &lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;Star Us&lt;/a&gt; to help devs discover the project. Do give it a try and share your feedback for improving the product.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;If you've used ChatGPT, Claude, Gemini, or any modern LLM, you've already benefited from one of the most influential transformer architecture in modern AI.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;In 2017, a team of researchers at Google published a paper titled &lt;strong&gt;"Attention Is All You Need."&lt;/strong&gt; Hidden inside it was the now-famous architecture diagram shown below—the blueprint for the Transformer.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fspfod3rgaw8ktpku3t9n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fspfod3rgaw8ktpku3t9n.png" alt="blueprint for transformer" width="592" height="698"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At first glance, it looks intimidating: boxes, arrows, loops, encoder stacks, decoder stacks, attention blocks...&lt;/p&gt;

&lt;p&gt;But underneath the complexity lies a surprisingly elegant idea.&lt;/p&gt;

&lt;p&gt;By the end of this article, you'll understand &lt;strong&gt;every single component&lt;/strong&gt; in this diagram, why it exists, how information flows through it, and how all these pieces collaborate to generate human-like language.&lt;/p&gt;

&lt;p&gt;Let's build our understanding layer by layer.&lt;/p&gt;

&lt;h1&gt;
  
  
  The Big Picture: Two Factories Working Together
&lt;/h1&gt;

&lt;p&gt;Before diving into the individual blocks, ignore the details and look at the overall shape.&lt;/p&gt;

&lt;p&gt;There are &lt;strong&gt;two major halves&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Encoder (left)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Decoder (right)&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Think of them as two specialized factories.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Input sentence
      │
      ▼
 ┌───────────────┐
 │    Encoder    │
 └───────────────┘
      │
 Learned representation
      │
      ▼
 ┌───────────────┐
 │    Decoder    │
 └───────────────┘
      │
      ▼
 Generated text
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Originally, this architecture was designed for &lt;strong&gt;machine translation&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;English:
"The cat sat on the mat."

Encoder understands it.

↓

Decoder generates:

"Le chat était assis sur le tapis."
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The encoder's only responsibility is &lt;strong&gt;understanding&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The decoder's responsibility is &lt;strong&gt;generation&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Today's GPT models actually use &lt;strong&gt;only the decoder&lt;/strong&gt;, while models like BERT use &lt;strong&gt;only the encoder&lt;/strong&gt;. The original Transformer paper contained both because translation requires understanding one language before producing another.&lt;/p&gt;
&lt;h1&gt;
  
  
  Step 1 — Input Embeddings: Converting Words into Numbers
&lt;/h1&gt;

&lt;p&gt;Computers don't understand words.&lt;/p&gt;

&lt;p&gt;They understand vectors.&lt;/p&gt;

&lt;p&gt;When the sentence&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;The cat sat
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;enters the Transformer, each word is converted into a dense numerical vector.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"The"
↓

[0.17, -0.42, 1.33, ...]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;These vectors are called &lt;strong&gt;embeddings&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Words with similar meanings naturally end up close together in this high-dimensional space.&lt;/p&gt;

&lt;p&gt;For example,&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;king
queen
prince
princess
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;occupy nearby regions.&lt;/p&gt;

&lt;p&gt;Instead of manually designing these vectors, the Transformer &lt;strong&gt;learns them during training&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;In the architecture diagram, this is the very first pink box:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Inputs
   │
   ▼
Input Embedding
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;At this stage, every token is simply represented as a learned numerical vector.&lt;/p&gt;
&lt;h1&gt;
  
  
  Step 2 — Positional Encoding: Giving Words an Order
&lt;/h1&gt;

&lt;p&gt;Here's an interesting problem.&lt;/p&gt;

&lt;p&gt;Attention doesn't inherently know word order.&lt;/p&gt;

&lt;p&gt;Consider:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Dog bites man

Man bites dog
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Same words.&lt;/p&gt;

&lt;p&gt;Completely different meaning.&lt;/p&gt;

&lt;p&gt;Since attention processes every word simultaneously, we must explicitly tell the model where each word appears.&lt;/p&gt;

&lt;p&gt;That's the purpose of &lt;strong&gt;Positional Encoding&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The positional vector is added directly to the embedding.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Embedding

+

Position

=

Final input vector
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This explains the small &lt;strong&gt;⊕ symbol&lt;/strong&gt; in the diagram.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Embedding
      │
      ▼
      ⊕
     / \
Embedding Position
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Rather than learning grammar from sequence alone, the model receives positional information immediately.&lt;/p&gt;

&lt;p&gt;You can think of it as giving every token both:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;what it is&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;where it occurs&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;
  
  
  Step 3 — The Encoder Stack: Understanding the Entire Sentence
&lt;/h1&gt;

&lt;p&gt;Now we reach the large box labelled &lt;strong&gt;N×&lt;/strong&gt;.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;┌─────────────────────┐
│ Multi-Head Attention│
│ Add &amp;amp; Norm          │
│ Feed Forward        │
│ Add &amp;amp; Norm          │
└─────────────────────┘

Repeated N times
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The paper used &lt;strong&gt;N = 6&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Modern LLMs often use dozens or even hundreds of layers.&lt;/p&gt;

&lt;p&gt;Each encoder layer gradually refines the representation.&lt;/p&gt;

&lt;p&gt;Think of reading a paragraph.&lt;/p&gt;

&lt;p&gt;Your first reading identifies words.&lt;/p&gt;

&lt;p&gt;The second discovers phrases.&lt;/p&gt;

&lt;p&gt;The third understands relationships.&lt;/p&gt;

&lt;p&gt;The fourth extracts meaning.&lt;/p&gt;

&lt;p&gt;Each encoder layer performs another refinement pass.&lt;/p&gt;
&lt;h1&gt;
  
  
  Step 4 — Multi-Head Attention: The Heart of the Transformer
&lt;/h1&gt;

&lt;p&gt;This is the innovation that changed deep learning.&lt;/p&gt;

&lt;p&gt;Suppose the sentence is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The animal didn't cross the street because &lt;strong&gt;it&lt;/strong&gt; was tired.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;What does &lt;strong&gt;it&lt;/strong&gt; refer to?&lt;/p&gt;

&lt;p&gt;Attention allows every word to examine every other word before updating its representation.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;animal  ←──────────┐
                   │
cross ─────────────┤
                   │
street ────────────┤
                   │
it  ◄──────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Instead of only looking at nearby words like RNNs, every token has access to the &lt;strong&gt;entire sentence&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This allows long-distance dependencies to be captured naturally.&lt;/p&gt;
&lt;h2&gt;
  
  
  Why Multiple Heads?
&lt;/h2&gt;

&lt;p&gt;One attention mechanism isn't enough.&lt;/p&gt;

&lt;p&gt;Different relationships matter.&lt;/p&gt;

&lt;p&gt;One head may learn:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;grammatical structure&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Another:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;pronoun resolution&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Another:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;verb-object relationships&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Another:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;semantic similarity&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Imagine several experts reading the same sentence simultaneously.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Head 1:
Grammar

Head 2:
Meaning

Head 3:
Syntax

Head 4:
Long-range context
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Their outputs are combined into a richer representation.&lt;/p&gt;

&lt;p&gt;This is why it's called &lt;strong&gt;Multi-Head Attention&lt;/strong&gt;.&lt;/p&gt;
&lt;h1&gt;
  
  
  Step 5 — Add &amp;amp; Norm: Keeping Training Stable
&lt;/h1&gt;

&lt;p&gt;Notice that after every major block we see&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Add &amp;amp; Norm
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This performs two operations.&lt;/p&gt;
&lt;h2&gt;
  
  
  Residual Connection (Add)
&lt;/h2&gt;

&lt;p&gt;Instead of replacing information, we preserve the original.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Output

=

Attention(x)

+

x
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This shortcut helps gradients flow through deep networks.&lt;/p&gt;

&lt;p&gt;Without it, training hundreds of layers becomes extremely difficult.&lt;/p&gt;
&lt;h2&gt;
  
  
  Layer Normalization (Norm)
&lt;/h2&gt;

&lt;p&gt;Different layers naturally produce values on different scales.&lt;/p&gt;

&lt;p&gt;Layer normalization keeps activations well-behaved.&lt;/p&gt;

&lt;p&gt;Think of it as recalibrating measurements after every processing stage.&lt;/p&gt;

&lt;p&gt;Without normalization:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Layer 1

0.3

Layer 2

500

Layer 3

0.0004
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Training quickly becomes unstable.&lt;/p&gt;

&lt;p&gt;Normalization keeps everything numerically manageable.&lt;/p&gt;
&lt;h1&gt;
  
  
  Step 6 — Feed Forward Networks: Thinking Independently
&lt;/h1&gt;

&lt;p&gt;Attention allows tokens to exchange information.&lt;/p&gt;

&lt;p&gt;The Feed Forward layer allows each token to process what it has learned.&lt;/p&gt;

&lt;p&gt;For every token independently:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Vector

↓

Linear

↓

Activation

↓

Linear
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;No interaction happens here.&lt;/p&gt;

&lt;p&gt;Instead, this stage performs deeper feature extraction.&lt;/p&gt;

&lt;p&gt;An analogy:&lt;/p&gt;

&lt;p&gt;Attention is a group discussion.&lt;/p&gt;

&lt;p&gt;Feed Forward is everyone quietly thinking afterward.&lt;/p&gt;

&lt;p&gt;This alternating pattern—&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Discuss

↓

Think

↓

Discuss

↓

Think
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;is repeated across every Transformer layer.&lt;/p&gt;
&lt;h1&gt;
  
  
  Step 7 — The Decoder: Generating One Token at a Time
&lt;/h1&gt;

&lt;p&gt;Now we move to the right half of the diagram.&lt;/p&gt;

&lt;p&gt;The decoder is responsible for producing text.&lt;/p&gt;

&lt;p&gt;Its input isn't the original sentence.&lt;/p&gt;

&lt;p&gt;Instead it receives:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;START&amp;gt;

↓

The

↓

The cat

↓

The cat sat

↓

...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Notice the label:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Outputs
(shifted right)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This means that during training, the decoder receives the &lt;strong&gt;correct previous token&lt;/strong&gt; as input while learning to predict the next one.&lt;/p&gt;

&lt;p&gt;If the target sentence is:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;The cat sat
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;the decoder sees:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;START&amp;gt;

The

The cat
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;and learns to predict:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;The

cat

sat
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This "teacher forcing" strategy makes training much more efficient because the model always conditions on the correct history rather than its own mistakes.&lt;/p&gt;
&lt;h1&gt;
  
  
  Step 8 — Masked Multi-Head Attention: Preventing Cheating
&lt;/h1&gt;

&lt;p&gt;Imagine predicting the next word in:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;The cat sat on the __
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;If the model could already see&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mat
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;there would be nothing to learn.&lt;/p&gt;

&lt;p&gt;So the decoder applies &lt;strong&gt;Masked Multi-Head Attention&lt;/strong&gt;.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Current token

↓

Can see:

Previous words ✔

Future words ✘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;During generation:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;I love
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;cannot attend to&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pizza
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;until pizza has actually been generated.&lt;/p&gt;

&lt;p&gt;The mask preserves causality.&lt;/p&gt;

&lt;p&gt;This is precisely why GPT models generate text one token at a time.&lt;/p&gt;
&lt;h1&gt;
  
  
  Step 9 — Cross-Attention: Looking Back at the Encoder
&lt;/h1&gt;

&lt;p&gt;The second attention block inside the decoder is different.&lt;/p&gt;

&lt;p&gt;Here, the decoder attends to the encoder output.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Encoder

↓

Sentence meaning

↓

Decoder consults it
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Suppose we're translating:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"The red car."
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;While generating&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;voiture
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;the decoder continually asks:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Which parts of the original sentence are relevant right now?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This interaction between encoder and decoder is called &lt;strong&gt;cross-attention&lt;/strong&gt; (shown simply as "Multi-Head Attention" in the original diagram, with arrows coming from the encoder stack).&lt;/p&gt;

&lt;p&gt;It lets the decoder ground each generated token in the encoded meaning of the source sentence instead of relying only on previously generated words.&lt;/p&gt;

&lt;p&gt;Decoder-only models like GPT omit this block because there is no separate encoder to consult.&lt;/p&gt;
&lt;h1&gt;
  
  
  Step 10 — Linear Layer + Softmax: Choosing the Next Word
&lt;/h1&gt;

&lt;p&gt;After the decoder finishes processing, we finally reach the top of the diagram.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Decoder Output

↓

Linear

↓

Softmax

↓

Output Probabilities
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The &lt;strong&gt;Linear&lt;/strong&gt; layer converts the decoder's hidden representation into one score for every token in the vocabulary.&lt;/p&gt;

&lt;p&gt;Imagine a vocabulary containing 50,000 words.&lt;/p&gt;

&lt;p&gt;The output might look like:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cat      5.8
dog      2.1
apple   -0.4
car      1.7
...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;These raw scores (often called &lt;em&gt;logits&lt;/em&gt;) aren't probabilities yet.&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;Softmax&lt;/strong&gt; layer transforms them into a probability distribution:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cat      0.81
dog      0.09
car      0.04
apple    0.01
...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The model can then choose the next token—either the most probable one or a sampled alternative depending on the decoding strategy.&lt;/p&gt;

&lt;p&gt;That chosen token is fed back into the decoder, and the entire process repeats until an end-of-sequence token is produced.&lt;/p&gt;
&lt;h1&gt;
  
  
  Putting It All Together: Following the Data Through the Diagram
&lt;/h1&gt;

&lt;p&gt;Now the entire figure becomes much easier to read.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Input text

↓

Input Embedding

↓

Positional Encoding

↓

Encoder Stack (N layers)
    ├─ Multi-Head Attention
    ├─ Add &amp;amp; Norm
    ├─ Feed Forward
    └─ Add &amp;amp; Norm

↓

Context-rich representation

↓

Decoder receives previous outputs
(shifted right)

↓

Output Embedding

↓

Positional Encoding

↓

Masked Multi-Head Attention
(looks only at earlier generated tokens)

↓

Cross-Attention
(consults the encoder output)

↓

Feed Forward

↓

Repeat N layers

↓

Linear

↓

Softmax

↓

Next token probability

↓

Repeat until complete sentence
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Every block has a specific role:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Component&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Input Embedding&lt;/td&gt;
&lt;td&gt;Convert tokens into dense vectors&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Positional Encoding&lt;/td&gt;
&lt;td&gt;Encode word order&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Multi-Head Attention&lt;/td&gt;
&lt;td&gt;Let tokens exchange information globally&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Masked Multi-Head Attention&lt;/td&gt;
&lt;td&gt;Prevent access to future tokens during generation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cross-Attention&lt;/td&gt;
&lt;td&gt;Allow the decoder to consult the encoder's understanding&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Feed Forward&lt;/td&gt;
&lt;td&gt;Transform each token's representation independently&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Add &amp;amp; Norm&lt;/td&gt;
&lt;td&gt;Stabilize optimization and preserve information via residual connections&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Encoder Stack (N×)&lt;/td&gt;
&lt;td&gt;Build increasingly rich contextual representations&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Decoder Stack (N×)&lt;/td&gt;
&lt;td&gt;Generate the output sequence one token at a time&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Linear&lt;/td&gt;
&lt;td&gt;Produce a score for every vocabulary token&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Softmax&lt;/td&gt;
&lt;td&gt;Convert scores into probabilities for selecting the next token&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;h1&gt;
  
  
  A Crisp Summary To Help You Remember This
&lt;/h1&gt;

&lt;p&gt;The Transformer succeeded because it replaced sequential processing with &lt;strong&gt;parallel attention&lt;/strong&gt;, enabling models to reason over entire sequences at once while still generating coherent text token by token.&lt;/p&gt;

&lt;p&gt;Almost every major language model today—from GPT and Claude to Llama, Mistral, and Gemini—can trace its lineage back to this deceptively simple diagram. While modern architectures introduce refinements such as rotary positional embeddings, grouped-query attention, mixture-of-experts layers, and optimized decoding strategies, the core ideas remain strikingly similar to those introduced in 2017.&lt;/p&gt;

&lt;p&gt;The next time someone says an LLM is "just predicting the next token," remember what's happening under the hood: &lt;strong&gt;embeddings capture meaning, positional encodings preserve order, attention weaves relationships across the sequence, feed-forward networks refine those representations, residual connections keep deep networks trainable, and the decoder repeatedly transforms all of that into one probability distribution after another until a coherent response emerges.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;What part of the Transformer architecture surprised you the most—the fact that every token can attend to every other token, the masking that enables autoregressive generation, or how such a simple stack of repeated blocks scales to models with hundreds of billions of parameters?&lt;/p&gt;



&lt;p&gt;*AI agents write code fast. They also silently remove logic, change behavior, and introduce bugs -- without telling you. You often find out in production.&lt;/p&gt;

&lt;p&gt;git-lrc fixes this. It hooks into git commit and reviews every diff before it lands. 60-second setup. Completely free.*&lt;/p&gt;

&lt;p&gt;Any feedback or contributors are welcome! It's online, source-available, and ready for anyone to use.&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/HexmosTech" rel="noopener noreferrer"&gt;
        HexmosTech
      &lt;/a&gt; / &lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;
        git-lrc
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Free, Micro AI Code Reviews That Run on Git Commit
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div&gt;
&lt;p&gt;| &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.da.md" rel="noopener noreferrer"&gt;🇩🇰 Dansk&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.es.md" rel="noopener noreferrer"&gt;🇪🇸 Español&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.fa.md" rel="noopener noreferrer"&gt;🇮🇷 Farsi&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.fi.md" rel="noopener noreferrer"&gt;🇫🇮 Suomi&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.ja.md" rel="noopener noreferrer"&gt;🇯🇵 日本語&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.nn.md" rel="noopener noreferrer"&gt;🇳🇴 Norsk&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.pt.md" rel="noopener noreferrer"&gt;🇵🇹 Português&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.ru.md" rel="noopener noreferrer"&gt;🇷🇺 Русский&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.sq.md" rel="noopener noreferrer"&gt;🇦🇱 Shqip&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.zh.md" rel="noopener noreferrer"&gt;🇨🇳 中文&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.hi.md" rel="noopener noreferrer"&gt;🇮🇳 हिन्दी&lt;/a&gt; |&lt;/p&gt;
&lt;br&gt;
&lt;br&gt;
&lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/948c8f2d5cf41b48985cd364d48c3a2dc9bfbfd42eab3e0a9a1b3e61f5f17ce3/68747470733a2f2f6865786d6f732e636f6d2f66726565646576746f6f6c732f7075626c69632f6c725f6c6f676f2e737667"&gt;&lt;img width="60" alt="git-lrc logo" src="https://camo.githubusercontent.com/948c8f2d5cf41b48985cd364d48c3a2dc9bfbfd42eab3e0a9a1b3e61f5f17ce3/68747470733a2f2f6865786d6f732e636f6d2f66726565646576746f6f6c732f7075626c69632f6c725f6c6f676f2e737667"&gt;&lt;/a&gt;
&lt;br&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;git-lrc&lt;/h1&gt;
&lt;/div&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Free, Micro AI Code Reviews That Run on Commit&lt;/h2&gt;
&lt;/div&gt;



&lt;p&gt;&lt;a href="https://www.producthunt.com/products/git-lrc?embed=true&amp;amp;utm_source=badge-top-post-badge&amp;amp;utm_medium=badge&amp;amp;utm_campaign=badge-git-lrc" rel="nofollow noopener noreferrer"&gt;&lt;img alt="git-lrc - Free, micro AI code reviews that run on commit | Product Hunt" width="200" src="https://camo.githubusercontent.com/87bf2d4283c1e0aa99e254bd17fefb1c67c0c0d39300043a243a4aa633b6cecc/68747470733a2f2f6170692e70726f6475637468756e742e636f6d2f776964676574732f656d6265642d696d6167652f76312f746f702d706f73742d62616467652e7376673f706f73745f69643d31303739323632267468656d653d6c6967687426706572696f643d6461696c7926743d31373731373439313730383638"&gt;&lt;/a&gt;
&amp;nbsp;&lt;/p&gt;
&lt;br&gt;
&lt;a href="https://discord.gg/sGdnKwB3qq" rel="nofollow noopener noreferrer"&gt;
  &lt;img alt="Discord Community" src="https://camo.githubusercontent.com/b8f979318aaabc8dec512b9d4e6e2a12431fba3c8a3b8738e1a97a0722d4e4bf/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446973636f72642d436f6d6d756e6974792d3538363546323f6c6f676f3d646973636f7264266c6162656c436f6c6f723d7768697465"&gt;
&lt;/a&gt; &lt;a href="https://goreportcard.com/report/github.com/HexmosTech/git-lrc" rel="nofollow noopener noreferrer"&gt;&lt;img alt="Go Report Card" src="https://camo.githubusercontent.com/e74c0651c3ee9165a2ed01cb0f6842c494029960df30eb9c24cf622d3d21bf46/68747470733a2f2f676f7265706f7274636172642e636f6d2f62616467652f6769746875622e636f6d2f4865786d6f73546563682f6769742d6c7263"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/git-lrc/actions/workflows/gitleaks.yml" rel="noopener noreferrer"&gt;&lt;img alt="gitleaks.yml" title="gitleaks.yml: Secret scanning workflow" src="https://github.com/HexmosTech/git-lrc/actions/workflows/gitleaks.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/git-lrc/actions/workflows/osv-scanner.yml" rel="noopener noreferrer"&gt;&lt;img alt="osv-scanner.yml" title="osv-scanner.yml: Dependency vulnerability scan" src="https://github.com/HexmosTech/git-lrc/actions/workflows/osv-scanner.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/git-lrc/actions/workflows/govulncheck.yml" rel="noopener noreferrer"&gt;&lt;img alt="govulncheck.yml" title="govulncheck.yml: Go vulnerability check" src="https://github.com/HexmosTech/git-lrc/actions/workflows/govulncheck.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/git-lrc/actions/workflows/semgrep.yml" rel="noopener noreferrer"&gt;&lt;img alt="semgrep.yml" title="semgrep.yml: Static analysis security scan" src="https://github.com/HexmosTech/git-lrc/actions/workflows/semgrep.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/git-lrc/./gfx/dependabot-enabled.svg"&gt;&lt;img alt="dependabot-enabled" title="dependabot-enabled: Automated dependency updates are enabled" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2Fgit-lrc%2FHEAD%2F.%2Fgfx%2Fdependabot-enabled.svg"&gt;&lt;/a&gt;
&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/git-lrc/./gfx/a_few_micro_reviews.png"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2Fgit-lrc%2FHEAD%2F.%2Fgfx%2Fa_few_micro_reviews.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;GenAI today is a &lt;strong&gt;race car without brakes&lt;/strong&gt;. It accelerates fast -- you describe something, and large blocks of code appear instantly. But AI agents &lt;em&gt;silently break things&lt;/em&gt;: they remove logic, relax constraints, introduce expensive cloud calls, leak credentials, and change behavior -- without telling you. You often find out in production.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;git-lrc&lt;/code&gt; is your braking system.&lt;/strong&gt; It hooks into &lt;code&gt;git commit&lt;/code&gt; and runs an AI review on every diff &lt;em&gt;before&lt;/em&gt; it lands. 60-second setup. Completely free.&lt;/p&gt;
&lt;p&gt;In short, git-lrc helps &lt;strong&gt;Prevent Outages, Breaches, and Technical Debt Before They Happen&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;At a glance:&lt;/strong&gt; &lt;a href="https://github.com/HexmosTech/git-lrc#what-git-lrc-checks-for" rel="noopener noreferrer"&gt;10 risk categories&lt;/a&gt; · &lt;a href="https://github.com/HexmosTech/git-lrc#what-git-lrc-checks-for" rel="noopener noreferrer"&gt;100+ failure patterns tracked&lt;/a&gt; · every commit…&lt;/p&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


</description>
      <category>ai</category>
      <category>webdev</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Self-Attention: The Brilliant Idea That Made Large Language Models Possible</title>
      <dc:creator>Shrijith Venkatramana</dc:creator>
      <pubDate>Sun, 28 Jun 2026 17:18:46 +0000</pubDate>
      <link>https://dev.to/shrsv/self-attention-the-brilliant-idea-that-made-large-language-models-possible-1oj</link>
      <guid>https://dev.to/shrsv/self-attention-the-brilliant-idea-that-made-large-language-models-possible-1oj</guid>
      <description>&lt;p&gt;&lt;em&gt;Hello, I'm Shrijith Venkatramana. I'm building git-lrc, an AI code reviewer that runs on every commit. &lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;Star Us&lt;/a&gt; to help devs discover the project. Do give it a try and share your feedback for improving the product.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;How a seemingly simple mathematical trick replaced decades of sequential neural networks and unlocked the age of GPT.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Imagine asking ten software engineers to summarize a pull request.&lt;/p&gt;

&lt;p&gt;One engineer reads every line from top to bottom. Another immediately jumps to the files that seem most relevant. A senior engineer skims most of the code but pays close attention to the parts that affect authentication, concurrency, or performance.&lt;/p&gt;

&lt;p&gt;The senior engineer isn't processing every line equally.&lt;/p&gt;

&lt;p&gt;They're &lt;strong&gt;paying attention&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;That simple observation eventually became one of the most important ideas in modern machine learning. In 2017, a group of researchers at Google published a paper with an almost understated title: "&lt;strong&gt;\"Attention Is All You Need.\"&lt;/strong&gt; The paper introduced the &lt;strong&gt;Transformer&lt;/strong&gt;, a new neural network architecture that abandoned recurrent networks entirely in favor of one central mechanism: &lt;strong&gt;self-attention&lt;/strong&gt;."&lt;/p&gt;

&lt;p&gt;Today, nearly every major Large Language Model—GPT, Claude, Gemini, Llama, DeepSeek, Mistral—builds upon this idea.&lt;/p&gt;

&lt;p&gt;Let's understand why.&lt;/p&gt;

&lt;h1&gt;
  
  
  Before Transformers: Language Was Processed Like a Conveyor Belt
&lt;/h1&gt;

&lt;p&gt;For nearly two decades, sequence models were dominated by &lt;strong&gt;Recurrent Neural Networks (RNNs)&lt;/strong&gt; and later &lt;strong&gt;LSTMs&lt;/strong&gt; and &lt;strong&gt;GRUs&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Suppose we have the sentence:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The animal didn't cross the road because it was tired.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;An RNN processes it like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;The
 ↓
animal
 ↓
didn't
 ↓
cross
 ↓
...
 ↓
tired
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Every new word updates a hidden state.&lt;/p&gt;

&lt;p&gt;If the model wants to understand &lt;strong&gt;"it"&lt;/strong&gt;, information about &lt;strong&gt;"animal"&lt;/strong&gt; has already travelled through six or seven intermediate computations.&lt;/p&gt;

&lt;p&gt;It's a little like the children's game of telephone. Every time information is passed forward, a little noise is introduced.&lt;/p&gt;

&lt;p&gt;The longer the sentence becomes, the harder it is to preserve distant information.&lt;/p&gt;

&lt;p&gt;This caused several practical problems:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Long-range dependencies became difficult.&lt;/li&gt;
&lt;li&gt;Training was inherently sequential.&lt;/li&gt;
&lt;li&gt;GPUs—which thrive on parallel computation—were underutilized.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Even clever improvements like LSTMs only partially solved these issues.&lt;/p&gt;

&lt;p&gt;Researchers began asking a different question:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;What if every word could simply look at every other word directly?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That question became self-attention.&lt;/p&gt;
&lt;h1&gt;
  
  
  The Core Idea: Every Word Gets to Read the Entire Sentence
&lt;/h1&gt;

&lt;p&gt;Instead of processing words one after another, self-attention lets every token consult every other token before deciding what it should represent.&lt;/p&gt;

&lt;p&gt;Consider:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The trophy didn't fit into the suitcase because it was too small.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;When humans read "it", we naturally ask:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;trophy?&lt;/li&gt;
&lt;li&gt;suitcase?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Our brain briefly looks backward.&lt;/p&gt;

&lt;p&gt;Transformers perform the same operation mathematically.&lt;/p&gt;

&lt;p&gt;When computing the representation for &lt;strong&gt;it&lt;/strong&gt;, the model assigns attention weights:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Word&lt;/th&gt;
&lt;th&gt;Importance&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;trophy&lt;/td&gt;
&lt;td&gt;0.08&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;suitcase&lt;/td&gt;
&lt;td&gt;0.67&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;small&lt;/td&gt;
&lt;td&gt;0.17&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;fit&lt;/td&gt;
&lt;td&gt;0.05&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;others&lt;/td&gt;
&lt;td&gt;0.03&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;These numbers are not programmed.&lt;/p&gt;

&lt;p&gt;They are learned from enormous amounts of text.&lt;/p&gt;

&lt;p&gt;The new representation becomes approximately:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;representation(it)

=
0.67 × suitcase
+
0.17 × small
+
0.08 × trophy
...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Notice something subtle.&lt;/p&gt;

&lt;p&gt;The word &lt;strong&gt;it&lt;/strong&gt; itself never changes.&lt;/p&gt;

&lt;p&gt;Instead, its &lt;strong&gt;vector representation&lt;/strong&gt; becomes richer because it incorporates contextual information from the rest of the sentence.&lt;/p&gt;

&lt;p&gt;This is why the mechanism is called &lt;strong&gt;self-attention&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The sentence is attending to itself.&lt;/p&gt;
&lt;h1&gt;
  
  
  Why This Was Revolutionary
&lt;/h1&gt;

&lt;p&gt;The Google paper's title—&lt;strong&gt;Attention Is All You Need&lt;/strong&gt;—was intentionally provocative.&lt;/p&gt;

&lt;p&gt;At the time, attention mechanisms already existed.&lt;/p&gt;

&lt;p&gt;Bahdanau and colleagues had introduced attention in neural machine translation in 2014. However, attention was only an add-on to recurrent networks.&lt;/p&gt;

&lt;p&gt;The Transformer asked a far bolder question:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;What happens if we remove recurrence completely?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Instead of:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Input
 ↓
LSTM
 ↓
LSTM
 ↓
LSTM
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;the Transformer became:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Input
 ↓
Self Attention
 ↓
Feed Forward
 ↓
Self Attention
 ↓
Feed Forward
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;No recurrence.&lt;/p&gt;

&lt;p&gt;No convolutions.&lt;/p&gt;

&lt;p&gt;Just attention layers stacked dozens—or eventually hundreds—of times.&lt;/p&gt;

&lt;p&gt;Many researchers initially viewed this as risky.&lt;/p&gt;

&lt;p&gt;Within a year, it became obvious the idea worked astonishingly well.&lt;/p&gt;
&lt;h1&gt;
  
  
  The Math Is Simple and Elegant
&lt;/h1&gt;

&lt;p&gt;The mathematics often intimidates newcomers, but the underlying idea is straightforward.&lt;/p&gt;

&lt;p&gt;Each token produces three vectors:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Query (Q)&lt;/strong&gt; → What information am I looking for?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Key (K)&lt;/strong&gt; → What information do I contain?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Value (V)&lt;/strong&gt; → What information should I contribute?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Think of attending a technical conference.&lt;/p&gt;

&lt;p&gt;Every attendee carries:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a list of questions they're interested in (Query),&lt;/li&gt;
&lt;li&gt;a badge describing their expertise (Key),&lt;/li&gt;
&lt;li&gt;the knowledge they can share (Value).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Conversation happens when someone's questions match another person's expertise.&lt;/p&gt;

&lt;p&gt;Mathematically:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;score = Query · Key
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The dot product measures compatibility.&lt;/p&gt;

&lt;p&gt;Large dot product?&lt;/p&gt;

&lt;p&gt;Pay attention.&lt;/p&gt;

&lt;p&gt;Small dot product?&lt;/p&gt;

&lt;p&gt;Ignore.&lt;/p&gt;

&lt;p&gt;The scores are normalized using the Softmax function:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;weights&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;softmax&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;QKᵀ&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="err"&gt;√&lt;/span&gt;&lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The division by √d prevents very large vector dimensions from producing excessively large dot products that would make Softmax saturate. Without this scaling, gradients become small and training becomes unstable.&lt;/p&gt;

&lt;p&gt;Finally,&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;Output&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;weights&lt;/span&gt; &lt;span class="err"&gt;×&lt;/span&gt; &lt;span class="n"&gt;V&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Each token becomes a weighted combination of information from every other token.&lt;/p&gt;

&lt;p&gt;That's the entire mechanism.&lt;/p&gt;

&lt;p&gt;The famous equation occupies only a single line in the original paper.&lt;/p&gt;

&lt;p&gt;Yet it changed AI forever.&lt;/p&gt;
&lt;h1&gt;
  
  
  A Back-of-the-Envelope Calculation: Why Attention Is Expensive
&lt;/h1&gt;

&lt;p&gt;Self-attention's biggest strength is also its biggest weakness.&lt;/p&gt;

&lt;p&gt;Suppose a context contains &lt;strong&gt;4,096 tokens&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Every token compares itself against every other token.&lt;/p&gt;

&lt;p&gt;Total comparisons:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;4096 × 4096

≈ 16.8 million
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Now consider modern models.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;8,192 tokens&lt;/li&gt;
&lt;li&gt;32 attention heads&lt;/li&gt;
&lt;li&gt;dozens of Transformer layers&lt;/li&gt;
&lt;li&gt;billions of parameters&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The number of operations quickly reaches the trillions during training.&lt;/p&gt;

&lt;p&gt;This explains why training frontier models requires thousands of GPUs running continuously for weeks or months.&lt;/p&gt;

&lt;p&gt;The economics become equally striking.&lt;/p&gt;

&lt;p&gt;A single GPU might cost tens of thousands of dollars. Training clusters contain thousands of them.&lt;/p&gt;

&lt;p&gt;Electricity, cooling, networking, storage, engineering time, and failed experiments all contribute to training costs that can reach tens or even hundreds of millions of dollars for the largest models.&lt;/p&gt;

&lt;p&gt;This computational expense has also motivated an entire research field devoted to making attention cheaper.&lt;/p&gt;

&lt;p&gt;Techniques such as FlashAttention, grouped-query attention, sparse attention, and linear attention all attempt to preserve the quality of self-attention while reducing memory usage or computational complexity.&lt;/p&gt;

&lt;p&gt;Ironically, many innovations in modern LLM engineering are really innovations in making self-attention practical at scale.&lt;/p&gt;
&lt;h1&gt;
  
  
  Why Self-Attention Became the Foundation of LLMs
&lt;/h1&gt;

&lt;p&gt;Language isn't fundamentally sequential.&lt;/p&gt;

&lt;p&gt;Relationships often span entire documents.&lt;/p&gt;

&lt;p&gt;A variable declared hundreds of lines earlier influences the current line of code.&lt;/p&gt;

&lt;p&gt;A pronoun refers to a noun introduced several paragraphs ago.&lt;/p&gt;

&lt;p&gt;An API call depends on documentation presented earlier in the conversation.&lt;/p&gt;

&lt;p&gt;Self-attention naturally models these relationships.&lt;/p&gt;

&lt;p&gt;It also parallelizes beautifully.&lt;/p&gt;

&lt;p&gt;Unlike RNNs, every token in a sequence can be processed simultaneously on modern GPUs.&lt;/p&gt;

&lt;p&gt;That single architectural decision dramatically increased hardware utilization and enabled models to scale from millions of parameters to today's trillion-parameter frontier.&lt;/p&gt;

&lt;p&gt;Perhaps the greatest lesson is that breakthroughs are not always about making systems more complicated.&lt;/p&gt;

&lt;p&gt;Sometimes they're about removing assumptions.&lt;/p&gt;

&lt;p&gt;The Transformer removed the assumption that language must be processed one word at a time.&lt;/p&gt;

&lt;p&gt;Everything that followed—from GPT-2 to ChatGPT—was built on that realization.&lt;/p&gt;
&lt;h1&gt;
  
  
  Final Thoughts
&lt;/h1&gt;

&lt;p&gt;It's easy to think of GPT as an impossibly complex black box.&lt;/p&gt;

&lt;p&gt;But underneath the billions of parameters lies a surprisingly elegant principle.&lt;/p&gt;

&lt;p&gt;Every word asks:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Which other words should I pay attention to?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That single question replaced decades of recurrent architectures and reshaped artificial intelligence.&lt;/p&gt;

&lt;p&gt;Sometimes, the most revolutionary ideas aren't new ways of computing.&lt;/p&gt;

&lt;p&gt;They're new ways of deciding &lt;strong&gt;what deserves attention&lt;/strong&gt;.&lt;/p&gt;



&lt;p&gt;&lt;strong&gt;What surprised you most about self-attention?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Was it that the core algorithm fits into a single equation, or that one architectural decision replaced decades of recurrent neural networks? I'd love to hear your thoughts—or any clever analogies you've found useful when explaining Transformers to other developers.&lt;/p&gt;



&lt;p&gt;*AI agents write code fast. They also silently remove logic, change behavior, and introduce bugs -- without telling you. You often find out in production.&lt;/p&gt;

&lt;p&gt;git-lrc fixes this. It hooks into git commit and reviews every diff before it lands. 60-second setup. Completely free.*&lt;/p&gt;

&lt;p&gt;Any feedback or contributors are welcome! It's online, source-available, and ready for anyone to use.&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/HexmosTech" rel="noopener noreferrer"&gt;
        HexmosTech
      &lt;/a&gt; / &lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;
        git-lrc
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Free, Micro AI Code Reviews That Run on Git Commit
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div&gt;
&lt;p&gt;| &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.da.md" rel="noopener noreferrer"&gt;🇩🇰 Dansk&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.es.md" rel="noopener noreferrer"&gt;🇪🇸 Español&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.fa.md" rel="noopener noreferrer"&gt;🇮🇷 Farsi&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.fi.md" rel="noopener noreferrer"&gt;🇫🇮 Suomi&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.ja.md" rel="noopener noreferrer"&gt;🇯🇵 日本語&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.nn.md" rel="noopener noreferrer"&gt;🇳🇴 Norsk&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.pt.md" rel="noopener noreferrer"&gt;🇵🇹 Português&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.ru.md" rel="noopener noreferrer"&gt;🇷🇺 Русский&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.sq.md" rel="noopener noreferrer"&gt;🇦🇱 Shqip&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.zh.md" rel="noopener noreferrer"&gt;🇨🇳 中文&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.hi.md" rel="noopener noreferrer"&gt;🇮🇳 हिन्दी&lt;/a&gt; |&lt;/p&gt;
&lt;br&gt;
&lt;br&gt;
&lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/948c8f2d5cf41b48985cd364d48c3a2dc9bfbfd42eab3e0a9a1b3e61f5f17ce3/68747470733a2f2f6865786d6f732e636f6d2f66726565646576746f6f6c732f7075626c69632f6c725f6c6f676f2e737667"&gt;&lt;img width="60" alt="git-lrc logo" src="https://camo.githubusercontent.com/948c8f2d5cf41b48985cd364d48c3a2dc9bfbfd42eab3e0a9a1b3e61f5f17ce3/68747470733a2f2f6865786d6f732e636f6d2f66726565646576746f6f6c732f7075626c69632f6c725f6c6f676f2e737667"&gt;&lt;/a&gt;
&lt;br&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;git-lrc&lt;/h1&gt;
&lt;/div&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Free, Micro AI Code Reviews That Run on Commit&lt;/h2&gt;
&lt;/div&gt;



&lt;p&gt;&lt;a href="https://www.producthunt.com/products/git-lrc?embed=true&amp;amp;utm_source=badge-top-post-badge&amp;amp;utm_medium=badge&amp;amp;utm_campaign=badge-git-lrc" rel="nofollow noopener noreferrer"&gt;&lt;img alt="git-lrc - Free, micro AI code reviews that run on commit | Product Hunt" width="200" src="https://camo.githubusercontent.com/87bf2d4283c1e0aa99e254bd17fefb1c67c0c0d39300043a243a4aa633b6cecc/68747470733a2f2f6170692e70726f6475637468756e742e636f6d2f776964676574732f656d6265642d696d6167652f76312f746f702d706f73742d62616467652e7376673f706f73745f69643d31303739323632267468656d653d6c6967687426706572696f643d6461696c7926743d31373731373439313730383638"&gt;&lt;/a&gt;
&amp;nbsp;&lt;/p&gt;
&lt;br&gt;
&lt;a href="https://discord.gg/sGdnKwB3qq" rel="nofollow noopener noreferrer"&gt;
  &lt;img alt="Discord Community" src="https://camo.githubusercontent.com/b8f979318aaabc8dec512b9d4e6e2a12431fba3c8a3b8738e1a97a0722d4e4bf/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446973636f72642d436f6d6d756e6974792d3538363546323f6c6f676f3d646973636f7264266c6162656c436f6c6f723d7768697465"&gt;
&lt;/a&gt; &lt;a href="https://goreportcard.com/report/github.com/HexmosTech/git-lrc" rel="nofollow noopener noreferrer"&gt;&lt;img alt="Go Report Card" src="https://camo.githubusercontent.com/e74c0651c3ee9165a2ed01cb0f6842c494029960df30eb9c24cf622d3d21bf46/68747470733a2f2f676f7265706f7274636172642e636f6d2f62616467652f6769746875622e636f6d2f4865786d6f73546563682f6769742d6c7263"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/git-lrc/actions/workflows/gitleaks.yml" rel="noopener noreferrer"&gt;&lt;img alt="gitleaks.yml" title="gitleaks.yml: Secret scanning workflow" src="https://github.com/HexmosTech/git-lrc/actions/workflows/gitleaks.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/git-lrc/actions/workflows/osv-scanner.yml" rel="noopener noreferrer"&gt;&lt;img alt="osv-scanner.yml" title="osv-scanner.yml: Dependency vulnerability scan" src="https://github.com/HexmosTech/git-lrc/actions/workflows/osv-scanner.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/git-lrc/actions/workflows/govulncheck.yml" rel="noopener noreferrer"&gt;&lt;img alt="govulncheck.yml" title="govulncheck.yml: Go vulnerability check" src="https://github.com/HexmosTech/git-lrc/actions/workflows/govulncheck.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/git-lrc/actions/workflows/semgrep.yml" rel="noopener noreferrer"&gt;&lt;img alt="semgrep.yml" title="semgrep.yml: Static analysis security scan" src="https://github.com/HexmosTech/git-lrc/actions/workflows/semgrep.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/git-lrc/./gfx/dependabot-enabled.svg"&gt;&lt;img alt="dependabot-enabled" title="dependabot-enabled: Automated dependency updates are enabled" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2Fgit-lrc%2FHEAD%2F.%2Fgfx%2Fdependabot-enabled.svg"&gt;&lt;/a&gt;
&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/git-lrc/./gfx/a_few_micro_reviews.png"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2Fgit-lrc%2FHEAD%2F.%2Fgfx%2Fa_few_micro_reviews.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;GenAI today is a &lt;strong&gt;race car without brakes&lt;/strong&gt;. It accelerates fast -- you describe something, and large blocks of code appear instantly. But AI agents &lt;em&gt;silently break things&lt;/em&gt;: they remove logic, relax constraints, introduce expensive cloud calls, leak credentials, and change behavior -- without telling you. You often find out in production.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;git-lrc&lt;/code&gt; is your braking system.&lt;/strong&gt; It hooks into &lt;code&gt;git commit&lt;/code&gt; and runs an AI review on every diff &lt;em&gt;before&lt;/em&gt; it lands. 60-second setup. Completely free.&lt;/p&gt;
&lt;p&gt;In short, git-lrc helps &lt;strong&gt;Prevent Outages, Breaches, and Technical Debt Before They Happen&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;At a glance:&lt;/strong&gt; &lt;a href="https://github.com/HexmosTech/git-lrc#what-git-lrc-checks-for" rel="noopener noreferrer"&gt;10 risk categories&lt;/a&gt; · &lt;a href="https://github.com/HexmosTech/git-lrc#what-git-lrc-checks-for" rel="noopener noreferrer"&gt;100+ failure patterns tracked&lt;/a&gt; · every commit…&lt;/p&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


</description>
      <category>ai</category>
      <category>webdev</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Sequence Transduction: The Forgotten Problem That Led to Modern LLMs</title>
      <dc:creator>Shrijith Venkatramana</dc:creator>
      <pubDate>Sat, 27 Jun 2026 17:15:41 +0000</pubDate>
      <link>https://dev.to/shrsv/sequence-transduction-the-forgotten-problem-that-led-to-modern-llms-439e</link>
      <guid>https://dev.to/shrsv/sequence-transduction-the-forgotten-problem-that-led-to-modern-llms-439e</guid>
      <description>&lt;p&gt;&lt;em&gt;Hello, I'm Shrijith Venkatramana. I'm building git-lrc, an AI code reviewer that runs on every commit. &lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;Star Us&lt;/a&gt; to help devs discover the project. Do give it a try and share your feedback for improving the product.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Most developers think large language models were built to predict the next word. They weren't—not at first.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;If you travel back to the early 2010s, the hardest problems in AI weren't writing poems or generating code. They were translating English into French, converting speech into text, and summarizing documents. These were all instances of the same challenge: &lt;strong&gt;sequence transduction&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The term appears almost casually in the opening paragraph of the Transformer paper:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"...sequence modeling and transduction problems such as language modeling and machine translation."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Today, almost everyone knows the Transformer. Very few remember the problem it was invented to solve.&lt;/p&gt;

&lt;p&gt;Ironically, solving sequence transduction turned out to create the foundation upon which modern LLMs would later emerge.&lt;/p&gt;

&lt;p&gt;Let's explore why.&lt;/p&gt;

&lt;h1&gt;
  
  
  What Exactly Is Sequence Transduction?
&lt;/h1&gt;

&lt;p&gt;Imagine you own a factory.&lt;/p&gt;

&lt;p&gt;A sequence modeling problem asks:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Given everything that has happened so far, what comes next?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Like predicting the next product coming off the conveyor belt.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;The cat sat on the _____
                ↓
               mat
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This is language modeling.&lt;/p&gt;

&lt;p&gt;A sequence transduction problem is larger idea.&lt;/p&gt;

&lt;p&gt;Instead of predicting one missing piece, you transform an entire sequence into another.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;English
↓

"The weather is nice."

↓

French

"Il fait beau."
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Or&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Audio
↓

Waveform

↓

Text

"Welcome everyone."
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Or&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Buggy code

↓

Correct code
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Different input.&lt;/p&gt;

&lt;p&gt;Different output.&lt;/p&gt;

&lt;p&gt;Often different lengths.&lt;/p&gt;

&lt;p&gt;The model must understand the entire source or at least large parts of it before generating the target.&lt;/p&gt;

&lt;p&gt;In hindsight, modern AI assistants spend almost all of their time doing sequence transduction:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;translating languages&lt;/li&gt;
&lt;li&gt;summarizing reports&lt;/li&gt;
&lt;li&gt;generating SQL&lt;/li&gt;
&lt;li&gt;converting Python to Rust&lt;/li&gt;
&lt;li&gt;explaining stack traces&lt;/li&gt;
&lt;li&gt;producing commit messages&lt;/li&gt;
&lt;li&gt;writing documentation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;They all reduce to:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Input sequence → Output sequence&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h1&gt;
  
  
  Why Was This Such a Hard Problem?
&lt;/h1&gt;

&lt;p&gt;Humans underestimate how much memory translation requires.&lt;/p&gt;

&lt;p&gt;Consider translating:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"The committee, after reviewing several proposals over three months, finally approved the budget."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Suppose you're translating into German.&lt;/p&gt;

&lt;p&gt;The verb may not appear until the end.&lt;/p&gt;

&lt;p&gt;To translate correctly, the model must remember:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;who performed the action&lt;/li&gt;
&lt;li&gt;tense&lt;/li&gt;
&lt;li&gt;plurality&lt;/li&gt;
&lt;li&gt;grammatical structure&lt;/li&gt;
&lt;li&gt;dependencies dozens of words apart&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Early neural networks processed text one word at a time.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Word₁ → hidden state
              ↓
Word₂ → hidden state
              ↓
Word₃ → hidden state
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Everything had to be compressed into one hidden vector.&lt;/p&gt;

&lt;p&gt;It was like asking someone to summarize an entire novel using only one sticky note.&lt;/p&gt;

&lt;p&gt;Eventually information disappears.&lt;/p&gt;

&lt;p&gt;This became known as the &lt;strong&gt;long-range dependency problem&lt;/strong&gt;.&lt;/p&gt;
&lt;h1&gt;
  
  
  The Rise—and Limits—of Recurrent Neural Networks
&lt;/h1&gt;

&lt;p&gt;During the late 1980s and 1990s, researchers developed &lt;strong&gt;Recurrent Neural Networks (RNNs)&lt;/strong&gt; to process sequential data.&lt;/p&gt;

&lt;p&gt;Unlike ordinary neural networks, RNNs reused the same parameters at every time step.&lt;/p&gt;

&lt;p&gt;Instead of building a different network for every word, one network repeatedly updated an internal memory.&lt;/p&gt;

&lt;p&gt;Mathematically:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;hidden_state&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;f&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;previous_hidden_state&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;current_input&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The same computation runs repeatedly.&lt;/p&gt;

&lt;p&gt;This parameter sharing was elegant.&lt;/p&gt;

&lt;p&gt;Suppose an RNN contains one million parameters.&lt;/p&gt;

&lt;p&gt;A thousand-word paragraph still uses one million parameters—not a billion.&lt;/p&gt;

&lt;p&gt;The network simply reuses them.&lt;/p&gt;

&lt;p&gt;Economically, this was attractive. But computationally, it was painful.&lt;/p&gt;

&lt;p&gt;Everything had to happen sequentially.&lt;/p&gt;

&lt;p&gt;Word 500 could not begin until word 499 finished.&lt;/p&gt;

&lt;p&gt;No parallelism. No GPUs in picture. Training was slow.&lt;/p&gt;
&lt;h1&gt;
  
  
  LSTMs: Teaching Neural Networks to Remember
&lt;/h1&gt;

&lt;p&gt;In 1997, Sepp Hochreiter and Jürgen Schmidhuber introduced one of the most influential ideas in deep learning:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Long Short-Term Memory (LSTM).&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Instead of blindly overwriting memory every step, the network learned gates.&lt;/p&gt;

&lt;p&gt;Think of memory like a whiteboard.&lt;/p&gt;

&lt;p&gt;Each word asks three questions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Should I erase something?&lt;/li&gt;
&lt;li&gt;Should I remember this?&lt;/li&gt;
&lt;li&gt;Should I reveal this later?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Those questions became three learned gates.&lt;/p&gt;

&lt;p&gt;Forget gate.&lt;/p&gt;

&lt;p&gt;Input gate.&lt;/p&gt;

&lt;p&gt;Output gate.&lt;/p&gt;

&lt;p&gt;Instead of forcing every piece of information through the same bottleneck, the model learned what deserved long-term storage.&lt;/p&gt;

&lt;p&gt;A surprisingly intuitive analogy is human note-taking.&lt;/p&gt;

&lt;p&gt;Most conversations are forgotten.&lt;/p&gt;

&lt;p&gt;A few facts are written into your notebook.&lt;/p&gt;

&lt;p&gt;LSTMs learned which facts deserved the notebook.&lt;/p&gt;

&lt;p&gt;For over a decade, LSTMs dominated speech recognition, handwriting recognition, language translation, and time-series forecasting.&lt;/p&gt;

&lt;p&gt;Google, Apple, Microsoft, and Baidu all deployed enormous production systems powered by them.&lt;/p&gt;
&lt;h1&gt;
  
  
  The Encoder–Decoder Revolution
&lt;/h1&gt;

&lt;p&gt;Around 2014, another breakthrough appeared.&lt;/p&gt;

&lt;p&gt;Instead of using one RNN/LSTMs for everything, researchers separated the task into two parts.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Input sentence
      ↓
Encoder
      ↓
Meaning vector
      ↓
Decoder
      ↓
Output sentence
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This architecture became known as the &lt;strong&gt;sequence-to-sequence (Seq2Seq)&lt;/strong&gt; model.&lt;/p&gt;

&lt;p&gt;For the first time, neural networks learned translation end-to-end.&lt;/p&gt;

&lt;p&gt;No phrase tables or handcrafted grammar or brittle rules. It was just millions of examples.&lt;/p&gt;

&lt;p&gt;One famous anecdote came from Google.&lt;/p&gt;

&lt;p&gt;Traditional statistical machine translation systems consisted of dozens of independently engineered components accumulated over years.&lt;/p&gt;

&lt;p&gt;Neural machine translation replaced much of that complexity with a single differentiable model trained from data. In 2016, Google reported that its neural system substantially reduced translation errors across multiple language pairs while simplifying the overall pipeline.&lt;/p&gt;

&lt;p&gt;This represented an engineering improvement for sure, but more importantly it was a philosophical shift.&lt;/p&gt;

&lt;p&gt;Instead of programming language knowledge -- we trained it.&lt;/p&gt;
&lt;h1&gt;
  
  
  Attention Changed Everything
&lt;/h1&gt;

&lt;p&gt;The Seq2Seq model still had one weakness.&lt;/p&gt;

&lt;p&gt;Everything had to fit inside one vector.&lt;/p&gt;

&lt;p&gt;Information gets lost.&lt;/p&gt;

&lt;p&gt;In 2014, Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio proposed &lt;strong&gt;attention&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Instead of remembering everything, just look back whenever necessary.&lt;/p&gt;

&lt;p&gt;While generating each output word, the decoder asks:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Which input words matter right now?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Not every word.&lt;/p&gt;

&lt;p&gt;Only the relevant ones.&lt;/p&gt;

&lt;p&gt;Translation suddenly became much easier.&lt;/p&gt;

&lt;p&gt;Long sentences improved dramatically.&lt;/p&gt;
&lt;h1&gt;
  
  
  From Translation Engine to ChatGPT
&lt;/h1&gt;

&lt;p&gt;The Transformer paper in 2017 -- instead of improving recurrent networks, removed recurrence entirely.&lt;/p&gt;

&lt;p&gt;Every word could attend directly to every other word.&lt;/p&gt;

&lt;p&gt;Parallel computation became possible.&lt;/p&gt;

&lt;p&gt;Training speed increased enormously.&lt;/p&gt;

&lt;p&gt;GPUs became dramatically more efficient because every token in a sequence could be processed simultaneously rather than one after another.&lt;/p&gt;

&lt;p&gt;Even more interesting was the economics.&lt;/p&gt;

&lt;p&gt;Suppose translating a sentence of 100 words with an RNN requires roughly 100 sequential computation steps.&lt;/p&gt;

&lt;p&gt;A Transformer still performs similar amounts of arithmetic overall, but many of those operations can execute in parallel on modern accelerators.&lt;/p&gt;

&lt;p&gt;The wall-clock training time drops dramatically because GPUs are optimized for large batches of matrix multiplications rather than long chains of sequential dependencies.&lt;/p&gt;

&lt;p&gt;That operational advantage—not merely higher accuracy—made scaling practical.&lt;/p&gt;

&lt;p&gt;The remarkable twist is that the architecture built to solve translation generalized astonishingly well.&lt;/p&gt;

&lt;p&gt;Replace:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;English → French
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;with&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Question → Answer
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;or&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Code → Documentation
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;or&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;Prompt&lt;/span&gt; &lt;span class="err"&gt;→&lt;/span&gt; &lt;span class="n"&gt;Python&lt;/span&gt; &lt;span class="n"&gt;program&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The underlying problem barely changes.&lt;/p&gt;

&lt;p&gt;It remains sequence transduction.&lt;/p&gt;

&lt;p&gt;Modern LLMs still perform next-token prediction during training.&lt;/p&gt;

&lt;p&gt;But from a developer's perspective, they are universal transduction engines.&lt;/p&gt;

&lt;p&gt;Every prompt is transformed into another sequence.&lt;/p&gt;

&lt;p&gt;The interface changed.&lt;/p&gt;

&lt;p&gt;The underlying abstraction survived.&lt;/p&gt;
&lt;h1&gt;
  
  
  Final Thoughts
&lt;/h1&gt;

&lt;p&gt;The history of AI is often told as a story about predicting the next word.&lt;/p&gt;

&lt;p&gt;That story is incomplete.&lt;/p&gt;

&lt;p&gt;For decades, researchers wrestled with a harder question:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;How do we transform one complex sequence into another while preserving meaning?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That single question drove the invention of encoder–decoder architectures, LSTMs, attention mechanisms, and ultimately the Transformer itself.&lt;/p&gt;

&lt;p&gt;The next time you ask an LLM to refactor code, summarize a meeting, or generate a SQL query, remember what it's really doing.&lt;/p&gt;

&lt;p&gt;Not merely predicting words.&lt;/p&gt;

&lt;p&gt;Performing sequence transduction at an extraordinary scale.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What surprised you most about this history?&lt;/strong&gt; Did you always think LLMs grew out of language modeling, or is it more useful to think of them as the latest—and perhaps most powerful—generation of sequence transduction systems?&lt;/p&gt;



&lt;p&gt;*AI agents write code fast. They also silently remove logic, change behavior, and introduce bugs -- without telling you. You often find out in production.&lt;/p&gt;

&lt;p&gt;git-lrc fixes this. It hooks into git commit and reviews every diff before it lands. 60-second setup. Completely free.*&lt;/p&gt;

&lt;p&gt;Any feedback or contributors are welcome! It's online, source-available, and ready for anyone to use.&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/HexmosTech" rel="noopener noreferrer"&gt;
        HexmosTech
      &lt;/a&gt; / &lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;
        git-lrc
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Free, Micro AI Code Reviews That Run on Git Commit
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div&gt;
&lt;p&gt;| &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.da.md" rel="noopener noreferrer"&gt;🇩🇰 Dansk&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.es.md" rel="noopener noreferrer"&gt;🇪🇸 Español&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.fa.md" rel="noopener noreferrer"&gt;🇮🇷 Farsi&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.fi.md" rel="noopener noreferrer"&gt;🇫🇮 Suomi&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.ja.md" rel="noopener noreferrer"&gt;🇯🇵 日本語&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.nn.md" rel="noopener noreferrer"&gt;🇳🇴 Norsk&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.pt.md" rel="noopener noreferrer"&gt;🇵🇹 Português&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.ru.md" rel="noopener noreferrer"&gt;🇷🇺 Русский&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.sq.md" rel="noopener noreferrer"&gt;🇦🇱 Shqip&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.zh.md" rel="noopener noreferrer"&gt;🇨🇳 中文&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.hi.md" rel="noopener noreferrer"&gt;🇮🇳 हिन्दी&lt;/a&gt; |&lt;/p&gt;
&lt;br&gt;
&lt;br&gt;
&lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/948c8f2d5cf41b48985cd364d48c3a2dc9bfbfd42eab3e0a9a1b3e61f5f17ce3/68747470733a2f2f6865786d6f732e636f6d2f66726565646576746f6f6c732f7075626c69632f6c725f6c6f676f2e737667"&gt;&lt;img width="60" alt="git-lrc logo" src="https://camo.githubusercontent.com/948c8f2d5cf41b48985cd364d48c3a2dc9bfbfd42eab3e0a9a1b3e61f5f17ce3/68747470733a2f2f6865786d6f732e636f6d2f66726565646576746f6f6c732f7075626c69632f6c725f6c6f676f2e737667"&gt;&lt;/a&gt;
&lt;br&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;git-lrc&lt;/h1&gt;
&lt;/div&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Free, Micro AI Code Reviews That Run on Commit&lt;/h2&gt;
&lt;/div&gt;



&lt;p&gt;&lt;a href="https://www.producthunt.com/products/git-lrc?embed=true&amp;amp;utm_source=badge-top-post-badge&amp;amp;utm_medium=badge&amp;amp;utm_campaign=badge-git-lrc" rel="nofollow noopener noreferrer"&gt;&lt;img alt="git-lrc - Free, micro AI code reviews that run on commit | Product Hunt" width="200" src="https://camo.githubusercontent.com/87bf2d4283c1e0aa99e254bd17fefb1c67c0c0d39300043a243a4aa633b6cecc/68747470733a2f2f6170692e70726f6475637468756e742e636f6d2f776964676574732f656d6265642d696d6167652f76312f746f702d706f73742d62616467652e7376673f706f73745f69643d31303739323632267468656d653d6c6967687426706572696f643d6461696c7926743d31373731373439313730383638"&gt;&lt;/a&gt;
&amp;nbsp;&lt;/p&gt;
&lt;br&gt;
&lt;a href="https://discord.gg/sGdnKwB3qq" rel="nofollow noopener noreferrer"&gt;
  &lt;img alt="Discord Community" src="https://camo.githubusercontent.com/b8f979318aaabc8dec512b9d4e6e2a12431fba3c8a3b8738e1a97a0722d4e4bf/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446973636f72642d436f6d6d756e6974792d3538363546323f6c6f676f3d646973636f7264266c6162656c436f6c6f723d7768697465"&gt;
&lt;/a&gt; &lt;a href="https://goreportcard.com/report/github.com/HexmosTech/git-lrc" rel="nofollow noopener noreferrer"&gt;&lt;img alt="Go Report Card" src="https://camo.githubusercontent.com/e74c0651c3ee9165a2ed01cb0f6842c494029960df30eb9c24cf622d3d21bf46/68747470733a2f2f676f7265706f7274636172642e636f6d2f62616467652f6769746875622e636f6d2f4865786d6f73546563682f6769742d6c7263"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/git-lrc/actions/workflows/gitleaks.yml" rel="noopener noreferrer"&gt;&lt;img alt="gitleaks.yml" title="gitleaks.yml: Secret scanning workflow" src="https://github.com/HexmosTech/git-lrc/actions/workflows/gitleaks.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/git-lrc/actions/workflows/osv-scanner.yml" rel="noopener noreferrer"&gt;&lt;img alt="osv-scanner.yml" title="osv-scanner.yml: Dependency vulnerability scan" src="https://github.com/HexmosTech/git-lrc/actions/workflows/osv-scanner.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/git-lrc/actions/workflows/govulncheck.yml" rel="noopener noreferrer"&gt;&lt;img alt="govulncheck.yml" title="govulncheck.yml: Go vulnerability check" src="https://github.com/HexmosTech/git-lrc/actions/workflows/govulncheck.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/git-lrc/actions/workflows/semgrep.yml" rel="noopener noreferrer"&gt;&lt;img alt="semgrep.yml" title="semgrep.yml: Static analysis security scan" src="https://github.com/HexmosTech/git-lrc/actions/workflows/semgrep.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/git-lrc/./gfx/dependabot-enabled.svg"&gt;&lt;img alt="dependabot-enabled" title="dependabot-enabled: Automated dependency updates are enabled" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2Fgit-lrc%2FHEAD%2F.%2Fgfx%2Fdependabot-enabled.svg"&gt;&lt;/a&gt;
&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/git-lrc/./gfx/a_few_micro_reviews.png"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2Fgit-lrc%2FHEAD%2F.%2Fgfx%2Fa_few_micro_reviews.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;GenAI today is a &lt;strong&gt;race car without brakes&lt;/strong&gt;. It accelerates fast -- you describe something, and large blocks of code appear instantly. But AI agents &lt;em&gt;silently break things&lt;/em&gt;: they remove logic, relax constraints, introduce expensive cloud calls, leak credentials, and change behavior -- without telling you. You often find out in production.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;git-lrc&lt;/code&gt; is your braking system.&lt;/strong&gt; It hooks into &lt;code&gt;git commit&lt;/code&gt; and runs an AI review on every diff &lt;em&gt;before&lt;/em&gt; it lands. 60-second setup. Completely free.&lt;/p&gt;
&lt;p&gt;In short, git-lrc helps &lt;strong&gt;Prevent Outages, Breaches, and Technical Debt Before They Happen&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;At a glance:&lt;/strong&gt; &lt;a href="https://github.com/HexmosTech/git-lrc#what-git-lrc-checks-for" rel="noopener noreferrer"&gt;10 risk categories&lt;/a&gt; · &lt;a href="https://github.com/HexmosTech/git-lrc#what-git-lrc-checks-for" rel="noopener noreferrer"&gt;100+ failure patterns tracked&lt;/a&gt; · every commit…&lt;/p&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


</description>
      <category>ai</category>
      <category>webdev</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>How We Actually Measure Whether an LLM's Output Is Good - BLEU, COMET and BLEURT</title>
      <dc:creator>Shrijith Venkatramana</dc:creator>
      <pubDate>Fri, 26 Jun 2026 18:36:27 +0000</pubDate>
      <link>https://dev.to/shrsv/how-we-actually-measure-whether-an-llms-output-is-good-bleu-comet-and-bleurt-3c0f</link>
      <guid>https://dev.to/shrsv/how-we-actually-measure-whether-an-llms-output-is-good-bleu-comet-and-bleurt-3c0f</guid>
      <description>&lt;p&gt;&lt;em&gt;Hello, I'm Shrijith Venkatramana. I'm building git-lrc, an AI code reviewer that runs on every commit. &lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;Star Us&lt;/a&gt; to help devs discover the project. Do give it a try and share your feedback for improving the product.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;An AI model writes a paragraph. It sounds fluent. It looks convincing. But how do you know whether it's actually good?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;This deceptively simple question has occupied researchers for more than two decades.&lt;/p&gt;

&lt;p&gt;Long before ChatGPT, machine translation researchers faced exactly the same problem. Human evaluation was expensive, inconsistent, and painfully slow. If every new model required thousands of humans to compare translations, research would crawl.&lt;/p&gt;

&lt;p&gt;That necessity gave rise to &lt;strong&gt;BLEU&lt;/strong&gt;, one of the most influential evaluation metrics in AI history. Years later, as language models became better at paraphrasing and reasoning, BLEU started to show its age. Researchers responded with learned metrics like &lt;strong&gt;BLEURT&lt;/strong&gt; and &lt;strong&gt;COMET&lt;/strong&gt;, which use neural networks to judge language much more like humans do.&lt;/p&gt;

&lt;p&gt;Interestingly, this mirrors software engineering itself. We first wrote simple unit tests, then integration tests, and today we increasingly rely on sophisticated observability systems. Evaluation metrics for LLMs have undergone a similar evolution.&lt;/p&gt;

&lt;p&gt;Let's see why.&lt;/p&gt;

&lt;h1&gt;
  
  
  Before BLEU: The Evaluation Bottleneck
&lt;/h1&gt;

&lt;p&gt;Imagine you're building Google Translate in 2001.&lt;/p&gt;

&lt;p&gt;Every time your team improves the model, someone has to read thousands of translated sentences and score them.&lt;/p&gt;

&lt;p&gt;Suppose a single sentence pair takes only 20 seconds to judge.&lt;/p&gt;

&lt;p&gt;Evaluating 50,000 sentences would require nearly &lt;strong&gt;280 human-hours&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Now imagine dozens of experiments every week.&lt;/p&gt;

&lt;p&gt;Evaluation—not training—quickly becomes the bottleneck.&lt;/p&gt;

&lt;p&gt;Researchers at IBM, led by &lt;strong&gt;Kishore Papineni&lt;/strong&gt;, introduced &lt;strong&gt;BLEU (Bilingual Evaluation Understudy)&lt;/strong&gt; in 2002 to automate this process.&lt;/p&gt;

&lt;p&gt;Their idea was surprisingly simple:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If a machine translation resembles what professional translators write, it's probably good.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This became one of the most cited papers in natural language processing.&lt;/p&gt;

&lt;h1&gt;
  
  
  BLEU: Counting Shared Phrases
&lt;/h1&gt;

&lt;p&gt;BLEU compares a model's output against one or more human reference translations.&lt;/p&gt;

&lt;p&gt;Suppose the reference is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The cat is sitting on the mat.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The model produces:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The cat sat on the mat.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Many words and short phrases overlap.&lt;/p&gt;

&lt;p&gt;Now consider:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A feline rested indoors.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A human recognizes this as a perfectly reasonable translation.&lt;/p&gt;

&lt;p&gt;BLEU mostly doesn't.&lt;/p&gt;

&lt;p&gt;Why?&lt;/p&gt;

&lt;p&gt;Because BLEU isn't measuring meaning.&lt;/p&gt;

&lt;p&gt;It measures &lt;strong&gt;shared n-grams&lt;/strong&gt;—contiguous sequences of words.&lt;/p&gt;

&lt;p&gt;The score combines:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;word matches (1-grams)&lt;/li&gt;
&lt;li&gt;two-word phrases&lt;/li&gt;
&lt;li&gt;three-word phrases&lt;/li&gt;
&lt;li&gt;four-word phrases&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It also penalizes outputs that are suspiciously short.&lt;/p&gt;

&lt;p&gt;High-level intuition:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;More matching phrases → higher score&lt;/li&gt;
&lt;li&gt;Longer matching phrases → even better&lt;/li&gt;
&lt;li&gt;Too short → penalty&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This simple idea turned out to correlate surprisingly well with human judgments across large datasets.&lt;/p&gt;

&lt;p&gt;When the famous &lt;strong&gt;Transformer&lt;/strong&gt; paper &lt;em&gt;Attention Is All You Need&lt;/em&gt; reported &lt;strong&gt;28.4 BLEU&lt;/strong&gt; on the WMT English-German benchmark, that represented roughly a &lt;strong&gt;2 BLEU improvement&lt;/strong&gt; over previous systems—a significant jump that helped establish the Transformer as the new state of the art.&lt;/p&gt;

&lt;h1&gt;
  
  
  Why BLEU Eventually Broke Down
&lt;/h1&gt;

&lt;p&gt;BLEU assumes that good translations look similar.&lt;/p&gt;

&lt;p&gt;Modern LLMs don't.&lt;/p&gt;

&lt;p&gt;Consider these summaries.&lt;/p&gt;

&lt;p&gt;Reference:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The meeting was postponed because the client requested additional documentation.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Output A:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The meeting was delayed after the client asked for more documents.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Output B:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Client requested more paperwork, so the meeting moved.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Humans would probably give both excellent scores.&lt;/p&gt;

&lt;p&gt;BLEU prefers whichever shares more exact phrases.&lt;/p&gt;

&lt;p&gt;Now imagine asking ChatGPT:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Explain recursion like I'm five.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;There are hundreds of excellent answers.&lt;/p&gt;

&lt;p&gt;BLEU expects one.&lt;/p&gt;

&lt;p&gt;This becomes even worse for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;summarization&lt;/li&gt;
&lt;li&gt;question answering&lt;/li&gt;
&lt;li&gt;code explanations&lt;/li&gt;
&lt;li&gt;dialogue&lt;/li&gt;
&lt;li&gt;reasoning&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As models became more creative, exact word overlap became a poor proxy for quality.&lt;/p&gt;

&lt;p&gt;Researchers needed evaluation metrics that understood meaning rather than wording.&lt;/p&gt;

&lt;h1&gt;
  
  
  BLEURT: Teaching AI to Judge AI
&lt;/h1&gt;

&lt;p&gt;Google Research introduced &lt;strong&gt;BLEURT&lt;/strong&gt; in 2020.&lt;/p&gt;

&lt;p&gt;Instead of counting words, BLEURT fine-tunes a pretrained Transformer to predict human evaluation scores.&lt;/p&gt;

&lt;p&gt;Think of it as hiring a reviewer instead of using a spell checker.&lt;/p&gt;

&lt;p&gt;During training, BLEURT sees:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;candidate answer&lt;/li&gt;
&lt;li&gt;reference answer&lt;/li&gt;
&lt;li&gt;human quality score&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After millions of examples, it learns patterns humans value:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;preserved meaning&lt;/li&gt;
&lt;li&gt;factual consistency&lt;/li&gt;
&lt;li&gt;grammatical quality&lt;/li&gt;
&lt;li&gt;fluency&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;An interesting engineering trick made BLEURT particularly effective.&lt;/p&gt;

&lt;p&gt;Human-scored datasets are relatively small.&lt;/p&gt;

&lt;p&gt;The researchers first generated large amounts of &lt;strong&gt;synthetically corrupted text&lt;/strong&gt;—introducing deletions, substitutions, and paraphrases—to pretrain the evaluator before fine-tuning on expensive human judgments.&lt;/p&gt;

&lt;p&gt;This significantly reduced the amount of labeled data needed.&lt;/p&gt;

&lt;h1&gt;
  
  
  COMET: Learning from Human Preferences
&lt;/h1&gt;

&lt;p&gt;Around the same time, researchers at &lt;strong&gt;Unbabel&lt;/strong&gt; developed &lt;strong&gt;COMET&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Like BLEURT, COMET uses a neural network.&lt;/p&gt;

&lt;p&gt;But it has access to something BLEURT often doesn't:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;original source sentence&lt;/li&gt;
&lt;li&gt;reference translation&lt;/li&gt;
&lt;li&gt;candidate translation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That additional context matters.&lt;/p&gt;

&lt;p&gt;Suppose the French sentence is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Il fait froid.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;One candidate says:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;It is cold.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Another says:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;It is freezing.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Without seeing the original sentence, both might seem acceptable.&lt;/p&gt;

&lt;p&gt;With the source available, COMET can better judge whether meaning has shifted.&lt;/p&gt;

&lt;p&gt;Modern COMET models consistently show stronger correlation with professional human evaluators than BLEU across many translation benchmarks.&lt;/p&gt;

&lt;p&gt;Today, COMET is frequently reported alongside BLEU in machine translation research.&lt;/p&gt;

&lt;h1&gt;
  
  
  The Economics of Evaluation
&lt;/h1&gt;

&lt;p&gt;Training frontier models can cost millions of dollars.&lt;/p&gt;

&lt;p&gt;Evaluation, surprisingly, can become expensive too.&lt;/p&gt;

&lt;p&gt;Imagine comparing three model versions.&lt;/p&gt;

&lt;p&gt;Each produces answers for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;10 benchmark datasets&lt;/li&gt;
&lt;li&gt;5,000 prompts each&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That's &lt;strong&gt;150,000 outputs&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;If humans spend only 15 seconds per evaluation:&lt;/p&gt;

&lt;p&gt;150,000 × 15 seconds ≈ &lt;strong&gt;625 hours&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;At $40/hour for expert annotators, that's &lt;strong&gt;$25,000&lt;/strong&gt; for a single evaluation round.&lt;/p&gt;

&lt;p&gt;And that's before measuring agreement between multiple reviewers.&lt;/p&gt;

&lt;p&gt;Automatic metrics dramatically reduce this cost.&lt;/p&gt;

&lt;p&gt;A common workflow today looks like:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Evaluate every experiment automatically.&lt;/li&gt;
&lt;li&gt;Keep only the best-performing candidates.&lt;/li&gt;
&lt;li&gt;Send those few models to human reviewers.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The automatic metric acts as a high-quality filter rather than a replacement for humans.&lt;/p&gt;

&lt;h1&gt;
  
  
  Where We Are Today
&lt;/h1&gt;

&lt;p&gt;No single metric captures quality perfectly.&lt;/p&gt;

&lt;p&gt;BLEU remains valuable because:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;it's simple&lt;/li&gt;
&lt;li&gt;reproducible&lt;/li&gt;
&lt;li&gt;historically comparable&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;BLEURT improves semantic understanding by learning from human judgments.&lt;/p&gt;

&lt;p&gt;COMET goes even further by incorporating the original source sentence and demonstrating stronger agreement with professional evaluators.&lt;/p&gt;

&lt;p&gt;For frontier LLMs, evaluation has become even broader.&lt;/p&gt;

&lt;p&gt;Researchers increasingly combine:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;learned metrics like COMET&lt;/li&gt;
&lt;li&gt;human preference studies&lt;/li&gt;
&lt;li&gt;benchmark suites&lt;/li&gt;
&lt;li&gt;domain-specific tests&lt;/li&gt;
&lt;li&gt;LLM-as-a-judge evaluations&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The lesson is larger than machine translation.&lt;/p&gt;

&lt;p&gt;As AI systems become more capable, &lt;strong&gt;evaluating them becomes an AI problem itself.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The future of language models may depend just as much on better judges as on better generators.&lt;/p&gt;




&lt;p&gt;*AI agents write code fast. They also silently remove logic, change behavior, and introduce bugs -- without telling you. You often find out in production.&lt;/p&gt;

&lt;p&gt;git-lrc fixes this. It hooks into git commit and reviews every diff before it lands. 60-second setup. Completely free.*&lt;/p&gt;

&lt;p&gt;Any feedback or contributors are welcome! It's online, source-available, and ready for anyone to use.&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/HexmosTech" rel="noopener noreferrer"&gt;
        HexmosTech
      &lt;/a&gt; / &lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;
        git-lrc
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Free, Micro AI Code Reviews That Run on Git Commit
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div&gt;
&lt;p&gt;| &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.da.md" rel="noopener noreferrer"&gt;🇩🇰 Dansk&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.es.md" rel="noopener noreferrer"&gt;🇪🇸 Español&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.fa.md" rel="noopener noreferrer"&gt;🇮🇷 Farsi&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.fi.md" rel="noopener noreferrer"&gt;🇫🇮 Suomi&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.ja.md" rel="noopener noreferrer"&gt;🇯🇵 日本語&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.nn.md" rel="noopener noreferrer"&gt;🇳🇴 Norsk&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.pt.md" rel="noopener noreferrer"&gt;🇵🇹 Português&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.ru.md" rel="noopener noreferrer"&gt;🇷🇺 Русский&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.sq.md" rel="noopener noreferrer"&gt;🇦🇱 Shqip&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.zh.md" rel="noopener noreferrer"&gt;🇨🇳 中文&lt;/a&gt; | &lt;a href="https://github.com/HexmosTech/git-lrc/readme/README.hi.md" rel="noopener noreferrer"&gt;🇮🇳 हिन्दी&lt;/a&gt; |&lt;/p&gt;
&lt;br&gt;
&lt;br&gt;
&lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/948c8f2d5cf41b48985cd364d48c3a2dc9bfbfd42eab3e0a9a1b3e61f5f17ce3/68747470733a2f2f6865786d6f732e636f6d2f66726565646576746f6f6c732f7075626c69632f6c725f6c6f676f2e737667"&gt;&lt;img width="60" alt="git-lrc logo" src="https://camo.githubusercontent.com/948c8f2d5cf41b48985cd364d48c3a2dc9bfbfd42eab3e0a9a1b3e61f5f17ce3/68747470733a2f2f6865786d6f732e636f6d2f66726565646576746f6f6c732f7075626c69632f6c725f6c6f676f2e737667"&gt;&lt;/a&gt;
&lt;br&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;git-lrc&lt;/h1&gt;
&lt;/div&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Free, Micro AI Code Reviews That Run on Commit&lt;/h2&gt;
&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;
&lt;p&gt;&lt;a href="https://www.producthunt.com/products/git-lrc?embed=true&amp;amp;utm_source=badge-top-post-badge&amp;amp;utm_medium=badge&amp;amp;utm_campaign=badge-git-lrc" rel="nofollow noopener noreferrer"&gt;&lt;img alt="git-lrc - Free, micro AI code reviews that run on commit | Product Hunt" width="200" src="https://camo.githubusercontent.com/87bf2d4283c1e0aa99e254bd17fefb1c67c0c0d39300043a243a4aa633b6cecc/68747470733a2f2f6170692e70726f6475637468756e742e636f6d2f776964676574732f656d6265642d696d6167652f76312f746f702d706f73742d62616467652e7376673f706f73745f69643d31303739323632267468656d653d6c6967687426706572696f643d6461696c7926743d31373731373439313730383638"&gt;&lt;/a&gt;
&amp;nbsp;&lt;/p&gt;
&lt;br&gt;
&lt;a href="https://discord.gg/sGdnKwB3qq" rel="nofollow noopener noreferrer"&gt;
  &lt;img alt="Discord Community" src="https://camo.githubusercontent.com/b8f979318aaabc8dec512b9d4e6e2a12431fba3c8a3b8738e1a97a0722d4e4bf/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446973636f72642d436f6d6d756e6974792d3538363546323f6c6f676f3d646973636f7264266c6162656c436f6c6f723d7768697465"&gt;
&lt;/a&gt; &lt;a href="https://goreportcard.com/report/github.com/HexmosTech/git-lrc" rel="nofollow noopener noreferrer"&gt;&lt;img alt="Go Report Card" src="https://camo.githubusercontent.com/e74c0651c3ee9165a2ed01cb0f6842c494029960df30eb9c24cf622d3d21bf46/68747470733a2f2f676f7265706f7274636172642e636f6d2f62616467652f6769746875622e636f6d2f4865786d6f73546563682f6769742d6c7263"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/git-lrc/actions/workflows/gitleaks.yml" rel="noopener noreferrer"&gt;&lt;img alt="gitleaks.yml" title="gitleaks.yml: Secret scanning workflow" src="https://github.com/HexmosTech/git-lrc/actions/workflows/gitleaks.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/git-lrc/actions/workflows/osv-scanner.yml" rel="noopener noreferrer"&gt;&lt;img alt="osv-scanner.yml" title="osv-scanner.yml: Dependency vulnerability scan" src="https://github.com/HexmosTech/git-lrc/actions/workflows/osv-scanner.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/git-lrc/actions/workflows/govulncheck.yml" rel="noopener noreferrer"&gt;&lt;img alt="govulncheck.yml" title="govulncheck.yml: Go vulnerability check" src="https://github.com/HexmosTech/git-lrc/actions/workflows/govulncheck.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/git-lrc/actions/workflows/semgrep.yml" rel="noopener noreferrer"&gt;&lt;img alt="semgrep.yml" title="semgrep.yml: Static analysis security scan" src="https://github.com/HexmosTech/git-lrc/actions/workflows/semgrep.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/git-lrc/./gfx/dependabot-enabled.svg"&gt;&lt;img alt="dependabot-enabled" title="dependabot-enabled: Automated dependency updates are enabled" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2Fgit-lrc%2FHEAD%2F.%2Fgfx%2Fdependabot-enabled.svg"&gt;&lt;/a&gt;
&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/git-lrc/./gfx/a_few_micro_reviews.png"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2Fgit-lrc%2FHEAD%2F.%2Fgfx%2Fa_few_micro_reviews.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;GenAI today is a &lt;strong&gt;race car without brakes&lt;/strong&gt;. It accelerates fast -- you describe something, and large blocks of code appear instantly. But AI agents &lt;em&gt;silently break things&lt;/em&gt;: they remove logic, relax constraints, introduce expensive cloud calls, leak credentials, and change behavior -- without telling you. You often find out in production.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;git-lrc&lt;/code&gt; is your braking system.&lt;/strong&gt; It hooks into &lt;code&gt;git commit&lt;/code&gt; and runs an AI review on every diff &lt;em&gt;before&lt;/em&gt; it lands. 60-second setup. Completely free.&lt;/p&gt;
&lt;p&gt;In short, git-lrc helps &lt;strong&gt;Prevent Outages, Breaches, and Technical Debt Before They Happen&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;At a glance:&lt;/strong&gt; &lt;a href="https://github.com/HexmosTech/git-lrc#what-git-lrc-checks-for" rel="noopener noreferrer"&gt;10 risk categories&lt;/a&gt; · &lt;a href="https://github.com/HexmosTech/git-lrc#what-git-lrc-checks-for" rel="noopener noreferrer"&gt;100+ failure patterns tracked&lt;/a&gt; · every commit…&lt;/p&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


</description>
      <category>ai</category>
      <category>webdev</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
