AI モデル共設計:ハードウェアに優しい大規模言語モデルの設計
NVIDIA は、大規模言語モデルの実行速度向上とコスト削減を実現するため、AI モデル設計段階からハードウェア特性を考慮する共同設計手法を発表した。
キーポイント
ハードウェアフレンドリーな共同設計の発表
NVIDIA がモデル開発とハードウェア最適化を分離せず、初期段階から統合して行う新しい設計アプローチを提示した。
実行速度とコストの両立
この手法により、大規模言語モデル(LLM)の推論・学習時の処理速度が向上し、同時に運用コストを削減できる効果が期待される。
NVIDIA 製品との親和性強化
同社の GPU アーキテクチャに最適化されたモデル設計を通じて、ハードウェアの性能限界まで引き出すことを目指している。
影響分析・編集コメントを表示
影響分析
この発表は、AI モデル開発のパラダイムシフトを示唆しており、単なるアルゴリズムの改良だけでなく、ハードウェア制約を設計要件として組み込む重要性を浮き彫りにしています。業界全体において、より効率的な LLM の構築と運用が加速し、特に大規模モデルの実用化におけるコスト競争力が強化される可能性があります。
編集コメント
ハードウェアとソフトウェアの境界を曖昧にするこのアプローチは、AI インフラの効率化において今後ますます重要視されるトレンドです。開発者はモデル設計時にハードウェア特性を考慮する必要性に迫られています。
AI の性能は、3 つの次元に帰着されます:
- 精度(Accuracy):モデルが推論し、出力を生成する能力の程度
- スループット(Throughput):データセンターが 1 秒間に生成できるトークン数
- 対話性(Interactivity):ユーザーに対するモデルの応答性。これはレイテンシによって支配されます
運用ではこれら 3 つをすべてバランスさせる必要があります。レスポンスが遅ければ高い精度も無駄になり、各ユーザーの体験がラグい状態であれば、純粋なスループットはほとんど意味を持ちません。したがって、実用的なシステムでは、精度・スループット・対話性を一体的に最適化します。
本稿では、スループットと対話性に焦点を当て、精度を犠牲にすることなく両方を形作るモデル設計の選択について解説します(精度とのトレードオフが生じる場合はその旨を示します)。
精度を一定に保った場合、問題は 2 次元のパレートフロンティア(Pareto frontier:最適解の集合)の問題となります。一方を改善すると通常は他方が犠牲になるからです。目標は、このフロンティア全体を外側に押し出し、曲線下の面積を最大化することです(以下、図 1 を参照)。
image*図 1. システムスループットと対話性のパレートフロンティア*
まず、現在最も代表的な AI ワークロードである大規模言語モデル(LLM)から始めます。このトレードオフには 2 つの視点があります。システム運用者はフリート全体のスループット(秒間トークン数)を優先し、ユーザーは最初のトークンまでの時間やトークン間のレイテンシの低さを重視します。トークン間レイテンシの逆数が「ユーザーあたりの秒間トークン数」であり、この値が高いほど応答性が向上します。
1 つのレスポンスは、プロンプト → [最初のトークンのレイテンシ] → 最初のトークン → [トークン間のレイテンシ] → 次のトークン、というように続きます。
これは、現代のハードウェア上でモデルを円滑に実行したいモデル開発者向けの実践的な入門書です。考え方はシンプルで、ハードウェアと整合性の取れたモデルは単に高速化するだけでなく、より良くスケーリングし、コストが抑えられ、より広い採用につながります。
まず、2 つの軸に沿って変化するデプロイメント環境(図 2 を参照)を検討してください。
image*図 2. 異なるワークロードレジーム(横軸)とサービス目標(縦軸)におけるレイテンシの内訳*
ワークロードは短いコンテキストから長いコンテキストまで多岐にわたり、サービス目標もスループット指向(トークン/秒を最大化)からレイテンシ指向(レスポンス時間を最小化)まで様々です。その多くはその中間に位置します。
各象限には異なる最適化が必要です。長文コンテキストでスループット指向のサービングでは、時間の大部分がアテンション処理に費やされます。一方、レイテンシ指向のサービングでは、通信コストと固定オーバーヘッドを犠牲にしてアテンションと FFN(フィードフォワードネットワーク)の時間を短縮するためにモデル並列化を追加します。短いコンテキストでスループット指向のサービングでは、時間はアテンションと FFN の間でより均等に分割され、大規模なスケールにおいてはエキスパート並列化などの並列処理から恩恵を受けることができます。
アンダールの法則は適用されます:ある部分を最適化しても、その部分が占める時間分しか効果はありません。アテンションが実行時間の 77% を占めている場合、フィードフォワード層のチューニングではわずかな改善しか得られず、努力が報われるのはアテンションパスです。自分がどの領域にいるかを知ることで、どこに集中すべきかがわかります。
この投稿は、システムエンジニアでなくてもハードウェアから最大限を引き出したい人のために、これらの判断を早期に行うための簡単な経験則を提供します。シリーズの各章では、ハードウェアを意識した設計の異なる側面を対象とし、計算ボトルネックの回避、データセンター規模での摩擦のないデプロイ、ユースケースに合わせた設計の実装、そして実践的なスケーリングを支援します。
賢く設計し、迅速に展開し、より広くスケールしましょう。さあ始めましょう。
LLM の線形層におけるハードウェアフレンドリーな次元設計
トランスフォーマーの重要な設計上の選択は、そのアスペクト比です:モデル幅と層数のバランス()です。デコーダー型モデルでは、これらの要因が計算とメモリをスタック全体にどのように配分するかを支配します。幅自体は、MLP 層における隠れ次元()と中間投影次元()という 2 つの次元によって設定されます。
これら 3 つの要素、すなわち、, , および は、モデルが並列化戦略にどれだけきれいにマッピングされ、GPU を跨いでどのようにスケーリングするかにも影響を与えます。この投稿では、これらの 3 つの選択がスループット、対話性、および拡張性にどう影響するかを、線形層に焦点を当てて詳しく検討します。
演算強度の役割
あらゆるハードウェアにおいて、達成可能な性能はロフライモデルによって制約されます。ワークロードがどこに位置するかは、その演算強度(arithmetic intensity)によって決まります。これは、移動するメモリ 1 バイトあたりに実行される計算操作の数として定義されます。
演算強度の低いワークロードはメモリー帯域幅によって制限され(メモリーバウンド)、演算強度の高いワークロードはデバイスのピーク計算スループット(FLOPS)によって制限されます(コンピュートバウンド)。目標が最大のスループット(1 秒あたりのトークン数)である場合、ハードウェアの数学的容量をフルに活用するために、ワークロードをコンピュートバウンド領域へ駆動させる必要があります。
レイテンシ敏感なデコーディングはこれとは逆で、低並列度で実行されメモリーバウンドとなるため、応答レイテンシを低下させるにはメモリアクセス時間の短縮が鍵となります。
image*図 3. ロフライモデル。山頂点より下ではワークロードはメモリー帯域幅によって制限され、上ではデバイスのピーク計算スループットによって制限されます。ワークロードの演算強度(バイトあたりの操作数)が、どのレジームに属するかを決定します*
1 バイトあたりの操作数を高める最も単純な方法はバッチサイズを増やすことですが、モデル形状も重要です。では、どのようにして GEMM がコンピュートバウンドかメモリーバウンドかを判断するかを見てみましょう。単一デバイス上で実行する際、GEMM の形状は以下の形式で設定されます:
必ず JSON 形式で返してください。translation フィールドのみ。他のフィールド (technical_terms 等) は一切追加しないこと — 余計なフィールドを書こうとして本文翻訳がトークン上限で打ち切られる事故を防ぐため:
{"translation": "翻訳全文"}
一般的な線形代数ライブラリで使用される慣習に従い、A は行数 m、列数 n の行列であり、B は n × p の行列です。積 C = AB は m 個の出力を持ち、それぞれが長さ p の内積となります。これには mpf 回の融合乗算加算(FMAs)が必要です。各 FMA は 2 つの浮動小数点演算(1 回の乗算と 1 回の加算)に相当するため、計算コストは以下のようになります。
ここで、α, β, γ は使用する精度によって決まる要素ごとのバイト数です。A を入力、B を重みとして、以下の表 1 は、各線形層におけるトークン数(T)、次元 H、および H′を GEMM の M、N、K にマッピングします。
レイヤー名射影(in → out)GEMM MGEMM NGEMM K
Q/K/V 入力線形H* → 3*H*トークン数3*HH**
アテンション出力線形*H* → *H*トークン数HH
FFN-1(上向き射影)*H* → *H′*トークン数H′H
FFN-2(下向き射影)*H′* → *H*トークン数HH′
*表 1. トークン数、H、および H′を用いて表現したトランスフォーマーブロック内の線形層の GEMM 次元(M, N, K)*
すべての GEMM が「正方行列」、すなわち M = N の場合を想定します。このとき、1 つの GEMM は約 m²p 回の浮動小数点演算を実行し、同時に約 mp 個のメモリ要素を移動します。したがって、演算強度は p に比例して増加します。実用的な帰結として、m または n のいずれかが小さい場合、トークン次元が大きい場合でも、GPU は計算よりもデータ転送に相対的に多くの時間を費やすことになります。
具体的な例として、GB300 上で意図的に小さく設定された FFN-2 を取り上げます。これは 4 ビット入力と 8 ビット出力を使用します。下の Table 2 に示す通り、トークン数が多い場合(GEMM-M が大きい場合)でも、このレイヤーは依然としてメモリーバウンド状態にあり、データ転送が支配的です。出力が FP8 で入力が FP4 であるため書き込みコストが支配的となり、また小さな縮小次元により GEMM はメモリーバウンドのままとなります。
M (Tokens) 𝑁 𝐾 math (µs) FP4 read (µs) FP8 write (µs)
256 8192 512 0.14 0.30 0.26
2048 8192 512 1.15 0.37 2.10
16384 8192 512 9.16 0.89 16.8
*Table 2. GB300 における FFN-2 の理論的な GEMM 単体実行時間(= 8192, = 512)。ピーク FP4 演算性能を 15 PFLOPS、ピークメモリー帯域を 8 TB/s と仮定。すべてのトークン数でメモリー処理時間が演算時間を上回るため、このレイヤーは全体を通じてメモリーバウンド状態にあります*
下の Figure 4 のプロットは、GB300 シリコン上でこれを示しています。NVFP4 GEMM を使用し、トークン次元(GEMM-M)を大きな値である 8192 に固定した状態で、縮小次元(GEMM-K)(左側に表示)と投影次元(GEMM-N)(右側に表示)をスweep します。どちらの場合も、スweep する次元が小さい場合、スループットは急激に低下し、小さな または がハードウェアの未活用状態をもたらすことを確認できます。( と は、レイヤーに応じてそれぞれ または に相当します;上の Table 1 を参照してください。)
image*図 4(左)。GB300 上の NVFP4 GEMM スループットと縮小次元との関係(= 8192, = 9728 は固定)。≈ 6144 で飽和し、持続スループットの 80% に達するには > 3072 が必要。図 4(右)。GB300 上の NVFP4 GEMM スループットと射影次元との関係(= 8192, = 8448 は固定)。≈ 6144 で飽和し、持続スループットの 80% に達するには > 2560 が必要*
これはモデル設計者にとって重要なポイントです:計算リソースを最大限に活用するためには、バッチサイズと同様にモデルの次元も重要なのです。
*ガイドライン 1:* *固定パラメータのモデルにおいては、ほぼ正方形の重み行列を好ましくし、射影次元または縮小次元のいずれかを小さくしすぎないこと。
しかし、サイズだけでは不十分です。高い Tensor Core(テンソルコア)利用率を達成するには、GEMM の次元が基盤となるタイル幾何学にきれいにマッピングされる必要があります。整列が悪いとタイル量子化が発生し、演算強度が高くてもスループットが低下します。
GPU における GEMM の実行方法
GPU は出力行列をタイルに分割して GEMM を実行します。各タイルはストリーミングマルチプロセッサ(SM)によって計算されます。最近の GPU では、SM が単独で動作する必要はありません。複数の SM が協力してより大きな 1 つのタイル上で作業できます:clusterMMA(クラスター MMA)では、2 つの隣接する SM が 1 つのタイル上で力を合わせます。また、Cooperative Grid Array(CGA:協調グリッドアレイ)を使用すると、SM のグループ全体を 1 つのクラスタとしてまとめて動作させることができます。
協調動作はデータ再利用を改善しますが、同時に有効なタイルサイズが大きくなるため、アライメントを保つには次元値がより大きな値の倍数である必要があります。ある次元がこの有効なタイルサイズの倍数でない場合、エッジにあるタイルは部分的にしか埋められませんが、それでもフルタイル分の計算を実行するために起動・実行されます。その結果、未使用(パディング)部分は有用な作業を行わず、サイクルを浪費してスループットが低下します。図 5 はこれを示しています:256×128 のベースタイル、clusterMMA、および 4×2 の CGA を用いた場合、GEMM-N を微細なステップでスイープすると、N が 256(clusterMMA から 2×128)または 512(CGA から 2×256)の倍数であるときにローカルスループットの極大値が得られます。
image*図 5. GB300 上で測定した、カーネルが強制的に M×N 出力行列に対して 256×128 のタイルと clusterMMA および 4×2 の CGA を使用するように設定された場合の、提供されるスループットに対するタイル量子化の影響*
この浪費を避けるには、モデル次元値をタイルサイズの大きな倍数とし、GPU キャッシュライン幅とも整合させるように選択してください。128 の倍数は安全で移植性の高い下限値です;256(clusterMMA)または 512(CGA)の倍数は、より大きな協調タイルと整合し、最も高いスループットを捉えることができます。
*ガイドライン 2: **モデル次元値を少なくとも 128 の倍数とし、GPU タイルサイズおよびキャッシュライン幅と整合させること。また、clusterMMA および CGA によって形成されるより大きなタイルに合わせるため、256 または 512 を優先すること。
より広いモデルの方が、より深いモデルよりもハードウェアフレンドリーである
固定されたパラメータ予算において、幅広のモデルは、より多くの重みの再利用と短い逐次クリティカルパスにより、深いモデルよりも高い演算強度と低いレイテンシを提供します。これにより、スループット指向およびレイテンシ指向の両方のサービス目標に対して、幅広のモデルが有利となります。
ただし、アスペクト比もモデルの品質に影響を与えます:深さは表現力に寄与するため、「幅広であるほど常に良い」のではなく、有用な幅と深さのバランス帯域が存在します。精度が保たれる範囲内で幅を広げることを優先し、モデルを単に広くするために層を削り取るべきではありません。
*ガイドライン 3:** 選択肢がある場合は、多くの小さな演算よりも少数の大きな演算を優先してください;これにより演算強度が最大化され、ハードウェアの利用効率が向上し、スループットと対話性の両方に利益をもたらします。つまり、幅広のトランスフォーマーモデルは、深いモデルよりもハードウェアフレンドリーです。
パフォーマンスレバーとしての量子化
量子化は、数学的な処理スループットの向上とメモリトラフィックの削減を同時に実現することで、計算バウンド型およびメモリバウンド型の両方のワークロードに寄与します。Blackwell システムでは、NVFP4 とともに、FP8 や FP16/BF16 などの他のビット幅フォーマットをサポートしています(以下、図 6 を参照)。
image*図 6. データタイプごとの密集テンソルコアのスループット***
NVFP4 は、モデルの精度と速度のバランスを最適化するために特別に設計されています。各 16 値のマイクロブロックに対して微細な FP8 (E4M3) スケールを適用し、さらにテンソルごとに第 2 レベルの FP32 スケールを追加します。この階層的スケーリングにより量子化誤差が劇的に削減されつつ、4 ビット計算の速度を維持できるため、幅広い LLM ワークロードにおいて NVFP4 は高精度なモデルとほぼ同等の精度を実現します(以下図 7、DeepSeek-R1 を参照)。
image*図 7. NVFP4 における DeepSeek-R1 の精度は FP8 ベースラインとほぼ同等であり、ほとんどのベンチマークで約 1 ポイント以内にとどまり、SciCode、Math-500、AIME 2024 では FP8 と同等かそれ以上の性能を発揮します*
NVIDIA は、この実現を可能にするエンドツーエンドのツールを提供しています。TensorRT Model Optimizer および LLM Compressor は、ポストトレーニング量子化 (PTQ)、量子化意識型トレーニング (QAT)、および高度なキャリブレーションをサポートしており、精度の低下を最小限に抑えながらモデルを NVFP4 形式へ量子化できます。
その結果、線形層など行列乗算演算が中心となる処理は、NVFP4 を完全に活用してスループットを向上させつつ、モデルの忠実性を維持することが可能になります。より低いビット幅でのトレーニングに関する詳細については、Pretraining Large Language Models with NVFP4(NVIDIA Research, 2025)をご覧ください。
*ガイドライン4:ネットワークに計算コストの高い演算を導入する際は、デプロイ時に量子化が可能かどうかを検討してください。低精度実行の恩恵を受けるレイヤーを設計することが、現代の GPU の性能を最大限引き出す鍵となります。
大規模なエキスパート並列性がスループットを向上させる
スループット指向のサービスにおける目標は単純です:可能な限り少ない GPU で、できるだけ多くのユーザーを、できるだけ高速に処理すること。現在、最先端の大規模言語モデル(LLM)の多くがエキスパート混合モデル(MoE)であるため、これを実現する非常に効果的な方法がエキスパート並列性(EP)です:アテンションにはデータ並列性を適用し、FFN のエキスパートを GPU 間で分散します。
アテンションにデータ並列性(DP)を使用することは、テンソル並列性(TP)の重要な制限を回避します。それは、部分的な結果を結合するために必要な高コストな AllReduce です。このオーバーヘッドは同時実行性とともに増大し、スループットを低下させるため、ここでは TP は不適切です。DP によるアテンションはより自然にスケーリングします:GPU を追加することで直接グローバルな同時実行性が向上し、高い同時実行性は MoE の FFN における GEMM-M(行列乗算)の規模を大きくします。
トークンのルーティングが一様であると仮定すると:
ここで、グローバル並行度は「GPU 1 台あたりの同時実行トークン数 × GPU 総数」で定義され、top-k はトークンごとに活性化されるエクスパートの数(DeepSeek-R1 の場合は 8)、#experts はエクスパートの総数(DeepSeek-R1 の場合は 256)です。GEMM-M(行列乗算演算量)は並行度が増すと拡大し、モデルのスパーシティ(疎性)が高まると縮小するため、スパーシな MoE モデルで GEMM 利用率を高める鍵となるのは並行度を押し上げることです。一方、GPU 1 台あたりの並行度は KV キャッシュのメモリフットプリントによって上限が決まるため、それを引き上げる主な手段は、より多くの GPU にわたって EP(Expert Parallelism:エクスパート並列処理)を拡張することです。
各エクスパートの実効バッチサイズ(GEMM-M)が小さくても、それが並行度の制限やトークンルーティングの偏りによるものであっても、EP を拡張することで以下の 2 つの点で効果があります:
- アグリゲート帯域幅による実行速度向上:エクスパートをより多くの GPU に分散させることで、エクスパート重みの読み込みに利用可能な実効メモリ帯域幅が増加し、FFN(Feed-Forward Network:順伝播ネットワーク)の全体レイテンシが短縮されます。
- GPU 1 台あたりのメモリフットプリント削減:各 GPU はエクスパートの一部のみを保持するため、メモリが解放され、GPU 1 台あたりの実効並行度を高め、計算リソースをより効果的に飽和させることができます。
EP にはすべてへの通信(all-to-all communication)のオーバーヘッドとエクスパート負荷の不均衡という 2 つの課題がありますが、NVIDIA の TensorRT-LLM に搭載された Wide-EP 機能はこれら両方を解決します:
- Blackwell マルチノード NVLink システム上で EP を拡張する高パフォーマンスな all-to-all カーネル、および
- リアルタイムの負荷パターンに基づいてエキスパートトラフィックを再分配し、歪んだトークンおよびエキスパート分布下でも安定性を維持する適応型ロードバランサー。
詳細は、TensorRT-LLM の ドキュメント を参照してください。スループット指向の MoE(Mixture of Experts)デプロイメントにおいて、重要なレバーとなるのはエキスパート並列化です。
*ガイドライン 5:** エキスパート数が多く複雑なスパース MoE モデルでも、適切な並列化戦略、特にエキスパート並列化を広くスケールさせることで、高いスループットを実現できます。
パイプライン並列化のための設計
プリフィルとデコードを分離(disaggregate)する場合にパイプライン並列化が重要になります。これは特定のモデルサイズ、トラフィックパターン、レイテンシ目標に対して効果的なサービング戦略となり得ます。これは Beyond the Buzz: A Pragmatic Take on Inference Disaggregation(NVIDIA Research, 2025)で分析した通りです:プリフィルとデコードを異なるモデル分割で実行することで、それぞれを個別に最適化・スケールでき、全体のスループットが向上します。
プリフィルにおいては、特に長いコンテキストにおいて高いスループットを維持しつつ最初のトークンまでのレイテンシ(FTL)を削減するためには、積極的な並列化が必要です。チャンクドパイプライン並列化(CPP: Chunked Pipeline Parallelism)はここに適しています:これはモデル層と入力コンテキストの両方を GPU 間で分割し、パイプラインを流れるチャンクに分割します(以下図 8 参照)。
image*図 8. チャンク化パイプライン並列処理は、トークンと層を GPU に分散してパイプライン実行を実現します*
これにより、prefill ワーカーは広範なテンソル並列処理(以下参照:図 9)に頼ることなく、厳格な FTL バジェット内で長いシーケンスを処理できるようになります。
image<figcapt
原文を表示
AI performance comes down to three dimensions:
- Accuracy: How well the model reasons and produces outputs
- Throughput: How many tokens per second a datacenter can generate
- Interactivity: How responsive the model feels to a user, dominated by latency
Deployments must balance all three: High accuracy is wasted if responses are slow, and raw throughput means little if each user’s experience is laggy. Practical systems therefore optimize accuracy, throughput, and interactivity together.
This post focuses on throughput and interactivity, and how model-design choices shape both without sacrificing accuracy (we flag accuracy trade-offs where they arise).
Holding accuracy fixed, the problem becomes a two-dimensional Pareto frontier: improving one usually costs the other. The goal is to push the whole frontier outward, maximizing the area under the curve (see Figure 1, below).

