<?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>Sequence Parallelism on Duo&#39;s Tech Blog</title>
    <link>https://duoan.github.io/tags/sequence-parallelism/</link>
    <description>Recent content in Sequence Parallelism on Duo&#39;s Tech Blog</description>
    <image>
      <title>Duo&#39;s Tech Blog</title>
      <url>https://duoan.github.io/images/papermod-cover.png</url>
      <link>https://duoan.github.io/images/papermod-cover.png</link>
    </image>
    <generator>Hugo -- 0.153.1</generator>
    <language>en-us</language>
    <lastBuildDate>Mon, 12 May 2025 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://duoan.github.io/tags/sequence-parallelism/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Sequence Parallelism I: Megatron SP Cuts Activation Memory Along the Sequence</title>
      <link>https://duoan.github.io/posts/sequence-parallelism-megatron-sp/</link>
      <pubDate>Mon, 12 May 2025 00:00:00 +0000</pubDate>
      <guid>https://duoan.github.io/posts/sequence-parallelism-megatron-sp/</guid>
      <description>&lt;h1 id=&#34;sequence-parallelism-i-megatron-sp-cuts-activation-memory-along-the-sequence&#34;&gt;Sequence Parallelism I: Megatron SP Cuts Activation Memory Along the Sequence&lt;/h1&gt;
&lt;p&gt;Tensor parallelism is usually introduced as a way to make matrix multiplications fit.
That is true, but it hides a second problem.
After the weights are split, many activations are still replicated on every tensor-parallel rank.
For short contexts this is tolerable.
For long contexts it becomes one of the reasons training throughput collapses into activation checkpointing.&lt;/p&gt;
&lt;p&gt;Megatron sequence parallelism, usually shortened to Megatron SP, is a targeted fix from &lt;em&gt;Reducing Activation Recomputation in Large Transformer Models&lt;/em&gt; (&lt;a href=&#34;https://arxiv.org/abs/2205.05198&#34;&gt;arXiv:2205.05198&lt;/a&gt;).
It does not replace tensor parallelism.
It keeps Megatron&amp;rsquo;s column-parallel and row-parallel linear layers, then shards the sequence-local regions that tensor parallelism had left replicated.
The trick is small enough to miss and important enough to change the memory budget of a whole Transformer block.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
