<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>FP4 | Andrei Panferov</title><link>https://blog.panferov.org/tag/fp4/</link><atom:link href="https://blog.panferov.org/tag/fp4/index.xml" rel="self" type="application/rss+xml"/><description>FP4</description><generator>Hugo Blox Builder (https://hugoblox.com)</generator><language>en-us</language><lastBuildDate>Wed, 25 Feb 2026 00:00:00 +0000</lastBuildDate><image><url>https://blog.panferov.org/media/icon_huc9e102a171bf4c2800fdfdc4c205b92a_107130_512x512_fill_lanczos_center_3.png</url><title>FP4</title><link>https://blog.panferov.org/tag/fp4/</link></image><item><title>Quartet: Native FP4 Training Can Be Optimal for Large Language Models</title><link>https://blog.panferov.org/post/quartet-native-fp4-training/</link><pubDate>Wed, 25 Feb 2026 00:00:00 +0000</pubDate><guid>https://blog.panferov.org/post/quartet-native-fp4-training/</guid><description>&lt;h2 id="the-low-precision-training-challenge">The Low-Precision Training Challenge&lt;/h2>
&lt;p>When training large language models (LLMs), moving to low-precision offers a compelling way to improve throughput and energy efficiency. NVIDIA&amp;rsquo;s recent Blackwell architecture even provides hardware support for very low-precision operations using FP4 variants.&lt;/p>
&lt;p>However, existing algorithms for training in FP4 face severe accuracy degradation. To compensate, they often fallback to mixed-precision, effectively leaving performance on the table.&lt;/p>
&lt;h2 id="key-observations">Key Observations&lt;/h2>
&lt;p>Instead of mixed-precision workarounds, we investigate end-to-end, native FP4 training. Through extensive evaluations on Llama-type models, we explored how to keep all major computations (linear layers) in pure low precision.&lt;/p>
&lt;p>We reveal a new &lt;strong>low-precision scaling law&lt;/strong> that precisely quantifies the performance trade-offs across different bit-widths and training setups.&lt;/p>
&lt;p>
&lt;figure >
&lt;div class="d-flex justify-content-center">
&lt;div class="w-100" >&lt;img alt="Low-Precision Scaling Laws" srcset="
/post/quartet-native-fp4-training/laws_hucaa920974cbdefbb0c6ee4cc6fec5e33_107905_7b494de6b0e8742c26720c82d76f0ab5.webp 400w,
/post/quartet-native-fp4-training/laws_hucaa920974cbdefbb0c6ee4cc6fec5e33_107905_1824c4a6cb4dcf07b25b806681131e61.webp 760w,
/post/quartet-native-fp4-training/laws_hucaa920974cbdefbb0c6ee4cc6fec5e33_107905_1200x1200_fit_q75_h2_lanczos_3.webp 1200w"
src="https://blog.panferov.org/post/quartet-native-fp4-training/laws_hucaa920974cbdefbb0c6ee4cc6fec5e33_107905_7b494de6b0e8742c26720c82d76f0ab5.webp"
width="760"
height="251"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/p>
&lt;h2 id="introducing-quartet">Introducing Quartet&lt;/h2>
&lt;p>
&lt;figure >
&lt;div class="d-flex justify-content-center">
&lt;div class="w-100" >&lt;img alt="Quartet Native FP4 Training" srcset="
/post/quartet-native-fp4-training/diagram_hu6b586d797e7f5c5db36eb520ee5e3090_79886_e6ab233ff32e1b50ab8b4097fe64e9be.webp 400w,
/post/quartet-native-fp4-training/diagram_hu6b586d797e7f5c5db36eb520ee5e3090_79886_8c57ad076b5b04dc3ef2bc43a1dbfb62.webp 760w,
/post/quartet-native-fp4-training/diagram_hu6b586d797e7f5c5db36eb520ee5e3090_79886_1200x1200_fit_q75_h2_lanczos_3.webp 1200w"
src="https://blog.panferov.org/post/quartet-native-fp4-training/diagram_hu6b586d797e7f5c5db36eb520ee5e3090_79886_e6ab233ff32e1b50ab8b4097fe64e9be.webp"
width="740"
height="308"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/p>
&lt;p>Guided by this scaling law, we formulated &lt;strong>Quartet&lt;/strong> — an optimal technique for balancing accuracy and computation in FP4.&lt;/p>
&lt;p>We implemented Quartet using custom, optimized CUDA kernels tailored for the Blackwell architecture. What we discover is that fully FP4-based training can be a highly competitive alternative to both FP16 half-precision and FP8 training, closing the accuracy gap without sacrificing speed.&lt;/p>
&lt;p>
&lt;figure >
&lt;div class="d-flex justify-content-center">
&lt;div class="w-100" >&lt;img alt="FP4 vs FP8 Optimality" srcset="
/post/quartet-native-fp4-training/fp4_fp8_optimal_hu1f0b17796e12ad46d52bb9ea99772afa_133731_4caafc784b7d9cdf6aac38238932d745.webp 400w,
/post/quartet-native-fp4-training/fp4_fp8_optimal_hu1f0b17796e12ad46d52bb9ea99772afa_133731_5c7025faea6c5a45ffcc4e9cf6638cf9.webp 760w,
/post/quartet-native-fp4-training/fp4_fp8_optimal_hu1f0b17796e12ad46d52bb9ea99772afa_133731_1200x1200_fit_q75_h2_lanczos_3.webp 1200w"
src="https://blog.panferov.org/post/quartet-native-fp4-training/fp4_fp8_optimal_hu1f0b17796e12ad46d52bb9ea99772afa_133731_4caafc784b7d9cdf6aac38238932d745.webp"
width="760"
height="270"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/p>
&lt;p>&lt;strong>&lt;a href="https://arxiv.org/abs/2505.14669" target="_blank" rel="noopener">Read the Paper →&lt;/a>&lt;/strong>
&lt;br>
&lt;strong>&lt;a href="https://github.com/IST-DASLab/Quartet" target="_blank" rel="noopener">Code and Implementation →&lt;/a>&lt;/strong>&lt;/p>
&lt;hr>
&lt;p>&lt;em>Disclaimer: This blog post was automatically generated from the &lt;a href="https://arxiv.org/abs/2505.14669" target="_blank" rel="noopener">arXiv paper&lt;/a>.&lt;/em>&lt;/p></description></item></channel></rss>