<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Ai on Aadi</title>
		<link>https://aadi-blogs.web.app/tags/ai/</link>
		<description>Recent content in Ai on Aadi</description>
		<generator>Hugo</generator>
		<language>en-us</language>
		
		
		
		
			<lastBuildDate>Tue, 11 Aug 2026 06:00:42 -0400</lastBuildDate>
		
			<atom:link href="https://aadi-blogs.web.app/tags/ai/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>Writing a Trainable Attention Mechanism in Tensorflow</title>
				<link>https://aadi-blogs.web.app/blog/llm-forward-attention/</link>
				<pubDate>Tue, 11 Aug 2026 06:00:42 -0400</pubDate>
				<guid>https://aadi-blogs.web.app/blog/llm-forward-attention/</guid>
				<description>&lt;p&gt;The primary goal of langugae models is next-word/next-sequence prediction. The transformer architecture is built on the premise of &amp;ldquo;attention&amp;rdquo;, this was developed to solve the precursor&amp;rsquo;s weakness in modeling long-length text sequences (namely recursive neural networks).&lt;/p&gt;&#xA;&lt;p&gt;In its most basic format, an RNN is a &lt;code&gt;reduce&lt;/code&gt; over a sequence with a carried accumulator (in machine-learning terms, the current state).&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;For context, &lt;code&gt;reduce(function, iterable, initializer)&lt;/code&gt; goes through the iterable from left to right, applying the function at each call. It takes the output of &lt;code&gt;function(accumulator, item)&lt;/code&gt; at each call, returning the new accumulator and moves to the next item. The &lt;code&gt;initializer&lt;/code&gt; is the starting accumulator/state&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
