<?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>Prefill-Decode Disaggregation: Why LLM Inference Is Starting to Look Like a Distributed System</title>
      <dc:creator>Shrijith Venkatramana</dc:creator>
      <pubDate>Sun, 09 Aug 2026 18:11:41 +0000</pubDate>
      <link>https://dev.to/shrsv/prefill-decode-disaggregation-why-llm-inference-is-starting-to-look-like-a-distributed-system-3nb</link>
      <guid>https://dev.to/shrsv/prefill-decode-disaggregation-why-llm-inference-is-starting-to-look-like-a-distributed-system-3nb</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;h1&gt;
  
  
  Prefill-Decode Disaggregation: Why LLM Inference Is Starting to Look Like a Distributed System
&lt;/h1&gt;

&lt;p&gt;There is a strange thing about serving an LLM.&lt;/p&gt;

&lt;p&gt;A user sends you 4,000 tokens and asks for 200 more.&lt;/p&gt;

&lt;p&gt;The GPU spends one kind of computation processing those 4,000 tokens—and then spends the next 200 steps doing something fundamentally different.&lt;/p&gt;

&lt;p&gt;Yet, in a conventional serving system, we often put both workloads on exactly the same GPUs, under the same scheduler, fighting for the same resources.&lt;/p&gt;

&lt;p&gt;That is beginning to look increasingly unreasonable.&lt;/p&gt;

&lt;p&gt;The idea of &lt;strong&gt;prefill-decode disaggregation&lt;/strong&gt; is simple:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Run the part of inference that reads the prompt separately from the part that generates the answer.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This sounds like an obvious optimization once you see it. But getting it right involves KV caches, GPU memory, network bandwidth, batching, latency SLOs, scheduling, and some surprisingly interesting economics.&lt;/p&gt;

&lt;p&gt;The idea was explored systematically in Microsoft's &lt;strong&gt;Splitwise&lt;/strong&gt; work, published at ISCA 2024, and then pushed further for latency-sensitive serving by &lt;strong&gt;DistServe&lt;/strong&gt;, published at OSDI 2024.&lt;/p&gt;

&lt;p&gt;Let's build the idea from first principles.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. An LLM request actually contains two very different jobs
&lt;/h2&gt;

&lt;p&gt;Suppose you send this to a model:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Explain how TCP congestion control works.
Assume I already understand IP routing.
Give me a detailed explanation with examples.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Imagine that becomes 25 input tokens and the model generates 300 output tokens.&lt;/p&gt;

&lt;p&gt;Inference looks roughly 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;                INPUT
                  |
                  v
        +-----------------+
        |     PREFILL     |
        |                 |
        | Process all     |
        | input tokens    |
        +--------+--------+
                 |
                 | KV cache
                 v
        +-----------------+
        |      DECODE     |
        |                 |
        | token -&amp;gt; token  |
        | -&amp;gt; token -&amp;gt; ... |
        +--------+--------+
                 |
                 v
               OUTPUT
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  Prefill
&lt;/h3&gt;

&lt;p&gt;The model processes the entire prompt.&lt;/p&gt;

&lt;p&gt;If the prompt contains 4,000 tokens, the transformer can process those tokens largely in parallel.&lt;/p&gt;

&lt;p&gt;This is a &lt;strong&gt;large, dense computation&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;GPUs are extremely good at this.&lt;/p&gt;
&lt;h3&gt;
  
  
  Decode
&lt;/h3&gt;

&lt;p&gt;Now the model generates the answer one token 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;token 1
   |
   v
token 2
   |
   v
token 3
   |
   v
token 4
   |
   v
...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;There is an unavoidable autoregressive dependency:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;P(token_n | token_1 ... token_(n-1))
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;You cannot generally generate token 400 before knowing token 399.&lt;/p&gt;

&lt;p&gt;So decode consists of many relatively small GPU operations.&lt;/p&gt;

&lt;p&gt;This creates an important asymmetry:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prefill wants compute throughput. Decode wants memory bandwidth and predictable latency.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Microsoft researchers Pratyush Patel, Esha Choukse, Chaojie Zhang and colleagues characterized exactly this difference in their Splitwise work. They found prompt processing to be compute-intensive while token generation was much more memory-intensive and underutilized expensive accelerator resources.&lt;/p&gt;

&lt;p&gt;This is the fundamental observation behind disaggregation.&lt;/p&gt;
&lt;h2&gt;
  
  
  2. The surprising part: the same GPU is a bad compromise
&lt;/h2&gt;

&lt;p&gt;Imagine a restaurant with two kinds of customers.&lt;/p&gt;

&lt;p&gt;One customer arrives with 100 people and wants to place a large order.&lt;/p&gt;

&lt;p&gt;Another customer arrives alone and wants one sandwich every 30 seconds for the next ten minutes.&lt;/p&gt;

&lt;p&gt;If you force both groups through the same kitchen workflow, optimizing for one will hurt the other.&lt;/p&gt;

&lt;p&gt;LLM serving has a similar problem.&lt;/p&gt;

&lt;p&gt;Consider a decode batch:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;request A -&amp;gt; generate next token
request B -&amp;gt; generate next token
request C -&amp;gt; generate next token
request D -&amp;gt; generate next token
...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Batching is extremely useful here.&lt;/p&gt;

&lt;p&gt;The GPU can reuse the model weights across many requests, so the cost of reading the weights gets amortized.&lt;/p&gt;

&lt;p&gt;Now a new request arrives with a 20,000-token prompt.&lt;/p&gt;

&lt;p&gt;Its prefill is a large compute-heavy operation.&lt;/p&gt;

&lt;p&gt;If the scheduler inserts that prefill into the same GPU workload, it can temporarily consume enormous amounts of compute and memory bandwidth.&lt;/p&gt;

&lt;p&gt;The users already generating tokens don't care that the new request has a giant prompt.&lt;/p&gt;

&lt;p&gt;They just experience:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;token
token
token
     &amp;lt;- giant prefill
...
token
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Their inter-token latency spikes.&lt;/p&gt;

&lt;p&gt;This is why &lt;strong&gt;TTFT&lt;/strong&gt; and &lt;strong&gt;TPOT/ITL&lt;/strong&gt; matter.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;TTFT&lt;/strong&gt; — Time To First Token: how long the user waits before seeing anything.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ITL&lt;/strong&gt; — Inter-Token Latency: how long the user waits between generated tokens.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;TPOT&lt;/strong&gt; — Time Per Output Token: closely related to ITL in serving measurements.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A system can have excellent average throughput while feeling terrible interactively.&lt;/p&gt;

&lt;p&gt;DistServe's central argument was that prefill and decode interfere with one another strongly enough that treating them as one homogeneous workload makes it difficult to simultaneously satisfy TTFT and TPOT requirements.&lt;/p&gt;
&lt;h2&gt;
  
  
  3. What is actually being "disaggregated"?
&lt;/h2&gt;

&lt;p&gt;Here is where the implementation gets interesting.&lt;/p&gt;

&lt;p&gt;You don't split the neural network into:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;GPU A:
  layers 1-40

GPU B:
  layers 41-80
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;That's ordinary model parallelism.&lt;/p&gt;

&lt;p&gt;Instead, you run essentially the &lt;strong&gt;same model&lt;/strong&gt; in two different pools:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                  Request
                     |
                     v
            +----------------+
            | Prefill Pool   |
            |                |
            | GPU GPU GPU    |
            +-------+--------+
                    |
                    | KV cache
                    |
                    v
            +----------------+
            |  Decode Pool   |
            |                |
            | GPU GPU GPU    |
            +-------+--------+
                    |
                    v
                 Tokens
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The prefill workers process the prompt.&lt;/p&gt;

&lt;p&gt;They produce the intermediate state needed by the decoder: primarily the &lt;strong&gt;key/value (KV) cache&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;That cache is transferred to a decode worker.&lt;/p&gt;

&lt;p&gt;The decode worker then continues generation.&lt;/p&gt;

&lt;p&gt;So the architecture becomes:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;             network / interconnect
        -----------------------------&amp;gt;

PREFILL GPU                         DECODE GPU
----------                         ----------
prompt
  |
  v
transformer
  |
  v
KV cache ------------------------&amp;gt; KV cache
                                       |
                                       v
                                   generate
                                   token 1
                                     |
                                   token 2
                                     |
                                   token 3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This is why the technique is much more interesting than simply running two queues.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The KV cache becomes a distributed-system object.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;And that changes everything.&lt;/p&gt;
&lt;h2&gt;
  
  
  4. The KV cache is the thing holding the whole system together
&lt;/h2&gt;

&lt;p&gt;During attention, the model needs information about previous tokens.&lt;/p&gt;

&lt;p&gt;Instead of recomputing the entire history for every generated token, serving systems store the relevant keys and values in the KV cache.&lt;/p&gt;

&lt;p&gt;A simplified picture is:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Prompt:
A B C D E

KV cache:
K(A) V(A)
K(B) V(B)
K(C) V(C)
K(D) V(D)
K(E) V(E)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;When generating &lt;code&gt;F&lt;/code&gt;, the model can attend to this existing state.&lt;/p&gt;

&lt;p&gt;Then it adds:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;K(F) V(F)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;and continues.&lt;/p&gt;

&lt;p&gt;This cache can become enormous.&lt;/p&gt;

&lt;p&gt;A rough formula for KV-cache memory is:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;M_KV ~= 2 * L * H_KV * D * T * B
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;where:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;L     = number of transformer layers
H_KV  = number of KV heads
D     = head dimension
T     = number of tokens
B     = bytes per element
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The factor &lt;code&gt;2&lt;/code&gt; represents keys + values.&lt;/p&gt;

&lt;p&gt;Consider a model with:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;80 layers
8 KV heads
128-dimensional heads
BF16 KV cache = 2 bytes
4,000 tokens
&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;M_KV
~= 2 * 80 * 8 * 128 * 4000 * 2
~= 1.31 billion bytes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;or roughly &lt;strong&gt;1.2 GiB per request&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;At 32K tokens, the same request is roughly:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;9.8 GiB of KV cache.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now the distributed-systems problem becomes obvious.&lt;/p&gt;

&lt;p&gt;Suppose you have to move 1.2 GiB from a prefill GPU to a decode GPU.&lt;/p&gt;

&lt;p&gt;With a theoretical 400 Gb/s interconnect:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;400 Gb/s = 50 GB/s
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;so the absolute bandwidth floor is approximately:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1.2 GB / 50 GB/s
~= 24 ms
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;That isn't necessarily the actual latency—you have protocol overhead, topology, serialization, synchronization, GPU copies, contention, and so on.&lt;/p&gt;

&lt;p&gt;But it gives you the right intuition:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Disaggregation replaces GPU interference with a network-transfer problem.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That trade is worthwhile only when the interference you eliminate is more expensive than the communication you introduce.&lt;/p&gt;

&lt;p&gt;This is why DistServe explicitly considers cluster bandwidth and KV-cache transfer when deciding where to place prefill and decode workers.&lt;/p&gt;
&lt;h2&gt;
  
  
  5. The math explains why decode is such a strange workload
&lt;/h2&gt;

&lt;p&gt;Here's a useful back-of-the-envelope calculation.&lt;/p&gt;

&lt;p&gt;Suppose you have a 70B-parameter model running in BF16.&lt;/p&gt;

&lt;p&gt;The weights alone occupy roughly:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;70B parameters * 2 bytes
~= 140 GB
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;A rough rule for transformer inference is around:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;2 * parameters
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;FLOPs per token for the dense model.&lt;/p&gt;

&lt;p&gt;So:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;70B * 2
~= 140 GFLOPs/token
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;For a 4,000-token prompt, that gives approximately:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;140 GFLOPs/token * 4000 tokens
= 560 TFLOPs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;of model computation, ignoring architectural details and attention-specific terms.&lt;/p&gt;

&lt;p&gt;That is a substantial matrix-multiplication workload.&lt;/p&gt;

&lt;p&gt;Now consider decoding &lt;strong&gt;one&lt;/strong&gt; token.&lt;/p&gt;

&lt;p&gt;It's only around:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;140 GFLOPs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Yet the model still needs to use its enormous parameter set.&lt;/p&gt;

&lt;p&gt;This is why decode benefits enormously from batching.&lt;/p&gt;

&lt;p&gt;Imagine 32 requests decoding simultaneously.&lt;/p&gt;

&lt;p&gt;The same model weights can participate in the computation for 32 tokens:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                    Model weights
                         |
        +----------------+----------------+
        v                v                v
      req A            req B            req C ...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Instead of paying the weight-access cost independently for each request.&lt;/p&gt;

&lt;p&gt;This is one reason a decode GPU can look strangely underutilized in conventional compute-utilization metrics while still being the bottleneck for latency.&lt;/p&gt;

&lt;p&gt;It isn't that the GPU has "nothing to do."&lt;/p&gt;

&lt;p&gt;It is that its workload has a very different &lt;strong&gt;arithmetic intensity&lt;/strong&gt; from prefill.&lt;/p&gt;

&lt;p&gt;This distinction is central to Splitwise's economic argument: the latest, most expensive GPU is extraordinarily valuable for compute-heavy prefill, but its additional compute capability is much less valuable for decode.&lt;/p&gt;


&lt;h2&gt;
  
  
  6. Now the economics become interesting
&lt;/h2&gt;

&lt;p&gt;Suppose you have two kinds of machines:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                    Prefill             Decode
                    -------             ------
Compute             extremely useful   less important
Memory bandwidth    useful             extremely important
Power               high               lower preferred
Cost                high               lower preferred
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;A conventional deployment 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;GPU GPU GPU GPU
|   |   |   |
+---+---+---+
    everything
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Every GPU has to support both workloads.&lt;/p&gt;

&lt;p&gt;But with disaggregation:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;             PREFILL                  DECODE

          H100 H100 H100          A100 A100 A100
             |                       |
             +------- network -------+
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;you can independently scale the two pools.&lt;/p&gt;

&lt;p&gt;Suppose your workload suddenly changes:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Before:
10,000 short prompts
500 output tokens each

After:
2,000 enormous prompts
500 output tokens each
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The prefill workload has exploded.&lt;/p&gt;

&lt;p&gt;You may want:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Prefill:
3 GPUs -&amp;gt; 8 GPUs

Decode:
4 GPUs -&amp;gt; 4 GPUs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;With a monolithic serving architecture, you're effectively scaling both together.&lt;/p&gt;

&lt;p&gt;With disaggregation, they become separate capacity-planning problems.&lt;/p&gt;

&lt;p&gt;This is exactly the kind of optimization Splitwise explored.&lt;/p&gt;

&lt;p&gt;The authors reported up to &lt;strong&gt;1.4x higher throughput at 20% lower cost&lt;/strong&gt;, or &lt;strong&gt;2.35x more throughput under the same cost and power budgets&lt;/strong&gt;, depending on the cluster configuration.&lt;/p&gt;

&lt;p&gt;Those numbers are important because they demonstrate that this isn't merely a latency trick.&lt;/p&gt;

&lt;p&gt;It can become a &lt;strong&gt;datacenter economics optimization&lt;/strong&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  7. But you don't always need disaggregation
&lt;/h2&gt;

&lt;p&gt;This is perhaps the most important practical point.&lt;/p&gt;

&lt;p&gt;If you're running:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;7B model
8 concurrent users
2K context
single GPU
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;you probably shouldn't build a distributed prefill/decode architecture.&lt;/p&gt;

&lt;p&gt;The complexity is ridiculous relative to the workload.&lt;/p&gt;

&lt;p&gt;There are intermediate techniques.&lt;/p&gt;

&lt;p&gt;One particularly important one is &lt;strong&gt;chunked prefill&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Instead of allowing a 20,000-token prompt to monopolize the GPU:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;20K-token prefill
████████████████████████
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;you split it:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;chunk 1
████

chunk 2
████

chunk 3
████
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;and schedule decode work between those chunks.&lt;/p&gt;

&lt;p&gt;Some systems explored this approach, combining chunked prefills with decode-heavy batching. On their tested workloads, they reported substantial improvements, including up to 10x decode throughput for LLaMA-13B on an A6000 and 1.33x end-to-end throughput.&lt;/p&gt;

&lt;p&gt;So there is a spectrum:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Simple
  |
  +-- Continuous batching
  |
  +-- Chunked prefill
  |
  +-- Better scheduling
  |
  +-- Prefill/decode disaggregation
       |
       v
Complex
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The last step makes sense when the scale and latency requirements justify it.&lt;/p&gt;

&lt;p&gt;Current vLLM documentation reflects exactly this distinction: its disaggregated-prefill implementation runs separate prefill and decode instances and transfers KV cache between them, while explicitly noting that disaggregation by itself does not necessarily improve raw throughput. Its major benefit is giving operators independent control over TTFT and inter-token latency and avoiding prefill-induced latency spikes.&lt;/p&gt;

&lt;p&gt;That qualification matters.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Disaggregation isn't magic.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It gives you a better set of knobs.&lt;/p&gt;

&lt;p&gt;Whether those knobs improve your system depends on your workload.&lt;/p&gt;
&lt;h2&gt;
  
  
  8. The deeper lesson: inference is becoming an operating-systems problem
&lt;/h2&gt;

&lt;p&gt;The interesting thing about this research is that the model itself isn't changing.&lt;/p&gt;

&lt;p&gt;The transformer is still:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;attention
  |
MLP
  |
attention
  |
MLP
  |
...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;What is changing is everything around it.&lt;/p&gt;

&lt;p&gt;Once models become sufficiently expensive, inference starts looking less like:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Run this neural network on a GPU."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;and more like:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Schedule heterogeneous computational phases across a distributed hardware system while managing a huge state object under latency SLOs."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That sounds remarkably like distributed systems.&lt;/p&gt;

&lt;p&gt;You now have:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;queues&lt;/li&gt;
&lt;li&gt;admission control&lt;/li&gt;
&lt;li&gt;scheduling&lt;/li&gt;
&lt;li&gt;cache placement&lt;/li&gt;
&lt;li&gt;memory management&lt;/li&gt;
&lt;li&gt;network topology&lt;/li&gt;
&lt;li&gt;batching&lt;/li&gt;
&lt;li&gt;backpressure&lt;/li&gt;
&lt;li&gt;load balancing&lt;/li&gt;
&lt;li&gt;tail latency&lt;/li&gt;
&lt;li&gt;capacity planning&lt;/li&gt;
&lt;li&gt;heterogeneous hardware&lt;/li&gt;
&lt;li&gt;cost optimization&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And the KV cache is effectively distributed state.&lt;/p&gt;

&lt;p&gt;Splitwise asked: &lt;em&gt;why not put the phases on different machines?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;DistServe went further and treated TTFT and TPOT as separate SLOs, optimizing resource allocation and parallelism for each phase.&lt;/p&gt;

&lt;p&gt;And the idea has since moved into real inference software: vLLM now exposes experimental disaggregated-prefill machinery based around separate prefill/decode instances and KV-cache transfer.&lt;/p&gt;

&lt;p&gt;The trajectory is revealing.&lt;/p&gt;

&lt;p&gt;We started by optimizing &lt;strong&gt;the neural network&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Then we optimized &lt;strong&gt;the GPU kernels&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Then &lt;strong&gt;batching and memory management&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Now we're increasingly optimizing &lt;strong&gt;the entire inference system&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;That is probably the more important shift.&lt;/p&gt;
&lt;h2&gt;
  
  
  Conclusion: Don't think of an LLM request as one computation
&lt;/h2&gt;

&lt;p&gt;The useful mental model is no longer:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;request
   |
   v
LLM
   |
   v
