AAIニュース
最新ニュースAI日報Hacker日報週報動画AIツールトレンド企業
AAIニュース

世界中のAI最新情報を日本語で。毎時自動収集・翻訳・要約。

コンテンツ

最新ニュースAI日報週報

分析

トレンド企業動画

サイト

についてRSSお問い合わせ
© 2026 ainew.jp — All rights reserved.特定商取引法に基づく表記
ニュース一覧元記事を開く
NVIDIA Developer Blog·2026年6月27日 01:00·約20分

NVIDIA モデル最適化器を用いた NVIDIA Nemotron 3 Ultra NVFP4 チェックポイントの作成方法

#LLM#Model Optimization#NVIDIA Model Optimizer#NVFP4#High-Performance Computing
TL;DR

NVIDIA は「NVIDIA Model Optimizer」を活用し、高精度な推論を実現する新モデルチェックポイント「Nemotron 3 Ultra NVFP4」の生成手法を発表した。

AI深層分析2026年6月27日 02:02
4
重要/ 5段階
深度40%
4
関連度30%
5
実用性20%
4
革新性10%
3

キーポイント

1

NVFP4 形式による高精度推論の実現

NVIDIA Model Optimizer を使用して、非整数精度(FP4)でありながら高精度な推論性能を維持する「Nemotron 3 Ultra NVFP4」モデルチェックポイントを生成する手法が確立された。

2

最適化ツールの活用と効率化

既存の NVIDIA Model Optimizer ツールチェーンを活用することで、計算リソースやメモリ使用量を大幅に削減しつつ、複雑な推論タスクへの対応を可能にした。

3

次世代 LLM の展開基盤整備

この手法は、大規模言語モデルのより効率的なデプロイとスケーラビリティ向上に寄与し、実環境での高性能推論を加速する重要なステップとなる。

影響分析・編集コメントを表示

影響分析

この発表は、AI モデルの推論コストを劇的に下げつつ性能を維持する技術的ブレークスルーを示しており、企業や開発者が大規模言語モデルを実装する際のハードルを大幅に下げる可能性があります。特に NVFP4 のような非整数精度形式の実用化は、エッジデバイスからクラウドまで幅広い環境での AI 展開を加速させる重要な転換点となります。

編集コメント

非整数精度(FP4)の活用により、推論コストと性能のトレードオフを劇的に改善する手法が提示されました。これは大規模モデルの実用化における重要な技術的マイルストーンと言えます。

コンテキストウィンドウが長くなるにつれ、大規模モデルの重みを効率的に移動させることがパフォーマンスにとって極めて重要になります。これに対処する一般的な方法は量子化であり、これはモデルの重みをより小さなデータ形式に圧縮する最適化技術です。NVFP4 はその量子化フォーマットの一例で、NVIDIA Blackwell アーキテクチャと共に導入された革新的な 4 ビット浮動小数点方式です。

これが、新しい Nemotron 3 Ultra NVFP4 チェックポイントの背後にあるアプローチです:私たちは NVIDIA Model Optimizer を用いてモデルを NVFP4 に量子化しました。その結果、Figure 1 に示すように、デコード集中型のワークロードにおいて GLM-5.1 754B FP4 モデルよりも最大で 5.9 倍高い推論スループットを実現しつつ、ほぼすべてのベンチマークで BF16 と同等の精度を達成するモデルとなりました。

NVFP4 のパフォーマンス上の利点はよく知られていますが、高品質な NVFP4 チェックポイントを生成するプロセスについては必ずしも周知されていません。本記事では、NVIDIA Model Optimizer を用いて Nemotron 3 Ultra (550B) を NVFP4 に量子化する手順を解説し、開発者が自身のモデルに対して最適な量子化チェックポイントを生成する方法を示します。

imageimage*Figure 1. 他の NVFP4 モデルと比較した Nemotron 3 Ultra NVFP4 のパフォーマンス*

Nemotron 3 Ultra NVFP4 チェックポイント

一般的な誤解として、NVFP4 チェックポイントのすべての層が NVFP4 で保存されていると考えられがちですが、表 1 が示す通り、これは事実ではありません。各層は、そのアーキテクチャに対する感度とモデル精度への影響に応じて選択された異なる精度フォーマットに量子化されています。NVFP4 量子化後、Nemotron 3 Ultra モデルは BF16(ブレイドド・フロート 16)の 1,121 GB から 352.3 GB に縮小され、3.2 倍の削減を実現しています。その効果は大きく、ハードウェアのフットプリントを半分に減らすことができます。

層/演算子BF16 ベースライン量子化済みチェックポイント精度

埋め込み層、出力分類層、MTP 層BF16BF16

MoE ルート付きエキスパートBF16NVFP4

MoE 共有エキスパートBF16テンソルごとの FP8

Mamba ミキサー線形演算BF16テンソルごとの FP8

アテンション線形演算BF16BF16

潜在 MoEBF16BF16

Mamba conv1dBF16BF16

KV キャッシュBF16FP8

Mamba SSM キャッシュFP32確率的丸め付きの FP16

*表 1. BF16 ベースラインと各層/演算子の量子化済みチェックポイント精度との比較 *Nemotron 3 Ultra 論文より

Nemotron 3 Ultra NVFP4 の重要な革新点は、単一のチェックポイントが NVIDIA Hopper と Blackwell の両方で実行可能であることです。これは、動作するハードウェアに合わせて重みフォーマットを変換することで実現されています。ネイティブ FP4 テンサーコアを備えていない Hopper では、サービングフレームワークが自動的に W4A16 に切り替わります。一方、Blackwell ではネイティブの W4A4 が使用されます。

