[Bugfix][Spec Decode] Avoid fastsafetensors deadlock for PP draft models (#54416)

Signed-off-by: Canlin <canlinguosdu@gmail.com>
Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
Canlin Guo
2026-09-12 14:22:30 +08:00
committed by GitHub
co-authored by Codex
parent eed1f3d0c6
commit dca96bf97b
6 changed files with 42 additions and 2 deletions
@@ -6,6 +6,7 @@ import torch.nn as nn
from vllm.config import ModelConfig, VllmConfig, replace
from vllm.logger import init_logger
from vllm.v1.attention.backends.registry import AttentionBackendEnum
from vllm.v1.worker.gpu.spec_decode.utils import get_pp_safe_draft_load_config
logger = init_logger(__name__)
@@ -73,6 +74,7 @@ def load_dspark_model(target_model: nn.Module, vllm_config: VllmConfig) -> nn.Mo
if speculative_config.kv_cache_dtype is not None
else vllm_config.cache_config
),
load_config=get_pp_safe_draft_load_config(vllm_config.load_config),
)
# VllmConfig post-init restores the target's quant config because the target
# config is retained for DSpark's target-layer metadata, so we must override it.