<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Attention on Nalar</title>
    <link>https://nalar.dev/tags/attention/</link>
    <description>Recent content in Attention on Nalar</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Thu, 03 Sep 2026 00:00:00 +0700</lastBuildDate>
    <atom:link href="https://nalar.dev/tags/attention/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Understand Self-Attention in Transformer Models</title>
      <link>https://nalar.dev/understand-self-attention-in-transformer-models/</link>
      <pubDate>Thu, 03 Sep 2026 00:00:00 +0700</pubDate>
      <guid>https://nalar.dev/understand-self-attention-in-transformer-models/</guid>
      <description>&lt;p&gt;Transformers can process relationships between tokens without stepping through a sequence one token at a time. The mechanism that makes this possible is self-attention: each token builds a weighted view of other tokens in the same context.&lt;/p&gt;&#xA;&lt;p&gt;The formula is compact, but using transformer models well becomes easier when you understand what the calculation is doing, why masking matters, and where the computational cost comes from.&lt;/p&gt;&#xA;&lt;h2 id=&#34;start-with-token-representations&#34;&gt;Start with token representations&lt;/h2&gt;&#xA;&lt;p&gt;Before attention runs, each input token is represented by a vector. Let the matrix &lt;code&gt;X&lt;/code&gt; contain those token representations. A transformer layer applies learned projections to produce three matrices:&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
