<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Batching on Nalar</title>
    <link>https://nalar.dev/tags/batching/</link>
    <description>Recent content in Batching on Nalar</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Wed, 16 Sep 2026 00:00:00 +0700</lastBuildDate>
    <atom:link href="https://nalar.dev/tags/batching/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Bucket Sequence Lengths to Reduce Padding Waste</title>
      <link>https://nalar.dev/bucket-sequence-lengths-to-reduce-padding-waste/</link>
      <pubDate>Wed, 16 Sep 2026 00:00:00 +0700</pubDate>
      <guid>https://nalar.dev/bucket-sequence-lengths-to-reduce-padding-waste/</guid>
      <description>&lt;p&gt;A padded batch is shaped by its longest sequence, not its average sequence. If one batch contains token counts of &lt;code&gt;120&lt;/code&gt;, &lt;code&gt;124&lt;/code&gt;, &lt;code&gt;131&lt;/code&gt;, and &lt;code&gt;900&lt;/code&gt;, every sequence may be represented at length &lt;code&gt;900&lt;/code&gt;. Most positions in the first three rows then carry padding rather than input tokens.&lt;/p&gt;&#xA;&lt;p&gt;Length bucketing changes batch composition instead of changing the model. Examples with similar token counts are placed near each other before batches are formed. The maximum length inside each batch falls closer to the lengths of its members, reducing the number of padded positions processed by operations that still use the rectangular batch shape.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
