Hugging Face、同じクラスターで利用効率を 33 ポイント向上させる順序変更を発表
本文の状態
日本語全文を表示中
詳細モードで約23分の本文を読めます。
同じ出来事の情報源
この情報源を基点に整理
Hugging Face Blog
Dharma-AI の研究者らは、同じクラスター環境においてモデルの推論順序を変更するだけでリソース利用率が 33 ポイント向上したことを示し、ハードウェア変更なしでの効率化手法を報告している。
AI深層分析を開く2026年8月18日 05:31
AI深層分析
キーポイント
推論順序の変更による効率化
同じクラスター環境において、モデルの推論順序を変更するだけでリソース利用率が 33 ポイント向上したことを確認した。
ハードウェア変更なしでの最適化
新しいハードウェアやアーキテクチャの変更を伴わずに、ソフトウェア側の設定のみで大幅な性能改善を実現した事例である。
Dharma-AI による実証実験
Hugging Face Blog に投稿された記事において、Gabriel Pimenta de Freitas Cardoso 氏ら Dharma-AI のチームが同様の環境下での比較検証を行った。
FIFOスケジューラの限界と制約認識型アロケーターの効果
優先順位やワークロードの特性を無視して到着順に処理するFIFO方式では、リソース競合時に非効率が生じる。これに対し、制約を考慮したGPUアロケーターは同一ハードウェアで利用度を最大33ポイント、優先度加重出力を最大105%向上させた。
競合するワークロード形状と割り当ての難しさ
トレーニングやバッチ推論のような連続的なブロックが必要なジョブと、リアルタイム推論のような弾力的な需要に応えるジョブが同じハードウェアで競合する点が課題となる。
重要な引用
Same Cluster, 33 Points More Utilization: What Changed Was the Order
"Keep the GPUs busy" is not a decision a system can execute. The decision is narrower and much harder: which GPU runs which job, in which timestep, at what priority.
Two incompatible shapes competing for the same hardware in the same timestep is the core problem.
Order is not a tiebreaker applied after the capacity question is settled. Order is a capacity decision.
編集コメントを表示
編集コメント
ハードウェアの制約が厳しい現場において、推論順序というソフトウェア側の調整だけで利用率を大幅に改善できる点は示唆に富む。この手法は既存インフラの有効活用を目指す開発者にとって即座に検討すべき対象となるだろう。
Source Article
元記事を日本語で読む
本文に関係しない購読案内、埋め込み通知、サイト内プロモーションは除いています。
記事一覧に戻る
前回の投稿では、エンタープライズ AI における次の制約は知能ではなくリソース利用率にあると指摘し、成熟した GPU マネジメントの実践例を示す指針はまだ存在しないことに触れました。これがその指針です。
私たちは制約を認識する GPU アロケータを開発し、FIFO スケジューラとの比較ベンチマークを 7 つのシナリオで実施しました。同じハードウェア上で同一のワークロードを実行した結果、GPU の利用率は最大で 33 ポイント向上し、優先度加重出力はすべてのケースで増加、最大で 105% も伸びました。ハードウェアに何らかの変更があったわけではありません。変化したのは、アロケーション決定が行われる順序です。
数値を語る前に測定方法について一言。以下の改善幅はいずれも、同一シナリオにおける FIFO スケジューラの結果に対する相対的な向上度を示しています。利用率はパーセントポイントで、価値(出力)の増加は優先度加重されたアウトプットの増加分としてパーセンテージで報告します。
意思決定を明確に定義する
「GPU を稼働させ続ける」というのは、システムが実行できる意思決定ではありません。真に必要とされるのは、より狭く、かつ遥かに困難な判断です。「どの GPU が、どのジョブを、いつのタイムステップで、どのような優先度で処理するか」です。
形式的には、GPU・ジョブ・タイムステップの各組み合わせごとに 1 つの二値選択が存在し、その出力はグリッドとなります。これは全スケジューリング期間にわたるすべての GPU を網羅したものであり、各セルにはジョブ名が記載されるか、あるいは何もない状態となります。
そのグリッドを巡って、トレーニング、リアルタイム推論、バッチ推論、量子化の 4 つのワークロードが競合します。これらは大きく 2 つのアロケーション形状に分類され、この「分け方」こそが課題の本質です。
トレーニング、バッチ推論、量子化はすべて「バッチ型」です。一度開始すれば、ジョブが完了するまで GPU の連続したブロックを中断なく確保し続ける必要があります。一方、リアルタイム推論はその対極に位置します。需要曲線によって駆動され、時間ステップごとに変動するトラフィックに合わせて柔軟に伸縮する性質を持っています。
同じハードウェア上で、互換性のない 2 つの形状が同時に競合することが中核的な問題です。さらに、単一のタイプの中にも多様性が存在します。同じベースモデルであっても、トレーニングジョブの実行時間は数時間から数日まで幅があり、必要な GPU 数は 1 台から数十台に及びます。
混雑下での FIFO の代償
比較の基準となるのは、FIFO(先着順)方式に基づくスケジューラーです。リアルタイム推論は固定リザーブで処理され、それ以外のジョブは到着順に割り当てられます。ここで優先順位は考慮されません。
適切な条件下では、このポリシーは妥当な選択です。クラスターに余裕がある場合、アロケーションの順序による利用効率への影響はありません。どんな順序でもすべて収まるため、FIFO も高度なアルゴリズムも、プールを埋める割合は同じになります。しかし、混雑が発生すると、この順序によるコストが隠れなくなり、容量の損失として顕在化します。
これは 2 つの異なる形でコストを発生させます。それぞれについて、順を追って見ていきましょう。
予約の課題。リアルタイム推論は、リソースが利用可能な瞬間に即座にGPUを確保できなければなりません。ジョブ到着順で配置するスケジューラには、トラフィックの少ない時間帯にGPUを解放し、次のピーク前に回収する仕組みがありません。そのため、可用性を保証するには、各リアルタイムアプリケーションが1日に必要とする最大GPU数を計算し、その分を24時間予約する必要があります。このコストは、ピーク時以外のすべての時間で発生します。
例えば、正午に6基、午前4時に2基のGPUが必要なアプリケーションがあった場合でも、24時間を通じて6基すべてを確保したままになります。残りの4基は1日中バッチジョブのために利用できなくなります。使われてもいないし、かといって無料でもありません。
このコストが、予約が支配的な2つのシナリオでベースラインのクラスター利用率が約半分になる主な理由です。混合制御では51.6%、トレーニング重視のケースでは53.6%となっています。プール全体の約半分が確保されており、そのうち多くの部分が「利用可能」ではなく「予約済み」として固定されている状態なのです。
このコストは、クラスターに競合が発生しているかどうかに関わらず常に発生します。競合が生じると、この隠れたコストが目に見える形として顕在化するだけです。
ジョブの順序が重要だ。実際の混雑状態では、どのジョブを割り当てられるかは単に利用可能な容量があるかどうかではなく、ジョブを配置する順序次第である。順序は、容量の問題が決まった後の同点決着手段ではない。順序そのものが容量に関する意思決定なのである。
FIFO(先入れ先出し)方式では、ジョブが到着した順にそのまま割り当てられる。各ジョブの価値を考慮せず、時間枠内に収めるべき他のジョブも確認しないため、優先度の高い作業は、先にリクエストされたものによって遅れ、容量は後続のジョブが使えないような配置で消費されてしまう。
この方式では、1 日の最大リアルタイム需要のために確保されたブロックが、キューにあるすべてのバッチジョブに対して、どの時間帯でも利用不可となる。残った分は、リクエストがたまたら到着した順序で割り当てられるだけだ。
これは航空会社が、最初にチャーターを申し込んだ便に機体を割り当ててしまい、実際に収益になる路線には何も残っていないという状況の GPU 版である。1 日中ピーク時の数時間分のために予約された GPU は、まさに前回の議論で言及した「地上に置かれた機体」そのものだ。待機状態であり、収益を生むこともなく、他の誰にも利用できない。
*[図:同じシナリオにおける並列の割り当てグリッド——上側がアロケーター、下側が FIFO]*
実在する混雑を想定した 5 つのベンチマークシナリオにおいて、アロケーターは両方の指標で同時に改善を示した。利用率は 52〜85% の範囲から 72〜88% の範囲へと向上し、優先度を重み付けした価値は 24.6% から 105.1% の間(平均 52%)で上昇した。すべてのシナリオにおいて、両方の指標が改善され、説明のつくトレードオフは一切存在しなかった。
最も顕著なケースは、8 つの GPU を使用したトレーニング中心のワークロードでした。GPU 利用率は 53.6% から 87.0% に向上し、価値は 105% も増加して倍増しました。これは、固定資産であり既に減価償却が進んでいるリソースから、予約されていた待機容量を回収し、残りを優先順位に従って配置することで実現された 33 ポイントの改善です(この数値は単一のベースライン順序に基づくものです)。
アロケータはこの二つの行動パターンを排除します。リアルタイム需要は上限ではなく曲線として扱われ、各タイムステップで需要に対して割り当てられます。バッチ処理のようなワークロードはその谷間に配置され、リアルタイムジョブが連続するタイムステップ間で切り替え可能な GPU の数に上限があるという制約の中で管理されます。また、バッチ処理のようなジョブは到着順ではなく、全体のスパンにわたって優先順位に基づいて配置されます。
利用率は必要だが、価値を生むのは優先順位だ
利用率は稼働率を測る指標です。利用可能な GPU 時間のうち何割が何かしらのタスクに割り当てられているかを示すだけで、その「何か」の価値については一切の情報を含みません。
あるシナリオでは、この二つの要素が完全に乖離します。その乖離は見過ごしやすい方向へ進みます。
スケールテストでは、64 台の GPU を使用して 30 のジョブを実行しましたが、FIFO(先着順)方式と新しいアロケータは利用率において 44.9% と完全に一致し、スループットも 30 中 27 のジョブ完了という点で同じ結果となりました。しかし、アロケータは優先度重み付けされた価値において 15.9% の向上をもたらしました。すべてのダッシュボードでは同じ数値が表示されますが、クラスターが生み出した実際の出力には明確な違いがありました。
優先度を価格に反映しない目標では、クラスターが同じレベルまで満たされ、処理されるジョブ数も同じでも、結果として得られる価値は少なくなる可能性があります。前回の記事では、「稼働率」だけではクラスターが収益を生んでいるかどうかを判断するのは不適切だと論じましたが、これはその主張を定量的に裏付けたものです。
問題の形式化
解決策は単により長いヒューリスティックルールの羅列ではありません。一部の制約条件はグローバルな視点でしか意味を持たず、局所的なルールでは表現できません。例えば、連続するブロックの確保や、全体のスパンにわたって許容できる GPU の入れ替え量の予算設定、あるいは実行中のジョブを絶対に停止させない保証などがそれです。これらを満たすためには、問題を一つの統合された課題として記述する必要があります。
正当な割り当てを定義する 5 つの制約条件があります:
- 各 GPU は、1 つのタイムステップあたり最大 1 つのジョブのみを担当します。
- すべてのジョブは要求範囲を守りつつ、すでに実行中のリソースは継承され保持されます。
- バッチ処理のようなジョブは、2 の乗数サイズで連続する GPU ブロックを占有します。
- リアルタイムジョブでは、連続するタイムステップ間で入れ替え可能な GPU 数の上限が厳格に設定されています。
- 一度開始されたジョブは中断できません。
目的関数は 2 つの項から構成されます。バッチ処理のようなジョブに GPU を割り当てると、その優先度に時間減衰係数を掛けた値と同程度の報酬を得られます。一方、リアルタイムな需要を満たせなかった場合、不足分の規模に比例したペナルティが発生します。
重みの相対的な大きさは、サービスレベルのポリシーを一つの数値で表したものです。リアルタイム需要に対するペナルティ重みは、割り当て重みの 5 倍から 10 倍も大きくなります。つまり、満たされなかったリアルタイム需要 1 ユニットのコストは、同等優先度のバッチ処理作業を GPU で 5 から 10 ステップ実行するコストに相当します。
この非対称性は意図的なものであり、レイテンシの保証が、バッチ処理の割り当てを行う最適化プロセスの内部で強制されることを意味しています。これは、スケジューラと競合して同じ GPU を巡って争う別の自動スケーラーによって行われるわけではありません。
また、これがリアルタイム需要に対する弾力的な扱いを安全にする理由でもあります。アロケータは、需要が低い時間帯に GPU をバッチ処理に割り当てることができます。なぜなら、後でリアルタイム需要に対して不十分な対応をした場合のペナルティが、そのバッチ処理が得られる収益よりもはるかに大きいためです。可用性を守るのは静的な予約ではなく、このペナルティなのです。
時間重みが予測期間全体にわたって減衰するのには理由があります。これはオンラインシステムでなければ意味をなさない仕組みです。次のスケジューリング実行時には、新しいジョブが到着しているからです。現在使用されるキャパシティは、将来約束されたキャパシティよりも価値が高いのです。
制約をすでに把握しているアロケータ
正式モデルは、法的に妥当で適切にスコア付けされた割り当てがどのようなものかを定義します。 incoming request への対応は別の仕事であり、別のコンポーネントの役割です。これは NP-hard な組み合わせ最適化問題であり、ジョブが到着するたびにスケジューラーが再呼び出されるため、決定は API リクエスト間のギャップ内で完了しなければなりません。このレイテンシ予算こそが、アーキテクチャ設計の根幹となる固定制約です。そのため、ホットパスにはヒューリスティックが配置され、その背後に正式モデルが置かれ、ヒューリスティックはこのモデルが満たすべき仕様として構築されています。
このヒューリスティックは汎用的な貪欲型アロケーターではありません。そのルール自体が、正式モデルの構造的制約そのものなのです。つまり、生成されるグリッドは設計上、常に法的に妥当な割り当てとなります。単に「たまたま」有効なのではなく、「設計によって」有効なのです。
この設計を一度の到着だけでなく、全体のスコープ(ホライズン)に適用することで、利用効率の向上が実現されます。アロケーターはどのジョブも配置する前にキューにあるすべてのジョブを把握しており、残りのワークロードが実際に占有できる形状で空きリソースプールを確保できます。そのため、特定のサイズの連続ブロックが必要なバッチジョブでも、順番が回ってきた時点でまだ空きがあります。優先順位が、そのスペースを最初に主張する権利を持つ者を決定します。
FIFO(先着順)にはそのような視点がありません。最初に要求したジョブに即座に容量を割り当ててしまうため、後から到着して特定の形状を必要とするジョブは、適合するリソースが残っていない可能性があります。その結果、そのジョブはスケジューリングされず、本来消費されるはずだった GPU 時間(GPU-hours)が未利用のまま失われてしまいます。
このシステムは、競合が激しい 5 つのシナリオでは 1〜2 ミリ秒で動作し、64 GPU と 30 ジョブを処理する環境でも 15 ミリ秒で完了します。これは、すべての incoming request(リクエスト)に対して実行するのに十分な速度です。
システムは 2 つのモードを提供しています。高速モードではアロケータのみを実行し、そのグリッド結果を即座に返します。これがホットパスとして機能します。一方、フルモードでは、このグリッドを初期値として正式なモデルに入力し、さらに改善を試みます。これはリクエストごとの判断ではなく、定期的な見直しに適した運用です。
結果
| シナリオ | 利用率 | 値 | 価値の向上 | レイテンシ |
|---|---|---|---|---|
| 混合制御 (8 GPU, 10 ジョブ) | 51.6% → 72.4% | 7,093 → 10,980 | +54.8% | 1 ms |
| リアルタイム競合 (8 GPU, 8 ジョブ) | 75.0% → 80.2% | 3,233 → 4,029 | +24.6% | 1 ms |
| トレーニング集中型 (8 GPU, 16 ジョブ) | 53.6% → 87.0% | 8,553 → 17,545 | +105.1% | 2 ms |
| 大規模混合 (14 GPU, 16 ジョブ) | 76.8% → 82.7% | 13,977 → 20,101 | +43.8% | 2 ms |
| 過負荷状態 (8 GPU, 9 ジョブ) | 85.4% → 87.5% | 4,311 → 5,760 | +33.6% | 1 ms |
| スケーリングテスト (64 GPU, 30 ジョブ) | 44.9% → 44.9% | 44,233 → 51,248 | +15.9% | 15 ms |
| 均等優先度 (14 GPU, 16 ジョブ) | 76.8% → 87.5% | 25,219 → 31,052 | +23.1% | 2 ms |
シナリオのほとんどでリソース利用率が向上し、1 つのケースでは同率となりました。価値指標は全 7 つのシナリオで改善されました。
このスケールテストが重要なのは、64 GPU、30 ジョブ、15 ミリ秒という大規模環境でも結果が維持されるからです。これにより、価値指標は 15.9% 向上することが確認されています。
均一優先度テストの意義は、懐疑的な見方への明確な回答となる点にあります。すべてのジョブを同一の優先度に設定し、優先度信号による区別を排除しても、アロケータは利用率を 76.8% から 87.5% に引き上げ、価値を 23.1% 向上させます。この改善は単に優先度順に並べ替えたことによる artefact(産物)ではありません。未来の配置計画自体が独立して貢献しているのです。
需要予測が間違っていれば機能しない
上記の結果はいずれも、スケジューラが各ジョブに必要な GPU 時間と、リアルタイムトラフィックの規模を正確に把握していることを前提としています。これらは入力値ではなく予測値であり、スケジューラの性能はこれらの予測精度にかかっています。
単一の汎用推定モデルでは不十分です。4 つのワークロードタイプには本質的に異なるコスト要因が存在するためです。ここが前回の議論で述べた「専門化」の主張と再び結びつく部分です。タスク特化型モデルが一般モデルを上回る理由と同じ論理が、スケジューラに情報を提供する推定モデルにも適用されます。
トレーニングは単一のワークロードではありません。それは、互いに独立して自由に組み合わせ可能な 2 つの軸に沿って変化します。
戦略(Strategy)は、モデルのどの部分を更新するかを決定します。具体的には、パラメータ効率化手法である LoRA などを用いたフルファインチューニングとの比較です。一方、技術(Technique)は最適化の目的とトレーニングループを決定します。SFT、DPO、RLHF、RLVR、CPT などがこれに該当します。
これらの違いは些細なものではありません。LoRA は、同じベースモデルを用いたフルファインチューニングと比較して、学習可能なパラメータ数を最大で 10,000 倍削減し、GPU メモリ使用量を約 3 分の 1 に抑えます。また、DPO を採用すれば、RLHF で必要となる報酬モデル(reward model)とサンプリングループを不要にできます。
モデルサイズだけで推定すると、スケジューラが決定する「期間」と「GPU 数」の 2 つの量において桁違いに異なる実行結果を平均化してしまい、正確な見積もりができなくなります。そこで当社のトレーニング予測ツールは、10 の具体的なトレーニングバリアントを区別するカテゴリカル変数を初めとする 22 の特徴量を条件として活用しています。
量子化(Quantization)もまた、スケジューリング可能なジョブであり、背景でこっそり行う雑務ではありません。単一の大型モデルの量子化には、他の作業が待機しているハードウェア上で数時間の GPU 時間を消費することがあります。そのため、量子化にも独自の予測モデルを構築しています。これはパラメータ数に基づくキャリブレーションティア(calibration tiers)から成り立ち、bitsandbytes、AWQ、GPTQ といったアルゴリズムごとに異なる処理方針を採用しています。また、丸め誤差のリスクに備えて、計算結果を整数時間の GPU 時間に切り上げる前に安全マージンを設けています。
これまでの先行研究では、量子化はスケジューリングの対象外とみなされるのが一般的でした。
リアルタイム推論は、ジョブ単位で個別に見積もるものではありません。これは、毎週再調整される需要プロファイルとして予測され、時間ごとのトラフィック履歴から再構築されます。この予測では、正式なモデルが課すのと同じスワップコストの下で GPU 数が割り当てられます。
予測と最適化アルゴリズムは、どの程度の入れ替えコストがかかるかについて合意します。互いに意見が対立して争うのではなくです。この予測こそが、ピーク時の予約に代わるものです。時間ごとの需要曲線があるからこそ、スケジューラーは谷間の間に GPU を解放し、次のピーク到来前に確実に回収できると確信を持って実行できます。
これは順序付けに関する議論へと戻ります。優先度に応じた配置を可能にするのは、より精度の高い需要推定です。ジョブが何を消費するかを知り得ない限り、ジョブの順序付けを適切に行うことはできません。
1 日を最適化し、1 時間をコミットする
これらすべてに対する明白な反論は、「予測は間違えるものだ」というものです。では、その場合どうなるのでしょうか?
避けるべき失敗モードには、借用すべき名前があります。「世界終末効果」です。自身の時間範囲の先を見通せない最適化アルゴリズムは、直近の時間ステップを破壊する現在の決定を下します。なぜなら、モデルにとっては時間範囲が終了した後に何かが存在しないからです。
このアーキテクチャは、2 つの課題を同時に解決します。スケジューラは 24 時間の展望を最適化しますが、コミットするのは現在のタイムステップのみで、30〜60 分ごとに再実行されます。午前 9 時に実行すれば、その時点での割り当ては確定しますが、10 時から午後 5 時までの計画は、未来が存在することを理解したモデルによって 9 時の判断を下すために存在するだけです。実際の 10 時の割り当ては、10 時の実行で、新鮮なデータに基づいて行われます。
その結果、予測誤差が蓄積されるのではなく、再最適化によって吸収されます。各実行では実際に稼働しているものを継承して固定するため、連続する計画は混乱するのではなく更新されていきます。
副次的なメリットもあります。展望計画自体が予測製品として機能し、リアルタイムのカバレッジリスクや予測可能なアイドルウィンドウを、それらが訪れる前に浮き彫りにします。これらの特定の割り当てが最終的にコミットされるかどうかに関わらず、これは有用です。
これが時間減衰重みが存在する理由でもあります。次の実行時には、ワークロードのミックスは変化しているはずです。
これが一般化できること
航空会社は最適なスケジュールを計算することで稼働率を解決したわけではありません。彼らは運用上の規律(ターナラウンド順序、メンテナンスウィンドウ、乗務員ローテーションなど)が何が起こるかの順序に組み込まれることでそれを解決し、その規律が積み重なるようにしました。
同じことがここでも起こりました。最も過密なシナリオにおいて、利用可能なハードウェアとワークロードをそのままに、数ミリ秒のうちに、クラスターが物理的に許容する範囲をエンコーディングして順序決定を行うことで、33 ポイントの利用効率向上と、平均で 52% の優先度加重出力の増加を実現しました。複雑さよりも構造が勝ったのです。
前回の記事では、専門化(specialization)とオーケストレーションは表裏一体の問題であると論じました。専門化は各ワークロードに必要なリソースを削減し、オーケストレーションはその差額をどこに配分するかを決めます。どちらか一方のレバーだけでは効果は得られません。これが、後半部分を実装した際の姿です。
GPU はすでに設置され、コミットされ、減価償却が進んでいました。今回の成果は、それらをいかに使うかという選択にあります。
さらに読む
チャットボットを超えた直接選好最適化
Hugging Face の Dharma AI を探索して、インタラクティブなデモを試したり、オープンソースモデルをダウンロードしたり、実企業のアプリケーションにおいて専門的な AI システムが汎用モデルを上回る理由を探ってみましょう。
原文を表示
The previous post argued that utilization, not intelligence, is where the next real constraint in enterprise AI is forming, and it closed by noting that no playbook has emerged yet for what a mature GPU Management practice looks like. This is ours.
We built a constraint-aware GPU allocator and benchmarked it against a FIFO scheduler across seven benchmark scenarios. On identical hardware, running identical workloads, GPU utilization rose by as much as 33 percentage points, and priority-weighted output rose in every one of them, by as much as 105%. Nothing about the hardware changed. What changed was the order in which allocation decisions get made.
One note on measurement before the numbers start. Every gain below is expressed as improvement over the FIFO result on the same scenario. Utilization is reported in percentage points; value is reported as a percentage increase in priority-weighted output.
The decision, stated precisely
"Keep the GPUs busy" is not a decision a system can execute. The decision is narrower and much harder: which GPU runs which job, in which timestep, at what priority. Formally it is one binary choice per combination of GPU, job and timestep, and the output is a grid — every GPU, across the whole scheduling horizon, with a job name in each cell or nothing at all.
Four workload types compete for that grid: training, real-time inference, batch inference, and quantization. They split into two allocation shapes, and the split is where the difficulty lives. Training, batch inference and quantization are batch-like: once started, each needs a contiguous block of GPUs held without interruption until the job finishes. Real-time inference is the opposite: elastic, driven by a demand curve that changes every timestep, growing and shrinking as traffic does.
Two incompatible shapes competing for the same hardware in the same timestep is the core problem. A second heterogeneity sits inside a single type: for the same base model, training jobs range from a few hours to several days, and from one GPU to dozens.
What FIFO costs under contention
The comparison point throughout is a FIFO-based scheduler: real-time inference served from a fixed reservation, and every other job placed in arrival order, without regard for priority.
Under the right conditions, that is a reasonable policy. When the cluster has slack, allocation order costs nothing in utilization, everything fits regardless of sequence, so FIFO and anything more sophisticated fill the same fraction of the pool. Contention is where that ordering cost stops being invisible and starts costing capacity too. It then becomes expensive in two separate ways, and they are worth taking one at a time.
The reservation. Real-time inference cannot wait for capacity; the GPUs have to be there the moment traffic needs them. A scheduler that places jobs in arrival order has no mechanism for releasing GPUs during a trough and reclaiming them before the next peak, so the only way to guarantee availability is to take each real-time application's maximum demand for the day and reserve that many GPUs for the whole day. The cost lands in every hour that is not the peak. An application needing six GPUs at midday and two at 4am holds all six for twenty-four hours, and the four idle GPUs are unavailable to any batch job for the entire day. They are not being used, and they are not free either. It is why the baseline sits near half the cluster in the two scenarios where reservation dominates: 51.6% in the mixed control and 53.6% in the training-heavy case. Roughly half a pool, with much of the idle half reserved rather than free. This cost is paid whether the cluster is contended or not — contention only makes it visible.
The ordering. Under real contention, which jobs fit at all depends on the order you place them, not just on how much capacity exists. Order is not a tiebreaker applied after the capacity question is settled. Order *is* a capacity decision. FIFO places each job as it arrives, without weighing what that job is worth and without checking what else still has to fit inside the horizon, so high-priority work waits behind whatever asked first and capacity gets committed in placements that later jobs cannot use.
The two compound. The block held for the day's maximum real-time demand is off the table for every batch job in the queue, in every hour, and whatever remains is handed out in the order the requests happened to arrive.
It is the GPU equivalent of an airline assigning aircraft to whichever charter called first, then finding nothing left to fly the route that actually pays. And GPUs reserved all day for a peak lasting a couple of hours are the grounded aircraft from the previous piece in the most literal sense: on standby, earning nothing, unavailable to anyone else.
*[Figure: side-by-side allocation grids — allocator above, FIFO below, same scenario]*
Across five benchmark scenarios built for genuine contention, the allocator improved both axes at once. Utilization moved from a 52–85% band to a 72–88% band. Priority-weighted value rose between 24.6% and 105.1%, averaging 52%. Every scenario, both metrics, no tradeoff to explain away.
The strongest single case was a training-heavy workload on 8 GPUs: utilization went from 53.6% to 87.0%, and value more than doubled, up 105%. Thirty-three points of a fixed, already-depreciating asset, recovered by reclaiming reserved standby capacity and placing the rest in priority order. (This figure reflect a single baseline ordering.)
The allocator removes both behaviors. Real-time demand is treated as a curve rather than a ceiling, allocated against demand at each timestep, with batch-like work occupying the troughs, bounded by the cap on how many GPUs a real-time job may swap between consecutive timesteps. And batch-like jobs are placed by priority across the whole horizon instead of in the order they arrived. The rest of this piece is how.
Utilization is necessary. Priority is what turns it into value.
Utilization measures occupancy: what fraction of available GPU-time is allocated to something. It carries no information about what that something is worth. One scenario pulls the two apart completely, and the gap runs in a direction that is easy to miss.
In the scale test, 30 jobs across 64 GPUs, FIFO and the allocator produced identical utilization, 44.9% each, and identical throughput, 27 of 30 jobs completed. The allocator delivered 15.9% more priority-weighted value. Every dashboard reads the same. The cluster produced materially different output.
An objective that does not price priority can fill the cluster to exactly the same level, finish exactly as many jobs, and still deliver less. The previous piece argued that occupancy is a poor read on whether a cluster is earning; this is the measured version of that claim.
Writing the problem down
The alternative is not a longer list of heuristic rules. Some constraints only mean anything globally, and no local rule can express them: contiguous blocks, a budget for how much GPU churn is acceptable across the entire horizon, a guarantee that running work is never preempted. To honor those, the problem has to be written down as one thing.
Five constraints define a legal allocation:
- A GPU serves at most one job per timestep.
- Every job respects its demand range, and whatever is already running is inherited and held.
- Batch-like jobs occupy contiguous blocks of GPUs, sized to a power of two.
- Real-time jobs have a hard cap on how many GPUs they may swap between consecutive timesteps.
- A job that has started cannot be interrupted.
The objective function has two terms. Allocating a GPU to a batch-like job earns a reward equal to its priority multiplied by a time-decay weight. Failing to meet real-time demand incurs a penalty proportional to the size of the shortfall.
The relative size of those weights is the entire service-level policy, expressed as one number. The real-time penalty weight is 5 to 10 times greater than the allocation weight. One unit of unmet real-time demand therefore costs what 5 to 10 GPU-timesteps of equal-priority batch work costs. The asymmetry is deliberate, and it means latency obligations are enforced *inside* the same optimization that places batch work, rather than by a separate autoscaler competing with the scheduler for the same GPUs.
It is also what makes the elastic treatment of real-time demand safe. The allocator can hand a GPU to batch work during a trough because underserving real-time demand later is priced so far above whatever that batch work earns — the penalty, not a static reservation, is what protects availability.
The time weight decays across the horizon for a reason that only makes sense in an online system: by the next scheduling run, new jobs will have arrived. Capacity used now is worth more than capacity promised later.
The allocator that already knows the constraints
The formal model defines what a legal, well-scored allocation looks like. Answering an incoming request is a separate job, and it belongs to a separate component. This is NP-hard combinatorial allocation, and the scheduler is re-invoked every time a job arrives, so the decision has to come back in the gap between two API requests. That latency budget is the fixed constraint the architecture is designed around, which is why a heuristic sits on the hot path and the formal model sits behind it as the specification the heuristic is built to satisfy.
That heuristic is not a generic greedy allocator. Its rules *are* the formal model's structural constraints, which means every grid it produces is a legal allocation by construction. Not usually valid. Valid by design.
That design, applied across the whole horizon rather than one arrival at a time, is what produces the utilization gain. The allocator sees every queued job before it places any of them, it can hold the free pool in shapes the remaining work can actually occupy, a batch job needing a contiguous block of a given size still has room when its turn comes. Priority decides who gets first claim on that room. FIFO has neither view: it commits capacity to whichever job asked first, and a job that arrives later and needs a specific shape may find nothing left that fits, so it goes unscheduled and the GPU-hours it would have consumed go unclaimed.
It runs in 1 to 2 milliseconds on the five contended scenarios, and 15 milliseconds at 64 GPUs and 30 jobs — fast enough to run on every incoming request.
The system exposes two modes. Fast mode runs the allocator alone and returns its grid; this is the hot path. Full mode uses that grid as a starting point for the formal model, which attempts to improve on it — suited to periodic review rather than per-request decisions.
結果
| Scenario | Utilization | Value | Value gain | Latency |
|---|---|---|---|---|
| Mixed control (8 GPUs, 10 jobs) | 51.6% → 72.4% | 7,093 → 10,980 | +54.8% | 1 ms |
| Real-time contention (8 GPUs, 8 jobs) | 75.0% → 80.2% | 3,233 → 4,029 | +24.6% | 1 ms |
| Training-heavy (8 GPUs, 16 jobs) | 53.6% → 87.0% | 8,553 → 17,545 | +105.1% | 2 ms |
| Large mixed (14 GPUs, 16 jobs) | 76.8% → 82.7% | 13,977 → 20,101 | +43.8% | 2 ms |
| Oversubscribed (8 GPUs, 9 jobs) | 85.4% → 87.5% | 4,311 → 5,760 | +33.6% | 1 ms |
| Scale test (64 GPUs, 30 jobs) | 44.9% → 44.9% | 44,233 → 51,248 | +15.9% | 15 ms |
| Uniform priority (14 GPUs, 16 jobs) | 76.8% → 87.5% | 25,219 → 31,052 | +23.1% | 2 ms |
Utilization improved in every scenario but one, where it tied exactly. Value improved in all seven.
The scale test matters because it holds at size: 64 GPUs, 30 jobs, 15 milliseconds, 15.9% more value.
The uniform-priority test matters because it addresses the obvious skeptical reading. Override every job to identical priority, so that no priority signal distinguishes any of them, and the allocator still moves utilization from 76.8% to 87.5% and value up 23.1%. The gain is not purely an artifact of ordering by priority. Planning placements across the horizon contributes on its own.
None of it works if the demand numbers are wrong
Everything above assumes the scheduler knows how many GPU-hours each job needs and how much real-time traffic is coming. Both are predictions, not inputs, and a scheduler is only as good as they are.
A single generic estimator does not work, because the four workload types have qualitatively different cost drivers. This is where the specialization argument from the previous piece reconnects: the same logic that makes a task-specific model outperform a generalist applies to the estimators feeding the scheduler.
Training is not one workload. It varies along two independent, freely combinable axes. Strategy determines how much of the model is updated (full fine-tuning against parameter-efficient methods like LoRA). Technique determines the optimization objective and the training loop (SFT, DPO, RLHF, RLVR, CPT). The differences are not marginal: LoRA cuts trainable parameters by up to 10,000× and GPU memory roughly 3× against full fine-tuning, on the same base model. DPO removes both the reward model and the sampling loop of RLHF. Estimating from model size alone averages across runs that differ by orders of magnitude, in exactly the two quantities the scheduler decides on, duration and GPU count. Our training forecaster conditions on 22 features, including a categorical variable distinguishing 10 concrete training variants.
Quantization is a schedulable job, not a background chore. Quantizing a single large model can consume hours of GPU time on hardware that other work is waiting for. It gets its own forecast, built from calibration tiers by parameter count, with distinct handling per algorithm (bitsandbytes, AWQ, GPTQ) and a safety margin before rounding up to whole GPU-hours. Prior work in this area places quantization outside scheduling scope entirely.
Real-time inference is not estimated per job at all. It is forecast as a continuously recalibrated weekly demand profile, rebuilt from hourly traffic history and mapped to GPU counts under the same swap cost the formal model enforces. Forecast and optimizer therefore agree on what churn costs, rather than disagreeing and fighting each other. This forecast is what replaces peak reservation. A per-timestep demand curve is the only thing that lets the scheduler release GPUs during a trough with any confidence that they can be reclaimed before the next peak.
This closes back to the ordering argument. Better demand estimates are what make priority-aware placement possible in the first place, you cannot sequence jobs well without knowing what they will consume.
Optimize the day, commit the hour
The obvious objection to all of this is that forecasts are wrong. What happens then?
The failure mode to avoid has a name worth borrowing: the end-of-world effect. An optimizer that cannot see past the end of its horizon makes present decisions that wreck the timesteps immediately outside it, because as far as the model is concerned, nothing exists after the horizon ends.
The architecture answers both problems at once. The scheduler optimizes a 24-hour horizon, but commits only the current timestep, and re-runs every 30 to 60 minutes. Run at 9am, and the 9am allocation is real; the plan for 10am through 5pm exists only so that the 9am decision is made by a model that knows a future exists. The real 10am allocation comes from the 10am run, against fresh data.
The consequence is that forecast error is absorbed by re-optimization instead of compounding. Each run inherits what is actually running and pins it in place, so successive plans update rather than thrash.
There is a secondary payoff. The horizon plan is itself a forecasting product: it surfaces real-time coverage risk and predictable idle windows before they arrive, which is useful whether or not those specific allocations are ever committed.
This is also why the time-decay weight exists. By the next run, the workload mix will have changed.
What this generalizes to
Airlines did not solve utilization by computing an optimal schedule. They solved it by encoding operational discipline into the order things happen (turnaround sequence, maintenance windows, crew rostering) and letting that discipline compound.
The same thing happened here. Thirty-three points of utilization in the hardest-packed scenario, and 52% more priority-weighted output on average, on the same hardware, with the same workloads, in a couple of milliseconds, came from encoding what the cluster physically permits into the order decisions get made. Structure beat sophistication.
The previous piece argued that specialization and orchestration are two halves of one problem: specialization shrinks what each workload needs, and orchestration decides where the difference goes. Neither lever pays off alone. This is what the second half looks like when it is built.
The GPUs were already installed, already committed, already depreciating. The gain was in how we chose to spend them.
Further Reading
- GPU Management: Why Idle GPUs Are the New Grounded Aircraft
- Newer Models, Same Advantage
- Why Specialization Is Inevitable
- Specialization Beats Scale: A Strategic Variable Most AI Procurement Decisions Overlook
- Text Degeneration: A Production Failure Mode That Most Benchmarks Do Not Track
- Direct Preference Optimization Beyond Chatbots
*Explore* Dharma AI on Hugging Face *to* try our interactive demos*,* download our open-source models*, and discover how specialized AI systems outperform general-purpose models in real enterprise applications.*
関連記事
今日のまとめ
AIデイリーブリーフで今日の重要ニュースをまとめ読み