W8A8(8 ビット重み、8 ビット活性化)は Hopper にとって明白な選択肢のように思えますが、その大きなメモリ使用量は、マルチトークン予測 (MTP) を収容するための十分な余裕を残していません。私たちは MTP が W4A16(4 ビット重み、16 ビット活性化)と共存できることを見出し、W4A16 はあらゆる点でこれに匹敵し、あるいは凌駕することを確認しました。詳細は Nemotron 3 Ultra 技術レポート (セクション 4.6) をお読みください。

最適な NVFP4 チェックポイントの発見方法

最適な NVFP4 チェックポイントを見つけるには、いくつかの反復が必要です。このセクションでは、NVFP4 チェックポイントをどのようにして取得したかという開発者のストーリーに迫ります。

FP4 における量子化の課題

FP4 量子化では、重みのブロック全体を表すために正の値 [0, 0.5, 1, 1.5, 2, 3, 4, および 6] の 8 つしかありません。元の値の範囲をどのようにマッピングするかを決定する必要があります。これは「スケール」と呼ばれる、表現の粒度を決定する乗算子によって制御されます。不適切なスケールを選択すると、小さな値に対して精度が浪費されるか、大きな値が切り捨てられることになり、どちらもモデルの品質を低下させます。では、最適なスケール因子はどのように選択すべきでしょうか?いくつかのアプローチがあります。

Max スケーリング

ここで、ブロック内の最大値を表現可能な FP4 の最大値にマッピングするようにスケールを設定します。しかし、単一の大きな重み外れ値が存在する場合、最大値スケーリングはブロック内の他のすべての値を狭い範囲に圧縮してしまい、これらの値がゼロに切り捨てられてしまう可能性があります。この情報の損失は精度に悪影響を及ぼす恐れがあります。最大値スケーリングはブロック内で最も絶対値の大きい値を保持しますが、その副作用として他の値がゼロに切り捨てられる可能性があります。

imageimage*図 2. 外れ値を含む重みブロックに対する最大値(absmax)スケーリング。外れ値によって設定されたスケール(12.8)は、FP4 量子化および逆量子化後にすべての 6 つの小さな重みをほぼゼロに圧縮します。12.8 の場合、スケールは absmax/6 であり、外れ値は 6.0 にマッピングされ、逆量子化すると正確にその数値に戻ります*

NVIDIA Model Optimizer で試す:

model = mtq.quantize(model, mtq.NVFP4_DEFAULT_CFG, forward_loop=forward_loop)

最大値スケーリング(スケールがブロックの絶対値最大値のみによって設定されるため、absmax とも呼ばれます)は最もシンプルなオプションですが、外れ値に対する感度が高いため、通常は最良の選択肢とはなりません。

これはまさに、以前のモデルである NVIDIA Nemotron 3 Super で直面したギャップです。単純な absmax NVFP4 PTQ(Post-Training Quantization:推論後量子化)では精度の差が生じてしまったため、チームは単一の外れ値がスケーリングを決定してしまうことのない一連の代替キャリブレーション戦略を評価しました。これには、平均二乗誤差(MSE)に基づく重みスケーリングから、2 次情報を用いて重みを符号化する効率的な手法である GPTQ までが含まれます。

アルゴリズム詳細MMLU-ProGPQALiveCodeBenchAA-LCR

BF16—83.4979.9272.90753.00

デフォルト NVFP4 PTQ(ベースラインアルゴリズム)静的なテンソルごとのスケーリングは最大値キャリブレーションを用いて計算され、ブロックごとのスケーリングはブロックの最大値から動的に計算されます。82.9979.2970.1855.50

MSE を最小化する重みブロックごとのスケーリング重みブロックごとのスケーリングを掃引して、ブロックごとの MSE を最小化します。83.3179.9271.3756.75

出力 MSE を最小化する重みブロックごとのスケーリング重みブロックごとのスケーリングを独立して掃引し、GEMM(行列乗算)の出力 MSE を最小化します。83.0578.9871.0057.06

GPTQGPTQ (Frantar et al., 2023) は重みの量子化に使用されます。83.1180.0569.7957.87

*表 2. Nemotron 3 Super の量子化に関する実験結果。チームは複数の量子化手法を試行し、4 つのタスクにおける精度の変化を評価しました。詳細については Nemotron 3 Super の論文 を参照してください*

平均二乗誤差スケーリング

もう一つの手法は、ブロック全体にわたる平均再構成誤差を最小化するスケール値を検索する平均二乗誤差(MSE)スケーリングです。

しかし、MSE の値が低いことが必ずしもモデルの精度向上につながるわけではありません。Nemotron 3 Ultra の実験において、MSE キャリブレーションは 4/6 スケーリングと比較してテンソルごとの重み誤差を 27.1% 削減しましたが、下流ベンチマークにおける一貫した改善は見られませんでした。

imageimage*図 3. 同じブロックに対する MSE ベースのスケーリングは、使用可能な解像度を保ちつつ小さな重みの大部分を維持し、外れ値を 2.0 に飽和させます*

NVIDIA Model Optimizer で MSE ベースのスケーリングを試す:

model = mtq.quantize(model, mtq.NVFP4_W4A4_WEIGHT_MSE_FP8_SWEEP_CFG, forward_loop=forward_loop)

**

**以前のモデルである NVIDIA Nemotron 3 Super では、最終的な量子化レシピとして、重みに対して MSE ベースのブロックスケーリングを組み合わせ、活性化値に対してテンソルごとの FP8 スイープと動的な最大値ベースのスケーリングを採用していました。MSE 重みに FP8 活性化スイープを組み合わせることで、試したすべての手法の中で精度とサイズのトレードオフが最適となり、これが Super における最適な NVFP4 構成となりました。

