<?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>Mixed Precision on Duo&#39;s Tech Blog</title>
    <link>https://duoan.github.io/tags/mixed-precision/</link>
    <description>Recent content in Mixed Precision 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, 26 Apr 2025 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://duoan.github.io/tags/mixed-precision/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Megatron Internals III: Mixed Precision, Loss Scaling, and Grad Clipping</title>
      <link>https://duoan.github.io/posts/megatron-mixed-precision-training/</link>
      <pubDate>Sat, 26 Apr 2025 00:00:00 +0000</pubDate>
      <guid>https://duoan.github.io/posts/megatron-mixed-precision-training/</guid>
      <description>&lt;h1 id=&#34;megatron-internals-iii-mixed-precision-loss-scaling-and-grad-clipping&#34;&gt;Megatron Internals III: Mixed Precision, Loss Scaling, and Grad Clipping&lt;/h1&gt;
&lt;p&gt;Mixed precision training is not just &amp;ldquo;turn on fp16.&amp;rdquo; It is a state machine: fast low-precision tensors do forward and backward, stable fp32 tensors receive optimizer updates, and every rank agrees whether the step is valid before any shard changes.&lt;/p&gt;
&lt;p&gt;The classic recipe comes from Micikevicius et al., &lt;a href=&#34;https://arxiv.org/abs/1710.03740&#34;&gt;Mixed Precision Training&lt;/a&gt;: use lower precision where hardware is fast, keep fp32 master weights for updates, and use loss scaling when fp16 gradients underflow.
Megatron wraps that recipe around tensor, pipeline, and data parallelism.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
