<?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>Tensor Parallel on Duo&#39;s Tech Blog</title>
    <link>https://duoan.github.io/tags/tensor-parallel/</link>
    <description>Recent content in Tensor Parallel 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>Sat, 19 Apr 2025 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://duoan.github.io/tags/tensor-parallel/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Megatron Internals II: Column/Row Parallel Linear and Vocab Parallel Embedding</title>
      <link>https://duoan.github.io/posts/megatron-model-parallel-internals/</link>
      <pubDate>Sat, 19 Apr 2025 00:00:00 +0000</pubDate>
      <guid>https://duoan.github.io/posts/megatron-model-parallel-internals/</guid>
      <description>&lt;h1 id=&#34;megatron-internals-ii-columnrow-parallel-linear-and-vocab-parallel-embedding&#34;&gt;Megatron Internals II: Column/Row Parallel Linear and Vocab Parallel Embedding&lt;/h1&gt;
&lt;p&gt;Tensor parallelism is not &amp;ldquo;split every tensor somehow.&amp;rdquo; In Megatron, it is a small set of layer contracts: which dimension is local, which collective completes the dense math, and which gradient path communicates.&lt;/p&gt;
&lt;p&gt;The original &lt;a href=&#34;https://arxiv.org/abs/1909.08053&#34;&gt;Megatron-LM paper&lt;/a&gt; is still the cleanest starting point: split transformer matrix multiplies so each GPU does useful dense GEMM, then communicate only where the algebra requires it.
This post walks the implementation-level contracts behind &lt;code&gt;ColumnParallelLinear&lt;/code&gt;, &lt;code&gt;RowParallelLinear&lt;/code&gt;, &lt;code&gt;VocabParallelEmbedding&lt;/code&gt;, and parallel cross entropy.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Megatron Internals I: Building the DP / TP / PP Process Groups</title>
      <link>https://duoan.github.io/posts/megatron-distributed-init/</link>
      <pubDate>Sat, 12 Apr 2025 00:00:00 +0000</pubDate>
      <guid>https://duoan.github.io/posts/megatron-distributed-init/</guid>
      <description>&lt;h1 id=&#34;megatron-internals-i-building-the-dp--tp--pp-process-groups&#34;&gt;Megatron Internals I: Building the DP / TP / PP Process Groups&lt;/h1&gt;
&lt;p&gt;Megatron-LM&amp;rsquo;s first trick is not tensor-parallel matmul.
It is rank bookkeeping.
Before the model runs, every process must know the small set of peers it will communicate with for tensor parallelism, pipeline parallelism, data parallelism, embeddings, and optimizer state.&lt;/p&gt;
&lt;p&gt;The original &lt;a href=&#34;https://arxiv.org/abs/1909.08053&#34;&gt;Megatron-LM paper&lt;/a&gt; introduced intra-layer tensor parallelism for transformer training.
The later &lt;a href=&#34;https://arxiv.org/abs/2104.04473&#34;&gt;Megatron-LM scaling paper&lt;/a&gt; put tensor parallelism, pipeline parallelism, and data parallelism into one training system.
This post is the control plane underneath that system: how a flat list of ranks becomes a DP / PP / TP mesh.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
