NVIDIA Blackwell UltraによるSoftmaxの効率化
NVIDIAの次世代アーキテクチャBlackwell Ultraが、AI計算の重要な関数Softmaxを効率化し、大規模言語モデルの性能向上に貢献する技術革新について。
キーポイント
NVIDIA Blackwell Ultraは、Transformerアーキテクチャのボトルネックであるsoftmax関数の計算を高速化するために、Special Function Units (SFUs)のスループットを2倍に向上させた
LLMのコンテキスト長の拡大とMLA/GQAなどの複雑な注意機構の採用により、行列演算ではなく超越関数(特に自然指数関数)の計算が推論速度の制約要因となっている
MUFU.EX2命令の実行効率向上により、アテンションブロック内のパイプラインストールを解消し、AIの「思考速度」を加速する
影響分析・編集コメントを表示
影響分析
この技術革新は、長文処理や複雑な注意機構を必要とする次世代LLMの実用化を加速し、AI推論の効率性に新たな基準を設ける可能性がある。特に大規模言語モデルのリアルタイム応用やコスト削減に直接寄与するため、AIインフラストラクチャ全体に波及効果が期待される。
編集コメント
AI性能向上の焦点がソフトウェアアルゴリズムからハードウェアアーキテクチャの微調整に移行していることを示す重要な事例。ベンダー固有の最適化が業界標準に与える影響を注視すべき。
LLMのコンテキスト長は爆発的に増加しており、アーキテクチャはMulti-Head Latent Attention(MLA)やGrouped Query Attention(GQA)のような複雑な注意機構へと移行しています。その結果、AIの「思考速度」は、行列乗算の膨大なスループットではなく、ソフトマックス関数の超越関数計算によって支配されるようになってきています。
超越関数とは、有理係数を持つ多項式方程式の根として表現できない関数を指します。したがって、それらは加算や乗算といった基本的な代数演算を「超越」します。これは、Tensor Coreが最も得意とする演算そのものです。ソフトマックスの具体的な文脈において、計算コストが最も高い超越関数は、自然指数関数であり、これはSpecial Function Units(SFU)上で実行されます。NVIDIAのアセンブリ命令(SASS)では、この関数はMUFU.EX2命令によって呼び出されます。このアーキテクチャ上の分離は、強力な行列演算エンジンが、SFUデータパスが注意スコアを正規化するのを待機するためにアイドル状態を強いられるとき、注意ブロック内にソフトマックスのボトルネックを生み出します。
NVIDIA Blackwell Ultraは、標準的なNVIDIA Blackwellアーキテクチャと比較してSFUのスループットを2倍にすることで、このボトルネックを軽減します。
このブログでは、注意ループ内におけるソフトマックスのメカニズムを掘り下げ、Blackwell Ultraのハードウェア最適化がどのようにパイプラインストールを解消するかを探り、生のMUFU.EX2性能を測定するためのベンチマークを提供します。
注意機構の仕組み
現代の大規模言語モデルの基礎的な構成要素は注意機構であり、これによりモデルは静的なトークンベクトルを動的で文脈を考慮した表現へと動的に変換できます。その核心は、トークンが互いに対する重要性を調整できるようにすることで情報の重み付けをやり直すプロセスです。この相互作用を可能にするために、シーケンス内のすべてのトークンは3つの機能的な役割に射影されます。
クエリ: 現在のトークンが自身の文脈を理解しようと探しているものを表します。
キー: 他のトークンがマッチングに使用するトークンのプロファイルを表します。シーケンス内で前にあるトークンは、クエリに対する自身の特定の関連性を示すキーを持ちます。
バリュー: これは実際の情報内容を保持します。クエリとキーの間でマッチが確認されると、バリューは元のトークンに転送される具体的なデータとなります。
以下の図1は、動作中の注意機構を示しています。ここでは、「dog」という単語を2つの異なる定義で使用する2つの文があります。最初に、両方の「dog」の言及の埋め込み(多次元空間で意味とニュアンスを捉える数値ベクトル)が同一であることがわかります。

原文を表示
LLM context lengths are exploding, and architectures are moving toward complex attention schemes like Multi-Head Latent Attention (MLA) and Grouped Query Attention (GQA). As a result, AI ”speed of thought” is increasingly governed not by the massive throughput of matrix multiplications, but by the transcendental math of the softmax function.
Transcendentals refer to functions that cannot be expressed as the root of a polynomial equation with rational coefficients. Subsequently, they “transcend” basic algebraic operations like addition and multiplication—the exact operations Tensor Cores excel at. In the specific context of softmax, the most computationally expensive of these transcendentals is the natural exponential function that is executed on Special Function Units (SFUs). In NVIDIA assembly instructions (SASS), this function is invoked via the MUFU.EX2 instruction. This architectural split creates a softmax bottleneck within the attention block, when powerful matrix engines are forced to idle while waiting for the SFU datapaths to normalize attention scores.
NVIDIA Blackwell Ultra alleviates this bottleneck by doubling SFU throughput over the standard NVIDIA Blackwell architecture.
This blog dives into the mechanics of softmax within the attention loop, explores how Blackwell Ultra’s hardware optimizations eliminate pipeline stalls, and provides a benchmark for you to measure the raw MUFU.EX2
How attention works
A foundational component of modern large language models is the attention mechanism, which allows a model to dynamically transform static token vectors into dynamic, context-aware representations. At its core, it is a process of re-weighting information by allowing tokens to adjust their importance to one another. To facilitate this interaction, every token in a sequence is projected into three functional roles:
Query: Represents what the current token is seeking to understand its own context.
Key: Represents a token’s profile that others use for matching. Tokens previous in the sequence have keys that signal their specific relevance to the query.
Value: This holds the actual informational content. Once a match is confirmed between a query and a key, the Value is the specific data that is transferred to the original token.
Figure 1 below shows attention in action. We have two sentences that utilize the word “dog” in two different definitions. Initially, we can see that the embeddings (the numerical vectors that capture meaning and nuance in a multidimensional space) of both “dog” mentions are identical.

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