Max スケーリングと MSE スケーリングはどちらも全体の丸め誤差を最小化するスケールを選択しますが、どちらの手法もグリッド上の誤差の発生源には注目していません。Nemotron 3 Ultra では、グリッド内のギャップによる誤差に基づいて範囲を選択するスケーリング方法を使用しました。

Four-over-six スケーリング

NVFP4 が表現できるのは正の値 8 つのみ(0, 0.5, 1, 1.5, 2, 3, 4, 6)であることを思い出してください。4 の次は直接 6 にジャンプします。この範囲にある重みは、4 または 6 のいずれかに強制的に丸められ、単一の値で 13% を超える誤差が生じることもあります。

imageimage*図 4. NVFP4 の誤差は最大値付近の丸めから生じます。上段:FP4 で表現可能な値には 4 と 6 の間にギャップがあり、そのギャップへの丸めが NVFP4 の誤差の大部分を駆動します。下段:Cook et al. (2026) に基づくシミュレーションでは、Llama-3.1-8B に対する FP4 の量子化(quantization)で、量子化閾値が誤差にどう影響するかを示しています*

Four-over-six は、各重みブロックが独立して M=4 または M=6 の最大値へのスケーリングを選択し、再構成誤差を最小化する方を選ぶことでこの問題を解決します。Four-over-six は重みに適用され、活性化(activations)についてはデフォルトの NVFP4 にフォールバックします。

imageimage*図 5. M=4 と M=6 のブロックスケーリング(four-over-six)。2 つのサンプル重みブロックをそれぞれ M=6 と M=4 で量子化し、FP4 コードと平均二乗誤差を示しています。一方のブロックは M=6 を好み、もう一方は M=4 を好みます*

M=6 がブロック [2, 4, 5.9, 6] で勝利する場合

スケール M=1 の場合、値 2, 4, 6 は FP4 グリッドポイントに正確に対応し、5.9 はわずかなコストで 6 に丸められます。一方、M=4 にスケーリングすると 2 が 2.25、4 が 4.5 となり、誤差が生じます。

ブロック [10, 20, 30, 40] で M=4 が勝利する

M=6 にスケールすると、30 は 4.62 にマッピングされ、切り捨てられて 4 となり、13% の誤差が生じます。一方、代わりに M=4 にスケールすると、10, 20, 30, 40 がそれぞれ 1, 2, 3, 4 に正確にマッピングされ、ブロック全体で丸め誤差がゼロになります。平均二乗誤差 (MSE: Mean Squared Error) は 4.33 対 0.0 です。

Nemotron 3 Ultra では、FP4 ルートド・エキスパート重みスケールを設定するために「四対六」方式を採用し、グローバルなテンソルごとの重みスケールを 1.75 倍引き上げました。各マイクロブロックが M=4 または M=6 のグリッドを選択します。モデルの 48 個の MoE (Mixture of Experts) エキスパート層における全 49,152 個のプロジェクション重みにおいて、標準的な最大値キャリブレーションと比較して、中央値の再構成 MSE を 16.4% 削減し、バランス型 5.03-BPE (Billion Parameters per Example) 設定で最良のダウンストリーム結果をもたらしました。これは BF16 に対する中央値回復率で 98.5% に達し、最大値キャリブレーション (96.8%) や MSE 最適化 (98.4%) を上回りました。

NVIDIA Model Optimizer で四対六方式を試す:

model = mtq.quantize(model,

mtq.NVFP4_FOUR_OVER_SIX_CFG, forward_loop=forward_loop)

*NVFP4_FOUR_OVER_SIX_CFG は、7 月に公開予定の次期 NVIDIA Model Optimizer (バージョン 0.46) でリリースされます。*Nemotron 3 Ultra PTQ の例*をご覧ください。**

ビット毎要素数**

有効ビット数(BPE)とは、モデルのすべての重みを保存するために必要な平均ビット数を指します。BF16 重みをすべて使用するモデルは 16 ビットの BPE を使用しますが、半分の重みが FP8 で半分が BF16 のモデルでは 12 ビットのみとなります。NVFP4 はブロック単位およびテンソル単位のスケーリングオーバーヘッドを追加するため、最小値は 4.5 ビットの BPE になります。テンソル単位のスケールにおける 32 ビットは全テンソルにわたって均等化され、全体の BPE 計算では無視できるほど小さいとみなされます。

目標は、精度を犠牲にすることなく、有効な BPE を可能な限り低く抑える量子化構成を検索することです。これは層ごとに耐性が異なるため難しい問題です。一部の層は量子化に対して敏感であり、より高い精度で維持する必要があり、これにより有効な BPE が上昇します。各層を異なるレベルで量子化するか、あるいは量子化しない選択ができるため、可能な組み合わせの数は指数関数的に増加し、網羅的な検索は現実的ではなく、より賢明な戦略が必要となります。

NVIDIA Model Optimizer の AutoQuantize(mtq.auto_quantize)がこれを実現します。固定された構成を指定するのではなく、ターゲットビット予算(例:auto_quantize_bits=4.8)と候補フォーマットのリスト(NVFP4_DEFAULT_CFG や FP8_DEFAULT_CFG など)を提供するだけで済みます。その後、各層の感度を評価し、予算を満たしつつ最高の精度を達成する層ごとのフォーマット割り当てを検索します。これにより、最も敏感な層はより高い精度のフォーマットに保たれるか、あるいは完全にスキップされます。

import modelopt.torch.quantization as mtq

