<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Policy-Gradients on Aakash Thatte</title><link>https://sky-2002.github.io/tags/policy-gradients/</link><description>Recent content in Policy-Gradients on Aakash Thatte</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Sat, 01 Aug 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://sky-2002.github.io/tags/policy-gradients/index.xml" rel="self" type="application/rss+xml"/><item><title>RL for LLMs - from softmax to GRPO</title><link>https://sky-2002.github.io/posts/2026-08-01-llm-rl-starter/</link><pubDate>Sat, 01 Aug 2026 00:00:00 +0000</pubDate><guid>https://sky-2002.github.io/posts/2026-08-01-llm-rl-starter/</guid><description>&lt;p&gt;Working through RL for LLMs from softmax all the way to a full GRPO update, on a five-token toy where the numbers stay hand-checkable. One section steps off the toy to sketch multi-step credit assignment.&lt;/p&gt;
&lt;p&gt;Goal is that we have a model that sometimes solves a task → make it solve the task more often.&lt;/p&gt;
&lt;h2 id="language-model-is-a-probability-distribution"&gt;Language model is a probability distribution&lt;/h2&gt;
&lt;p&gt;During each step of autoregressive generation, an LLM produces a score (logit) for each token in the vocabulary, then converts those to probabilities with softmax. Consider the prompt &lt;code&gt;2+3=&lt;/code&gt; given to our toy model whose vocabulary is &lt;code&gt;{0, 4, 5, 6, 15}&lt;/code&gt;. Logits are deliberate multiples of $\ln 2$ so the softmax stays as fractions:&lt;/p&gt;</description></item></channel></rss>