NVIDIA TensorRT LLM AutoDeployによる推論最適化の自動化
NVIDIAがTensorRT LLM AutoDeployを発表し、大規模言語モデルの推論最適化とデプロイを自動化するツールを提供。AI開発の効率化を目指す。
キーポイント
TensorRT LLM AutoDeployは、PyTorchモデルから推論最適化グラフへの自動変換を実現し、LLMデプロイメントの手作業を大幅に削減
従来の手動再実装からコンパイラ駆動のワークフローへ移行し、モデル開発と推論最適化を分離
新規アーキテクチャや研究モデル、長尾モデルの迅速なデプロイを可能にし、競争力のあるベースライン性能を提供
影響分析・編集コメントを表示
影響分析
この技術はLLMデプロイメントの民主化を促進し、研究から実運用への移行を加速させる可能性がある。特に新規アーキテクチャやカスタムモデルの実用化ハードルを下げ、AIエコシステム全体のイノベーション速度を向上させる重要なインフラ技術と言える。
編集コメント
LLM実用化の最大ボトルネックであるデプロイメント工程を自動化する画期的なソリューション。研究開発と実運用のギャップを埋める重要なブリッジ技術として注目。
NVIDIA TensorRT LLMは、大規模言語モデル(LLM)向けの高性能推論エンジンを開発者が構築することを可能にしますが、新しいアーキテクチャをデプロイするには、従来は多大な手作業が必要でした。この課題に対処するため、本日、TensorRT LLMにおけるベータ機能としてAutoDeployの提供を発表します。
AutoDeployは、市販のPyTorchモデルを推論最適化グラフにコンパイルします。これにより、推論特有の最適化をモデルコードに直接組み込む必要がなくなり、LLMのデプロイ時間を短縮します。AutoDeployは、各モデルを手動で再実装・最適化するアプローチから、モデルの作成と推論最適化を分離したコンパイラ主導のワークフローへの移行を実現します。
この記事では、AutoDeployのアーキテクチャと機能を紹介し、それが最近のNVIDIA Nemotronモデルのローンチ時サポートをどのように可能にしたかを示します。
AutoDeployとは?
新しいLLMアーキテクチャには、トランスフォーマーモデルからハイブリッド視覚言語モデル(VLM)、状態空間モデル(SSM)まで、それぞれ固有の推論上の課題があります。リファレンス実装を高性能な推論エンジンに変換するには、通常、KVキャッシュ管理の追加、GPU間での重みのシャーディング、演算の融合、特定のハードウェア向けの実行グラフの調整などが必要です。
AutoDeployは、このワークフローをコンパイラ主導のアプローチへと移行させます。モデルの作成者に推論ロジックを手動で再実装させる代わりに、AutoDeployは市販のPyTorchモデルから計算グラフを自動的に抽出し、一連の自動変換を適用して、推論最適化されたTensorRT LLMグラフを生成します。これにより、モデルをPyTorchで一度記述するだけで、キャッシング、シャーディング、カーネル選択、ランタイム統合といった推論特有の懸念事項をコンパイラとランタイムに委譲できます。
このアプローチは、新しい研究用アーキテクチャ、内部バリアント、急速に変化するオープンソースモデルなど、手動での再実装が非現実的または正当化されないことが多い、いわゆる「ロングテール」のモデル群に特に適しています。AutoDeployは、競争力のあるベースラインパフォーマンスでローンチ時にデプロイを可能にしつつ、モデルが成熟するにつれて段階的に最適化していく明確な道筋を残します。
AutoDeployが提供するもの:
シームレスなモデル変換:Hugging Faceモデルを手動で書き換えることなく、自動的にTensorRT LLMグラフに変換
単一の信頼できる情報源:元のPyTorchモデルを正規の定義として保持
推論最適化:シャーディング、量子化、KVキャッシュ挿入、アテンション融合、CUDA Graphs最適化などを適用
ローンチ時のデプロイ:即時のデプロイを可能にし、時間の経過とともに継続的なパフォーマンス向上を実現
すぐに使えるセットアップ:TensorRT LLMの一部として、例とドキュメントとともに提供
AutoDeployは以下の用途に使用できます:
新規または実験的アーキテクチャ:研究モデル、ハイブリッド設計、新しいトークンミキシング(アテンション)メカニズムを迅速にデプロイ
ロングテールモデルのサポート:カスタムの推論実装なしに、内部モデル、ファインチューニング済みモデル、または一般的でないモデルを提供
迅速なパフォーマンス立ち上げ:競争力のあるベースラインパフォーマンスに素早く到達し、その後段階的に最適化
統一された学習から推論へのワークフロー:モデル定義にはPyTorchを維持しつつ、ランタイム統合にはTensorRT LLMを依頼
AutoDeployは現在、100以上のテキスト生成LLMをサポートしており、VLMやSSM、LlamaモデルファミリーやNVIDIA Nemotron 3 Nanoなどのパフォーマンス最適化モデルの早期サポートも提供しています。
AutoDeployの技術的背景
AutoDeployは、元のHugging FaceモデルとTensorRT LLMランタイムの間に位置します。LLM APIはモデル名またはチェックポイントディレクトリを受け取り、高レベルのLLMオブジェクトを返します。内部では、そのオブジェクトはAutoDeploy(自動)または手動バックエンドを使用できます。
図1が示すように、AutoDeployパスはグラフを自動的に抽出し、最適化を適用して、推論最適化グラフを生成します。手動パスでは、エンジニアが同じランタイムで実行する前に、モデルを(KVキャッシュロジック、アテンションカーネル、シャーディング、カーネル融合などを追加して)書き換える必要があります。
グラフキャプチャとパターンマッチング
AutoDeployはtorch.exportを使用します。
この最初のステップで、AutoDeployは、エキスパートの混合(MoE)、アテンション、RoPE、状態空間層などの一般的な構成要素が、カスタム演算としてグラフ内の単一ノードとして表現されるリファレンス実装を使用して表現されるようにします。
図2は、アテンションがすべてのモデルで、PyTorch内の単一で解釈しやすいカスタム演算子としてどのように表現されるかの例を示しています。
このアプローチにより、パフォーマンス最適化やランタイム統合から切り離された、シームレスなモデルサポートのオンボーディングプロセスが保証されます。
さらに、モデルのオンボーディングは、パターンマッチングによる完全自動オンボーディングと(完全な)手動書き換えの間のスライディングスケールで行われ、最終的なモデルグラフがモデルを完全に実行できるようにします。モデル作成者は、関連する演算をPyTorchカスタム演算子としてデコレートすることで、カスタムカーネルをモデルグラフに注入できます。AutoDeployコンパイラは関連する演算子を変更しません(図3)。
シャーディング、融合、およびパフォーマンス最適化
次の段階では、AutoDeployは、融合パス、パフォーマンス調整済みレシピ、および最適化カーネルのグラフ表現への挿入を組み合わせた、コンパイラのようなパスを通じて、パフォーマンス最適化を自動的に適用します。この段階では、利用可能なヒューリスティックまたはHugging Faceのシャーディングヒントを再利用して事前指定されたシャーディングヒントに基づき、マルチGPU推論のためにモデルがシャーディングされます。
柔軟なアテンションとキャッシングサポート
グラフキャプチャとパターンマッチング中、AutoDeployはトークンミキシング(例えば、アテンション)演算子を、AutoDeploy正規化リファレンス演算子として表現される、単純なプリフィルのみの演算として表現します。これは、ソフトマックスアテンションの例について図3に描かれています。
その後、システムは自動的にパフォーマンス最適化されたアテンションカーネルへの交換を処理し、トークンミキシング演算子のキャッシングメカニズムをTensorRT LLM最適化キャッシュマネージャーシステムに自動的に統合します。現在、AutoDeployは、ソフトマックスアテンション、状態空間層(Mamba2)、線形アテンション(DeltaNet)、因果的畳み込みから任意に構成されるモデルを扱うことができます。
キャッシングを伴う他の演算子のサポート追加は、厳格なインターフェースに従い、容易に拡張可能です。
コンパイルツール
AutoDeployは、モデルをさらにコンパイルおよび低レベル化するための一般的な市販ツール、例えばtorch.compileと統合します。
ランタイム統合
AutoDeployは、モデルを最適化されたTensorRT LLMランタイムに統合するすべての側面を処理します。これには、オーバーラップスケジューラ、チャンク化プリフィル、投機的デコード、キャッシュおよび状態管理などの機能が含まれ、モデル作成者にモデルとランタイムの複雑に絡み合った依存関係の負担をかけません。
AutoDeployパフォーマンス例:Nemotron 3 Nano
AutoDeployの能力を測るために、チームはハイブリッドMoEモデルであるNVIDIA Nemotron 3 Nanoのオンボーディングを行いました。このようなモデルを推論用に手動で調整するには通常数週間かかりますが、AutoDeployにより数日以内でのオンボーディングが可能になり、その後、手動調整されたベースラインと同等の性能を発揮する段階的な最適化が行われました。
単一のNVIDIA Blackwell DGX B200 GPU上で、AutoDeployはTensorRT LLMにおける手動最適化ベースラインと同等の性能を発揮しました(図4)。ユーザーあたりのスループットでは最大毎秒350トークン、レイテンシおよび高スループットアプリケーションでは最大毎秒13,000出力トークンをそれぞれ達成しました。
データは、ISL/OSL 1k/1k、TP=1、NVIDIA DGX B200上で、TensorRT LLM v1.3.0rc1、trtllm-serveを使用して収集されました。
この結果を自身で再現するには、NVIDIA Nemotron 3 Nano Checkpointで概説されている手順に従ってください。
モデルオンボーディング例:Nemotron-Flash
Nemotron-Flashは、純粋に手動の推論ワークフローを使用してサポートすることが難しいタイプのアーキテクチャの代表的な例です。このハイブリッド研究モデルは、状態空間層、ソフトマックスアテンション、線形アテンションを含む複数のトークンミキサーを組み合わせており、重要な手動実装を必要とします。
原文を表示
NVIDIA TensorRT LLM enables developers to build high-performance inference engines for large language models (LLMs), but deploying a new architecture traditionally requires significant manual effort. To address this challenge, today we are announcing the availability of AutoDeploy as a beta feature in TensorRT LLM.
AutoDeploy compiles off-the-shelf PyTorch models into inference-optimized graphs. This avoids the need to bake inference-specific optimizations directly into model code, reducing LLM deployment time. AutoDeploy enables the shift from manually reimplementing and optimizing each model toward a compiler-driven workflow that separates model authoring from inference optimization.
This post introduces AutoDeploy architecture and capabilities and shows how it enabled support for recent NVIDIA Nemotron models at launch.
What is AutoDeploy?
Every new LLM architecture comes with its own inference challenges, from transformer models to hybrid vision language models (VLMs) to state space models (SSMs). Turning a reference implementation into a high-performance inference engine typically requires adding KV cache management, sharding weights across GPUs, fusing operations, and tuning the execution graph for specific hardware.
AutoDeploy shifts this workflow toward a compiler-driven approach. Instead of requiring model authors to manually reimplement inference logic, AutoDeploy automatically extracts a computation graph from an off-the-shelf PyTorch model and applies a series of automated transformations to produce an inference-optimized TensorRT LLM graph. This enables you to describe the model once in PyTorch and delegate inference-specific concerns—such as caching, sharding, kernel selection, and runtime integration—to the compiler and runtime.
This approach is particularly well-suited for the long tail of models, including new research architectures, internal variants, and fast-moving open source models, where manual reimplementation is often impractical or unjustified. AutoDeploy enables deployment at launch with competitive baseline performance, while preserving a clear path to incremental optimization as models mature.
AutoDeploy provides:
Seamless model translation: Automatically converts Hugging Face models into TensorRT LLM graphs without manual rewrites
Single source of truth: Keeps the original PyTorch model as the canonical definition
Inference optimization: Applies sharding, quantization, KV cache insertion, attention fusion, CUDA Graphs optimization, and more
Deployment at launch: Enables immediate deployment with ongoing performance improvements over time
Turnkey setup: Ships as part of TensorRT LLM with examples and documentation
AutoDeploy can be used for:
New or experimental architectures: Rapidly deploy research models, hybrid designs, or novel token mixing (attention) mechanisms
Long-tail model support: Serve internal, fine-tuned, or less common models without bespoke inference implementations
Fast performance bring-up: Reach competitive baseline performance quickly, then optimize incrementally
Unified training-to-inference workflow: Keep PyTorch as the model definition while relying on TensorRT LLM for runtime integration
AutoDeploy currently supports more than 100 text‑to‑text LLMs and offers early support for VLMs and SSMs and performance-optimized models such as the Llama model family and NVIDIA Nemotron 3 Nano.
AutoDeploy technical background
AutoDeploy sits between the original Hugging Face model and the TensorRT LLM runtime. The LLM API accepts a model name or checkpoint directory and returns a high‑level LLM object. Under the hood, that object can use AutoDeploy (automated) or a manual backend.
As Figure 1 shows, the AutoDeploy path automatically extracts a graph, applies optimizations, and generates an inference‑optimized graph. The manual path requires engineers to rewrite the model (adding KV cache logic, attention kernels, sharding, kernel fusion, and more) before running it through the same runtime.
Graph capture and pattern matching
AutoDeploy uses the torch.export
In this initial step, AutoDeploy ensures that common building blocks such as mixture of experts (MoE), attention, RoPE, or state-space layers are represented using reference implementations that are represented as custom ops and single nodes in the graph.
Figure 2 provides an example of how attention is represented across all models as a single, easy-to-interpret custom operator in PyTorch.
This approach ensures a seamless onboarding process of model support that is decoupled from performance optimization and runtime integration.
Moreover, model onboarding happens on a sliding scale between fully-automated model onboarding through pattern matching and (full) manual rewrites to ensure the final model graph can fully execute the model. The model author can inject custom kernels into the model graph by decorating relevant operations as PyTorch custom operators. The AutoDeploy compiler will not modify the relevant operators (Figure 3).
Sharding, fusion, and performance optimization
In the next stages, AutoDeploy automatically applies performance optimization through compiler-like passes combining fusion passes, performance-tuned recipes, and insertion of optimized kernels into the graph representation. During this stage, the model is also sharded for multi-GPU inference based on available heuristics or prespecified sharding hints reusing the Hugging Face sharding hints.
Flexible attention and caching support
During graph capture and pattern matching, AutoDeploy represents token mixing (for example, attention) operators as simple prefill-only operations expressed as AutoDeploy canonicalized reference operators. This is depicted in Figure 3 for the example of softmax attention.
The system then automatically handles swapping to performance-optimized attention kernels and automatically integrates the caching mechanisms of token mixing operators into the TensorRT LLM optimized cache manager system. Currently, AutoDeploy can handle models that are arbitrarily composed of softmax attention, state-space layers (Mamba2), linear attention (DeltaNet), and causal convolution.
Adding support for other operators with caching follows a strict interface and is easily extendable.
Compilation tooling
AutoDeploy integrates with common off-the-shelf tooling for compiling and lowering the model further, such as torch.compile
Runtime integration
AutoDeploy handles all aspects of integrating the model into the optimized TensorRT LLM runtime including features like overlap scheduler, chunked prefill, speculative decoding, or cache and state management without burdening the model author with the intertwined dependencies between the model and the runtime.
AutoDeploy performance example: Nemotron 3 Nano
To gauge AutoDeploy capabilities, the team onboarded NVIDIA Nemotron 3 Nano, a hybrid MoE model. While hand‑tuning such a model for inference would typically take weeks, AutoDeploy enabled onboarding within days, followed by incremental optimizations that performed in line with a manually tuned baseline.
On a single NVIDIA Blackwell DGX B200 GPU, AutoDeploy performed on par with the manually optimized baseline in TensorRT LLM (Figure 4). It delivered up to 350 tokens per second per user throughput and up to 13,000 output tokens per second for latency and high-throughput applications, respectively.
Data was collected for ISL/OSL 1k/1k, TP=1, on NVIDIA DGX B200 using TensorRT LLM v1.3.0rc1, trtllm-serve
To reproduce the results yourself, follow the steps outlined in the NVIDIA Nemotron 3 Nano Checkpoint.
Model onboarding example: Nemotron-Flash
Nemotron-Flash is a representative example of the type of architecture that can be difficult to support using a purely manual inference workflow. This hybrid research model combines multiple token mixers—including state space layers, softmax attention, and linear attention—and would require significant engineering effort to reimplement, optimize, and maintain by hand.
With AutoDeploy, existing optimization passes for Nemotron-Flash layers could be reused out-of-the-box, without any model-specific engineering. New layer types, such as DeltaNet update rule, were integrated as an incremental extension rather than a full rewrite and can be reused for future model onboarding work.
As a result, Nemotron-Flash was onboarded and performance-optimized within days and is now supported out-of-the-box. This highlights the core strength of AutoDeploy: once optimizations are expressed as reusable compiler passes, new and unconventional architectures can immediately benefit from the full optimization stack, dramatically reducing time-to-deployment while maintaining high inference performance.
The team used TensorRT LLM AutoDeploy to benchmark Nemotron Flash 3B Instruct against Qwen2.5 3B Instruct, a widely adopted, heavily hand-tuned model in a similar size range. For the benchmarking scenario in Figure 1 (ISL/OSL=8k/16k), Nemotron-Flash outperforms Qwen2.5 highlighting how novel model architectures can be quickly onboarded to achieve production-ready performance.
Data was collected for ISL/OSL 8k/16k, TP=1, on NVIDIA DGX H100 using TensorRT LLM v1.3.0rc1, trtllm-serve
Get started with TensorRT LLM AutoDeploy
TensorRT LLM AutoDeploy marks a shift toward approaching inference optimization as a compiler and runtime responsibility rather than a burden on the model author. This approach enables faster experimentation, broader model coverage, and a cleaner separation between model design and deployment.
Instead of hand-tuning each model, you can describe the architecture once and let the system apply graph transformations and optimized kernels. Early successes such as Nemotron Nano 3 and Nemotron-Flash demonstrate that deployment at model launch with peak performance is achievable across diverse model architectures.
TensorRT LLM AutoDeploy is rapidly evolving. If you’re interested in experimenting with this feature or contributing to its development, check out the AutoDeploy documentation and example scripts.
Acknowledgments
We’d like to thank those who have contributed to AutoDeploy, including Ajinkya Rasane, Bala Marimuthu, Chenghao Zhang, Chenjie Luo, Eran Geva, Frida Hou, Gal Hubara Agam, Govind Ramnarayan, Grzegorz Kwasniewski, Hao Guo, Jingyu Xin, Joyjit Daw, Karthik Vetrivel, Lucas Liebenwein, Neta Zmora, Suguna Varshini Velury, Suyog Gupta, Tal Cherckez, Taylor Lee, Wanli Jiang, Wei-Ming Chen, William Zhang, and Yoco Xiao.





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