We will start with LLMs, today’s most prominent AI workload. The trade-off has two perspectives: the system deployer, who prioritizes fleet throughput (tokens/sec), and the user, who values lower first-token and inter-token latency. The inverse of inter-token latency is tokens/sec/user, where higher means greater responsiveness.
A single response looks like: prompt → [first-token latency] → first token → [inter-token latency] → next token, and so forth.
This is a practical primer for model developers who want their models to run well on modern hardware. The idea is simple: models that align with the hardware don’t just run faster; they scale better, cost less, and reach wider adoption.
First, consider the deployment landscape, which varies along two axes (see Figure 2, below).

Workloads range from short to long context, and service goals from throughput-oriented (maximize tokens/sec) to latency-oriented (minimize response time); many fall in between.
Each quadrant needs different optimizations: long-context, throughput-oriented serving spends most of its time in attention, while latency-oriented serving adds model parallelism to shorten attention and FFN, at the cost of communication and fixed overheads. Short-context, throughput-oriented serving splits time more evenly across attention and FFN, and can benefit from parallelism (such as expert parallelism) at scale.
Amdahl’s law applies: optimizing one part helps only as much as the time it occupies. If attention is 77% of runtime, tuning the feed-forward layers yields only marginal gains; the attention path is where effort pays off. Knowing your regime tells you where to focus.
This post gives simple rules of thumb to make these decisions early, for anyone who wants the most from the hardware without being a systems engineer. Each subsequent chapter of the series will target a different dimension of hardware-aware design, helping you avoid compute bottlenecks, deploy frictionlessly at datacenter scale, match design to your use case, and scale in practice.
Design smarter. Deploy faster. Scale wider. Let’s begin.
Hardware-friendly dimensioning of linear layers in LLMs
A key transformer design choice is its aspect ratio: the balance between model width and number of layers (). In decoder-style models, these factors dominate how computation and memory are distributed across the stack. Width itself is set by two dimensions, the hidden dimension () and the intermediate projection dimension () in the MLP layers.
Together, , , and also shape how cleanly the model maps onto parallelism strategies and how well it scales across GPUs. This post looks at how these three choices affect throughput, interactivity, and scalability, with a close focus on the linear layers.
Role of arithmetic intensity
On any hardware, achievable performance is bounded by the roofline model. Where a workload lands depends on its arithmetic intensity, defined as the number of compute operations performed per byte of memory moved.
Workloads with low arithmetic intensity are capped by memory bandwidth (memory-bound); those with high arithmetic intensity are capped by the device’s peak compute throughput, in FLOPS (compute-bound). When the goal is maximum throughput (tokens per second), you want to drive the workload into the compute-bound region so the hardware’s full math capacity is used.
Latency-sensitive decoding is the opposite, it runs at low concurrency and is memory-bound, so reducing memory-access time is what lowers response latency.