response
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Think:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                    REQUEST
                       |
                       v
               +--------------+
               |    PREFILL   |
               |              |
               | compute-heavy|
               +------+-------+
                      |
                  KV CACHE
                      |
               -------+-------
                  network
               -------+-------
                      |
               +------+-------+
               |    DECODE    |
               |              |
               | memory-heavy |
               | autoregressive|
               +------+-------+
                      |
                      v
                   RESPONSE
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Once you see those as two different workloads, a lot of otherwise strange behavior in LLM serving starts making sense.&lt;/p&gt;

&lt;p&gt;Why does a long prompt suddenly destroy token latency?&lt;/p&gt;

&lt;p&gt;Why does GPU utilization fail to tell you whether your inference system is healthy?&lt;/p&gt;

&lt;p&gt;Why can adding GPUs fail to improve interactive latency?&lt;/p&gt;

&lt;p&gt;Why might a cheaper GPU be perfectly adequate for part of an LLM workload?&lt;/p&gt;

&lt;p&gt;Why does network bandwidth suddenly become an inference bottleneck?&lt;/p&gt;

&lt;p&gt;And why are systems researchers talking about LLM serving in terms of queues, SLOs, cache placement and goodput rather than simply FLOPS?&lt;/p&gt;

&lt;p&gt;Because &lt;strong&gt;the neural network is only one component of the system anymore.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The interesting question for developers is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;As LLM inference gets increasingly disaggregated, which other parts of the inference stack do you think will become independently schedulable next?&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&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 FSRS Replaces 30-Year-Old Algorithms in Modern Memory Software</title>
      <dc:creator>Shrijith Venkatramana</dc:creator>
      <pubDate>Thu, 06 Aug 2026 19:34:22 +0000</pubDate>
      <link>https://dev.to/shrsv/how-fsrs-replaces-30-year-old-algorithms-in-modern-memory-software-del</link>
      <guid>https://dev.to/shrsv/how-fsrs-replaces-30-year-old-algorithms-in-modern-memory-software-del</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;strong&gt;Why your spaced repetition app needs a scheduler that learns&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Picture this: You are building a language learning app. Your users review flashcards daily. Some cards they remember easily. Others they forget repeatedly. Your scheduler must decide when to show each card again.&lt;/p&gt;

&lt;p&gt;For decades, the industry standard was SM-2 — the algorithm behind SuperMemo and Anki. SM-2 uses a single number (an "ease factor") to adjust intervals. It works. But it does not learn from user behavior.&lt;/p&gt;

&lt;p&gt;Then came Jarrett Ye. Working on MaiMemo, a language learning platform in China, Ye and his team asked a fundamental question: Can we build a scheduler that actually models how human memory works?&lt;/p&gt;

&lt;p&gt;The result was FSRS — the Free Spaced Repetition Scheduler. It is now the default scheduler in Anki as of version 23.10. It is open source. And it is backed by serious research: two peer-reviewed papers, one at ACM SIGKDD 2022 and one in IEEE Transactions on Knowledge and Data Engineering.&lt;/p&gt;

&lt;p&gt;This article explains FSRS from the ground up. We start with intuition. We go deeper into the math. We show code. By the end, you will know enough to implement FSRS in your own application.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. The Problem with One-Number Scheduling
&lt;/h2&gt;

&lt;p&gt;SM-2 uses a single parameter — the "ease factor" — to adjust intervals for all cards. If you rate a card "easy", the ease factor increases. If you rate it "hard", the ease factor decreases.&lt;/p&gt;

&lt;p&gt;This works for simple cases. But memory is not simple.&lt;/p&gt;

&lt;p&gt;Consider two cards you review today:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Card A: "Paris is the capital of France" — you know this well.&lt;/li&gt;
&lt;li&gt;Card B: "The chemical symbol for Tungsten is W" — you always confuse this.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Both cards might have the same ease factor under SM-2. But they are not the same. One is easy. One is hard. One should have longer intervals. The other should have shorter intervals.&lt;/p&gt;

&lt;p&gt;SM-2 cannot distinguish them. It uses one number for all cards.&lt;/p&gt;

&lt;p&gt;FSRS solves this by using three numbers per card.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. The DSR Model: Three Numbers Instead of One
&lt;/h2&gt;

&lt;p&gt;FSRS models memory using three variables:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Difficulty (D)&lt;/strong&gt; — How hard is this card? Range: 1.0 (easiest) to 10.0 (hardest). A card about "Paris" gets low difficulty. A card about "Tungsten" gets higher difficulty.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Stability (S)&lt;/strong&gt; — How strong is the memory? Definition: the number of days for recall probability to drop from 100% to 90%. If S = 30 days, you have a 90% chance of recalling it after 30 days.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Retrievability (R)&lt;/strong&gt; — The probability you will recall it right now. Range: 0 to 1. This changes daily as time passes.&lt;/p&gt;

&lt;p&gt;Here is the key insight: &lt;strong&gt;Stability and Difficulty are properties of the card. Retrievability is a property of the card and the time since your last review.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When you review a card, FSRS updates D and S based on your rating. Between reviews, R decays over time.&lt;/p&gt;

&lt;p&gt;The scheduler's job is simple: show the card when R drops to your target retention (usually 90%).&lt;/p&gt;

&lt;h2&gt;
  
  
  3. The Forgetting Curve: Why Power Beats Exponential
&lt;/h2&gt;

&lt;p&gt;Most spaced repetition systems use an exponential forgetting curve:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;R(t) = 0.9^(t/S)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;FSRS uses a &lt;strong&gt;power-law&lt;/strong&gt; forgetting curve:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;R(t, S) = (1 + F * (t/S))^(-0.5)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Where F = 19/81 ~ 0.2346.&lt;/p&gt;

&lt;p&gt;Why a power law? The research shows that a power function fits human memory data better than an exponential function.&lt;/p&gt;

&lt;p&gt;Here is the intuition: Human memory is not a single process. It is a superposition of many memory traces with different decay rates. A power law emerges naturally when you average many exponential decays.&lt;/p&gt;

&lt;p&gt;The practical difference: At long intervals, a power law predicts &lt;strong&gt;more forgetting&lt;/strong&gt; than an exponential curve. This matches real data — we forget more over long periods than exponential models predict.&lt;/p&gt;

&lt;p&gt;At short intervals (under 10 days), the two curves are nearly identical. The difference shows up over weeks and months.&lt;/p&gt;

&lt;p&gt;For developers: this means FSRS gives longer intervals for well-known cards and shorter intervals for hard cards — with better accuracy than exponential models.&lt;/p&gt;
&lt;h2&gt;
  
  
  4. State Updates: The Math Behind Each Review
&lt;/h2&gt;

&lt;p&gt;When a user rates a card, FSRS updates the memory state. Here is how it works.&lt;/p&gt;
&lt;h3&gt;
  
  
  Initial Review (New Card)
&lt;/h3&gt;

&lt;p&gt;For a new card, FSRS sets initial stability based on the user's rating:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Rating&lt;/th&gt;
&lt;th&gt;Initial Stability&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Again (1)&lt;/td&gt;
&lt;td&gt;0.4 days&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Hard (2)&lt;/td&gt;
&lt;td&gt;0.6 days&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Good (3)&lt;/td&gt;
&lt;td&gt;2.4 days&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Easy (4)&lt;/td&gt;
&lt;td&gt;5.8 days&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;These values come from default parameters — trained on 738 million reviews from 20,000 users.&lt;/p&gt;

&lt;p&gt;Initial difficulty is calculated as:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;D_0(G) = w_4 - e^(w_5 * (G-1)) + 1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Clamped to [1, 10]. Higher ratings yield lower difficulty.&lt;/p&gt;
&lt;h3&gt;
  
  
  Successful Review (Grade &amp;gt;= 2)
&lt;/h3&gt;

&lt;p&gt;When you remember a card, difficulty updates first:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;D_next = D_prev - w_6 * (G - 3)
D_new = w_7 * D_0(3) + (1 - w_7) * D_next
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;Rating &amp;gt; 3 -&amp;gt; difficulty decreases (card gets easier)&lt;/li&gt;
&lt;li&gt;Rating &amp;lt; 3 -&amp;gt; difficulty increases (card gets harder)&lt;/li&gt;
&lt;li&gt;Mean reversion (w_7) prevents extreme values&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then stability updates:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;GrowthFactor = e^(w_8) * (11 - D) * S^(-w_9) * (e^(w_10*(1-R)) - 1) * h * b
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Where:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;h = w_15 if Grade = 2 (Hard penalty), else 1&lt;/li&gt;
&lt;li&gt;b = w_16 if Grade = 4 (Easy bonus), else 1&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The new stability is:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;S_new = S_prev * (1 + GrowthFactor)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This looks complex. But the intuition is simple: &lt;strong&gt;The growth factor depends on difficulty, current stability, retrievability at review time, and the user's rating.&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Higher difficulty -&amp;gt; smaller growth (hard cards improve more slowly)&lt;/li&gt;
&lt;li&gt;Higher current stability -&amp;gt; smaller growth (already stable cards improve more slowly)&lt;/li&gt;
&lt;li&gt;Lower retrievability -&amp;gt; larger growth (if you almost forgot it, reviewing it strengthens memory more)&lt;/li&gt;
&lt;li&gt;"Easy" rating -&amp;gt; bonus growth&lt;/li&gt;
&lt;li&gt;"Hard" rating -&amp;gt; penalty&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Failed Review (Grade = 1)
&lt;/h3&gt;

&lt;p&gt;When you forget a card, stability decreases:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;S_new = w_17 * D^(-w_18) * (S_prev + 1)^(-w_19)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Difficulty increases:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;D_new = D_prev + w_11
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Clamped to [1, 10].&lt;/p&gt;
&lt;h2&gt;
  
  
  5. Interval Calculation: When to Show the Card
&lt;/h2&gt;

&lt;p&gt;Once we have stability S and target retention R_req, we calculate the interval:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;I(S, R_req) = S * (81/19) * (R_req^(-2) - 1)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;For R_req = 0.9 (90% target):&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;I = S * (81/19) * (1/0.81 - 1) = S * (81/19) * (19/81) = S
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;At 90% retention, the optimal interval equals stability&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;For other retention targets:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;R_req = 0.85 -&amp;gt; I ~ 0.75 * S (shorter interval, higher retention)&lt;/li&gt;
&lt;li&gt;R_req = 0.95 -&amp;gt; I ~ 1.38 * S (longer interval, lower retention)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This trade-off is the core economics of spaced repetition: &lt;strong&gt;Higher retention means more reviews. Lower retention means fewer reviews but more forgetting.&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  6. The Optimizer: Learning from Your Data
&lt;/h2&gt;

&lt;p&gt;The scheduler uses 19 parameters (w_0 through w_19). Default parameters come from 738 million reviews across 20,000 users.&lt;/p&gt;

&lt;p&gt;But FSRS can do better: it can &lt;strong&gt;learn your personal memory patterns&lt;/strong&gt; from your review history.&lt;/p&gt;

&lt;p&gt;The optimizer uses two techniques:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Maximum Likelihood Estimation (MLE)&lt;/strong&gt; — Find parameters that make your observed review outcomes most probable&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Backpropagation Through Time (BPTT)&lt;/strong&gt; — Train the model on time-series review data&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The optimizer takes your review logs — each with timestamp, card ID, and rating — and finds the parameters that best fit your data.&lt;/p&gt;

&lt;p&gt;In practice, optimized FSRS beats default FSRS, which beats SM-2:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Default FSRS better than SM-2 for 92% of users&lt;/li&gt;
&lt;li&gt;Optimized FSRS better than SM-2 for 99% of users&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;For developers&lt;/strong&gt;: The FSRS Optimizer is available as a Python library. You can feed it review logs and get optimized parameters. The optimizer runs on the client side (in the browser via WebAssembly) or on a server.&lt;/p&gt;
&lt;h2&gt;
  
  
  7. Implementation: Code Examples
&lt;/h2&gt;
&lt;h3&gt;
  
  
  Python
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;fsrs&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Scheduler&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Card&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Rating&lt;/span&gt;

&lt;span class="c1"&gt;# Initialize with default parameters
&lt;/span&gt;&lt;span class="n"&gt;scheduler&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Scheduler&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="c1"&gt;# Create a new card
&lt;/span&gt;&lt;span class="n"&gt;card&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Card&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="c1"&gt;# Simulate a review with "Good" (rating 3)
&lt;/span&gt;&lt;span class="n"&gt;review_log&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;scheduler&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;review_card&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;card&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Rating&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Good&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Get the next review date
&lt;/span&gt;&lt;span class="n"&gt;next_interval_days&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;review_log&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;scheduled_days&lt;/span&gt;

