<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>LLM | Andrei Panferov</title><link>https://blog.panferov.org/tag/llm/</link><atom:link href="https://blog.panferov.org/tag/llm/index.xml" rel="self" type="application/rss+xml"/><description>LLM</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>LLM</title><link>https://blog.panferov.org/tag/llm/</link></image><item><title>Quartet II: Accurate LLM Pre-Training in NVFP4 by Improved Unbiased Gradient Estimation</title><link>https://blog.panferov.org/post/quartet-ii-nvfp4-pretraining/</link><pubDate>Wed, 25 Feb 2026 00:00:00 +0000</pubDate><guid>https://blog.panferov.org/post/quartet-ii-nvfp4-pretraining/</guid><description>&lt;h2 id="the-core-problem">The Core Problem&lt;/h2>
&lt;p>
&lt;figure >
&lt;div class="d-flex justify-content-center">
&lt;div class="w-100" >&lt;img alt="Quartet II Scheme" srcset="
/post/quartet-ii-nvfp4-pretraining/scheme_hu798b5440025eb4160fb97e63cf9491f3_58326_96429ae1b52d898b0411d5bb8aa13940.webp 400w,
/post/quartet-ii-nvfp4-pretraining/scheme_hu798b5440025eb4160fb97e63cf9491f3_58326_d9e3d23424fa9ef23d0e432701cd2916.webp 760w,
/post/quartet-ii-nvfp4-pretraining/scheme_hu798b5440025eb4160fb97e63cf9491f3_58326_1200x1200_fit_q75_h2_lanczos_3.webp 1200w"
src="https://blog.panferov.org/post/quartet-ii-nvfp4-pretraining/scheme_hu798b5440025eb4160fb97e63cf9491f3_58326_96429ae1b52d898b0411d5bb8aa13940.webp"
width="675"
height="270"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
The introduction of the NVFP4 lower-precision format (natively supported by NVIDIA Blackwell GPUs) opens the door for end-to-end fully-quantized pre-training of massive Large Language Models (LLMs). However, existing quantized training methods compromise the format&amp;rsquo;s representation capacity. Specifically, to achieve unbiased gradient estimation via stochastic rounding (SR), these methods sacrifice noticeable accuracy compared to standard FP16 and FP8 training.&lt;/p>
&lt;h2 id="key-observations">Key Observations&lt;/h2>
&lt;p>To solve this, the authors introduce &lt;strong>MS-EDEN&lt;/strong>, a novel unbiased quantization routine specifically designed for micro-scaled formats.&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Reduced Error&lt;/strong>: MS-EDEN provides more than 2x lower quantization error than traditional stochastic rounding (SR).&lt;/li>
&lt;li>&lt;strong>Quartet II Integration&lt;/strong>: MS-EDEN is seamlessly integrated into a new fully-NVFP4 quantization scheme for linear layers, aptly named &lt;strong>Quartet II&lt;/strong>.&lt;/li>
&lt;/ul>
&lt;p>Analytically, Quartet II achieves consistently better gradient estimation across all major matrix multiplications—in both forward and backward passes. Furthermore, the proposal pairs exceptionally well with other recent performance enhancements aimed at NVFP4.&lt;/p>
&lt;h2 id="results">Results&lt;/h2>
&lt;p>
&lt;figure >
&lt;div class="d-flex justify-content-center">
&lt;div class="w-100" >&lt;img alt="Training Curves" srcset="
/post/quartet-ii-nvfp4-pretraining/nanochat_curves_hua97c7f2f4c10b5aeccf4b72a064220b9_77324_e3989992e9442ed778db174d749ab604.webp 400w,
/post/quartet-ii-nvfp4-pretraining/nanochat_curves_hua97c7f2f4c10b5aeccf4b72a064220b9_77324_fe93fdf6ae32f99f050f03c859f9ef81.webp 760w,
/post/quartet-ii-nvfp4-pretraining/nanochat_curves_hua97c7f2f4c10b5aeccf4b72a064220b9_77324_1200x1200_fit_q75_h2_lanczos_3.webp 1200w"
src="https://blog.panferov.org/post/quartet-ii-nvfp4-pretraining/nanochat_curves_hua97c7f2f4c10b5aeccf4b72a064220b9_77324_e3989992e9442ed778db174d749ab604.webp"
width="641"
height="245"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
The authors validated Quartet II on end-to-end LLM training runs with up to 1.9 Billion parameters on 38 Billion tokens.&lt;/p>
&lt;ul>
&lt;li>Supplied kernels for execution on NVIDIA Blackwell GPUs demonstrate an impressive &lt;strong>up to 4.2x speedup&lt;/strong> over equivalent BF16 implementations.&lt;/li>
&lt;/ul>
&lt;p>
&lt;figure >
&lt;div class="d-flex justify-content-center">
&lt;div class="w-100" >&lt;img alt="Linear Speedup" srcset="
/post/quartet-ii-nvfp4-pretraining/linear_speedup_hub21be593884195418b0c291fdcac80cf_19614_e4824be294880227d9014290c70d1b7e.webp 400w,
/post/quartet-ii-nvfp4-pretraining/linear_speedup_hub21be593884195418b0c291fdcac80cf_19614_af90f45f83850a33ba166e0804859ffe.webp 760w,
/post/quartet-ii-nvfp4-pretraining/linear_speedup_hub21be593884195418b0c291fdcac80cf_19614_1200x1200_fit_q75_h2_lanczos_3.webp 1200w"
src="https://blog.panferov.org/post/quartet-ii-nvfp4-pretraining/linear_speedup_hub21be593884195418b0c291fdcac80cf_19614_e4824be294880227d9014290c70d1b7e.webp"
width="353"
height="244"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/p>
&lt;h2 id="links">Links&lt;/h2>
&lt;ul>
&lt;li>&lt;strong>&lt;a href="https://arxiv.org/abs/2601.22813" target="_blank" rel="noopener">arXiv Paper&lt;/a>&lt;/strong>&lt;/li>
&lt;li>&lt;strong>&lt;a href="https://github.com/IST-DASLab/Quartet-II" target="_blank" rel="noopener">GitHub Repository&lt;/a>&lt;/strong>&lt;/li>
&lt;/ul>
&lt;hr>
&lt;p>&lt;em>Disclaimer: This blog post was automatically generated from the &lt;a href="https://arxiv.org/abs/2601.22813" target="_blank" rel="noopener">arXiv paper&lt;/a>.&lt;/em>&lt;/p></description></item><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>