One straightforward way to raise operations per byte is to increase batch size, but model shape matters too. Let’s look at how and decide whether a GEMM is compute-bound or memory-bound. When running on a single device, and set the shape of a GEMM of the form:
Following the convention used in typical linear-algebra libraries, is a matrix of size ( rows, columns) and is . The product has outputs, each a dot product of length , requiring fused multiply-adds (FMAs). Since each FMA is 2 FLOPs (one multiply, one add), the costs are:
where are the per-element byte counts set by the precision used. Taking as the inputs and as the weights, Table 1, below, maps the token count (), , and to a GEMM’s , , and for each linear layer.
*Table 1. GEMM dimensions (M, N, K) of the linear layers in a transformer block, expressed in terms of Tokens, H, and H′*
Consider a case where every GEMM is “square,” . A single GEMM then performs FLOPs while moving about elements of memory, so arithmetic intensity grows with . The practical consequence: when either or is small, the GPU spends proportionally more time moving data than doing math, even when the token dimension is large.
As a concrete example, take FFN-2 with a deliberately small and , using 4-bit inputs and 8-bit outputs on GB300. As Table 2 shows, below, even at large token counts (high GEMM-M) this layer stays memory-bound, dominated by data movement; the write cost dominates because the output is FP8 while the inputs are FP4, and the small reduction dimension keeps the GEMM memory-bound.
The plots in Figure 4, below, show this on GB300 silicon. With NVFP4 GEMMs and the token dimension (GEMM-M) fixed at a large 8192, we sweep the reduction dimension (GEMM-K) (shown on the left) and the projection dimension (GEMM-N) (shown on the right). In both cases throughput falls sharply when the swept dimension is small, confirming that a small or leaves the hardware underutilized. ( and correspond to or depending on the layer; see Table 1, above.)