&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Review again in &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;next_interval_days&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; days&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Py-FSRS is available on PyPI.&lt;/p&gt;
&lt;h3&gt;
  
  
  TypeScript
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;createEmptyCard&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;fsrs&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;Rating&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;ts-fsrs&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;card&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;createEmptyCard&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;scheduler&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;fsrs&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;card&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;updatedCard&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;reviewLog&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;scheduler&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;review&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;card&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;Rating&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Good&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Review again in &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;updatedCard&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;due&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; days`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;ts-fsrs is available on npm.&lt;/p&gt;
&lt;h3&gt;
  
  
  Rust
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="k"&gt;use&lt;/span&gt; &lt;span class="nn"&gt;fsrs&lt;/span&gt;&lt;span class="p"&gt;::{&lt;/span&gt;&lt;span class="n"&gt;FSRS&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Card&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Rating&lt;/span&gt;&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="k"&gt;mut&lt;/span&gt; &lt;span class="n"&gt;fsrs&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nn"&gt;FSRS&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;default&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="k"&gt;mut&lt;/span&gt; &lt;span class="n"&gt;card&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nn"&gt;Card&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;default&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;new_card&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;log&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;fsrs&lt;/span&gt;&lt;span class="nf"&gt;.review&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;card&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nn"&gt;Rating&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;Good&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="nd"&gt;println!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Review again in {} days"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;new_card&lt;/span&gt;&lt;span class="py"&gt;.due&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;FSRS-rs provides a Rust implementation with full training support.&lt;/p&gt;
&lt;h3&gt;
  
  
  Optimizing Parameters
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;fsrs_optimizer&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;optimize_parameters&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;fsrs&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;FSRSItem&lt;/span&gt;

&lt;span class="c1"&gt;# Load your review logs
&lt;/span&gt;&lt;span class="n"&gt;items&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;load_review_logs&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;  &lt;span class="c1"&gt;# List of FSRSItem
&lt;/span&gt;
&lt;span class="c1"&gt;# Optimize parameters for your data
&lt;/span&gt;&lt;span class="n"&gt;optimized_params&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;optimize_parameters&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;items&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Use optimized parameters
&lt;/span&gt;&lt;span class="n"&gt;scheduler&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;FSRS&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;parameters&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;optimized_params&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The FSRS Optimizer package handles this workflow.&lt;/p&gt;
&lt;h2&gt;
  
  
  9. Developer Considerations
&lt;/h2&gt;
&lt;h3&gt;
  
  
  Data Requirements
&lt;/h3&gt;

&lt;p&gt;FSRS works from day one with default parameters. But optimization requires data:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;At least 100 reviews for basic optimization&lt;/li&gt;
&lt;li&gt;1,000+ reviews for reliable personalization&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Implementation Options
&lt;/h3&gt;

&lt;p&gt;FSRS has implementations in:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Python (py-fsrs)&lt;/li&gt;
&lt;li&gt;TypeScript (ts-fsrs)&lt;/li&gt;
&lt;li&gt;Rust (fsrs-rs)&lt;/li&gt;
&lt;li&gt;Dart&lt;/li&gt;
&lt;li&gt;PHP&lt;/li&gt;
&lt;li&gt;C# (.NET)&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Migration from SM-2
&lt;/h3&gt;

&lt;p&gt;If you have existing users with SM-2 data, you can migrate. FSRS can estimate initial D and S from review history. Anki handles this automatically when you enable FSRS.&lt;/p&gt;
&lt;h3&gt;
  
  
  Free Scheduling
&lt;/h3&gt;

&lt;p&gt;The "Free" in FSRS means you can review cards early or late. FSRS adapts. If you review a card late and still remember it, stability increases more than if you reviewed it on time. If you review early, the algorithm accounts for that too.&lt;/p&gt;
&lt;h2&gt;
  
  
  10. Conclusion
&lt;/h2&gt;

&lt;p&gt;FSRS represents a fundamental improvement over traditional spaced repetition algorithms. It models memory with three variables instead of one. It uses a power-law forgetting curve that fits human memory data better. It learns from each user's review history.&lt;/p&gt;

&lt;p&gt;The research is solid: two peer-reviewed papers, one at ACM SIGKDD 2022 and one in IEEE TKDE 2023. The data is massive: 738 million reviews from 20,000 users. The results are clear: FSRS beats SM-2 for 92% of users with default parameters, and for 99% with optimized parameters.&lt;/p&gt;

&lt;p&gt;For developers, FSRS is ready to use. Pick an implementation. Import the library. Replace your scheduler. Your users will spend less time reviewing and remember more.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Now your turn&lt;/strong&gt;: Have you implemented a spaced repetition system? What algorithm did you use? Share your experience in the comments — including the data size, the user base, and what you learned.&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>SGLang Explained: Why LLM Inference Needed Its Own Programming Language</title>
      <dc:creator>Shrijith Venkatramana</dc:creator>
      <pubDate>Wed, 05 Aug 2026 19:29:06 +0000</pubDate>
      <link>https://dev.to/shrsv/sglang-explained-why-llm-inference-needed-its-own-programming-language-3fb6</link>
      <guid>https://dev.to/shrsv/sglang-explained-why-llm-inference-needed-its-own-programming-language-3fb6</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 LLM demo looks fast.&lt;/p&gt;

&lt;p&gt;A user sends one prompt. The model replies. Everybody is happy.&lt;/p&gt;

&lt;p&gt;Production is a different world.&lt;/p&gt;

&lt;p&gt;One GPU serves hundreds of users. Many prompts start with the same system prompt. Some users generate 20 tokens. Others generate 20,000. Agents branch into multiple reasoning paths. Memory fills up. GPU utilization falls. Costs rise.&lt;/p&gt;

&lt;p&gt;This is the problem that &lt;strong&gt;SGLang&lt;/strong&gt; tries to solve.&lt;/p&gt;

&lt;p&gt;It is easy to think of SGLang as "another inference framework." That misses the main idea.&lt;/p&gt;

&lt;p&gt;SGLang is really a &lt;strong&gt;co-design of a programming language and a runtime&lt;/strong&gt;. The language describes how an LLM application behaves. The runtime uses that information to execute the application much more efficiently.&lt;/p&gt;

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

&lt;h1&gt;
  
  
  The Story Behind SGLang
&lt;/h1&gt;

&lt;p&gt;SGLang came from researchers at &lt;strong&gt;UC Berkeley&lt;/strong&gt;, &lt;strong&gt;Stanford&lt;/strong&gt;, and the &lt;strong&gt;LMSYS&lt;/strong&gt; project. Several of the authors, including &lt;strong&gt;Lianmin Zheng&lt;/strong&gt;, &lt;strong&gt;Ion Stoica&lt;/strong&gt;, &lt;strong&gt;Joseph Gonzalez&lt;/strong&gt;, and &lt;strong&gt;Christos Kozyrakis&lt;/strong&gt;, have worked on distributed systems, machine learning infrastructure, and high-performance computing for many years. ([Stanford MAST Lab][1])&lt;/p&gt;

&lt;p&gt;Their observation was simple.&lt;/p&gt;

&lt;p&gt;Large language models no longer answer only one prompt.&lt;/p&gt;

&lt;p&gt;Modern applications perform:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;multiple LLM calls&lt;/li&gt;
&lt;li&gt;branching logic&lt;/li&gt;
&lt;li&gt;loops&lt;/li&gt;
&lt;li&gt;retrieval&lt;/li&gt;
&lt;li&gt;tool calls&lt;/li&gt;
&lt;li&gt;structured outputs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A simple customer support agent may execute ten or more model generations before it produces a final answer.&lt;/p&gt;

&lt;p&gt;Traditional inference engines treat every generation almost independently.&lt;/p&gt;

&lt;p&gt;SGLang treats the entire workflow as one program.&lt;/p&gt;

&lt;p&gt;That small shift changes everything.&lt;/p&gt;




&lt;h1&gt;
  
  
  The High-Level Intuition: Think Like a CPU Compiler
&lt;/h1&gt;

&lt;p&gt;Suppose a C compiler sees this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&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;span class="n"&gt;sum&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&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;The compiler does not execute one instruction at a time.&lt;/p&gt;

&lt;p&gt;It optimizes the whole loop.&lt;/p&gt;

&lt;p&gt;It removes unnecessary work.&lt;/p&gt;

&lt;p&gt;It improves memory access.&lt;/p&gt;

&lt;p&gt;It uses vector instructions.&lt;/p&gt;

&lt;p&gt;The programmer still writes simple code.&lt;/p&gt;

&lt;p&gt;The compiler makes it fast.&lt;/p&gt;

&lt;p&gt;SGLang applies the same idea to LLM applications.&lt;/p&gt;

&lt;p&gt;Instead of optimizing machine instructions, it optimizes &lt;strong&gt;language generation programs&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The runtime already knows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;which prompts share prefixes&lt;/li&gt;
&lt;li&gt;which branches reuse earlier work&lt;/li&gt;
&lt;li&gt;where generations start and stop&lt;/li&gt;
&lt;li&gt;which outputs have fixed structure&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That extra information lets the runtime remove a large amount of repeated computation.&lt;/p&gt;
&lt;h1&gt;
  
  
  The Economics: Why Recomputing Tokens Is Expensive
&lt;/h1&gt;

&lt;p&gt;Every generated token depends on every earlier token.&lt;/p&gt;

&lt;p&gt;That means the model creates a growing &lt;strong&gt;KV cache&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;For a long conversation, this cache becomes much larger than the generated text itself.&lt;/p&gt;

&lt;p&gt;Imagine 1,000 users.&lt;/p&gt;

&lt;p&gt;Each request starts with exactly the same system prompt.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;System prompt
↓

"You are an expert software architect..."
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Suppose the prompt contains &lt;strong&gt;4,000 tokens&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Without reuse:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1000 users × 4000 tokens

=

4 million prompt tokens
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The GPU performs the same computation one thousand times.&lt;/p&gt;

&lt;p&gt;That is wasted work.&lt;/p&gt;

&lt;p&gt;If the shared prefix is computed once and reused, almost all of that repeated computation disappears.&lt;/p&gt;

&lt;p&gt;This is exactly the kind of workload SGLang targets.&lt;/p&gt;

&lt;p&gt;As context windows continue to grow into hundreds of thousands or even millions of tokens, prefix reuse becomes even more valuable because the expensive part of inference moves from generation to prompt processing. ([Stanford MAST Lab][1])&lt;/p&gt;
&lt;h1&gt;
  
  
  RadixAttention: The Main Technical Idea
&lt;/h1&gt;

&lt;p&gt;The key innovation inside SGLang is called &lt;strong&gt;RadixAttention&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The name comes from the &lt;strong&gt;radix tree&lt;/strong&gt;, also called a &lt;strong&gt;prefix tree&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;A radix tree stores strings by sharing common prefixes.&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;apple
application
apply
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;All three words share:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;appl
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Instead of storing the prefix three times, the tree stores it once.&lt;/p&gt;

&lt;p&gt;SGLang applies the same idea to KV caches.&lt;/p&gt;

&lt;p&gt;Many prompts begin with identical text:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;System Prompt
↓

Few-shot examples
↓

User Question
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Only the user question changes.&lt;/p&gt;

&lt;p&gt;Instead of creating three independent KV caches:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Prompt A
Prompt B
Prompt C
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;the runtime stores one shared prefix and lets all requests reference it.&lt;/p&gt;

&lt;p&gt;The result is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;less GPU memory&lt;/li&gt;
&lt;li&gt;fewer repeated computations&lt;/li&gt;
&lt;li&gt;higher throughput&lt;/li&gt;
&lt;li&gt;lower latency&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is why RadixAttention becomes especially useful for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;chat applications&lt;/li&gt;
&lt;li&gt;coding assistants&lt;/li&gt;
&lt;li&gt;retrieval systems&lt;/li&gt;
&lt;li&gt;agent frameworks&lt;/li&gt;
&lt;li&gt;few-shot prompting&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;
  
  
  Programming LLM Applications Instead of Chaining API Calls
&lt;/h1&gt;

&lt;p&gt;Many LLM applications today look like this:&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;response1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;llm&lt;/span&gt;&lt;span class="p"&gt;(...)&lt;/span&gt;
&lt;span class="n"&gt;response2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;llm&lt;/span&gt;&lt;span class="p"&gt;(...)&lt;/span&gt;
&lt;span class="n"&gt;response3&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;llm&lt;/span&gt;&lt;span class="p"&gt;(...)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The application logic lives in Python.&lt;/p&gt;

&lt;p&gt;The inference engine sees only isolated requests.&lt;/p&gt;

&lt;p&gt;SGLang introduces a higher-level way to describe generation.&lt;/p&gt;

&lt;p&gt;A program can contain:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;variables&lt;/li&gt;
&lt;li&gt;loops&lt;/li&gt;
&lt;li&gt;branches&lt;/li&gt;
&lt;li&gt;structured generation&lt;/li&gt;
&lt;li&gt;tool calls&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Conceptually:&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;Generate&lt;/span&gt; &lt;span class="n"&gt;summary&lt;/span&gt;

&lt;span class="n"&gt;If&lt;/span&gt; &lt;span class="n"&gt;confidence&lt;/span&gt; &lt;span class="ow"&gt;is&lt;/span&gt; &lt;span class="n"&gt;low&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;Search&lt;/span&gt; &lt;span class="n"&gt;documents&lt;/span&gt;
    &lt;span class="n"&gt;Generate&lt;/span&gt; &lt;span class="n"&gt;again&lt;/span&gt;

&lt;span class="n"&gt;Return&lt;/span&gt; &lt;span class="n"&gt;JSON&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Instead of many disconnected API calls, the runtime sees one complete generation program.&lt;/p&gt;

&lt;p&gt;That visibility lets it schedule requests better, reuse cached prefixes, batch work more effectively, and avoid unnecessary memory movement.&lt;/p&gt;

&lt;p&gt;The result resembles the evolution from assembly language to modern compilers.&lt;/p&gt;

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

&lt;p&gt;The runtime performs optimization.&lt;/p&gt;
&lt;h1&gt;
  
  
  Why This Matters for the Next Generation of AI Systems
&lt;/h1&gt;

&lt;p&gt;The first generation of LLM software focused on model quality.&lt;/p&gt;

&lt;p&gt;The second generation focuses on &lt;strong&gt;systems engineering&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;A frontier model may cost tens of thousands of dollars per GPU.&lt;/p&gt;

&lt;p&gt;Large deployments may run thousands of GPUs continuously.&lt;/p&gt;

&lt;p&gt;Even a small increase in utilization can save millions of dollars each year.&lt;/p&gt;

&lt;p&gt;This is why inference has become a major research area.&lt;/p&gt;

&lt;p&gt;Recent work includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;continuous batching&lt;/li&gt;
&lt;li&gt;speculative decoding&lt;/li&gt;
&lt;li&gt;paged attention&lt;/li&gt;
&lt;li&gt;prefix caching&lt;/li&gt;
&lt;li&gt;quantization&lt;/li&gt;
&lt;li&gt;expert parallelism&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;SGLang combines many of these ideas into one production runtime while also providing a programming model that exposes more optimization opportunities than a simple HTTP API. Today it powers production deployments across hundreds of thousands of GPUs and generates trillions of tokens each day. ([SGLang Documentation][2])&lt;/p&gt;
&lt;h1&gt;
  
  
  Final Thoughts
&lt;/h1&gt;

&lt;p&gt;For many years, faster software came from better compilers.&lt;/p&gt;

&lt;p&gt;SGLang applies the same philosophy to LLM applications.&lt;/p&gt;

&lt;p&gt;Instead of treating every prompt as an isolated request, it treats the entire workflow as a program that can be analyzed and optimized.&lt;/p&gt;

&lt;p&gt;That change sounds small.&lt;/p&gt;

&lt;p&gt;In large production systems, it changes memory use, throughput, latency, and ultimately cost.&lt;/p&gt;

&lt;p&gt;As AI systems become more agentic and long-context models become common, this style of runtime optimization will likely become as important as model quality itself.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Question for developers:&lt;/strong&gt; Do you think the future of LLM infrastructure belongs to general-purpose serving engines, or will specialized systems like SGLang become the standard for production AI?&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>vLLM Explained: Ideas That Made LLM Serving Practical</title>
      <dc:creator>Shrijith Venkatramana</dc:creator>
      <pubDate>Tue, 04 Aug 2026 19:49:06 +0000</pubDate>
      <link>https://dev.to/shrsv/vllm-explained-ideas-that-made-llm-serving-practical-1147</link>
      <guid>https://dev.to/shrsv/vllm-explained-ideas-that-made-llm-serving-practical-1147</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;Many AI demonstrations look impressive.&lt;/p&gt;

&lt;p&gt;One developer sends one prompt. One GPU generates one answer.&lt;/p&gt;

&lt;p&gt;A production system is different.&lt;/p&gt;

&lt;p&gt;One GPU serves hundreds of users at the same time. One user sends a short question. Another user uploads a 50-page PDF. One request finishes in 100 ms. Another request generates thousands of tokens. GPU memory fills. Latency increases. Throughput decreases.&lt;/p&gt;

&lt;p&gt;In 2023, researchers at UC Berkeley studied this problem. The researchers found that the main bottleneck was no longer matrix multiplication.&lt;/p&gt;

&lt;p&gt;The bottleneck was &lt;strong&gt;memory management&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The researchers built &lt;strong&gt;vLLM&lt;/strong&gt; to solve this problem. Today, vLLM is one of the most widely used open-source systems for LLM serving.&lt;/p&gt;

&lt;p&gt;The key idea did not come from machine learning.&lt;/p&gt;

&lt;p&gt;The key idea came from operating systems.&lt;/p&gt;

&lt;h1&gt;
  
  
  1. Running One Model Is Easy. Serving Many Users Is Hard.
&lt;/h1&gt;

&lt;p&gt;Many developers first use an LLM with a small Python program.&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="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;transformers&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;AutoModelForCausalLM&lt;/span&gt;

&lt;span class="n"&gt;output&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;generate&lt;/span&gt;&lt;span class="p"&gt;(...)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This program works well during development.&lt;/p&gt;

&lt;p&gt;A production service has different requirements.&lt;/p&gt;

&lt;p&gt;Consider a customer support chatbot.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;User A sends 20 tokens.&lt;/li&gt;
&lt;li&gt;User B sends 5,000 tokens.&lt;/li&gt;
&lt;li&gt;User C receives streamed output for 30 seconds.&lt;/li&gt;
&lt;li&gt;User D cancels the request before completion.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All users share one GPU.&lt;/p&gt;

&lt;p&gt;A modern GPU is expensive. An NVIDIA H100 can cost tens of thousands of dollars. Cloud providers also charge several dollars per hour for one GPU.&lt;/p&gt;

&lt;p&gt;Suppose one GPU has only 20% utilization.&lt;/p&gt;

&lt;p&gt;Then about 80% of the GPU investment produces no useful work.&lt;/p&gt;

&lt;p&gt;The engineering question changes.&lt;/p&gt;

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

&lt;blockquote&gt;
&lt;p&gt;Can the model generate the correct answer?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;the engineer asks,&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Can the system keep the GPU busy every millisecond?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;vLLM focuses on this second question.&lt;/p&gt;
&lt;h1&gt;
  
  
  2. The Hidden Memory Cost
&lt;/h1&gt;

&lt;p&gt;Many developers think that model weights use most GPU memory.&lt;/p&gt;

&lt;p&gt;During inference, another data structure also uses a large amount of memory.&lt;/p&gt;

&lt;p&gt;This data structure is the &lt;strong&gt;KV cache&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Each generated token creates &lt;strong&gt;key tensors&lt;/strong&gt; and &lt;strong&gt;value tensors&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Future attention operations reuse these tensors.&lt;/p&gt;

&lt;p&gt;Without the KV cache, the model must process the complete prompt again for every generated token.&lt;/p&gt;

&lt;p&gt;The KV cache removes this repeated work.&lt;/p&gt;

&lt;p&gt;Consider a book.&lt;/p&gt;

&lt;p&gt;If the writer has no notes, the writer must read the complete manuscript before writing the next paragraph.&lt;/p&gt;

&lt;p&gt;The KV cache acts like these notes.&lt;/p&gt;

&lt;p&gt;The KV cache grows during generation.&lt;/p&gt;

&lt;p&gt;Suppose one request contains:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;8,000 prompt tokens&lt;/li&gt;
&lt;li&gt;1,000 generated tokens&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The KV cache stores information for about 9,000 tokens.&lt;/p&gt;

&lt;p&gt;Now multiply this memory by hundreds of active requests.&lt;/p&gt;

&lt;p&gt;The available GPU memory decreases quickly.&lt;/p&gt;

&lt;p&gt;Each request also grows at a different rate.&lt;/p&gt;

&lt;p&gt;Some conversations finish after 50 tokens.&lt;/p&gt;

&lt;p&gt;Some conversations continue for thousands of tokens.&lt;/p&gt;

&lt;p&gt;Memory becomes fragmented.&lt;/p&gt;

&lt;p&gt;This fragmentation became one of the main limits for high-throughput LLM serving.&lt;/p&gt;
&lt;h1&gt;
  
  
  3. The Operating System Idea
&lt;/h1&gt;

&lt;p&gt;The Berkeley team saw a familiar problem.&lt;/p&gt;

&lt;p&gt;The KV cache behaves like computer memory.&lt;/p&gt;

&lt;p&gt;A process starts.&lt;/p&gt;

&lt;p&gt;A process grows.&lt;/p&gt;

&lt;p&gt;A process ends.&lt;/p&gt;

&lt;p&gt;Operating systems solved this problem many years ago.&lt;/p&gt;

&lt;p&gt;A modern operating system does not require one continuous block of RAM for every process.&lt;/p&gt;

&lt;p&gt;Instead, the operating system divides memory into fixed-size pages.&lt;/p&gt;

&lt;p&gt;Virtual memory maps logical addresses to physical pages.&lt;/p&gt;

&lt;p&gt;An application does not know the physical location of each page.&lt;/p&gt;

&lt;p&gt;The vLLM team applied the same idea to the KV cache.&lt;/p&gt;

&lt;p&gt;This design became &lt;strong&gt;PagedAttention&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The KV cache is divided into many small blocks.&lt;/p&gt;

&lt;p&gt;The blocks can exist anywhere in GPU memory.&lt;/p&gt;

&lt;p&gt;A lookup table records the physical location of every block.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Traditional

Request
-------------------------
| Continuous KV Cache   |
-------------------------

PagedAttention

Logical Cache

Block 1
Block 2
Block 3
Block 4

↓

GPU Memory

Page 7
Page 2
Page 19
Page 5
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The model sees one logical KV cache.&lt;/p&gt;

&lt;p&gt;The GPU stores many separate physical blocks.&lt;/p&gt;

&lt;p&gt;This design is the same general idea that operating systems use for virtual memory.&lt;/p&gt;
&lt;h1&gt;
  
  
  4. Continuous Batching
&lt;/h1&gt;

&lt;p&gt;PagedAttention solves one problem.&lt;/p&gt;

&lt;p&gt;Scheduling solves another problem.&lt;/p&gt;

&lt;p&gt;Traditional batching works like a bus.&lt;/p&gt;

&lt;p&gt;The bus waits for all passengers.&lt;/p&gt;

&lt;p&gt;Then the bus starts.&lt;/p&gt;

&lt;p&gt;LLM inference originally behaved in a similar way.&lt;/p&gt;

&lt;p&gt;The system created one batch.&lt;/p&gt;

&lt;p&gt;The system waited.&lt;/p&gt;

&lt;p&gt;The system completed the batch.&lt;/p&gt;

&lt;p&gt;Then the system created the next batch.&lt;/p&gt;

&lt;p&gt;Continuous batching behaves more like an elevator.&lt;/p&gt;

&lt;p&gt;When one request finishes, a new request immediately enters the batch.&lt;/p&gt;

&lt;p&gt;The GPU does not wait for the remaining requests.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Time →

Request A ███████████████

Request B █████

Request C        ███████████
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Request B finishes first.&lt;/p&gt;

&lt;p&gt;The scheduler immediately inserts another request.&lt;/p&gt;

&lt;p&gt;GPU utilization stays high.&lt;/p&gt;

&lt;p&gt;Latency decreases.&lt;/p&gt;

&lt;p&gt;Throughput increases.&lt;/p&gt;

&lt;p&gt;This scheduling method is one reason why vLLM achieves much higher throughput than earlier serving systems.&lt;/p&gt;
&lt;h1&gt;
  
  
  5. Small Performance Gains Have Large Financial Value
&lt;/h1&gt;

&lt;p&gt;Suppose one GPU serves 80 requests every second.&lt;/p&gt;

&lt;p&gt;An improved serving system increases throughput to 120 requests every second.&lt;/p&gt;

&lt;p&gt;This change increases throughput by 50%.&lt;/p&gt;

&lt;p&gt;Now consider a service that processes 12 million requests every day.&lt;/p&gt;

&lt;p&gt;Before optimization:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;120 GPUs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;After optimization:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;80 GPUs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The service removes 40 GPUs.&lt;/p&gt;

&lt;p&gt;Suppose one GPU costs $3 per hour.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;40 × $3 × 24

≈ $2,880 each day

≈ $1 million each year
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;A small increase in utilization can produce a large reduction in infrastructure cost.&lt;/p&gt;

&lt;p&gt;For many AI companies, inference now costs more than model training.&lt;/p&gt;
&lt;h1&gt;
  
  
  6. Why vLLM Matters
&lt;/h1&gt;

&lt;p&gt;vLLM was developed by researchers including &lt;strong&gt;Woosuk Kwon&lt;/strong&gt;, &lt;strong&gt;Zhuohan Li&lt;/strong&gt;, &lt;strong&gt;Siyuan Zhuang&lt;/strong&gt;, &lt;strong&gt;Lianmin Zheng&lt;/strong&gt;, &lt;strong&gt;Joseph Gonzalez&lt;/strong&gt;, &lt;strong&gt;Hao Zhang&lt;/strong&gt;, and &lt;strong&gt;Ion Stoica&lt;/strong&gt; at &lt;strong&gt;UC Berkeley&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The work grew from the &lt;strong&gt;LMSYS&lt;/strong&gt; research group, which also created &lt;strong&gt;Chatbot Arena&lt;/strong&gt; and &lt;strong&gt;Vicuna&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The researchers operated public LLM services.&lt;/p&gt;

&lt;p&gt;The researchers saw that model quality improved quickly, but serving systems improved more slowly.&lt;/p&gt;

&lt;p&gt;The team presented the paper &lt;em&gt;Efficient Memory Management for Large Language Model Serving with PagedAttention&lt;/em&gt; at &lt;strong&gt;SOSP 2023&lt;/strong&gt;, one of the leading conferences in computer systems.&lt;/p&gt;

&lt;p&gt;This detail is important.&lt;/p&gt;

&lt;p&gt;The paper is a systems paper.&lt;/p&gt;

&lt;p&gt;The paper does not change the transformer architecture.&lt;/p&gt;

&lt;p&gt;The paper changes resource management.&lt;/p&gt;

&lt;p&gt;Today, many LLM serving systems use similar ideas.&lt;/p&gt;
&lt;h1&gt;
  
  
  7. The Bigger Lesson
&lt;/h1&gt;

&lt;p&gt;Many people expect the next breakthrough to come from a larger model.&lt;/p&gt;

&lt;p&gt;vLLM shows another path.&lt;/p&gt;

&lt;p&gt;The transformer stayed the same.&lt;/p&gt;

&lt;p&gt;The model weights stayed the same.&lt;/p&gt;

&lt;p&gt;The prompts stayed the same.&lt;/p&gt;

&lt;p&gt;The improvement came from better memory management, better scheduling, and better resource use.&lt;/p&gt;

&lt;p&gt;This pattern appears many times in computer science.&lt;/p&gt;

&lt;p&gt;Hardware improves.&lt;/p&gt;

&lt;p&gt;Algorithms improve.&lt;/p&gt;

&lt;p&gt;Then systems engineering becomes the next bottleneck.&lt;/p&gt;

&lt;p&gt;LLM serving has reached this stage.&lt;/p&gt;

&lt;p&gt;Future progress will depend on both better models and better systems.&lt;/p&gt;
&lt;h2&gt;
  
  
  What do you think?
&lt;/h2&gt;

&lt;p&gt;Most discussion about AI focuses on larger models, better prompts, and fine-tuning.&lt;/p&gt;

&lt;p&gt;Will the next 10× improvement come from better models, or will it come from better systems such as memory management, scheduling, caching, and GPU utilization?&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>
    </item>
    <item>
      <title>A Developer's Guide to LLM Model Serving - Part 2</title>
      <dc:creator>Shrijith Venkatramana</dc:creator>
      <pubDate>Mon, 03 Aug 2026 19:25:36 +0000</pubDate>
      <link>https://dev.to/shrsv/a-developers-guide-to-llm-model-serving-part-2-1fbg</link>
      <guid>https://dev.to/shrsv/a-developers-guide-to-llm-model-serving-part-2-1fbg</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;There are LLM inference enthusiasts who talk a lot about LLM serving.&lt;/p&gt;

&lt;p&gt;People mention terms like &lt;em&gt;prefill&lt;/em&gt;, &lt;em&gt;decode&lt;/em&gt;, &lt;em&gt;KV cache&lt;/em&gt;, &lt;em&gt;continuous batching&lt;/em&gt;, and &lt;em&gt;paged attention&lt;/em&gt;. After reading several articles, I could recognize the words, but I still could not answer a basic question:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;What actually happens after I send a prompt to an LLM?&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;As software engineers, we usually learn systems as a sequence of events. A web request reaches a server, middleware runs, business logic executes, and a response returns.&lt;/p&gt;

&lt;p&gt;I wanted the same mental model for LLMs.&lt;/p&gt;

&lt;p&gt;This article covers the second part of that journey.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. The Request Begins
&lt;/h2&gt;

&lt;p&gt;A simplified request flow 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;Client
    ↓
Load Balancer
    ↓
LLM Server
    ↓
Tokenizer
    ↓
Prefill
    ↓
Decode
    ↓
Streaming Response
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The two important stages are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Prefill&lt;/li&gt;
&lt;li&gt;Decode&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once these two ideas become clear, many later topics fit into place.&lt;/p&gt;
&lt;h2&gt;
  
  
  2. What Is Prefill?
&lt;/h2&gt;

&lt;p&gt;Suppose the prompt is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Explain quantum computing like I'm ten.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;My first question was:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Does the model start generating the response immediately?&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The answer is simpler than I expected.&lt;/p&gt;

&lt;p&gt;The model first processes the entire prompt.&lt;/p&gt;

&lt;p&gt;This stage is called &lt;strong&gt;prefill&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;A useful mental model is:&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;kvCache&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;firstToken&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;Prefill&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Prefill performs two tasks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Build the initial KV cache.&lt;/li&gt;
&lt;li&gt;Generate the first output token.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The model now has enough information to continue generating the response.&lt;/p&gt;
&lt;h2&gt;
  
  
  3. Decode Is a Simple Loop
&lt;/h2&gt;

&lt;p&gt;After prefill, the rest of the response comes from a repeated operation.&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;cache&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;token&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;Prefill&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;token&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="n"&gt;EOS&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;emit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;token&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;cache&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;token&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Decode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cache&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;token&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;Each call to &lt;code&gt;Decode()&lt;/code&gt; performs three actions:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Generate the next token.&lt;/li&gt;
&lt;li&gt;Update the KV cache.&lt;/li&gt;
&lt;li&gt;Return the new cache.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That loop continues until the model produces an end-of-sequence token.&lt;/p&gt;

&lt;p&gt;This was the first point where LLM inference started to feel like ordinary software instead of a black box.&lt;/p&gt;
&lt;h2&gt;
  
  
  4. What Is the KV Cache?
&lt;/h2&gt;

&lt;p&gt;The name made me think of a cache like Redis or a Go map.&lt;/p&gt;

&lt;p&gt;The actual idea is much simpler.&lt;/p&gt;

&lt;p&gt;The KV cache is data stored in GPU memory.&lt;/p&gt;

&lt;p&gt;During prefill, the model computes internal data for every prompt token and stores it.&lt;/p&gt;

&lt;p&gt;During decode, the model adds one new entry for every generated token.&lt;/p&gt;

&lt;p&gt;A simple mental model looks like this:&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="k"&gt;type&lt;/span&gt; &lt;span class="n"&gt;KVCache&lt;/span&gt; &lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;Layer0&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;Layer1&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;Layer2&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="o"&gt;...&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The cache grows during the entire conversation.&lt;/p&gt;

&lt;p&gt;The purpose is straightforward:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Save expensive computation so future tokens can reuse it.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;
  
  
  5. Why Doesn't the Model Process the Prompt Again?
&lt;/h2&gt;

&lt;p&gt;Imagine a prompt with 2,000 tokens.&lt;/p&gt;

&lt;p&gt;Suppose the model generates 500 output tokens.&lt;/p&gt;

&lt;p&gt;One approach would be:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Read the 2,000 prompt tokens.&lt;/li&gt;
&lt;li&gt;Generate one token.&lt;/li&gt;
&lt;li&gt;Read the same 2,000 prompt tokens again.&lt;/li&gt;
&lt;li&gt;Generate the next token.&lt;/li&gt;
&lt;li&gt;Repeat.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That would repeat a large amount of computation.&lt;/p&gt;

&lt;p&gt;The KV cache changes the process.&lt;/p&gt;

&lt;p&gt;The model reads the prompt once during prefill.&lt;/p&gt;

&lt;p&gt;During decode, it reuses the cached information and adds data for each newly generated token.&lt;/p&gt;

&lt;p&gt;The expensive work happens once.&lt;/p&gt;
&lt;h2&gt;
  
  
  6. Wait... How Large Does the KV Cache Become?
&lt;/h2&gt;

&lt;p&gt;This was the next question I asked.&lt;/p&gt;

&lt;p&gt;If every prompt token adds data to the cache...&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What happens with a one million token prompt?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The answer follows directly from the mental model.&lt;/p&gt;

&lt;p&gt;The cache grows with every token.&lt;/p&gt;

&lt;p&gt;A rough estimate for a 7B model gives memory usage on the order of hundreds of kilobytes per token.&lt;/p&gt;

&lt;p&gt;That leads to numbers like these:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Prompt Length&lt;/th&gt;
&lt;th&gt;Approximate KV Cache Size&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1,000 tokens&lt;/td&gt;
&lt;td&gt;Hundreds of MB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;100,000 tokens&lt;/td&gt;
&lt;td&gt;Tens of GB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1,000,000 tokens&lt;/td&gt;
&lt;td&gt;Hundreds of GB&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Modern models reduce this memory with techniques such as &lt;strong&gt;Grouped Query Attention (GQA)&lt;/strong&gt;. Several query heads share the same Keys and Values, so the cache becomes much smaller.&lt;/p&gt;

&lt;p&gt;The important idea is simple.&lt;/p&gt;

&lt;p&gt;Long context windows require large amounts of memory because the KV cache keeps growing.&lt;/p&gt;

&lt;p&gt;This explains why modern serving systems spend so much effort on KV cache management.&lt;/p&gt;
&lt;h2&gt;
  
  
  7. A Simple Mental Model
&lt;/h2&gt;

&lt;p&gt;After working through these ideas, I arrived at one picture that I keep in my head.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Prompt
    ↓
Prefill(prompt)
    ↓
KV Cache + First Token
    ↓
Decode(...)
    ↓
Next Token
    ↓
Decode(...)
    ↓
Next Token
    ↓
...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This model answers many basic questions.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Why does the model read the prompt before generating text?&lt;/li&gt;
&lt;li&gt;Why does GPU memory increase with context length?&lt;/li&gt;
&lt;li&gt;Why does every serving framework discuss the KV cache?&lt;/li&gt;
&lt;li&gt;Why do serving optimizations focus on prefill and decode?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I still have many questions about attention, batching, scheduling, and parallelism.&lt;/p&gt;

&lt;p&gt;Now I have a place to attach those ideas as I learn them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What part of LLM inference took the longest to click for you? Was it attention, the KV cache, batching, or something else?&lt;/strong&gt;&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>A Developer's Guide to LLM Model Serving - Part 1</title>
      <dc:creator>Shrijith Venkatramana</dc:creator>
      <pubDate>Sun, 02 Aug 2026 19:59:02 +0000</pubDate>
      <link>https://dev.to/shrsv/a-developers-guide-to-llm-model-serving-part-1-204</link>
      <guid>https://dev.to/shrsv/a-developers-guide-to-llm-model-serving-part-1-204</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;Training a model and deploying it are two very different problems.&lt;/p&gt;

&lt;p&gt;After completing a PyTorch tutorial, it's easy to think of the resulting &lt;code&gt;.pt&lt;/code&gt; file as the artifact that matters. In production, however, the challenge shifts from training to serving: accepting requests, loading models, scheduling inference, managing GPUs, and returning responses with predictable latency.&lt;/p&gt;

&lt;p&gt;As LLMs have grown larger, serving infrastructure has become a significant engineering problem in its own right. John Hennessy remarked in 2023 that running an LLM request could be around ten times more expensive than a traditional keyword search, making inference costs an important consideration for production systems.&lt;/p&gt;

&lt;p&gt;This article walks through the fundamentals of model serving, from what a deployed model actually consists of to why frameworks like vLLM and Triton exist.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. A Model Is More Than a Weight File
&lt;/h2&gt;

&lt;p&gt;It's common to think of a trained model as simply a large collection of learned weights.&lt;/p&gt;

&lt;p&gt;In practice, a deployed model consists of three distinct parts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Model architecture&lt;/strong&gt; – the code that defines the structure of the neural network.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Model data&lt;/strong&gt; – the learned weights, biases, and configuration.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Execution code&lt;/strong&gt; – the runtime responsible for loading the model and executing inference.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The book describes models as executable programs rather than passive data files. The weights alone are not enough—they need an architecture and an execution runtime before they can produce predictions.&lt;/p&gt;

&lt;p&gt;One practical consequence is that many projects store the architecture and weights separately. This makes it possible to evolve the architecture while partially loading compatible weights during deployment, rather than retraining the model from scratch.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Training and Serving Have Different Goals
&lt;/h2&gt;

&lt;p&gt;Training and serving optimize for different workloads.&lt;/p&gt;

&lt;p&gt;During training, the objective is to update model parameters using backpropagation. This usually involves very large batches running across multiple GPUs to maximize throughput.&lt;/p&gt;

&lt;p&gt;Serving only performs forward propagation. Instead of optimizing for training speed, it focuses on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  low latency&lt;/li&gt;
&lt;li&gt;  high availability&lt;/li&gt;
&lt;li&gt;  scalability&lt;/li&gt;
&lt;li&gt;  predictable operational costs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The serving stack is expected to handle anything from a handful of requests to millions while maintaining consistent response times. Cost-to-serve becomes one of the primary metrics when evaluating different deployment approaches.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. What Model Serving Actually Looks Like
&lt;/h2&gt;

&lt;p&gt;Production model serving involves considerably more than exposing a &lt;code&gt;generate()&lt;/code&gt; endpoint.&lt;/p&gt;

&lt;p&gt;A typical request flows through several components before it reaches the GPU:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Client
    ↓
API Gateway
    ↓
Load Balancer
    ↓
Inference Server
    ↓
Continuous Batch Scheduler
    ↓
GPU
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Traditional web infrastructure handles authentication, routing, and load balancing. ML-specific infrastructure is responsible for tokenization, scheduling, batching requests together, executing inference, and streaming responses back to clients. The architecture shown in the book separates these responsibilities explicitly.&lt;/p&gt;
&lt;h2&gt;
  
  
  4. Containerization Is the Foundation
&lt;/h2&gt;

&lt;p&gt;Most production inference happens inside containers.&lt;/p&gt;

&lt;p&gt;A serving container typically includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  the serving API&lt;/li&gt;
&lt;li&gt;  model management&lt;/li&gt;
&lt;li&gt;  the inference backend&lt;/li&gt;
&lt;li&gt;  access to model storage&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The container exposes an HTTP or gRPC interface while handling model initialization, execution, and resource management internally. This allows the same deployment to run consistently across development, testing, and production environments.&lt;/p&gt;

&lt;p&gt;A simplified request flow 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;Request
    ↓
Serving API
    ↓
Inference Backend
    ↓
Model Runtime
    ↓
Prediction
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h2&gt;
  
  
  5. Why Specialized Serving Frameworks Exist
&lt;/h2&gt;

&lt;p&gt;General-purpose ML libraries are designed primarily for experimentation and training. Serving large language models efficiently requires additional optimizations.&lt;/p&gt;

&lt;p&gt;Frameworks such as &lt;strong&gt;vLLM&lt;/strong&gt;, &lt;strong&gt;TensorRT-LLM&lt;/strong&gt;, and &lt;strong&gt;SGLang&lt;/strong&gt; are built specifically for inference workloads.&lt;/p&gt;

&lt;p&gt;For example, a typical vLLM deployment exposes tuning parameters such as GPU memory utilization, maximum concurrent sequences, tensor parallelism, and maximum batched tokens:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python &lt;span class="nt"&gt;-m&lt;/span&gt; vllm.entrypoints.openai.api_server &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--model&lt;/span&gt; openai/gpt-oss-20b &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--dtype&lt;/span&gt; bf16 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--gpu-memory-utilization&lt;/span&gt; 0.9 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--max-num-seqs&lt;/span&gt; 16 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--max-num-batched-tokens&lt;/span&gt; 16384 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--tensor-parallel-size&lt;/span&gt; 2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;These settings control how requests are scheduled and distributed across available hardware.&lt;/p&gt;

&lt;p&gt;The benchmark reproduced in &lt;em&gt;Hands-On LLM Serving and Optimization&lt;/em&gt; shows substantially higher serving throughput for vLLM than standard Hugging Face serving under the tested configurations.&lt;/p&gt;
&lt;h2&gt;
  
  
  6. Serving More Than One Model
&lt;/h2&gt;

&lt;p&gt;Many production applications rely on multiple models rather than a single LLM.&lt;/p&gt;

&lt;p&gt;A typical application might combine:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  an embedding model for semantic search&lt;/li&gt;
&lt;li&gt;  a reranker&lt;/li&gt;
&lt;li&gt;  a vision model&lt;/li&gt;
&lt;li&gt;  a language model for generation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Managing each model independently quickly becomes operationally complex.&lt;/p&gt;

&lt;p&gt;NVIDIA Triton Inference Server addresses this by providing a unified serving platform capable of loading multiple models in different formats, including PyTorch, ONNX, TensorRT, and TensorFlow. It also manages model loading, caching, and routing through a common API.&lt;/p&gt;
&lt;h2&gt;
  
  
  7. Why Serving Economics Matter
&lt;/h2&gt;

&lt;p&gt;The cost of serving an LLM is determined by more than GPU prices.&lt;/p&gt;

&lt;p&gt;A large part of the problem is utilization.&lt;/p&gt;

&lt;p&gt;GPUs that spend significant time idle still incur the same infrastructure cost. Shared inference platforms can aggregate requests from many customers, keeping hardware utilization high and reducing the average cost per request.&lt;/p&gt;

&lt;p&gt;The notes summarize the resulting cost hierarchy as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Model labs&lt;/li&gt;
&lt;li&gt;  General-purpose inference providers&lt;/li&gt;
&lt;li&gt;  Enterprise self-hosted deployments&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The more effectively GPU capacity is utilized, the lower the cost of serving each token tends to be.&lt;/p&gt;
&lt;h2&gt;
  
  
  Closing Thoughts
&lt;/h2&gt;

&lt;p&gt;Model serving sits at the intersection of machine learning and distributed systems.&lt;/p&gt;

&lt;p&gt;The model itself is only one component of a production deployment. The serving stack is responsible for scheduling requests, managing hardware, exposing APIs, handling failures, and keeping inference costs under control.&lt;/p&gt;

&lt;p&gt;Understanding these pieces makes it easier to evaluate serving frameworks, deployment architectures, and the trade-offs between latency, throughput, and operational cost.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What serving framework or deployment architecture are you using today, and what trade-offs led you to that choice?&lt;/strong&gt;&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>Figuring Out Math Concepts with Ask Gemini</title>
      <dc:creator>Shrijith Venkatramana</dc:creator>
      <pubDate>Wed, 29 Jul 2026 18:45:53 +0000</pubDate>
      <link>https://dev.to/shrsv/figuring-out-math-concepts-with-ask-gemini-1khj</link>
      <guid>https://dev.to/shrsv/figuring-out-math-concepts-with-ask-gemini-1khj</guid>
      <description>&lt;p&gt;I've always wanted to learn more math. &lt;/p&gt;

&lt;p&gt;I have made efforts here and there, but the overwhelming challenge, and my lack of time due to effort intensive work such as at &lt;a href="https://hexmos.com/" rel="noopener noreferrer"&gt;Hexmos&lt;/a&gt; has kept my overall progress limited.&lt;/p&gt;

&lt;p&gt;These days, with LLMs, I have a renewed hope that -- perhaps, even a time poor person like me could get a decent grasp of mathematical ideas -- with a fraction of time investment compared to what it used to take before.&lt;/p&gt;

&lt;p&gt;My goal here is "Exposure", as Sean McClure tends to call it, "exposure":&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%2Fzid797fik4ui6eckqvno.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%2Fzid797fik4ui6eckqvno.png" alt="exposure and comprehension" width="736" height="771"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Anyway, how does one go about familiarize with Mathematical concepts with the help of LLMs?&lt;/p&gt;

&lt;p&gt;Alright, let's get started with something practical. &lt;/p&gt;

&lt;p&gt;I remember studying "eigen vectors" and such long back in my college days, and I'd like to get a refresher on it.&lt;/p&gt;

&lt;p&gt;And I already know that I like going through problem/solution sets or rather worked out examples, rather than going through tons of theory first.&lt;/p&gt;

&lt;p&gt;I am a "problem-first" explorer of topics.&lt;/p&gt;

&lt;p&gt;So I also happen to know that "Schaum's outlines" are good for this sort of stuff.&lt;/p&gt;

&lt;p&gt;And I google "Schaum's linear algebra" and get this&lt;/p&gt;

&lt;p&gt;The first link seems to have a PDF of some sort, let's check it out:&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%2F2p54rmkoc2ngp7jos3al.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%2F2p54rmkoc2ngp7jos3al.png" alt="schaum book" width="800" height="491"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then, in the text, I search for "Eigen", and I get the following. Also I hit "Ask Gemini" on the sidebar, and ask it a basic question to check whether it has context on the presently active page (page 299) -- it does!&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%2Fniwq3wojvfmepeoa2al1.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%2Fniwq3wojvfmepeoa2al1.png" alt="open ask gemini" width="800" height="392"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What catches my attention now is -- "two points of view", and that catches my interest.&lt;/p&gt;

&lt;p&gt;So I open a skill in Gemini "Break it down", and ask it "What are these two points of views"&lt;/p&gt;

&lt;p&gt;Gemini has these skills and one can add many other useful skills (idea - perhaps I can get it to quiz me to check my understanding -- something to check later!)&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%2Fllf8863k16tyr79k5zir.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%2Fllf8863k16tyr79k5zir.png" alt="Break it down skill" width="329" height="392"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A good start here -- the perspectives are "formula and numbers" vs "geometry and spaces"&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%2F80s8y3goy549p7jw1jew.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%2F80s8y3goy549p7jw1jew.png" alt="two views" width="487" height="234"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;OK -- noticed there are quizzes and flashcards too, pretty cool:&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%2F9owmijqqygwnqhkd2zy6.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%2F9owmijqqygwnqhkd2zy6.png" alt="quizzes and flashcards" width="301" height="338"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I'm reading this second paragraph, and I happen not to immediately have in my memory what is "diagonalization" or what is "invertible matrix".&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%2Fny4dp74ttx4mmjd7xp71.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%2Fny4dp74ttx4mmjd7xp71.png" alt="unknown terms" width="470" height="150"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I think dealing with "unknown terms" is a key operation in any kind of mathematical activity.&lt;/p&gt;

&lt;p&gt;Now, I can proceed in two ways:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Ask Gemini to find the relevant part of the text&lt;/li&gt;
&lt;li&gt;Go the Ctrl-F route I went earlier.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Also, as a side thought, I am starting to realize, reading a mathematical text with AI requires these sorts of "bookmarks" to switch between a session for various concepts. &lt;/p&gt;

&lt;p&gt;Having a free-flowing chat is fine, but then moving between references of the book can be way more powerful.&lt;/p&gt;

&lt;p&gt;Perhaps something like Google's NotebookLM can do a better job at this, but now, we will make do with Ask Gemini, and see if it can handle a question about finding content in the book itself.&lt;/p&gt;

&lt;p&gt;I also check whether the sidebar can take actions on my behalf (scroll to the page where concept x is introduced)&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%2Fnzv11xe9bkeqwceyufel.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%2Fnzv11xe9bkeqwceyufel.png" alt="scroll challenge" width="479" height="158"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Gemini responds -- gives me the section number, but it cannot scroll for me (how disappointing!). The blue link you see just links to the PDF top - no page number reference. This makes me think "Ask Gemini" doesn't have page number context at all or in a usable way.&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%2Fo9e1mv9oyufeauf362nb.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%2Fo9e1mv9oyufeauf362nb.png" alt="scroll response" width="495" height="266"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But the information is legit, I was able to Ctrl-F the piece of text, and find exactly what Gemini promised me:&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%2Flsjjwl7slwzofu3g00pw.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%2Flsjjwl7slwzofu3g00pw.png" alt="invertible matrix" width="787" height="577"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Gemini gave an answer of its own along with the previous response, but I found a better example in the book itself -- essentially multiply A x B, or B x A, you get a singular matrix -- and here A and B are inverses:&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%2Ffhuqoxi8xjc7ciz78crh.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%2Ffhuqoxi8xjc7ciz78crh.png" alt="inverted matrix" width="744" height="157"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now I am ready to go back to diagonalization, I wish the AI could help me navigate across pages as I need them, but there is no such facility as of now. So I find my own way with Ctrl-F for now.&lt;/p&gt;

&lt;p&gt;I wanted an ELI5 skill for this "Ask Gemini", but all I see is a "simplify" one:&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%2F3eu7cmkrc9g8h3n8jdds.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%2F3eu7cmkrc9g8h3n8jdds.png" alt="simplify skill" width="800" height="505"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The whole skill is available for inspection:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Objective: Transform complex content into a simple explanation a 5 year old could understand

1. **Identify the central point of the content**

    * Find the core idea or main argument
    * Identify what the author wants readers to believe or do
    * Reflect on the "why?" of the content
    * Note the scope and limitations of the content

2. **Assess complexity**

    * Identify technical terms, jargon, or specialized vocabulary
    * Note assumed knowledge or prerequisites

3. **Make abstract concepts concrete with analogies**

    * Connect to everyday experiences (for example, playground, kitchen, family)
    * Use physical objects to represent abstract ideas
    * Create simple cause-and-effect relationships

4. **Rewrite using language accessible to a kindergarten student**

    * Replace jargon with common words
    * Shorten sentences to one idea each
    * Use active voice and present tense
    * Avoid hedging words like "might", "perhaps", and "arguably"

5. **Handling exceptions**

    Prioritize excellent content in your response. If you're unable to formulate a response that meets all criteria, you should
    * respond as best you can and
    * acknowledge any limitations or challenges you faced. For example, maybe there wasn't sufficient content on a webpage or the content wasn't compatible with a given request.

    Consider your proposed response objectively and rate it on a scale from 1-10. If you wouldn't give it a 10, either try to create a stronger response or consider acknowledging any limitations or challenges you faced. The score is just for your own purposes; don't share it with the user.

6. **Final response**

    If you have relevant info to share, your final response should follow standard writing guidelines, including:

    * Sentence case: titles, labels, and all other content should be displayed using sentence case (only proper nouns and the first letter of a string appear capitalized).
    * Favor simple sentences that use common words

    Your final response should also be:
    * 3-5 short paragraphs
    * Under 200 words total
    * No jargon or technical terms
    * At least one concrete analogy

7. **Follow-up questions**

    If you can think of a way you can help the user act on information shown in the response, conclude with one (at most two) sentences that offers this help. Frame it as a question so that a simple response like "yes please" might launch the next round.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2Fal4kfgeghqdom47yiehf.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%2Fal4kfgeghqdom47yiehf.png" alt="skill inspection" width="522" height="532"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let's trigger an explanation with this:&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%2Fk1jvsqhqj20dbzu1bt93.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%2Fk1jvsqhqj20dbzu1bt93.png" alt="eli5" width="492" height="117"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is the explanation I got, and it doesn't make me feel better. It seems to be giving some toy analogy which made it worse (for me). It's like you can either spin the tray to arrange toys or you can look at it from another perspective (!). The robot teacher is leading me astray here.&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%2F6pt5tzq20vblvhbfv2lr.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%2F6pt5tzq20vblvhbfv2lr.png" alt="bit of a head spin" width="482" height="478"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Need something better. Let me try a hand-rolled prompt:&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%2F1rc8xvmtd1hruzh5vorm.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%2F1rc8xvmtd1hruzh5vorm.png" alt="Guess one can merely try" width="434" height="91"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Alright, much better - because it combines both technical analogy and ELI5 analogy:&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%2F95jziyevbyycpz42j926.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%2F95jziyevbyycpz42j926.png" alt="diagonalization example" width="486" height="548"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I am starting to get an intuitive feel for what the whole thing is about. The matrix view is not very meaningful to me. I can imagine points in space. I can also imagine them being "crooked" or "messy". Then we change our default point of view, using change of basis. I know what basis vectors are from history, so I have a sense of what these are. Basis vectors are the "core direction givers" for any object we put in a vector space. With these basis vectors and a multiplier matrix or such, we can regenerate the object. So these basis vectors are "compression objects" of sorts. Eigen vectors are something of the sort.&lt;/p&gt;

&lt;p&gt;I like the ELI5 example much better here -- it actually helps.&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%2Feke3330k5un3r4qc7n5r.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%2Feke3330k5un3r4qc7n5r.png" alt="diagonalization idea" width="413" height="459"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You have a crooked paper hanging in front, it's awkward to draw on. You want a straight line (90 degree like). So you change your chair position so that from your perspective it is crooked anymore, then draw, then put the chair back in position. This explains it best:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The formula $B = P^{-1}AP$ says: Change your perspective ($P$), do the action ($A$), then switch back ($P^{-1}$). The final result $B$ is the exact same action, but expressed in the easiest way possible!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now I have an intuitive sense of what is going on here. Now let's see where this is used most in terms of applications.&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%2F9fvkt37mersdkh4p8x7e.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%2F9fvkt37mersdkh4p8x7e.png" alt="diagonaliztaion applications" width="787" height="610"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;PageRank, PCA, phew -- this is everywhere, something truly important.&lt;/p&gt;

&lt;h2&gt;
  
  
  Concluding thoughts
&lt;/h2&gt;

&lt;p&gt;Overall, this experiment left me fairly optimistic.&lt;/p&gt;

&lt;p&gt;I don't think LLMs replace textbooks.&lt;/p&gt;

&lt;p&gt;They make textbooks much easier to read.&lt;/p&gt;

&lt;p&gt;A few things stood out to me:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The textbook remained the source of truth.&lt;/strong&gt; Gemini was most useful when explaining, connecting ideas, or helping me locate information.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Unknown terms stopped being roadblocks.&lt;/strong&gt; They became quick detours before returning to the main flow.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prompt quality mattered a lot.&lt;/strong&gt; The built-in "Simplify" skill wasn't particularly helpful here. A hand-written prompt asking for both intuition and the technical explanation produced much better results.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Applications made concepts stick.&lt;/strong&gt; Once diagonalization clicked, seeing PageRank and PCA immediately answered the question: "Why should I care?"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There are still some missing pieces.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Navigation is the biggest one.&lt;/strong&gt; Gemini could tell me where something was, but it couldn't take me there.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Page references would help enormously.&lt;/strong&gt; "Jump to page 284" feels like an obvious capability.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bookmarks and multiple threads would be even better.&lt;/strong&gt; Mathematical reading naturally branches into prerequisites and side quests. A chat interface isn't ideal for keeping track of all of them.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I'm curious to see where these tools go over the next year or two.&lt;/p&gt;

&lt;p&gt;For now, though, this already feels like a much more enjoyable way to work through technical books than constantly bouncing between PDFs, Google searches, and Stack Overflow.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Zig's Incremental Compilation: Why It Could Change the Way We Build Software</title>
      <dc:creator>Shrijith Venkatramana</dc:creator>
      <pubDate>Tue, 28 Jul 2026 17:14:25 +0000</pubDate>
      <link>https://dev.to/shrsv/zigs-incremental-compilation-why-it-could-change-the-way-we-build-software-1f6j</link>
      <guid>https://dev.to/shrsv/zigs-incremental-compilation-why-it-could-change-the-way-we-build-software-1f6j</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;What if changing a single function in a million-line codebase took **50 milliseconds&lt;/em&gt;* to rebuild instead of 30 seconds?*&lt;/p&gt;

&lt;p&gt;For decades, we've accepted a strange reality of software engineering.&lt;/p&gt;

&lt;p&gt;You change one line of code, yet the compiler often behaves as though you've rewritten the world.&lt;/p&gt;

&lt;p&gt;Build systems like Make, Ninja, Bazel, Cargo, and Gradle have become remarkably sophisticated at figuring out &lt;strong&gt;which files&lt;/strong&gt; need rebuilding. But most of that intelligence lives &lt;em&gt;outside&lt;/em&gt; the compiler. Once the compiler is invoked, it frequently has to redo far more work than seems necessary.&lt;/p&gt;

&lt;p&gt;The Zig project takes a different approach.&lt;/p&gt;

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

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Which files changed?&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;it asks:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Which declarations actually changed, and what truly depends on them?&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That subtle shift in perspective opens the door to dramatically faster feedback loops.&lt;/p&gt;

&lt;p&gt;Let's explore why incremental compilation matters, how Zig approaches the problem, and why compiler researchers have been pursuing this idea for decades.&lt;/p&gt;

&lt;h1&gt;
  
  
  The hidden tax of waiting
&lt;/h1&gt;

&lt;p&gt;Every developer knows this loop.&lt;br&gt;
&lt;/p&gt;

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

↓

Build

↓

Wait...

↓

Run

↓

Repeat
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;On a toy project, the delay is barely noticeable.&lt;/p&gt;

&lt;p&gt;On a large codebase, it becomes part of your day.&lt;/p&gt;

&lt;p&gt;A few seconds here. Ten seconds there. Hundreds of builds every week.&lt;/p&gt;

&lt;p&gt;The cost isn't simply time.&lt;/p&gt;

&lt;p&gt;Long feedback loops discourage experimentation.&lt;/p&gt;

&lt;p&gt;Instead of testing an idea immediately, developers begin batching unrelated changes together because "it's not worth waiting for another rebuild."&lt;/p&gt;

&lt;p&gt;Kent Beck has often argued that software development is fundamentally governed by the speed of feedback. Faster feedback encourages experimentation, smaller commits, and more confident refactoring.&lt;/p&gt;

&lt;p&gt;Compiler engineers have known this for decades as well. Improving compile times isn't just about benchmarks—it changes how programmers think.&lt;/p&gt;
&lt;h1&gt;
  
  
  Traditional compilation thinks in files
&lt;/h1&gt;

&lt;p&gt;Imagine you're renovating a city.&lt;/p&gt;

&lt;p&gt;One house changes.&lt;/p&gt;

&lt;p&gt;A traditional compiler often behaves like a city inspector who says:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Let's inspect every building on this street, just to be safe."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Modern build systems improve this considerably.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;main.c
├── parser.c
├── lexer.c
└── util.c
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;If &lt;code&gt;parser.c&lt;/code&gt; changes, the build system avoids recompiling completely unrelated files.&lt;/p&gt;

&lt;p&gt;That's a huge improvement.&lt;/p&gt;

&lt;p&gt;But files are still a fairly crude unit of change.&lt;/p&gt;

&lt;p&gt;Suppose this file contains twenty functions.&lt;/p&gt;

&lt;p&gt;Only one function changes.&lt;/p&gt;

&lt;p&gt;The compiler still ends up reprocessing the entire translation unit because, historically, C and C++ compilers fundamentally operate on source files and headers rather than individual declarations.&lt;/p&gt;

&lt;p&gt;This design made perfect sense in the 1970s.&lt;/p&gt;

&lt;p&gt;Today's software is rather larger.&lt;/p&gt;
&lt;h1&gt;
  
  
  Zig thinks in declarations instead
&lt;/h1&gt;

&lt;p&gt;Andrew Kelley, Zig's creator, has long argued that much of the compiler's work should be understood in terms of semantic dependencies rather than files. His article, &lt;strong&gt;:contentReference[oaicite:0]{index=0}&lt;/strong&gt;, outlines many of the design goals that eventually led to Zig's modern compiler architecture.&lt;/p&gt;

&lt;p&gt;Consider this Zig source file.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight zig"&gt;&lt;code&gt;&lt;span class="k"&gt;const&lt;/span&gt; &lt;span class="n"&gt;PI&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;3.14159&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="n"&gt;area&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;f64&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="kt"&gt;f64&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;PI&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="n"&gt;perimeter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;f64&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="kt"&gt;f64&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;PI&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="n"&gt;fibonacci&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;u32&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="kt"&gt;u32&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Suppose you modify only &lt;code&gt;area()&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Should the compiler revisit &lt;code&gt;perimeter()&lt;/code&gt;?&lt;/p&gt;

&lt;p&gt;Probably not.&lt;/p&gt;

&lt;p&gt;Should it revisit &lt;code&gt;fibonacci()&lt;/code&gt;?&lt;/p&gt;

&lt;p&gt;Certainly not.&lt;/p&gt;

&lt;p&gt;Instead of treating the entire file as one indivisible object, Zig tracks dependencies between &lt;strong&gt;individual declarations&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Only the declarations affected by your edit—and anything depending on them—need to be reconsidered.&lt;/p&gt;

&lt;p&gt;That's much closer to how humans naturally reason about software.&lt;/p&gt;
&lt;h1&gt;
  
  
  The compiler becomes a dependency graph
&lt;/h1&gt;

&lt;p&gt;The key insight is that software is really a graph.&lt;/p&gt;

&lt;p&gt;Not a graph of files.&lt;/p&gt;

&lt;p&gt;A graph of relationships.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Function A
      │
      ▼
Type B
      │
      ▼
Constant C
      │
      ▼
Function D
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Now imagine changing &lt;code&gt;Constant C&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Only the reachable portion of the graph needs updating.&lt;/p&gt;

&lt;p&gt;Everything else remains valid.&lt;/p&gt;

&lt;p&gt;A useful analogy is Microsoft Excel.&lt;/p&gt;

&lt;p&gt;When you change one spreadsheet cell, Excel doesn't recompute the entire workbook.&lt;/p&gt;

&lt;p&gt;Only the formulas depending on that cell are recalculated.&lt;/p&gt;

&lt;p&gt;Incremental compilation follows exactly the same philosophy.&lt;/p&gt;

&lt;p&gt;The difference is that software dependency graphs are vastly more complicated than spreadsheets.&lt;/p&gt;

&lt;p&gt;Functions call functions.&lt;/p&gt;

&lt;p&gt;Types depend on other types.&lt;/p&gt;

&lt;p&gt;Compile-time evaluation generates additional dependencies.&lt;/p&gt;

&lt;p&gt;Generic instantiations create entirely new ones.&lt;/p&gt;

&lt;p&gt;Keeping track of all this correctly is one of the hardest problems in compiler engineering.&lt;/p&gt;
&lt;h1&gt;
  
  
  The real challenge is invalidation
&lt;/h1&gt;

&lt;p&gt;People often imagine incremental compilation as simply "saving previous work."&lt;/p&gt;

&lt;p&gt;That's actually the easy part.&lt;/p&gt;

&lt;p&gt;The difficult question is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;How does the compiler know exactly what became invalid?&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Phil Karlton famously joked:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"There are only two hard things in Computer Science: cache invalidation and naming things."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Incremental compilation is essentially one enormous cache invalidation problem.&lt;/p&gt;

&lt;p&gt;Imagine changing&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight zig"&gt;&lt;code&gt;&lt;span class="k"&gt;const&lt;/span&gt; &lt;span class="n"&gt;BufferSize&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;4096&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Now what?&lt;/p&gt;

&lt;p&gt;Should the compiler revisit functions using it?&lt;/p&gt;

&lt;p&gt;Generic instantiations?&lt;/p&gt;

&lt;p&gt;Compile-time evaluated expressions?&lt;/p&gt;

&lt;p&gt;Type layouts?&lt;/p&gt;

&lt;p&gt;Generated machine code?&lt;/p&gt;

&lt;p&gt;Getting this wrong either produces incorrect binaries—or wastes time rebuilding things unnecessarily.&lt;/p&gt;

&lt;p&gt;Much of Zig's recent compiler work has focused precisely on this problem.&lt;/p&gt;

&lt;p&gt;Compiler engineer Matthew Lugg explains this journey in the excellent Zig engineering article &lt;strong&gt;:contentReference[oaicite:1]{index=1}&lt;/strong&gt;, describing how the compiler's type resolution and semantic analysis were redesigned so dependency tracking becomes far more precise instead of repeatedly "over-analyzing" the program.&lt;/p&gt;

&lt;p&gt;This isn't flashy work.&lt;/p&gt;

&lt;p&gt;But it's exactly the kind of engineering that determines whether incremental compilation actually feels instantaneous.&lt;/p&gt;
&lt;h1&gt;
  
  
  Why compiler researchers have chased this for decades
&lt;/h1&gt;

&lt;p&gt;Incremental compilation didn't begin with Zig.&lt;/p&gt;

&lt;p&gt;Researchers have explored it since the 1980s, driven first by interactive programming environments and later by IDEs, language servers, and ever-larger software systems.&lt;/p&gt;

&lt;p&gt;One particularly approachable modern paper is &lt;strong&gt;:contentReference[oaicite:2]{index=2}&lt;/strong&gt;, which argues that dependency management should increasingly become the compiler's responsibility rather than being handled exclusively by external build systems.&lt;/p&gt;

&lt;p&gt;Zig is interesting because it was designed with this direction in mind.&lt;/p&gt;

&lt;p&gt;Rather than bolting incremental compilation onto an existing decades-old compiler architecture, the project has steadily evolved its semantic analysis, dependency tracking, and self-hosted compiler so that incremental rebuilding becomes a natural consequence of the design.&lt;/p&gt;

&lt;p&gt;That's a much harder path.&lt;/p&gt;

&lt;p&gt;It may also prove to be the more scalable one.&lt;/p&gt;
&lt;h1&gt;
  
  
  More than faster builds
&lt;/h1&gt;

&lt;p&gt;It's tempting to think incremental compilation is simply about shaving seconds off compile times.&lt;/p&gt;

&lt;p&gt;The deeper benefit is psychological.&lt;/p&gt;

&lt;p&gt;Imagine your compiler remaining alive between edits.&lt;/p&gt;

&lt;p&gt;It already knows your program.&lt;/p&gt;

&lt;p&gt;It remembers previous analysis.&lt;/p&gt;

&lt;p&gt;You save a file.&lt;/p&gt;

&lt;p&gt;Only a tiny portion of the dependency graph changes.&lt;/p&gt;

&lt;p&gt;Errors appear almost immediately.&lt;/p&gt;

&lt;p&gt;That changes how you work.&lt;/p&gt;

&lt;p&gt;Instead of thinking,&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"I'll make five edits before rebuilding,"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;you naturally start thinking,&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Let's verify every tiny change."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Smaller feedback loops encourage smaller experiments.&lt;/p&gt;

&lt;p&gt;Smaller experiments usually lead to cleaner designs, easier debugging, and greater confidence while refactoring.&lt;/p&gt;

&lt;p&gt;The fastest compiler isn't necessarily the one that produces binaries the quickest.&lt;/p&gt;

&lt;p&gt;It's the one that tells you whether your last idea worked before you've lost the thread of your thinking.&lt;/p&gt;
&lt;h1&gt;
  
  
  Final thoughts
&lt;/h1&gt;

&lt;p&gt;Programming languages often compete on syntax.&lt;/p&gt;

&lt;p&gt;Or performance.&lt;/p&gt;

&lt;p&gt;Or memory safety.&lt;/p&gt;

&lt;p&gt;Or ecosystems.&lt;/p&gt;

&lt;p&gt;Zig is making another bet.&lt;/p&gt;

&lt;p&gt;That &lt;strong&gt;developer feedback latency&lt;/strong&gt; deserves to be treated as a first-class design goal.&lt;/p&gt;

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

&lt;blockquote&gt;
&lt;p&gt;"How can we compile faster?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;the Zig compiler increasingly asks,&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;"How little work is actually necessary after this edit?"&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Those aren't the same question.&lt;/p&gt;

&lt;p&gt;One optimizes the compiler.&lt;/p&gt;

&lt;p&gt;The other optimizes for the programmer.&lt;/p&gt;

&lt;p&gt;As our codebases continue growing into millions of lines, that distinction may become one of the more important innovations in modern compiler design.&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>programming</category>
      <category>productivity</category>
      <category>webdev</category>
      <category>zig</category>
    </item>
    <item>
      <title>Beyond Prompts: 10 Installable Superpowers for Coding Agents</title>
      <dc:creator>Shrijith Venkatramana</dc:creator>
      <pubDate>Mon, 27 Jul 2026 18:22:52 +0000</pubDate>
      <link>https://dev.to/shrsv/beyond-prompts-10-installable-superpowers-for-coding-agents-4e77</link>
      <guid>https://dev.to/shrsv/beyond-prompts-10-installable-superpowers-for-coding-agents-4e77</guid>
      <description>&lt;p&gt;Hi there! I'm Shrijith Venkatramana, and I'm building something I think you'll find useful—&lt;strong&gt;git-lrc&lt;/strong&gt;, an AI code reviewer that checks every commit before it lands in your repo. If that sounds interesting, &lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;give us a star on GitHub&lt;/a&gt; to help other devs discover it. And please, try it out—I'd genuinely love your feedback.&lt;/p&gt;




&lt;p&gt;AI coding agents are becoming more capable every month. But one of the biggest shifts isn't a better model—it's &lt;strong&gt;teaching your agent new skills&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Instead of writing the same prompt over and over ("review my architecture", "design a better UI", "help me write tests"), you can install reusable skills that encode proven workflows and best practices.&lt;/p&gt;

&lt;p&gt;The open &lt;strong&gt;skills.sh&lt;/strong&gt; ecosystem has already crossed &lt;strong&gt;1 million+ installs&lt;/strong&gt;, with hundreds of reusable skills available for Claude Code, Cursor, GitHub Copilot, Cline, and other compatible agents. :contentReference[oaicite:0]{index=0}&lt;/p&gt;

&lt;p&gt;Let's look at the current Top 10 skills, what each one does, and when you should actually use it.&lt;/p&gt;




&lt;h1&gt;
  
  
  Installing Skills
&lt;/h1&gt;

&lt;p&gt;First, install the Skills CLI.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx skills add &amp;lt;owner/repository&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;If the repository contains multiple skills:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx skills add &amp;lt;owner/repository&amp;gt; &lt;span class="nt"&gt;--skill&lt;/span&gt; &amp;lt;skill-name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Useful commands:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Search for skills&lt;/span&gt;
npx skills find react

&lt;span class="c"&gt;# Check for updates&lt;/span&gt;
npx skills check

&lt;span class="c"&gt;# Update installed skills&lt;/span&gt;
npx skills update
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The CLI works with many popular AI coding agents including Claude Code, Cursor, GitHub Copilot, and Cline. :contentReference[oaicite:1]{index=1}&lt;/p&gt;
&lt;h1&gt;
  
  
  1. find-skills (vercel-labs/skills)
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;What it does&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Think of this as the package manager for AI skills.&lt;/p&gt;

&lt;p&gt;Whenever your agent doesn't know the best workflow for something, this skill teaches it how to search the Skills ecosystem and recommend high-quality skills.&lt;/p&gt;

&lt;p&gt;Install:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx skills add vercel-labs/skills &lt;span class="nt"&gt;--skill&lt;/span&gt; find-skills
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Use it by asking:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Find me a skill for Docker deployments."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;or&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Is there a skill for writing better documentation?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It searches the ecosystem, recommends trustworthy skills, and even suggests install commands.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Best for&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Discovering new capabilities&lt;/li&gt;
&lt;li&gt;Exploring the ecosystem&lt;/li&gt;
&lt;li&gt;Finding community skills&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;
  
  
  2. frontend-design (anthropics/skills)
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;What it does&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Makes your AI much better at UI and frontend design.&lt;/p&gt;

&lt;p&gt;Instead of generating generic HTML, it starts thinking more like an experienced product designer by considering:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;visual hierarchy&lt;/li&gt;
&lt;li&gt;spacing&lt;/li&gt;
&lt;li&gt;typography&lt;/li&gt;
&lt;li&gt;color usage&lt;/li&gt;
&lt;li&gt;responsive layouts&lt;/li&gt;
&lt;li&gt;accessibility&lt;/li&gt;
&lt;li&gt;modern UI patterns&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Install:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx skills add anthropics/skills &lt;span class="nt"&gt;--skill&lt;/span&gt; frontend-design
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Try prompts like:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Redesign this dashboard."&lt;/p&gt;

&lt;p&gt;"Make this login page feel premium."&lt;/p&gt;

&lt;p&gt;"Improve the visual hierarchy."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You'll usually get noticeably better design suggestions than with a vanilla model.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Best for&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;React apps&lt;/li&gt;
&lt;li&gt;SaaS dashboards&lt;/li&gt;
&lt;li&gt;Landing pages&lt;/li&gt;
&lt;li&gt;Internal tools&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;
  
  
  3. grill-me (mattpocock/skills)
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;What it does&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is one of my favorites.&lt;/p&gt;

&lt;p&gt;Instead of agreeing with everything you say, the AI becomes a skeptical reviewer.&lt;/p&gt;

&lt;p&gt;It starts asking difficult questions like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Why?&lt;/li&gt;
&lt;li&gt;Have you considered X?&lt;/li&gt;
&lt;li&gt;What if this fails?&lt;/li&gt;
&lt;li&gt;What assumptions are you making?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Install:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx skills add mattpocock/skills &lt;span class="nt"&gt;--skill&lt;/span&gt; grill-me
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Example prompt:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Grill my API design."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;or&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Challenge my startup idea."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It feels like discussing your work with a strong senior engineer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Best for&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Architecture reviews&lt;/li&gt;
&lt;li&gt;Design reviews&lt;/li&gt;
&lt;li&gt;Startup ideas&lt;/li&gt;
&lt;li&gt;Technical proposals&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;
  
  
  4. agent-browser (vercel-labs/agent-browser)
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;What it does&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Teaches your agent browser automation workflows.&lt;/p&gt;

&lt;p&gt;Instead of just talking about web pages, the agent can reason about interacting with websites and browser-driven tasks.&lt;/p&gt;

&lt;p&gt;Install:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx skills add vercel-labs/agent-browser
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Example requests:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Test this signup flow."&lt;/p&gt;

&lt;p&gt;"Navigate the application and summarize the UX."&lt;/p&gt;

&lt;p&gt;"Check whether this responsive layout breaks."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Best for&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;QA&lt;/li&gt;
&lt;li&gt;Browser automation&lt;/li&gt;
&lt;li&gt;End-to-end testing&lt;/li&gt;
&lt;li&gt;UI inspection&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;
  
  
  5. vercel-react-best-practices
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;What it does&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A huge collection of React and Next.js best practices from Vercel.&lt;/p&gt;

&lt;p&gt;It teaches your AI things like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;rendering patterns&lt;/li&gt;
&lt;li&gt;performance&lt;/li&gt;
&lt;li&gt;component design&lt;/li&gt;
&lt;li&gt;React Server Components&lt;/li&gt;
&lt;li&gt;data fetching&lt;/li&gt;
&lt;li&gt;caching&lt;/li&gt;
&lt;li&gt;composition&lt;/li&gt;
&lt;li&gt;maintainability&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Install:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx skills add vercel-labs/agent-skills &lt;span class="nt"&gt;--skill&lt;/span&gt; vercel-react-best-practices
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Now ask:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Refactor this React component."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;or&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Improve the performance of this page."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The suggestions become much closer to what experienced React developers would recommend.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Best for&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;React&lt;/li&gt;
&lt;li&gt;Next.js&lt;/li&gt;
&lt;li&gt;Performance optimization&lt;/li&gt;
&lt;li&gt;Code reviews&lt;/li&gt;
&lt;/ul&gt;


&lt;h1&gt;
  
  
  6. grill-with-docs (mattpocock/skills)
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;What it does&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Similar to &lt;strong&gt;grill-me&lt;/strong&gt;, but instead of challenging your ideas from experience alone, it uses documentation as evidence.&lt;/p&gt;

&lt;p&gt;Rather than saying:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"I think this is wrong."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;it says:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"According to the documentation, this pattern isn't recommended."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Install:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx skills add mattpocock/skills &lt;span class="nt"&gt;--skill&lt;/span&gt; grill-with-docs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Great prompts:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Review this API usage."&lt;/p&gt;

&lt;p&gt;"Challenge this implementation against the framework docs."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Best for&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Learning frameworks&lt;/li&gt;
&lt;li&gt;Avoiding outdated APIs&lt;/li&gt;
&lt;li&gt;Documentation-driven reviews&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;
  
  
  7. improve-codebase-architecture
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;What it does&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Looks beyond individual files.&lt;/p&gt;

&lt;p&gt;Instead of suggesting variable renames, it examines:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;project structure&lt;/li&gt;
&lt;li&gt;module boundaries&lt;/li&gt;
&lt;li&gt;coupling&lt;/li&gt;
&lt;li&gt;abstractions&lt;/li&gt;
&lt;li&gt;maintainability&lt;/li&gt;
&lt;li&gt;scalability&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Install:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx skills add mattpocock/skills &lt;span class="nt"&gt;--skill&lt;/span&gt; improve-codebase-architecture
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Example:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Review this repository's architecture."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;or&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"How would you reorganize this project?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This is particularly useful on mature codebases.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Best for&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Refactoring&lt;/li&gt;
&lt;li&gt;Large repositories&lt;/li&gt;
&lt;li&gt;Technical debt&lt;/li&gt;
&lt;li&gt;Long-term maintainability&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;
  
  
  8. tdd (mattpocock/skills)
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;What it does&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Encourages the agent to work using Test-Driven Development.&lt;/p&gt;

&lt;p&gt;Instead of immediately generating implementation code, it tends to:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;write tests&lt;/li&gt;
&lt;li&gt;think through edge cases&lt;/li&gt;
&lt;li&gt;implement only what's needed&lt;/li&gt;
&lt;li&gt;refactor afterwards&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Install:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx skills add mattpocock/skills &lt;span class="nt"&gt;--skill&lt;/span&gt; tdd
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Example prompt:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Build a URL parser using TDD."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;or&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Let's implement this feature test-first."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Excellent if you're trying to build more reliable software.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Best for&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Library development&lt;/li&gt;
&lt;li&gt;Backend code&lt;/li&gt;
&lt;li&gt;Complex business logic&lt;/li&gt;
&lt;li&gt;Learning TDD&lt;/li&gt;
&lt;/ul&gt;


&lt;h1&gt;
  
  
  9. web-design-guidelines
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;What it does&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Focuses specifically on good web design principles.&lt;/p&gt;

&lt;p&gt;Unlike &lt;strong&gt;frontend-design&lt;/strong&gt;, which improves overall UI generation, this skill emphasizes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;usability&lt;/li&gt;
&lt;li&gt;accessibility&lt;/li&gt;
&lt;li&gt;spacing&lt;/li&gt;
&lt;li&gt;responsive behavior&lt;/li&gt;
&lt;li&gt;layout consistency&lt;/li&gt;
&lt;li&gt;navigation&lt;/li&gt;
&lt;li&gt;readability&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Install:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx skills add vercel-labs/agent-skills &lt;span class="nt"&gt;--skill&lt;/span&gt; web-design-guidelines
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Try:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Audit my landing page."&lt;/p&gt;

&lt;p&gt;"Improve accessibility."&lt;/p&gt;

&lt;p&gt;"Review this homepage."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It's particularly useful before shipping a public website.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Best for&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Marketing sites&lt;/li&gt;
&lt;li&gt;Documentation&lt;/li&gt;
&lt;li&gt;Landing pages&lt;/li&gt;
&lt;li&gt;Design reviews&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;
  
  
  10. microsoft-foundry
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;What it does&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Provides guidance for building AI applications using Microsoft's AI Foundry ecosystem.&lt;/p&gt;

&lt;p&gt;If you're working with Azure AI services, this skill helps the agent recommend the right workflows, architectures, and platform capabilities.&lt;/p&gt;

&lt;p&gt;Install:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx skills add microsoft/azure-skills &lt;span class="nt"&gt;--skill&lt;/span&gt; microsoft-foundry
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Example prompts:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Help me build an AI application on Azure."&lt;/p&gt;

&lt;p&gt;"Recommend an AI Foundry architecture."&lt;/p&gt;

&lt;p&gt;"How should I deploy this AI workload?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Best for&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Azure users&lt;/li&gt;
&lt;li&gt;Enterprise AI&lt;/li&gt;
&lt;li&gt;Microsoft AI services&lt;/li&gt;
&lt;/ul&gt;


&lt;h1&gt;
  
  
  Which Skills Should You Install First?
&lt;/h1&gt;

&lt;p&gt;If you're a general software engineer, I'd start with these five:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Skill&lt;/th&gt;
&lt;th&gt;Why install it?&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;find-skills&lt;/td&gt;
&lt;td&gt;Discover everything else&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;grill-me&lt;/td&gt;
&lt;td&gt;Better technical decisions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;improve-codebase-architecture&lt;/td&gt;
&lt;td&gt;Higher-quality code reviews&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;tdd&lt;/td&gt;
&lt;td&gt;More reliable implementations&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;vercel-react-best-practices&lt;/td&gt;
&lt;td&gt;Essential if you write React&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Frontend developers should also add:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;frontend-design&lt;/li&gt;
&lt;li&gt;web-design-guidelines&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Azure users should definitely install:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;microsoft-foundry&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;
  
  
  Skills Are Becoming the New Prompt Library
&lt;/h1&gt;

&lt;p&gt;One thing stands out after looking through the leaderboard: these skills aren't replacing AI models—they're &lt;strong&gt;teaching them repeatable workflows&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Instead of repeatedly explaining &lt;em&gt;how&lt;/em&gt; you want your AI to think, you install that expertise once and reuse it across every conversation.&lt;/p&gt;

&lt;p&gt;As the ecosystem grows, I expect most developers to have a personal toolkit of skills for architecture, testing, design, documentation, DevOps, and domain-specific workflows—much like we already rely on packages and libraries today.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Which AI skill has saved you the most time? Have you published one yourself? I'd love to hear what's in your toolbox.&lt;/strong&gt;&lt;/p&gt;



&lt;p&gt;&lt;em&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;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;git-lrc&lt;/strong&gt; 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>Building Enterprise AI Applications: It's Not About the Model. It's About the System</title>
      <dc:creator>Shrijith Venkatramana</dc:creator>
      <pubDate>Sun, 26 Jul 2026 18:47:32 +0000</pubDate>
      <link>https://dev.to/shrsv/building-enterprise-ai-applications-its-not-about-the-model-its-about-the-system-247d</link>
      <guid>https://dev.to/shrsv/building-enterprise-ai-applications-its-not-about-the-model-its-about-the-system-247d</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;Most AI demos fail in production for a surprisingly simple reason.&lt;/p&gt;

&lt;p&gt;The model isn't the product.&lt;/p&gt;

&lt;p&gt;A chatbot that summarizes documents or answers questions is impressive for a demo. But enterprises don't buy demos. They buy reliability, traceability, governance, and predictable outcomes.&lt;/p&gt;

&lt;p&gt;The moment AI is asked to review contracts, approve financial decisions, analyze medical records, or assist engineers, the question changes from:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Can the model do this?"&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;to&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Can we trust the entire system?"&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That's the difference between consumer AI and enterprise AI.&lt;/p&gt;

&lt;p&gt;In this article we'll explore what actually makes an enterprise AI application, moving from high-level intuition down to the technical architecture that makes these systems dependable.&lt;/p&gt;

&lt;h1&gt;
  
  
  1. AI Applications Are Knowledge Systems, Not Chatbots
&lt;/h1&gt;

&lt;p&gt;Many teams start with a language model and ask:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"What can we build with GPT?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Successful teams usually ask the opposite question:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"What knowledge does our organization already possess, and how can AI leverage it?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Every company has accumulated years of institutional knowledge:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Internal documentation&lt;/li&gt;
&lt;li&gt;Policies&lt;/li&gt;
&lt;li&gt;Standard operating procedures&lt;/li&gt;
&lt;li&gt;Contracts&lt;/li&gt;
&lt;li&gt;Engineering playbooks&lt;/li&gt;
&lt;li&gt;Historical decisions&lt;/li&gt;
&lt;li&gt;Regulatory requirements&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This knowledge—not the LLM—is the company's competitive advantage.&lt;/p&gt;

&lt;p&gt;The language model is simply the reasoning engine that learns to navigate this knowledge.&lt;/p&gt;

&lt;p&gt;Think of the LLM as the CPU.&lt;/p&gt;

&lt;p&gt;Your enterprise knowledge is the operating system.&lt;/p&gt;

&lt;p&gt;Without the operating system, the CPU is remarkably limited.&lt;/p&gt;

&lt;h1&gt;
  
  
  2. Configuration Is Really Knowledge Engineering
&lt;/h1&gt;

&lt;p&gt;A common misconception is that building enterprise AI means fine-tuning models.&lt;/p&gt;

&lt;p&gt;In reality, much of the work involves structuring organizational knowledge.&lt;/p&gt;

&lt;p&gt;Instead of retraining the model, organizations typically:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;organize documents&lt;/li&gt;
&lt;li&gt;build retrieval pipelines&lt;/li&gt;
&lt;li&gt;encode business rules&lt;/li&gt;
&lt;li&gt;define workflows&lt;/li&gt;
&lt;li&gt;establish permissions&lt;/li&gt;
&lt;li&gt;create reusable prompts&lt;/li&gt;
&lt;li&gt;connect internal systems&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Imagine building an AI assistant for legal teams.&lt;/p&gt;

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

&lt;blockquote&gt;
&lt;p&gt;"Review this contract."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;you teach it things like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;preferred contract language&lt;/li&gt;
&lt;li&gt;company negotiation policies&lt;/li&gt;
&lt;li&gt;escalation rules&lt;/li&gt;
&lt;li&gt;jurisdiction-specific requirements&lt;/li&gt;
&lt;li&gt;acceptable risk thresholds&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The AI is no longer answering generic questions.&lt;/p&gt;

&lt;p&gt;It is reasoning inside your organization's operating model.&lt;/p&gt;

&lt;p&gt;This process is less about machine learning and more about knowledge engineering.&lt;/p&gt;

&lt;h1&gt;
  
  
  3. Enterprise AI Needs Verification, Not Just Evaluation
&lt;/h1&gt;

&lt;p&gt;Consumer AI is often evaluated with questions like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Does the answer sound good?&lt;/li&gt;
&lt;li&gt;Is the response fluent?&lt;/li&gt;
&lt;li&gt;Does it seem helpful?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Enterprise AI demands much stronger guarantees.&lt;/p&gt;

&lt;p&gt;Imagine an AI reviewing a million-dollar contract.&lt;/p&gt;

&lt;p&gt;A response that is "mostly correct" is still a failure.&lt;/p&gt;

&lt;p&gt;Instead, organizations create evaluation suites that resemble software testing.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;edge cases&lt;/li&gt;
&lt;li&gt;ambiguous wording&lt;/li&gt;
&lt;li&gt;conflicting policies&lt;/li&gt;
&lt;li&gt;historical mistakes&lt;/li&gt;
&lt;li&gt;adversarial prompts&lt;/li&gt;
&lt;li&gt;regulatory scenarios&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Rather than asking:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Can the model answer questions?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;they ask:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Can the system consistently produce acceptable decisions across thousands of difficult situations?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In many organizations, evaluation becomes a continuous engineering discipline rather than a one-time benchmark.&lt;/p&gt;

&lt;h1&gt;
  
  
  4. Every AI Decision Should Be Explainable
&lt;/h1&gt;

&lt;p&gt;One of the biggest differences between enterprise software and consumer AI is accountability.&lt;/p&gt;

&lt;p&gt;Imagine these two answers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Consumer AI&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"The answer is 17."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Done.&lt;/p&gt;

&lt;p&gt;Now compare that with an enterprise AI assistant.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"The answer is 17 because:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Policy section 4.2 applies.&lt;/li&gt;
&lt;li&gt;Customer qualifies under rule B.&lt;/li&gt;
&lt;li&gt;Historical precedent X was matched.&lt;/li&gt;
&lt;li&gt;Confidence score: 96%.&lt;/li&gt;
&lt;li&gt;Human approval required."&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;The second response is much more valuable.&lt;/p&gt;

&lt;p&gt;Not because it sounds smarter.&lt;/p&gt;

&lt;p&gt;Because someone can verify it.&lt;/p&gt;

&lt;p&gt;Enterprise users don't just want answers.&lt;/p&gt;

&lt;p&gt;They want reasoning they can inspect.&lt;/p&gt;

&lt;p&gt;This is especially important in finance, healthcare, insurance, legal services, and government.&lt;/p&gt;

&lt;p&gt;Explainability turns AI from an opinion generator into a decision-support system.&lt;/p&gt;

&lt;h1&gt;
  
  
  5. Governance Is an Engineering Problem
&lt;/h1&gt;

&lt;p&gt;People often think AI governance means lawyers writing policies.&lt;/p&gt;

&lt;p&gt;In practice, much of it becomes software engineering.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Which model generated this answer?&lt;/li&gt;
&lt;li&gt;Which prompt version was used?&lt;/li&gt;
&lt;li&gt;Which documents were retrieved?&lt;/li&gt;
&lt;li&gt;Which user approved the decision?&lt;/li&gt;
&lt;li&gt;Which workflow executed?&lt;/li&gt;
&lt;li&gt;Which policies were active?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Every decision should leave behind a reproducible trail.&lt;/p&gt;

&lt;p&gt;This resembles version control systems.&lt;/p&gt;

&lt;p&gt;Developers already expect every code change to have:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a commit&lt;/li&gt;
&lt;li&gt;an author&lt;/li&gt;
&lt;li&gt;a timestamp&lt;/li&gt;
&lt;li&gt;a review history&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Enterprise AI requires similar discipline.&lt;/p&gt;

&lt;p&gt;Every AI-generated outcome should have provenance.&lt;/p&gt;

&lt;p&gt;Not because regulations demand it.&lt;/p&gt;

&lt;p&gt;Because debugging AI without provenance is nearly impossible.&lt;/p&gt;

&lt;h1&gt;
  
  
  6. AI Systems Need Operational Safety
&lt;/h1&gt;

&lt;p&gt;Even highly capable models occasionally hallucinate.&lt;/p&gt;

&lt;p&gt;Enterprise systems assume this will happen.&lt;/p&gt;

&lt;p&gt;Instead of trying to eliminate all mistakes, they build systems that detect and contain them.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;confidence thresholds&lt;/li&gt;
&lt;li&gt;human approval workflows&lt;/li&gt;
&lt;li&gt;policy validation&lt;/li&gt;
&lt;li&gt;structured outputs&lt;/li&gt;
&lt;li&gt;retrieval verification&lt;/li&gt;
&lt;li&gt;anomaly detection&lt;/li&gt;
&lt;li&gt;rollback mechanisms&lt;/li&gt;
&lt;li&gt;emergency disable switches&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Consider an AI processing financial documents.&lt;/p&gt;

&lt;p&gt;If confidence drops below a threshold, the workflow can automatically:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;stop execution,&lt;/li&gt;
&lt;li&gt;notify a reviewer,&lt;/li&gt;
&lt;li&gt;attach supporting evidence,&lt;/li&gt;
&lt;li&gt;wait for approval before proceeding.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This philosophy mirrors how modern distributed systems are built.&lt;/p&gt;

&lt;p&gt;We don't assume servers never fail.&lt;/p&gt;

&lt;p&gt;We build systems that fail safely.&lt;/p&gt;

&lt;p&gt;Enterprise AI should follow the same principle.&lt;/p&gt;

&lt;h1&gt;
  
  
  7. The Architecture Shift: From Models to Platforms
&lt;/h1&gt;

&lt;p&gt;As organizations mature, they stop thinking about individual AI agents.&lt;/p&gt;

&lt;p&gt;Instead, they build AI platforms.&lt;/p&gt;

&lt;p&gt;A mature platform typically includes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                Enterprise Knowledge
      Documents • Policies • Databases • APIs
                     │
                     ▼
             Retrieval &amp;amp; Context Layer
                     │
                     ▼
            Prompt &amp;amp; Workflow Engine
                     │
                     ▼
               Foundation Models
                     │
                     ▼
          Evaluation &amp;amp; Policy Checks
                     │
                     ▼
         Human Review (when necessary)
                     │
                     ▼
      Logging • Audit Trail • Monitoring
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Notice something interesting.&lt;/p&gt;

&lt;p&gt;The language model is only one component.&lt;/p&gt;

&lt;p&gt;Most of the engineering effort goes into everything surrounding it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;context management&lt;/li&gt;
&lt;li&gt;orchestration&lt;/li&gt;
&lt;li&gt;observability&lt;/li&gt;
&lt;li&gt;evaluation&lt;/li&gt;
&lt;li&gt;governance&lt;/li&gt;
&lt;li&gt;integrations&lt;/li&gt;
&lt;li&gt;safety&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is why successful enterprise AI projects increasingly resemble distributed systems rather than chatbot applications.&lt;/p&gt;
&lt;h1&gt;
  
  
  Final Thoughts
&lt;/h1&gt;

&lt;p&gt;The first generation of AI applications focused on making models smarter.&lt;/p&gt;

&lt;p&gt;The next generation is focused on making AI systems trustworthy.&lt;/p&gt;

&lt;p&gt;Organizations are discovering that the real challenge isn't generating text.&lt;/p&gt;

&lt;p&gt;It's building systems that can justify their decisions, operate safely, adapt to organizational knowledge, and remain auditable months or even years later.&lt;/p&gt;

&lt;p&gt;The future of enterprise AI won't be won by the company with the largest model.&lt;/p&gt;

&lt;p&gt;It will be won by the teams that build the most reliable systems around those models.&lt;/p&gt;
&lt;h2&gt;
  
  
  What do you think?
&lt;/h2&gt;

&lt;p&gt;When building enterprise AI, where do you believe the hardest engineering challenge lies today?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Knowledge management?&lt;/li&gt;
&lt;li&gt;Evaluation?&lt;/li&gt;
&lt;li&gt;Governance?&lt;/li&gt;
&lt;li&gt;Safety?&lt;/li&gt;
&lt;li&gt;Or something entirely different?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I'd love to hear your experiences in the comments.&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>SVGBench: Measuring LLM Spatial Intelligence Through Vector Code</title>
      <dc:creator>Shrijith Venkatramana</dc:creator>
      <pubDate>Sat, 25 Jul 2026 16:59:27 +0000</pubDate>
      <link>https://dev.to/shrsv/svgbench-measuring-llm-spatial-intelligence-through-vector-code-370b</link>
      <guid>https://dev.to/shrsv/svgbench-measuring-llm-spatial-intelligence-through-vector-code-370b</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;Large language models (LLMs) can draft Python scripts, pass medical board exams, and write poetry. But can they actually &lt;em&gt;visualize&lt;/em&gt; the physical world, or are they simply echoing text patterns from their training data?&lt;/p&gt;

&lt;p&gt;Standard coding benchmarks like HumanEval or MBPP test syntactic correctness and procedural logic. However, they tell us very little about an AI’s internal spatial awareness. When an LLM claims to understand concepts like "next to," "overlapping," or "below," is it truly reasoning about visual space, or is it just predicting token sequences?&lt;/p&gt;

&lt;p&gt;To answer this, we need a test that bridges text generation and visual reality.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem: The Visual Blindspot in LLM Benchmarks
&lt;/h2&gt;

&lt;p&gt;Traditional text-based code evaluation suffers from a major visual blindspot:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Syntax ≠ Spatial Understanding:&lt;/strong&gt; A model can produce syntactically valid Python or HTML while remaining completely blind to the visual outcome.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pixel Matching Is Too Rigid:&lt;/strong&gt; Evaluating image generation models using metrics like FID (Fréchet Inception Distance) or exact pixel matching fails for vector graphics. A red circle shifted 2 pixels to the left isn't a failure, but rigid pixel-based evaluation penalizes it as one.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multimodal Blindspots:&lt;/strong&gt; Vision-Language Models (VLMs) can &lt;em&gt;describe&lt;/em&gt; an image, but asking a model to &lt;em&gt;build&lt;/em&gt; a scene from scratch requires true 2D spatial arrangement, layering order, perspective, and domain knowledge.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Without a way to evaluate how code renders into visual spatial logic, we cannot accurately measure an AI's mental model of the physical world.&lt;/p&gt;

&lt;h2&gt;
  
  
  Objectives of SVGBench
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/johnbean393/SVGBench" rel="noopener noreferrer"&gt;&lt;strong&gt;SVGBench&lt;/strong&gt;&lt;/a&gt; was built to turn raw vector code into a quantitative benchmark for spatial reasoning. Its primary goals include:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Test Visual Spatial Logic:&lt;/strong&gt; Measure whether models understand anatomical placement, relative positioning, and physical interactions (e.g., placing a saddle &lt;em&gt;on&lt;/em&gt; a horse, or floating an object &lt;em&gt;in&lt;/em&gt; water).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Evaluate Precision Instruction Following:&lt;/strong&gt; Force models to satisfy complex prompts containing 10–15 distinct visual sub-requirements simultaneously.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Establish Objective Multimodal Scoring:&lt;/strong&gt; Move away from binary pass/fail syntax tests or fuzzy global image scores by using requirement-based evaluation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Provide an End-to-End Automated Pipeline:&lt;/strong&gt; Offer an automated workflow that generates SVG code, renders it via headless browsers, and evaluates the visual output.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  The Conceptual Solution: Code, Render, Judge
&lt;/h2&gt;

&lt;p&gt;Instead of asking a model to describe a scene, SVGBench forces the model to express the scene programmatically using Scalable Vector Graphics (&lt;code&gt;.svg&lt;/code&gt;).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;┌──────────────┐     ┌──────────────┐     ┌──────────────┐     ┌──────────────┐
│  Prompt &amp;amp;    │ ──&amp;gt; │ Target Model │ ──&amp;gt; │ Headless     │ ──&amp;gt; │ Evaluator    │
│ Requirements │     │ Generates    │     │ Browser      │     │ Vision LLM   │
│ (JSON)       │     │ SVG Code     │     │ Renders PNG  │     │ Scores Match │
└──────────────┘     └──────────────┘     └──────────────┘     └──────────────┘

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Conceptually, the evaluation works in three distinct steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The Code Phase:&lt;/strong&gt; The target model receives a prompt along with detailed requirements (e.g., &lt;em&gt;"Draw a toy rocket with a blue body, red nose cone, and three symmetrical base fins"&lt;/em&gt;). It must output valid SVG code.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Render Phase:&lt;/strong&gt; The raw SVG string is rendered into a high-resolution PNG image inside an isolated headless Chrome browser. This turns abstract code into actual visual pixels.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Judgment Phase:&lt;/strong&gt; A multimodal Evaluator LLM (e.g., GPT-4o) inspects &lt;strong&gt;both&lt;/strong&gt; the rendered PNG image and the raw SVG source code against every single requirement. The final score represents the percentage of visual and structural requirements successfully met ($0.0$ to $1.0$).&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;
  
  
  Strengths &amp;amp; Weaknesses
&lt;/h2&gt;

&lt;p&gt;Like any benchmark architecture, SVGBench makes intentional trade-offs.&lt;/p&gt;
&lt;h3&gt;
  
  
  Strengths
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Granular Evaluation:&lt;/strong&gt; Scoring individual requirements produces a nuanced percentage score rather than a misleading pass/fail metric.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Resilient to Formatting Differences:&lt;/strong&gt; SVG allows infinite ways to draw the same object. By evaluating rendered images alongside code, models aren't penalized for using different drawing techniques (e.g., &lt;code&gt;&amp;lt;path&amp;gt;&lt;/code&gt; vs. &lt;code&gt;&amp;lt;rect&amp;gt;&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tests Multimodal Synthesis:&lt;/strong&gt; It evaluates code synthesis, visual aesthetic arrangement, coordinate math, and domain knowledge simultaneously.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Weaknesses
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Judge LLM Dependency:&lt;/strong&gt; Evaluation quality depends on the vision model's ability to accurately spot fine visual details in the rendered PNG.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;2D Vector Limitation:&lt;/strong&gt; SVGBench evaluates 2D layouts and pseudo-3D projections; it does not measure native 3D mesh or spatial depth generation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Execution Overhead:&lt;/strong&gt; Running headless browser screenshots and calling multimodal evaluator APIs makes evaluation slower and more resource-intensive than running standard unit tests.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Under the Hood: System Architecture &amp;amp; Execution
&lt;/h2&gt;

&lt;p&gt;Let's look at how SVGBench handles this pipeline under the hood.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SVGBench Architecture
├── questions/
│   ├── questions.json        # Main benchmark (100+ complex prompts)
│   └── test_questions.json   # 3-question smoke test dataset
├── src/
│   ├── run.py                # Main CLI controller
│   ├── benchmark/
│   │   └── benchmark.py      # Multi-threaded execution engine
│   └── utils/
│       ├── llm.py            # API client with vision support
│       └── svg_renderer.py   # Selenium &amp;amp; Headless Chrome renderer
└── results/                  # Generated artifacts (.svg, .png, JSON)

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  1. Headless Browser Rendering (&lt;code&gt;src/utils/svg_renderer.py&lt;/code&gt;)
&lt;/h3&gt;

&lt;p&gt;To render SVG code accurately, &lt;code&gt;SVGRenderer&lt;/code&gt; uses Selenium with Google Chrome:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Calculates bounding boxes if explicit &lt;code&gt;viewBox&lt;/code&gt; dimensions are missing.&lt;/li&gt;
&lt;li&gt;Wraps raw SVG code into an inline HTML5 document.&lt;/li&gt;
&lt;li&gt;Captures a high-resolution screenshot to convert the vector graphics into a PNG raster image.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  2. Parallel Benchmark Engine (&lt;code&gt;src/benchmark/benchmark.py&lt;/code&gt;)
&lt;/h3&gt;

&lt;p&gt;To process datasets efficiently, &lt;code&gt;Benchmark&lt;/code&gt; uses Python's &lt;code&gt;ThreadPoolExecutor&lt;/code&gt; to evaluate multiple questions in parallel. It saves progress automatically, allowing you to resume interrupted benchmark runs without re-evaluating completed items.&lt;/p&gt;
&lt;h3&gt;
  
  
  3. Quick Testing vs. Full Evaluation
&lt;/h3&gt;

&lt;p&gt;SVGBench includes two test sets:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;questions/questions.json&lt;/code&gt;: The standard dataset containing over 100 complex prompts (covering UI layouts, physical scenes, and spatial positioning).&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;questions/test_questions.json&lt;/code&gt;: A lightweight 3-question dataset for sanity-checking your setup without burning API credits.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  How to Run SVGBench
&lt;/h2&gt;
&lt;h3&gt;
  
  
  Setup
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Clone and prepare the environment&lt;/span&gt;
git clone https://github.com/johnbean393/SVGBench.git
&lt;span class="nb"&gt;cd &lt;/span&gt;SVGBench

conda create &lt;span class="nt"&gt;-n&lt;/span&gt; svgbench &lt;span class="nv"&gt;python&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;3.13
conda activate svgbench
pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; requirements.txt

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;em&gt;Note: Ensure Google Chrome and &lt;code&gt;chromedriver&lt;/code&gt; are installed and added to your system PATH.&lt;/em&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Execution
&lt;/h3&gt;

&lt;p&gt;Configure your &lt;code&gt;.env&lt;/code&gt; file with your API key:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;OPENROUTER_API_KEY=your_key_here

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Run the evaluation across one or multiple models:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Evaluate a single model&lt;/span&gt;
python src/run.py &lt;span class="nt"&gt;--model&lt;/span&gt; &lt;span class="s2"&gt;"anthropic/claude-sonnet-4"&lt;/span&gt;

&lt;span class="c"&gt;# Benchmark multiple models sequentially&lt;/span&gt;
python src/run.py &lt;span class="nt"&gt;--model&lt;/span&gt; &lt;span class="s2"&gt;"google/gemini-2.5-pro;anthropic/claude-sonnet-4;openai/gpt-4.1"&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;After the benchmark completes, launch the built-in web UI to inspect the results:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python &lt;span class="nt"&gt;-m&lt;/span&gt; http.server 8000 &lt;span class="nt"&gt;--directory&lt;/span&gt; results

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h2&gt;
  
  
  Leaderboard Results
&lt;/h2&gt;

&lt;p&gt;Here is how leading AI models perform on SVGBench:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Rank&lt;/th&gt;
&lt;th&gt;Model&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;1&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Claude Opus 4.6 (Medium)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;75.6%&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;GPT-5.2 (X-High)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;74.4%&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Claude Opus 4.5&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;72.0%&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;GLM-5&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;70.3%&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Gemini 3 Pro Preview&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;68.7%&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Kimi K2.5&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;67.5%&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;7&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;GPT-5.1 (High)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;67.5%&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;8&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;MiniMax M2.5&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;65.0%&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;9&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Claude Sonnet 4.5&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;62.2%&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Gemini 2.5 Pro&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;61.4%&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;11&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;o3&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;56.7%&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;12&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;DeepSeek V3.1&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;53.1%&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;em&gt;(Source: &lt;a href="https://github.com/johnbean393/SVGBench" rel="noopener noreferrer"&gt;SVGBench GitHub Repository&lt;/a&gt;)&lt;/em&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Key Takeaways
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Frontier Models Lead Visual Reasoning:&lt;/strong&gt; Top reasoning and frontier models like Claude Opus 4.6 and GPT-5.2 score around 75%, demonstrating strong spatial composition skills.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Significant Room for Improvement:&lt;/strong&gt; Even top-tier models miss roughly 25% of granular visual instructions, often struggling with precise overlapping elements, complex alignment, or coordinate math.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Code Intelligence ≠ Visual Intelligence:&lt;/strong&gt; Strong text coding performance does not always translate to high visual fidelity, proving that spatial vector reasoning requires unique capabilities beyond standard code generation.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By combining raw code generation with automated visual evaluation, SVGBench provides a clear window into how well AI models truly understand the visual and spatial world.&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>Beyond Code Generation: How OmniSVG Rethinks Vector Graphics with Vision-Language Models</title>
      <dc:creator>Shrijith Venkatramana</dc:creator>
      <pubDate>Fri, 24 Jul 2026 19:36:05 +0000</pubDate>
      <link>https://dev.to/shrsv/beyond-code-generation-how-omnisvg-rethinks-vector-graphics-with-vision-language-models-1b6d</link>
      <guid>https://dev.to/shrsv/beyond-code-generation-how-omnisvg-rethinks-vector-graphics-with-vision-language-models-1b6d</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;Vector graphics are the holy grail of modern UI/UX design, CAD systems, and digital illustration. Unlike raster images (JPEGs, PNGs) composed of fixed pixel grids, Scalable Vector Graphics (SVGs) use geometric shapes—Bézier curves, polygons, and fill attributes. They render crisply at 8K resolution and weigh only a few kilobytes.&lt;/p&gt;

&lt;p&gt;However, automating SVG creation has always been a major pain point for developers:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Optimization methods&lt;/strong&gt; (like DiffVG) treat vectorization as an iterative guessing game. They generate cluttered, uneditable SVG code with thousands of overlapping anchor points, consuming massive GPU power for every single image.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;LLM code-generation methods&lt;/strong&gt; (like Chat2SVG or StarVector) try to write raw XML tags directly. Because standard AI tokenizers split XML tags and coordinate numbers haphazardly, models suffer from "coordinate hallucination" and hit strict character limits whenever designs get complex.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A team of researchers from Fudan University and StepFun introduced &lt;strong&gt;OmniSVG&lt;/strong&gt;—an end-to-end framework built on native Vision-Language Models (&lt;strong&gt;Qwen2.5-VL&lt;/strong&gt;) that treats vector generation not as raw text writing, but as structured token sequence prediction.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. High-Level Intuition: Tokenizing Geometry Instead of Text
&lt;/h2&gt;

&lt;p&gt;Standard Large Language Models (LLMs) view an SVG as a long string of raw text: &lt;code&gt;&amp;lt;path d="M 10 20 C 30 40 ..."/&amp;gt;&lt;/code&gt;. To a typical AI tokenizer, &lt;code&gt;&amp;lt;path&lt;/code&gt;, &lt;code&gt;d="&lt;/code&gt;, and &lt;code&gt;10&lt;/code&gt; are disconnected sub-word chunks. The AI has to learn XML syntax rules, floating-point math, and spatial geometry all at the same time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;OmniSVG changes the paradigm:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Flatten the Structure:&lt;/strong&gt; All complex grouping tags, transformations, and inline styles are stripped away into simple, flat drawing instructions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Atomic Commands:&lt;/strong&gt; Any vector graphic is simplified into five core path commands:&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;M&lt;/strong&gt; (&lt;em&gt;Move To&lt;/em&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;L&lt;/strong&gt; (&lt;em&gt;Line To&lt;/em&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;C&lt;/strong&gt; (&lt;em&gt;Cubic Curve&lt;/em&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A&lt;/strong&gt; (&lt;em&gt;Arc&lt;/em&gt;)&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Z&lt;/strong&gt; (&lt;em&gt;Close Path&lt;/em&gt;)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Explicit Fill Token (F):&lt;/strong&gt; Color information is mapped directly into hex fill commands (&lt;strong&gt;F&lt;/strong&gt;) right inside the drawing order, treating color as just another drawing step rather than a messy CSS attribute.&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;+-----------------------------------------------------------------------+
|                            OmniSVG Pipeline                           |
|                                                                       |
|  [ Input Instruction ]                                                |
|  "A cute red panda icon"                                              |
|          |                                                            |
|          v                                                            |
|  +-----------------------+     +-----------------------------------+  |
|  |   Qwen2.5-VL VLM      | --&amp;gt; | Flattened &amp;amp; Parameterized Tokens  |  |
|  |   Autoregressive Core |     | &amp;lt;SOP&amp;gt; M [2000] C [2045] F #FF0000 |  |
|  +-----------------------+     +-----------------------------------+  |
|                                                  |                    |
|                                                  v                    |
|                                        [ Clean, Editable SVG ]        |
+-----------------------------------------------------------------------+

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;By separating spatial geometry from low-level XML syntax, the underlying model can focus entirely on visual layout and drawing order.&lt;/p&gt;
&lt;h2&gt;
  
  
  2. The Math Explained in Plain English: Coordinate Compression &amp;amp; Economics
&lt;/h2&gt;
&lt;h3&gt;
  
  
  Spatial Token Compression
&lt;/h3&gt;

&lt;p&gt;Traditional methods tokenized horizontal ($X$) and vertical ($Y$) coordinates as separate numbers. If an SVG path has 100 points, it takes at least 200 tokens just to specify where those points go.&lt;/p&gt;

&lt;p&gt;OmniSVG fits every SVG onto a standardized 200 by 200 pixel canvas grid. Instead of sending two separate numbers for every point, OmniSVG merges the two coordinates into a single number index using simple grid math:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Combined Token Index = (X Coordinate * Canvas Width) + Y Coordinate

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;For a canvas that is 200 pixels wide and 200 pixels tall, this formula translates every possible $(X, Y)$ spot on the canvas into a single unique ID number between 0 and 39,999.&lt;/p&gt;

&lt;p&gt;To convert that single ID number back into 2D coordinates on the fly:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;X Coordinate:&lt;/strong&gt; Divide the Token ID by the Canvas Width (200) and round down.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Y Coordinate:&lt;/strong&gt; Take the remainder after dividing the Token ID by the Canvas Width (200).&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Back-of-the-Envelope Token Savings
&lt;/h3&gt;

&lt;p&gt;Imagine writing a single smooth curve segment with a start point, two control handles, an end point, and a red fill color:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Raw XML Text String:&lt;/strong&gt;
&lt;code&gt;&amp;lt;path d="M 120 45 C 130 50 140 85 150 90 Z" fill="#FF5733"/&amp;gt;&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Standard Tokenizer Count: &lt;strong&gt;22 to 28 tokens&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;OmniSVG Approach:&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Commands: M, C, Z, F (&lt;strong&gt;4 tokens&lt;/strong&gt;)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Start point (Combined 120 and 45): &lt;strong&gt;1 token&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Curve handle points and end point: &lt;strong&gt;3 tokens&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Red Color Code (#FF5733): &lt;strong&gt;1 token&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Total Token Count: &lt;strong&gt;9 tokens&lt;/strong&gt; (A &lt;strong&gt;65% reduction&lt;/strong&gt; in total tokens!).&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  System Economics &amp;amp; Operational Efficiency
&lt;/h3&gt;

&lt;p&gt;When AI models generate content, their computational work and latency scale rapidly with the total length of the token sequence. Shorter sequences mean significantly faster rendering and lower server costs.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;       Token Sequence Length vs. Inference Latency (Conceptual)
   Latency
      ^
      |                                              / (Raw XML: ~32k Tokens)
      |                                             /
      |                                            /
      |                                           /
      |                                          /
      |                  /----------------------/ (OmniSVG: ~4.8k Tokens)
      |_________________/________________________________________&amp;gt;
                                                              Sequence Length

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;DiffVG / Live Optimization&lt;/th&gt;
&lt;th&gt;Raw XML LLM Generation&lt;/th&gt;
&lt;th&gt;OmniSVG (4B/8B Models)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Method Type&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Repeated Gradient Guesswork&lt;/td&gt;
&lt;td&gt;Standard Text LLM&lt;/td&gt;
&lt;td&gt;Structured Vision-Language Model&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Tokens / Steps&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;50,000 to 300,000 steps&lt;/td&gt;
&lt;td&gt;~18,500 raw text tokens&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;~3,800 to 5,800 tokens&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Time per Image&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;45 to 180 seconds&lt;/td&gt;
&lt;td&gt;12 to 25 seconds&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;1.5 to 4 seconds&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Output Structure&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Messy, overlapping anchor points&lt;/td&gt;
&lt;td&gt;Clean, but prone to syntax errors&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Hierarchical, clean, fully editable&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;h2&gt;
  
  
  3. How OmniSVG Learns to Draw
&lt;/h2&gt;

&lt;p&gt;OmniSVG fine-tunes the &lt;strong&gt;Qwen2.5-VL&lt;/strong&gt; Vision-Language Model using standard "next-token prediction"—the exact same technique LLMs use to write text, but applied to vector commands.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Input Context:&lt;/strong&gt; The model receives the user's instructions (such as a text prompt like "a blue bird icon" or a reference image).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sequential Prediction:&lt;/strong&gt; Based on what it has drawn so far, the model predicts the single most likely next drawing command or coordinate token.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Training Objective:&lt;/strong&gt; During training, the model is shown millions of completed vector graphs and adjusts its internal weights to minimize the difference between its predicted tokens and the actual target tokens.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;
  
  
  4. Scalability: MMSVG-2M &amp;amp; MMSVG-Bench
&lt;/h2&gt;

&lt;p&gt;To train OmniSVG, the authors created &lt;strong&gt;MMSVG-2M&lt;/strong&gt;, a dataset containing 2 million high-quality SVG assets across three core categories:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;MMSVG-Icon (1.1 Million Assets):&lt;/strong&gt; Web icons, interface symbols, UI elements.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MMSVG-Illustration (0.5 Million Assets):&lt;/strong&gt; Richly colored flat graphics, web banners, vector artwork.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MMSVG-Character (0.4 Million Assets):&lt;/strong&gt; Detailed vector anime art and character designs.
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   +-------------------------------------------------------------------+
   |                     MMSVG-2M Dataset Breakdown                    |
   |                                                                   |
   |   [ MMSVG-Icon ]          [ MMSVG-Illustration ]  [ Character ]   |
   |   1.1M Assets             0.5M Assets             0.4M Assets     |
   |   (Monochrome/UI)         (Rich Flat Graphics)    (Complex Anime) |
   +-------------------------------------------------------------------+

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  Benchmark Results (MMSVG-Bench)
&lt;/h3&gt;

&lt;p&gt;OmniSVG was tested against existing tools across two main tasks: generating SVGs from text descriptions and converting raster images to SVGs.&lt;/p&gt;
&lt;h4&gt;
  
  
  Text-to-SVG Task
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Visual Quality (Lower FID is better):&lt;/strong&gt; OmniSVG scored &lt;strong&gt;137.40&lt;/strong&gt;, vastly outperforming older text models like VectorFusion (250.77) and Chat2SVG (190.87).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Text Alignment:&lt;/strong&gt; OmniSVG maintained high prompt accuracy while generating outputs in &lt;strong&gt;less than 4,000 tokens&lt;/strong&gt;, compared to optimization tools that required over 60,000 iterations.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;
  
  
  Image-to-SVG Vectorization Task
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Visual Similarity (Higher SSIM is better):&lt;/strong&gt; OmniSVG achieved a structural similarity score of &lt;strong&gt;0.950&lt;/strong&gt;, matching expensive optimization tools like DiffVG (0.954) while generating clean, organized vector paths instead of messy shapes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Accuracy vs. Large Models:&lt;/strong&gt; OmniSVG drastically outperformed GPT-4o's direct SVG output (0.792 SSIM) and StarVector (0.881 SSIM) in vectorizing detailed images.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  5. Tokenization Ablation Insights
&lt;/h2&gt;

&lt;p&gt;To prove that combining coordinates and colors into custom tokens was the secret to success, the authors compared four model variants:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Configuration&lt;/th&gt;
&lt;th&gt;Visual Error (Lower is better)&lt;/th&gt;
&lt;th&gt;Output Accuracy (Higher is better)&lt;/th&gt;
&lt;th&gt;Average Token Count&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Raw XML Text (No Tokenization)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;High Error (218.76 FID)&lt;/td&gt;
&lt;td&gt;Low Accuracy (0.718 SSIM)&lt;/td&gt;
&lt;td&gt;18,500 tokens&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Without Coordinate Tokens&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Medium Error (193.42 FID)&lt;/td&gt;
&lt;td&gt;Medium Accuracy (0.809 SSIM)&lt;/td&gt;
&lt;td&gt;10,200 tokens&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Without Color Tokens&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Low-Medium Error (167.28 FID)&lt;/td&gt;
&lt;td&gt;Good Accuracy (0.879 SSIM)&lt;/td&gt;
&lt;td&gt;6,300 tokens&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;OmniSVG (Full Tokenization)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Lowest Error (145.89 FID)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Highest Accuracy (0.928 SSIM)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;4,800 tokens&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Key Takeaway:&lt;/strong&gt; Combining $X$ and $Y$ coordinates into single scalar tokens reduced file size and sequence lengths by &lt;strong&gt;74%&lt;/strong&gt; while making the resulting graphics twice as visually accurate.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;
  
  
  6. Hands-On Example: Tokenizer Implementation
&lt;/h2&gt;

&lt;p&gt;Below is a Python script showing how OmniSVG compresses 2D coordinates and drawing commands into discrete tokens:&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="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;re&lt;/span&gt;

&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;OmniSVGTokenizer&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;canvas_width&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;canvas_height&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;w&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;canvas_width&lt;/span&gt;
        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;h&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;canvas_height&lt;/span&gt;

        &lt;span class="c1"&gt;# Command mapped tokens
&lt;/span&gt;        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;cmd2token&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;M&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;&amp;lt;M&amp;gt;&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;L&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;&amp;lt;L&amp;gt;&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;C&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;&amp;lt;C&amp;gt;&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;A&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;&amp;lt;A&amp;gt;&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;Z&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;&amp;lt;Z&amp;gt;&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;F&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;&amp;lt;F&amp;gt;&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;token2cmd&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;v&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;k&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;k&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;v&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;cmd2token&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;items&lt;/span&gt;&lt;span class="p"&gt;()}&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;encode_point&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="s"&gt;Flattens 2D coordinates into a single 1D scalar token ID.&lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;
        &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;max&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;min&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;w&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
        &lt;span class="n"&gt;y&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;max&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;min&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;h&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
        &lt;span class="nf"&gt;return &lt;/span&gt;&lt;span class="p"&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;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;w&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;decode_point&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;token_id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;tuple&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;]:&lt;/span&gt;
        &lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="s"&gt;Restores 2D coordinates from a single 1D scalar token ID.&lt;/span&gt;&lt;span class="sh"&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;token_id&lt;/span&gt; &lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;w&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;token_id&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;w&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;tokenize_path&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;path_str&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;fill_hex&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="bp"&gt;None&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;list&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="s"&gt;Converts raw SVG path string into OmniSVG discrete tokens.&lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;
        &lt;span class="n"&gt;tokens&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;&amp;lt;SOP&amp;gt;&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;fill_hex&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="n"&gt;tokens&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;extend&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;cmd2token&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;F&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="n"&gt;fill_hex&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;

        &lt;span class="c1"&gt;# Parse commands and coordinates using regex
&lt;/span&gt;        &lt;span class="n"&gt;pattern&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sa"&gt;r&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;([MLCAZ])|(-?\d+\.?\d*)&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;
        &lt;span class="n"&gt;matches&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;re&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;findall&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pattern&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;path_str&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

        &lt;span class="n"&gt;current_cmd&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="bp"&gt;None&lt;/span&gt;
        &lt;span class="n"&gt;coords_buffer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;

        &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;cmd&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;num&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;matches&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;cmd&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;current_cmd&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;coords_buffer&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                    &lt;span class="n"&gt;tokens&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;extend&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;_process_coords&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;coords_buffer&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
                    &lt;span class="n"&gt;coords_buffer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;
                &lt;span class="n"&gt;current_cmd&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;cmd&lt;/span&gt;
                &lt;span class="n"&gt;tokens&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;cmd2token&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;cmd&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
            &lt;span class="k"&gt;elif&lt;/span&gt; &lt;span class="n"&gt;num&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                &lt;span class="n"&gt;coords_buffer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;int&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;float&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;num&lt;/span&gt;&lt;span class="p"&gt;)))&lt;/span&gt;

        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;coords_buffer&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="n"&gt;tokens&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;extend&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;_process_coords&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;coords_buffer&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;

        &lt;span class="n"&gt;tokens&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;&amp;lt;EOS&amp;gt;&lt;/span&gt;&lt;span class="sh"&gt;"&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;tokens&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;_process_coords&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;coords&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;list&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;list&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="s"&gt;Helper to pair raw coordinates into scalar tokens.&lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;
        &lt;span class="n"&gt;encoded&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;
        &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;coords&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
            &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nf"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;coords&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
                &lt;span class="n"&gt;encoded&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;&amp;lt;COORD_&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;encode_point&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;coords&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="n"&gt;coords&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;&amp;gt;&lt;/span&gt;&lt;span class="sh"&gt;"&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;encoded&lt;/span&gt;

&lt;span class="c1"&gt;# Example Usage
&lt;/span&gt;&lt;span class="n"&gt;tokenizer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;OmniSVGTokenizer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;canvas_width&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;canvas_height&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;raw_path&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;M 10 20 C 30 40 50 60 70 80 Z&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="n"&gt;fill_color&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;#FF0000&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;

&lt;span class="n"&gt;token_sequence&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;tokenizer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;tokenize_path&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;raw_path&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;fill_hex&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;fill_color&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Tokenized Sequence:&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;token_sequence&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Demonstrate Coordinate Reconstruction
&lt;/span&gt;&lt;span class="n"&gt;sample_token_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;tokenizer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;encode_point&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;120&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;45&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;decoded_x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;decoded_y&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;tokenizer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;decode_point&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sample_token_id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;Coordinate Check: Original (120, 45) -&amp;gt; Combined ID: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;sample_token_id&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; -&amp;gt; Reconstructed: (&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;decoded_x&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;, &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;decoded_y&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;)&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h2&gt;
  
  
  7. What's Next for Vector Graphics?
&lt;/h2&gt;

&lt;p&gt;OmniSVG proves that AI vector generation works best when we treat geometry as a structured sequence of drawing actions rather than raw code text. By combining Vision-Language Models with smart spatial tokenization, we can generate clean, editable vector graphics in seconds instead of minutes.&lt;/p&gt;

&lt;p&gt;How do you handle SVG vectorization in your current development workflows—do you rely on traditional image processing libraries, optimization scripts, or manual design tools? What challenges do you run into most with AI-generated SVG code? Share your thoughts in the comments below!&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>
  </channel>
</rss>