model, search_state = mtq.auto_quantize(

model,

constraints={"auto_quantize_bits": 4.8},

quantization_formats=["NVFP4_DEFAULT_CFG", "FP8_DEFAULT_CFG"],

data_loader=calib_dataloader,

forward_step=forward_step,

loss_func=loss_func,

Nemotron 3 Ultra のための最適な要素あたりのビット数を見つけるために、有効な要素あたりのビット数が 4.85 から 7.19 に至る 5 つの動作点をスキャンし、Table 3 に示されたいくつかのベンチマークにおける精度を比較しました。重要な信号は AA-LCR から得られ、4.85 から 5.03 に移行することでベンチマークが 2.4 ポイント向上しましたが、5.03 を超えるとパフォーマンスは再び平坦化しました。これにより、5.03 BPE が最適解であることが示されました。

Quantization (bits-per-element)**

TaskMetric4.855.03†5.255.437.19

Coding

SciCode*pass@1 (avg-16), subtask acc*43.8243.8843.4543.2743.44

Scientific Reasoning

GPQA Diamond*pass@1 (avg-32), sym. correct*84.6684.3384.7584.1284.52

HLE*pass@1, judge correct*24.2424.8425.0024.9825.44

CritPt*pass@1 (avg-8), accuracy*3.043.935.184.824.46

General

AA-Omniscience*pass@1 (avg-20), judge correct*29.2129.7529.1829.2929.00

*pass@1 (avg-20), non-hallucination*54.1351.5951.8451.7052.81

IFBench*pass@1 (avg-8), avg. score*79.3479.2679.8379.5379.83

Long Context

AA-LCR*pass@1 (avg-16), judge correct*62.2564.6964.1964.9465.00

*Table 3. Accuracy compared to effective bits-per-element from the Nemotron 3 Ultra paper*

NVIDIA Model Optimizer を用いた Nemotron 3 Ultra の NVFP4 量子化方法

Nemotron 3 Super 120B とは異なり、Nemotron 3 Ultra は 550B モデルであるため、量子化プロセスの並列化から大きな恩恵を受けます。このため、私たちは 2 つの量子化パスをサポートしています。

*両方のパスとも NVIDIA Model Optimizer によって駆動されています*

指標Hugging Face TransformersMegatron-LM

計算4 × B30016 × B300;**エキスパート並列性 = データ並列性 = 16

モデル読み込み時間40 分< 2 分

モデル読み込みとキャリブレーション時間85 分9 分

エクスポート42 分33 分

合計時間**120 分45 分

*表 4. Hugging Face Transformers と Megatron-LM の量子化時間の比較*

Nemotron 3 Ultra を NVFP4 に量子化する手順は、NVIDIA Megatron-LM における NVIDIA ModelOpt のポストトレーニング量子化 (PTQ) パイプラインに従います。並列ルートでは、事前学習済みチェックポイントがまず Megatron-LM 形式に変換され、その後 quantize.sh を単一の呼び出しで実行して NVFP4 量子化設定をレシピとして渡すことで量子化が行われます。バックエンドでは、Megatron-LM がエキスパート並列性とデータ並列性(16×B300 で EP = DP = 16)を用いてモデルを GPU にシャードするため、キャリブレーションのフォワードパスはすべてのデバイスに分散して実行されます。これにより、負荷とキャリブレーションにかかる時間が約 85 分から約 9 分に短縮されます。

キャリブレーションは nemotron-post-training-dataset-v2 を実行してブロックごとのスケールを適合させ、精度ポリシーは完全に設定駆動型です。quantize.sh に設定を渡すことで選択します。組み込み名(例:NVFP4_DEFAULT_CFG, FP8_DEFAULT_CFG)または YAML レシピパスのいずれかを使用し、これが最終的に mtq.quantize(model, config, forward_loop) に渡されて量子化器がインストールされキャリブレーションが実行されます。

NVIDIA Model Optimizer で 4 対 6 スケーリングを試す:

HF_MODEL_CKPT=nvidia/NVIDIA-Nemotron-3-Ultra-550B-A55B-BF16

TP=4 \

MLM_MODEL_SAVE=/tmp/Nemotron-3-Ultra_quant \

./quantize.sh nvidia/NVIDIA-Nemotron-3-Ultra-550B-A55B-BF16 huggingface/models/nvidia/Nemotron-3-Ultra-550B-A55B/ptq/nvfp4-4o6

PP=1 \

MLM_MODEL_CKPT=/tmp/Nemotron-3-Ultra_quant \

EXPORT_DIR=/tmp/Nemotron-3-Ultra_NVFP4_46_HF \

./export.sh nvidia/NVIDIA-Nemotron-3-Ultra-550B-A55B-BF16

NVFP4_FOUR_OVER_SIX_CFG による 4 対 6 のサポートが NVIDIA Model Optimizer 0.46 に実装されつつあります。Nemotron 3 Ultra の 4 対 6 用レシピは GitHub で利用可能です。4 対 6 は重み(weights)に対して機能し、活性化値(activations)についてはデフォルトの NVFP4 にフォールバックします。

量子化設定のカスタマイズ

NVIDIA Model Optimizer は、異なる量子化設定に対応してカスタマイズ可能に設計されています。組み込みの NVFP4 設定には、広範囲に量子化する NVFP4_DEFAULT_CFG から、敏感なアテンション投影層を高精度に保ちつつ FP4 を MLP およびエキスパート層に制限する、より選択的なプリセットである NVFP4_MLP_ONLY_CFG、NVFP4_EXPERTS_ONLY_CFG、および NVFP4_OMLP_ONLY_CFG までが含まれます。

内部では、設定はモジュール名パターンに対してマッチングされる規則の順序付きリストであり、mtq.quantize() がこれらを適用します。重みの量子化は *weight_quantizer パターンを対象とする規則によって制御され、ここではフォーマット(NVFP4 の場合、16 幅ブロックを持つ E2M1 要素と E4M3 ブロックスケール)を設定します。一方、活性化の量子化は、*input_quantizer パターンに対する別の規則によって制御されます。

これら 2 つは独立しているため、重みだけを量子化することも、重みと活性化を同時に量子化することも可能です。また、特定のモジュールに対して例外を設けるには、無効化する規則を追加することで対応できます。組み込みのプリセットを超える設定が必要な場合は、完全な YAML レシピを作成し、--recipe オプションで読み込むことで、量子化設定を完全に定義することができます。

以下の Nemotron-3 Ultra のレシピは、ルーティングされたエキスパート重みに NVFP4(4 ビット浮動小数点)を 4 対 6 の構成で適用し、共有エキスパートと Mamba プロジェクションは FP8 で維持し、KV キャッシュも FP8 を使用し、それ以外のすべては BF16 に保つものです。この完全なレシピは NVIDIA Model Optimizer のレシピライブラリに同梱されています:nvfp4-4o6.yaml

quantize:

algorithm:

method: mse

fp8_scale_sweep: false

start_multiplier: 1.0

stop_multiplier: 1.5

step_size: 0.5

quant_cfg:

  • quantizer_name: '*'

enable: false

  • quantizer_name: '*mixer.experts.*weight_quantizer'

enable: true

cfg:

block_sizes: {-1: 16, type: static, scale_bits: e4m3, four_over_six: true}

num_bits: e2m1

  • quantizer_name: '*mixer.experts.*input_quantizer'

enable: true

cfg:

block_sizes: {-1: 16, type: dynamic, scale_bits: e4m3}

num_bits: e2m1

  • quantizer_name: '*mixer.shared_experts*'

enable: true

cfg: {num_bits: e4m3, axis: null}

  • quantizer_name: '*mixer.in_proj*'

enable: true

cfg: {num_bits: e4m3, axis: null}

  • quantizer_name: '*mixer.out_proj*'

enable: true

cfg: {num_bits: e4m3, axis: null}

  • quantizer_name: '*[kv]_bmm_quantizer'

enable: true

cfg: {num_bits: e4m3}

Nemotron 3 Ultra でこの手順を説明しましたが、同じパイプラインは Hugging Face の任意のモデルチェックポイントでも動作します。 Model Optimizer を Hub のモデルカードまたはローカルパスに指し、設定(組み込みプリセットまたは独自のレシピ)を選択して、同じ量子化とエクスポートステップを実行するだけです。

import modelopt.torch.quantization as mtq

from modelopt.torch.export import export_hf_checkpoint

from transformers import AutoModelForCausalLM

model = AutoModelForCausalLM.from_pretrained("<your-hf-model-card>")

model = mtq.quantize(model, mtq.NVFP4_DEFAULT_CFG, forward_loop)

export_hf_checkpoint(model, export_dir="<export_path>")

ワンクリックランチャーを試す

デプロイを簡素化するため、Model Optimizer ランチャー は、Ultra PTQ とエクスポートのワークフロー全体を自動化します。ランチャーの README に記載されたセットアップ手順を完了した後、ローカルマシンから単一のコマンドで Nemotron 3 Ultra YAML レシピ を介してワークフローを開始できます:

uv run launch.py --yaml examples/nvidia/NVIDIA-Nemotron-3-Ultra-550B-A55B-BF16/megatron_lm_ptq.yaml --yes

起動後、Slurm クラスターへのアクセス権限があり十分な GPU リソースが確保されていることを前提に、このワークフローは残りの量子化およびエクスポート手順を自動的に処理します。本例は、それぞれ 4 基の NVIDIA Blackwell GPU を搭載した 4 ノードで検証済みです。

小規模な展開においては、Nemotron-3 Super 向けの PTQ(Post-Training Quantization: 学習後量子化)例も用意されています:

uv run launch.py --yaml examples/nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-BF16

はじめに

このプロセスは、オープンソースの NVIDIA Model Optimizer GitHub リポジトリで利用可能な完全なレシピを用いて再現可能です。Model Optimizer はコミュニティ主導のプロジェクトであり、貢献を歓迎しています。バグ報告や機能要望については Issue を提出でき、今後の作業計画はプロジェクトロードマップで確認可能であり、改善点を提案する Pull Request の提出も可能です。<co

原文を表示

As context windows grow longer, moving large model weights efficiently becomes critical to performance. A common way to address this is quantization, an optimization technique that compresses model weights into a smaller data format. One quantization format is NVFP4, an innovative 4-bit floating point introduced with NVIDIA Blackwell architecture.

That’s the approach behind our new Nemotron 3 Ultra NVFP4 checkpoint: we quantized the model into NVFP4 using NVIDIA Model Optimizer. The result is a model that achieves up to 5.9x higher inference throughput than GLM-5.1 754B FP4 model on decode-heavy workloads while matching BF16 accuracy across nearly every benchmark, as shown in Figure 1.

While the performance benefits of NVFP4 are well understood, the process of producing a high-quality NVFP4 checkpoint is not. This post walks through how we quantized Nemotron 3 Ultra (550B) to NVFP4 with NVIDIA Model Optimizer, and shows developers how to generate the best quantized checkpoints for their own models.

Figure 1. Performance of Nemotron 3 Ultra NVFP4 compared to other NVFP4 models
Figure 1. Performance of Nemotron 3 Ultra NVFP4 compared to other NVFP4 models

The Nemotron 3 Ultra NVFP4 checkpoint

A common misconception is that every layer of an NVFP4 checkpoint is stored in NVFP4. As Table 1 shows, this isn’t the case: different layers are quantized to different precision formats, chosen according to each layer’s sensitivity to the architecture and its impact on model accuracy. After NVFP4 quantization, the Nemotron 3 Ultra model shrinks from 1,121 GB in BF16 down to 352.3 GB, a 3.2x reduction. The payoff is substantial, cutting the hardware footprint in half.

A key innovation of the Nemotron 3 Ultra NVFP4 is that a single checkpoint can run on both NVIDIA Hopper and Blackwell. It achieves this by converting the weight format to match the hardware it runs on. On Hopper, which lacks native FP4 tensor cores, the serving framework automatically switches to W4A16. On Blackwell, it uses native W4A4.

While W8A8 (8-bit weights, 8-bit activations) seems like the obvious Hopper choice, its larger memory footprint leaves too little headroom to fit Multi-Token Prediction (MTP). We found MTP could only fit alongside W4A16 (4-bit weights, 16-bit activations) so W4A16 matches or beats it across the board. Read the full Nemotron 3 Ultra technical report (Section 4.6) to learn more.

How we found the optimal NVFP4 checkpoint

Finding an optimal NVFP4 checkpoint requires some iterations. We dive into the developer story of how we got an NVFP4 checkpoint in this section.

The challenge of quantizing at FP4

With FP4 quantization, there are only 8 positive values [0, 0.5, 1, 1.5, 2, 3, 4, and 6] to represent an entire block of weights. We need to determine how to map the original range of values. This is controlled by a *scale*, essentially a multiplier that determines the granularity of the representation. Choosing a poor scale means we either waste precision on small values or clip large values, both of which hurt model quality. So how should we choose the optimal scale factor? There are several approaches.

Max scaling

Here, we set the scale so the largest value in the block maps to the maximum representable FP4 value. However, with the presence of a single large weight outlier, the max scaling compresses every other value in the block into a narrow range, which can end up flushing these values to zero. This information loss may adversely affect accuracy. Max scaling preserves the highest magnitude value in the block, with a potential side effect of flushing other values to zero.

Figure 2. Max (absmax) scaling on a weight block with an outlier. The scale set by the outlier (12.8) compresses all six small weights to near 0 after FP4 quantization and dequantization. For 12.8, the scale is absmax/6; the outlier maps to 6.0 and dequantizes to exactly that number
Figure 2. Max (absmax) scaling on a weight block with an outlier. The scale set by the outlier (12.8) compresses all six small weights to near 0 after FP4 quantization and dequantization. For 12.8, the scale is absmax/6; the outlier maps to 6.0 and dequantizes to exactly that number

Try it with NVIDIA Model Optimizer:

model = mtq.quantize(model, mtq.NVFP4_DEFAULT_CFG, forward_loop=forward_loop)

Max scaling (also called absmax, since the scale is set entirely by the block’s absolute maximum) is the simplest option, but that sensitivity to outliers makes it rarely the best one.

This is exactly the gap we hit on our prior model, NVIDIA Nemotron 3 Super: naive absmax NVFP4 PTQ left an accuracy gap, so the team evaluated a range of alternative calibration strategies that don’t let a single outlier dictate the scale, from mean squared error (MSE)-based weight scaling to GPTQ, an efficient method that uses second-order information to encode weights.

Mean squared error scaling

Another approach is mean squared error (MSE) scaling, which searches for the scale that minimizes average reconstruction error across the whole block.

However, lower MSE does not always translate to better model accuracy. MSE calibration reduced per-tensor weight error by 27.1% over four-over-six scaling in our Nemotron 3 Ultra experiments, yet produced no consistent improvement on downstream benchmarks.

Figure 3. Illustration of MSE-based scaling on the same block preserves the bulk of small weights with usable resolution while saturating the outlier down to 2.0
Figure 3. Illustration of MSE-based scaling on the same block preserves the bulk of small weights with usable resolution while saturating the outlier down to 2.0

Try MSE-based scaling with NVIDIA Model Optimizer:

model = mtq.quantize(model, mtq.NVFP4_W4A4_WEIGHT_MSE_FP8_SWEEP_CFG, forward_loop=forward_loop)

**

**For our previous model, NVIDIA Nemotron 3 Super, the final quantization recipe combined MSE-based block scaling for weights with a per-tensor FP8 sweep and dynamic max-based scaling for activations. Combining MSE weights with the FP8 activation sweep gave the best accuracy-to-size tradeoff of everything we tried, and it became our optimal NVFP4 configuration for Super.

Max and MSE scaling both pick a scale to minimize overall rounding error, but neither pays attention to where the error comes from on the grid. For Nemotron 3 Ultra, we used a scaling method that chooses the range based on the error from the gap in the grid.

Four-over-six scaling

Remember how NVFP4 can only represent 8 positive values: 0, 0.5, 1, 1.5, 2, 3, 4, and 6. Notice that after 4, the next value jumps straight to 6. Any weight that falls in that range gets rounded aggressively to either 4 or 6, sometimes incurring over 13% error on a single value.

Figure 4. NVFP4 error comes from rounding near-maximal values. Top: FP4 representable values leave a gap between 4 and 6, and rounding into that gap drives most of the NVFP4 error. Bottom: from [Cook et al. (2026)Figure 4. NVFP4 error comes from rounding near-maximal values. Top: FP4 representable values leave a gap between 4 and 6, and rounding into that gap drives most of the NVFP4 error. Bottom: from [Cook et al. (2026), simulated quantization on Llama-3.1-8B FP4 shows how the quantization threshold affects error](https://developer-blogs.nvidia.com/wp-content/uploads/2026/06/Error-Rounding.webp)

Four-over-six fixes this as each block of weights independently chooses between scaling to a maximum of M=4 or M=6, picking whichever minimizes reconstruction error. Four-over-six works on weights and falls back to the default NVFP4 on activations.

Figure 5. M=4 vs. M=6 block scaling (four-over-six). Two sample weight blocks are quantized at M=6 and M=4 with their FP4 codes and mean squared error, showing one block favors M=6, and the other favors M=4
Figure 5. M=4 vs. M=6 block scaling (four-over-six). Two sample weight blocks are quantized at M=6 and M=4 with their FP4 codes and mean squared error, showing one block favors M=6, and the other favors M=4

When M=6 wins with block: [2, 4, 5.9, 6]

At a scale of M=1, values 2, 4, and 6 map exactly onto FP4 grid points and only 5.9 rounds to 6 at negligible cost. Scaling to M=4 pushes 2 to 2.25 and 4 to 4.5, introducing error.

When M=4 wins with block: [10, 20, 30, 40]

Scaling to M=6 maps 30 to 4.62, which rounds down to 4, a 13% error. Scaling to M=4 instead maps 10, 20, 30, and 40 exactly onto 1, 2, 3, and 4, with zero rounding error across the entire block. MSE: 4.33 vs 0.0.

Four-over-six was used to set the FP4 routed-expert weight scales in Nemotron 3 Ultra, raising the global per-tensor weight scale by 1.75x, and with each microblock picking the M=4 or M=6 grid. Across all 49,152 projection weights in the model’s 48 MoE expert layers, it cut the median reconstruction MSE by 16.4% compared to standard max calibration, and delivered the best downstream result in the balanced 5.03-BPE setting: 98.5% median recovery relative to BF16, ahead of max (96.8%) and MSE (98.4%).

Try four-over-six with NVIDIA Model Optimizer:

model = mtq.quantize(model,

mtq.NVFP4_FOUR_OVER_SIX_CFG, forward_loop=forward_loop)

*NVFP4_FOUR_OVER_SIX_CFG will be released on the upcoming 0.46 NVIDIA Model Optimizer in July. View the*Nemotron 3 Ultra PTQ example*.** *

Bits-per-element

Effective bits-per-element (BPE) refers to the average number of bits required to store all weights of the model. A model with all BF16 weights uses 16 effective bits-per-element, while a half-FP8, half-BF16 model uses only 12. NVFP4 adds per-block and per-tensor scaling overhead, bringing its minimum to 4.5 effective bits-per-element. The per-tensor scale’s 32 bits are amortized across the full tensor and is assumed to be negligible in the overall BPE calculation.

The goal is to search for the quantization configuration that pushes effective BPE as low as possible without sacrificing accuracy. This is tricky because layers are not equally robust. Some are sensitive to quantization and must stay in higher precision, which raises the effective BPE. Since each layer can be quantized at a different level or left unquantized, the number of possible combinations grows exponentially, making an exhaustive search impractical and a smarter strategy necessary.

NVIDIA Model Optimizer AutoQuantize (mtq.auto_quantize) does it for you. Instead of a fixed config, you give it a target bit budget (for example auto_quantize_bits=4.8) and a list of candidate formats, such as NVFP4_DEFAULT_CFG and FP8_DEFAULT_CFG. It then scores each layer’s sensitivity and searches for the per-layer format assignment that meets the budget at the best accuracy, keeping the most sensitive layers in the higher-precision format or skipping them entirely.

import modelopt.torch.quantization as mtq

model, search_state = mtq.auto_quantize(

model,

constraints={"auto_quantize_bits": 4.8},

quantization_formats=["NVFP4_DEFAULT_CFG", "FP8_DEFAULT_CFG"],

data_loader=calib_dataloader,

forward_step=forward_step,

loss_func=loss_func,

To find the right bits-per-element for Nemotron 3 Ultra, we swept over five operating points ranging from 4.85 to 7.19 effective bits-per-element, comparing accuracy over several benchmarks in Table 3. The key signal came from AA-LCR, where going from 4.85 to 5.03 improved the benchmark by 2.4 points, and benchmark performance then flattened again beyond 5.03. This makes 5.03 BPE the sweet spot.

How we quantized Nemotron 3 Ultra to NVFP4 with Model Optimizer

Unlike Nemotron 3 Super 120B, Nemotron 3 Ultra is a 550B model, so it benefits significantly from parallelizing the quantization process. For this reason, we support two quantization paths.

Quantizing Nemotron 3 Ultra to NVFP4 follows the NVIDIA ModelOpt post-training quantization (PTQ) pipeline in NVIDIA Megatron-LM. With the parallel route, the pretrained checkpoint is first converted to Megatron-LM format and then quantized with a single call to quantize.sh, passing an NVFP4 quantization config as the recipe. On the backend, Megatron-LM shards the model across GPUs with expert and data parallelism (EP = DP = 16 on 16×B300s), so the calibration forward pass runs distributed across all devices. This reduces load and calibration from ~85 minutes to ~9.

Calibration runs nemotron-post-training-dataset-v2 to fit the per-block scales, and the precision policy is entirely config-driven. Select it by passing a config to quantize.sh. Either a built-in name (e.g., NVFP4_DEFAULT_CFG, FP8_DEFAULT_CFG) or a YAML recipe path, which is what ultimately gets handed to mtq.quantize(model, config, forward_loop) to install the quantizers and run calibration.

Try Four-Over-Six Scaling with NVIDIA Model Optimizer:

HF_MODEL_CKPT=nvidia/NVIDIA-Nemotron-3-Ultra-550B-A55B-BF16

TP=4 \

MLM_MODEL_SAVE=/tmp/Nemotron-3-Ultra_quant \

./quantize.sh nvidia/NVIDIA-Nemotron-3-Ultra-550B-A55B-BF16 huggingface/models/nvidia/Nemotron-3-Ultra-550B-A55B/ptq/nvfp4-4o6

PP=1 \

MLM_MODEL_CKPT=/tmp/Nemotron-3-Ultra_quant \

EXPORT_DIR=/tmp/Nemotron-3-Ultra_NVFP4_46_HF \

./export.sh nvidia/NVIDIA-Nemotron-3-Ultra-550B-A55B-BF16

NVFP4_FOUR_OVER_SIX_CFG support for four-over-six is landing in NVIDIA Model Optimizer 0.46. The Nemotron 3 Ultra recipe for four-over-six is available on GitHub. Four-over-six works on weights and falls back to default NVFP4 on activations.

Customizing quantization configs

NVIDIA Model Optimizer is built to be customizable with different quantization configs. The built-in NVFP4 configs range from NVFP4_DEFAULT_CFG, which quantizes broadly, to more selective presets like NVFP4_MLP_ONLY_CFG, NVFP4_EXPERTS_ONLY_CFG, and NVFP4_OMLP_ONLY_CFG that restrict FP4 to the MLP and expert layers while keeping the sensitive attention projections in higher precision.

Under the hood, a config is an ordered list of rules matched against module-name patterns, and mtq.quantize() applies them. Weight quantization is governed by rules targeting the *weight_quantizer pattern, where you set the format (for NVFP4, E2M1 elements with 16-wide blocks and E4M3 block scales), while activation quantization is governed by separate rules on the *input_quantizer pattern.

Since the two are independent, you can quantize weights only or weights and activations together, and you can carve out exceptions for specific modules by appending rules that disable them. For anything beyond the built-in presets, you can write a full YAML recipe and load it with --recipe, which then fully defines the quant config.

The following Nemotron-3 Ultra recipe applies NVFP4 with four-over-six to the routed-expert weights, keeps the shared experts and Mamba projections in FP8, uses an FP8 KV cache, and leaves everything else in BF16. The complete recipe ships with NVIDIA Model Optimizer’s recipe library:nvfp4-4o6.yaml

quantize:

algorithm:

method: mse

fp8_scale_sweep: false

start_multiplier: 1.0

stop_multiplier: 1.5

step_size: 0.5

quant_cfg:

- quantizer_name: '*'

enable: false

- quantizer_name: '*mixer.experts.*weight_quantizer'

enable: true

cfg:

block_sizes: {-1: 16, type: static, scale_bits: e4m3, four_over_six: true}

num_bits: e2m1

- quantizer_name: '*mixer.experts.*input_quantizer'

enable: true

cfg:

block_sizes: {-1: 16, type: dynamic, scale_bits: e4m3}

num_bits: e2m1

- quantizer_name: '*mixer.shared_experts*'

enable: true

cfg: {num_bits: e4m3, axis: null}

- quantizer_name: '*mixer.in_proj*'

enable: true

cfg: {num_bits: e4m3, axis: null}

- quantizer_name: '*mixer.out_proj*'

enable: true

cfg: {num_bits: e4m3, axis: null}

- quantizer_name: '*[kv]_bmm_quantizer'

enable: true

cfg: {num_bits: e4m3}

While we walked through this on Nemotron 3 Ultra, the same pipeline works with any Hugging Face model checkpoint. **Simply point Model Optimizer at a model card from the Hub or a local path, pick a config (a built-in preset or your own recipe), and run the same quantize and export steps.

import modelopt.torch.quantization as mtq

from modelopt.torch.export import export_hf_checkpoint

from transformers import AutoModelForCausalLM

model = AutoModelForCausalLM.from_pretrained("<your-hf-model-card>")

model = mtq.quantize(model, mtq.NVFP4_DEFAULT_CFG, forward_loop)

export_hf_checkpoint(model, export_dir="<export_path>")

Try the one-click launcher

To simplify deployment, the Model Optimizer launcher automates the entire Ultra PTQ and export workflow. After completing the setup steps in the launcher README, the workflow can be launched via the Nemotron 3 Ultra YAML recipe with a single command from a local machine:

uv run launch.py --yaml examples/nvidia/NVIDIA-Nemotron-3-Ultra-550B-A55B-BF16/megatron_lm_ptq.yaml --yes

Once launched, the workflow handles the remaining quantization and export steps automatically, assuming access to a Slurm cluster with sufficient GPU resources. This example was validated on four nodes, each equipped with four NVIDIA Blackwell GPUs.

For smaller-scale deployments, a PTQ example is also available for Nemotron-3 Super:

uv run launch.py --yaml examples/nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-BF16

Get started

This process can be reproduced using the full recipe available in the open-source NVIDIA Model Optimizer GitHub repository. Model Optimizer is a community-driven project, and contributions are encouraged. Issues can be filed to report bugs or request features, the project roadmap can be reviewed for upcoming work, and pull requests can be submitted to contribute improvements. See <co

この記事をシェア

関連記事

LangChain Blog重要度42026年6月27日 02:13

Deep Agents との連携によるプロンプトキャッシング

Simon Willison Blog重要度52026年6月27日 02:10

OpenAI、GPT-5.6 シリーズの限定プレビューを開始

TechCrunch AI重要度42026年6月27日 01:24

もはやアンソロピック対オープンエーアイではない

今日のまとめ

AI日報で今日の重要ニュースをまとめ読み

ニュース一覧に戻る元記事を読む