This is an important point for model designers: model dimensions matter just as much as batch size for saturating compute.
*Guideline 1:* *For a fixed-parameter model, favor near-square weight matrices and avoid making either the projection or reduction dimension too small.*
But size alone isn’t enough. To reach high Tensor Core utilization, a GEMM’s dimensions must also map cleanly onto the underlying tiling geometry; poor alignment causes tile quantization, which reduces throughput even when arithmetic intensity is high.
How GPUs execute GEMMs
GPUs execute GEMMs by splitting the output matrix into tiles, each computed by a streaming multiprocessor (SM). On recent GPUs, SMs don’t have to work alone; they can cooperate on a single, larger tile: with clusterMMA, two neighboring SMs join forces on one tile, and a Cooperative Grid Array (CGA) lets a whole group of SMs work together as one cluster.
Cooperation improves data reuse, but it also enlarges the effective tile, so dimensions must be a multiple of a larger value to stay aligned. When a dimension is not a multiple of that effective tile, the edge tiles are only partially filled yet still launch and run a full tile’s worth of compute; the unused (padded) portion does no useful work, wasting cycles and lowering throughput. Figure 5 illustrates this: with a 256×128 base tile, clusterMMA, and a 4×2 CGA, sweeping GEMM-N in fine-grained steps produces local throughput maxima when N is a multiple of 256 (2×128 from clusterMMA) or 512 (2×256 from CGA).

