diff --git a/tensorrt_llm/_torch/pyexecutor/py_executor_creator.py b/tensorrt_llm/_torch/pyexecutor/py_executor_creator.py index 93c8d8382a3f..9ee8e5a85172 100644 --- a/tensorrt_llm/_torch/pyexecutor/py_executor_creator.py +++ b/tensorrt_llm/_torch/pyexecutor/py_executor_creator.py @@ -514,8 +514,23 @@ def create_py_executor( # WAR for https://nvbugs/5807902 # Disable separate draft KV cache in disaggregated mode # Enable separate pool for None DI + Non-KVBM and Aggregated + KVBM + # + # MiniMax-M3 is exempt: its cache manager forbids sharing draft + # layers (supports_shared_draft_layers=False), so this WAR's + # shared-manager fallback does not exist for it. Both worker roles + # must keep the separate manager, or their target pool layouts + # diverge and disaggregated KV transfer breaks. Checked via the + # sparse-attention algorithm because the manager class is not yet + # resolved here ("minimax_m3" maps 1:1 to MiniMaxM3KVCacheManagerV2). if cache_transceiver_config is not None: - spec_config._allow_separate_draft_kv_cache = False + if is_minimax_m3(m3_sparse_config): + logger.warning( + "Disaggregated MiniMax-M3 keeps the separate draft KV " + "cache manager; draft-layer KV is not transferred, so " + "generation-side acceptance is reduced until the drafter " + "rebuilds its context window.") + else: + spec_config._allow_separate_draft_kv_cache = False # chunk_unit_size may be changed to 64 when using flash mla attn_runtime_features = AttentionRuntimeFeatures(