<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Linear_algebra on Omanshu Thapliyal</title><link>https://omanshuthapliyal.github.io/tags/linear_algebra/</link><description>Recent content in Linear_algebra on Omanshu Thapliyal</description><generator>Hugo</generator><language>en</language><lastBuildDate>Fri, 07 Aug 2026 11:57:21 -0700</lastBuildDate><atom:link href="https://omanshuthapliyal.github.io/tags/linear_algebra/index.xml" rel="self" type="application/rss+xml"/><item><title>Can LLM Finetuning be Stateful? Small states for Large Models - Part 2</title><link>https://omanshuthapliyal.github.io/blog/hrm-part-2/</link><pubDate>Fri, 07 Aug 2026 11:57:21 -0700</pubDate><guid>https://omanshuthapliyal.github.io/blog/hrm-part-2/</guid><description>&lt;p>The code for this project can be found at: &lt;a href="https://github.com/omanshuthapliyal/HRM-adapter">https://github.com/omanshuthapliyal/HRM-adapter&lt;/a>.
And the paper can be found at: &lt;a href="https://arxiv.org/pdf/2606.26290">https://arxiv.org/pdf/2606.26290&lt;/a>.&lt;/p>
&lt;p>In the &lt;a href="https://omanshuthapliyal.github.io/blog/hrm-part-1/">previous post&lt;/a>, I introduced the basic idea behind a stateful adapter. Instead of asking a small trainable module to only modify the current transformer representation, we allow it to maintain a state: $$ s_t = \bar{A}s_{t-1} + \bar{B}h_t, $$ and use that state to generate a residual correction, $$ r_t = Cs_t. $$ The important unresolved question was: if this adapter gets a small amount of memory, what should it remember? The answer I want to explore is the same one that appeared in the discussion of Hankel singular values:&lt;/p></description></item><item><title>Can LLM Finetuning be Stateful? Small states for Large Models - Part 1</title><link>https://omanshuthapliyal.github.io/blog/hrm-part-1/</link><pubDate>Fri, 31 Jul 2026 11:57:21 -0700</pubDate><guid>https://omanshuthapliyal.github.io/blog/hrm-part-1/</guid><description>&lt;p>In the &lt;a href="https://omanshuthapliyal.github.io/blog/hankel-singular-values/">last post&lt;/a> I talked about Hankel operators of simple linear dynamical systems. Such operators, and either eigenvalues, &lt;em>&amp;ldquo;can be used as a proxy for how much memory a task actually requires in a state-space model&amp;rdquo;.&lt;/em> And later we tied their input-output relations empirically tie the memory requirements of a post-trained state space model (SSM) to its Hankel singular value (HSV) rates. Further, HSV-based balanced truncation can offer us to selectively choose &amp;lsquo;some&amp;rsquo; eigenvalues to keep that involve higher input-to-output signal strength over time.
And so, we used Hankel singular values to decide which states of a dynamical system are worth keeping.
However, a language model also processes a sequence of tokens over time.
We saw task-dependent HSV decay rates for various tasks for different SSM-based models.
Similarly, could we give the model a small state, one deliberately built around that same notion of &amp;ldquo;worth keeping&amp;rdquo;, without retraining the entire model?&lt;/p></description></item><item><title>State Space Models: How Control Theory can echo Machine Learning</title><link>https://omanshuthapliyal.github.io/blog/state-space-models/</link><pubDate>Mon, 06 Oct 2025 18:57:21 -0700</pubDate><guid>https://omanshuthapliyal.github.io/blog/state-space-models/</guid><description>&lt;p>I wrote in a &lt;a href="https://omanshuthapliyal.github.io/blog/transformers/">previous post&lt;/a> how transformers are kind of like system identification methods applied to some sequence in a state space. In this post we try to understand if the other way round is true.&lt;/p>
&lt;p>We already saw previously &lt;sup id="fnref:1">&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref">1&lt;/a>&lt;/sup> how predicting words/tokens is a sequence to sequence mapping problem, which is the subject of a lot of prediction, estimation, and controls problems. In fact, we leveraged a transformer&amp;rsquo;s sequence mapping ability and applied it to a controls problem of trajectory prediction for a simple 2D car model &lt;sup id="fnref1:1">&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref">1&lt;/a>&lt;/sup>. Can we do the other way round? Turns out: &lt;em>yes we can!&lt;/em>&lt;/p></description></item><item><title>On Eigenvalues, Homotopy, and Root Loci</title><link>https://omanshuthapliyal.github.io/blog/circles/</link><pubDate>Fri, 05 Sep 2025 11:57:21 -0700</pubDate><guid>https://omanshuthapliyal.github.io/blog/circles/</guid><description>&lt;p>Consider an $$n+1$$ dimensional matrix as follows:&lt;/p>
&lt;p>$$
A = \begin{pmatrix}
\frac{\pi^2}{6} &amp; 1 &amp; \frac{1}{4} &amp; ... &amp; \frac{1}{n^2} \\
1 &amp; \frac{\pi^2}{6} &amp; \frac{1}{4} &amp; ... &amp; \frac{1}{n^2} \\
\vdots &amp; &amp; \ddots &amp; &amp; \vdots\\
1 &amp; \frac{1}{4} &amp; ... &amp; \frac{1}{n^2} &amp;\frac{\pi^2}{6} \\
\end{pmatrix} $$&lt;/p>
&lt;p>Is the matrix positive-definite?
The problem itself is a dramatization of how &lt;a href="https://engineering.purdue.edu/AAE/people/ptProfile?resource_id=1339">my professor&lt;/a> would ask us to write arbitrary real matrices and quickly determine its positive-definiteness (most of the times) as a trick, seemingly like in-class wizardry!&lt;/p></description></item></channel></rss>