To avoid this waste, choose model dimensions that are large multiples of the tile size and aligned with GPU cache-line widths. A multiple of 128 is a safe, portable floor; multiples of 256 (clusterMMA) or 512 (CGA) align with the larger cooperative tiles and capture the most throughput.
*Guideline 2: **Make model dimensions multiples of 128 at minimum to align with GPU tile sizes and cache-line widths, and prefer 256 or 512 to match the larger tiles formed by clusterMMA and CGA.*
Wider models are more hardware-friendly than deeper models
For a fixed-parameter budget, wider models offer higher arithmetic intensity and lower latency than deeper models through greater weight reuse and a shorter sequential critical path. This makes wider models advantageous for both throughput- and latency-oriented service goals.
That said, aspect ratio also affects model quality: depth contributes to representational power, so there is a useful width-to-depth band rather than “wider is always better.” Favor width only as far as accuracy holds, rather than stripping out layers just to make the model wider.
*Guideline 3:** When given a choice, prefer fewer, larger operations over many smaller ones; this maximizes arithmetic intensity and improves hardware utilization, benefiting both throughput and interactivity. In other words, wider transformer models are more hardware-friendly than deeper ones.*
Quantization as a performance lever
Quantization helps both compute-bound and memory-bound work, by raising math throughput and reducing memory traffic at once. Blackwell systems support NVFP4 along with other bit-width formats such as FP8 and FP16/BF16 (see Figure 6, below).

