[#11423][feat] AutoDeploy: Basic Disagg Support#14057
Conversation
1daf15e to
842ef6f
Compare
842ef6f to
e2c608d
Compare
|
PR_Github #52889 [ run ] completed with state
|
|
@juney-nvidia : can you please unblock. thanks |
|
/bot run |
|
PR_Github #52982 [ run ] triggered by Bot. Commit: |
|
PR_Github #52982 [ run ] completed with state
|
029e77c to
1aa2c14
Compare
|
/bot run --disable-fail-fast |
|
PR_Github #53104 [ run ] triggered by Bot. Commit: |
Squashed branch work for AutoDeploy disagg serving: KV cache transport config, ad_executor/interface changes for disagg, MLA/attention custom op updates, DeepSeek model tweaks, plus integration tests (test_ad_disagg, trtllm_serve), unit tests, smoke tests, and test-list registrations. Signed-off-by: Govind Ramnarayan <105831528+govind-ramnarayan@users.noreply.github.com>
KVPagedResourceHandler now requires attention_type; update the two remaining base-handler fixtures (_non_speculative_handlers and _NON_SPECULATIVE_HANDLERS) that still constructed it without one. Signed-off-by: Govind Ramnarayan <105831528+govind-ramnarayan@users.noreply.github.com>
1aa2c14 to
fcad4dd
Compare
|
/bot kill |
|
PR_Github #53132 [ kill ] triggered by Bot. Commit: |
|
PR_Github #53104 [ run ] completed with state |
|
PR_Github #53132 [ kill ] completed with state |
|
/bot run --disable-fail-fast |
|
PR_Github #53136 [ run ] triggered by Bot. Commit: |
|
PR_Github #53136 [ run ] completed with state |
|
/bot run --stage-list DGX_H100-4_GPUs-AutoDeploy-Post-Merge-1 |
|
PR_Github #53193 [ run ] triggered by Bot. Commit: |
|
PR_Github #53193 [ run ] completed with state |
|
/bot run --disable-fail-fast |
|
PR_Github #53230 [ run ] triggered by Bot. Commit: |
|
PR_Github #53230 [ run ] completed with state |
ADEngine subclasses the abstract ModelEngine and does not run PyTorchModelEngine.__init__, so it never set `enable_spec_decode`. After NVIDIA#14546 added an unguarded `self.model_engine.enable_spec_decode` read in `_prepare_disagg_gen_transmission_complete` (the disagg generation handoff path that ADEngine traverses via NVIDIA#14057 AutoDeploy Basic Disagg Support), AutoDeploy disaggregated runs crash with: AttributeError: 'ADEngine' object has no attribute 'enable_spec_decode' NVIDIA#14546 and NVIDIA#14057 each passed CI independently but conflict semantically once both are on main. Set `is_spec_decode`/`enable_spec_decode` in ADEngine.__init__, mirroring PyTorchModelEngine (enable_spec_decode == spec_config is not None), so ADEngine satisfies the ModelEngine attribute contract that shared PyExecutor code relies on. Signed-off-by: Shixiaowei02 <39303645+Shixiaowei02@users.noreply.github.com>
ADEngine subclasses the abstract ModelEngine and does not run PyTorchModelEngine.__init__, so it never set `enable_spec_decode`. After NVIDIA#14546 added an unguarded `self.model_engine.enable_spec_decode` read in `_prepare_disagg_gen_transmission_complete` (the disagg generation handoff path that ADEngine traverses via NVIDIA#14057 AutoDeploy Basic Disagg Support), AutoDeploy disaggregated runs crash with: AttributeError: 'ADEngine' object has no attribute 'enable_spec_decode' NVIDIA#14546 and NVIDIA#14057 each passed CI independently but conflict semantically once both are on main. Set `is_spec_decode`/`enable_spec_decode` in ADEngine.__init__, mirroring PyTorchModelEngine (enable_spec_decode == spec_config is not None), so ADEngine satisfies the ModelEngine attribute contract that shared PyExecutor code relies on. Signed-off-by: Shixiaowei02 <39303645+Shixiaowei02@users.noreply.github.com>
fixes: #11423
Summary: Disaggregated serving support for the AutoDeploy backend. Since AutoDeploy is already integrated into the TRTLLM KvCacheManager, we just need to instantiate the KvCacheTransceiver when creating the PyExecutor for AutoDeploy. This PR implements support for disaggregation in AutoDeploy for MHA and MLA-based models.
All caches must be managed by the KvCacheManager in order for disagg to run. This is to proactively flag correctness issues where the prefill node does not register some cache with the KvCacheManager, so the gen node does not get it and crashes. Exceptions can be made by registering a cache as "Ephemeral". A good example is the hidden state cache we use for collecting target-model hidden states for Eagle / MTP. This is produced and consumed within a single forward pass, so does not need to be passed from prefill to generation workers.
Not Implemented:
Testing:
Test Coverage:
We want to make sure disagg works with AutoDeploy for all the attention types that we believe we should support with disagg - currently MHA and MLA. So we want to test correctness for at least one MHA and one MLA model.
It also interacts with some other features - for instance with overlap scheduling enabled, the generation worker must not crash on the first iteration, and for Eagle, we should tolerate dropping the Hidden State Cache in the disaggregated handoff. For chunked prefill, we shouldn't do the handoff too early.
We lift some of the feature matrix for testing from https://github.com/NVIDIA/TensorRT-LLM/blob/main/tests/integration/defs/disaggregated/test_disaggregated_single_gpu.py for testing.
Methodology / types of tests:
We try to put most tests into 1) and 2) as they are cheaper and have simpler setup, and errors are more easily traceable to AutoDeploy's engine and executor. For 2) and 3) in particular, we can use reduced-layer counts with real weights and check that aggregate output matches disagg output (even if it is nonsense) - this requires less memory. We include some full-sized model tests to make sure the pipeline is working in realistic scenarios.
@coderabbitai summary
Description
Test Coverage
PR Checklist
Please review the following before submitting your PR:
PR description clearly explains what and why. If using CodeRabbit's summary, please make sure it makes sense.
PR Follows TRT-LLM CODING GUIDELINES to the best of your knowledge.
Test cases are provided for new code paths (see test instructions)
Any new dependencies have been scanned for license and vulnerabilities
CODEOWNERS updated if ownership changes
Documentation updated as needed
Update tava architecture diagram if there is a significant design change in PR.
The reviewers assigned automatically/manually are appropriate for the PR.
Please check this after reviewing the above items as appropriate for this PR.
GitHub Bot Help
To see a list of available CI bot commands, please comment
/bot help.