NVFP4 is designed specifically for balancing model accuracy and speed; it applies a fine-grained FP8 (E4M3) scale to each 16-value micro-block, plus a second-level FP32 scale per tensor. This hierarchical scaling sharply reduces quantization error while keeping the speed of 4-bit computation, letting NVFP4 closely match higher-precision accuracy across a wide range of LLM workloads (see Figure 7, below, DeepSeek-R1).

NVIDIA provides end-to-end tooling to make this practical: TensorRT Model Optimizer and LLM Compressor support post-training quantization (PTQ), quantization-aware training (QAT), and advanced calibration, quantizing models to NVFP4 with minimal accuracy loss.
As a result, most matrix-multiplication-heavy operations, such as the linear layers, can fully exploit NVFP4 for higher throughput while keeping model fidelity. To learn more about training with lower bit-width, check out Pretraining Large Language Models with NVFP4 (NVIDIA Research, 2025).
*Guideline 4: **When introducing computationally expensive operations into a network, consider whether they can be quantized at deployment. Designing layers that benefit from low-precision execution is key to getting the most out of modern GPUs.*
Large expert parallelism boosts throughput
In throughput-oriented serving the goal is simple: Serve as many users as possible, as fast as possible, on the fewest GPUs. Since most state-of-the-art LLMs are now Mixture-of-Experts (MoE), a highly effective way to do this is expert parallelism (EP): run attention data parallel and distribute the FFN experts across GPUs.
Using data parallelism (DP) for attention avoids a key limitation of tensor parallelism (TP), the expensive AllReduce needed to combine partial results. That overhead grows with concurrency and drags down throughput, making TP a poor fit here. DP attention scales more naturally: adding GPUs directly raises global concurrency, and higher concurrency means a larger GEMM-M in the MoE FFNs.
Assuming uniform token routing:
where global concurrency is concurrent tokens per GPU × number of GPUs, top-k is the* *experts activated per token (8 for DeepSeek-R1), and #experts is the* *total number of experts (256 for DeepSeek-R1). Because GEMM-M grows with concurrency and shrinks with model sparsity, pushing concurrency is the key to high GEMM utilization in sparse MoE models, and since per-GPU concurrency is capped by the KV cache footprint, widening EP across more GPUs is the main lever for raising it.
Even when each expert’s effective batch (its GEMM-M) is small, whether from limited concurrency or imbalanced token routing, widening EP still helps in two ways:
- Faster execution via aggregate bandwidth: Distributing experts across more GPUs increases the effective memory bandwidth available for loading expert weights, reducing end-to-end FFN latency.
- Reduced per-GPU memory footprint: Each GPU stores only a subset of experts, freeing memory to increase effective concurrency per GPU and better saturate compute.
EP does bring two challenges, all-to-all communication overhead and expert load imbalance, but NVIDIA’s Wide-EP feature in TensorRT-LLM addresses both:
- High-performance all-to-all kernels that scale EP across Blackwell multi-node NVLink systems, and
- An adaptive load balancer that redistributes expert traffic based on real-time load patterns to stay stable under skewed token and expert distributions.
For details, see the TensorRT-LLM documentation on expert parallel scaling. For throughput-oriented MoE deployments, the key lever is expert parallelism.
*Guideline 5: **Complex, sparse MoE models with large numbers of experts can still deliver high throughput when deployed with the right parallelism strategy, most notably by scaling expert parallelism wide.*
Design for pipeline parallelism
Pipeline parallelism becomes relevant when you disaggregate prefill and decode, which can be an effective serving strategy for certain model sizes, traffic patterns, and latency targets, as we analyzed in Beyond the Buzz: A Pragmatic Take on Inference Disaggregation (NVIDIA Research, 2025): running prefill and decode with different model-partitioning lets each be optimized and scaled on its own, raising overall throughput.
For prefill, maintaining high throughput while reducing first-token latency (FTL), especially on long contexts, takes aggressive parallelization. Chunked Pipeline Parallelism (CPP) is well suited here: it splits both the model layers across GPUs and the input context into chunks that flow through the pipeline (see Figure 8, below).

This lets prefill workers handle long sequences within tight FTL budgets without resorting to wide tensor parallelism (see Figure 9, below).

<figcapt
関連記事
今日のまとめ
AI日報で今日の重要ニュースをまとめ読み