[Docs] Fix warnings in mkdocs build (continued) (#25042)

Signed-off-by: wwl2755 <wangwenlong2755@gmail.com>
This commit is contained in:
Wenlong Wang
2025-09-20 11:45:18 +00:00
committed by GitHub
parent e08a3a3fdb
commit 032d661d27
7 changed files with 24 additions and 15 deletions
+10 -2
View File
@@ -1810,7 +1810,8 @@ class ModelRunner(GPUModelRunnerBase[ModelInputForGPUWithSamplingMetadata]):
return [output]
def need_recv_kv(self, model_input, kv_caches) -> bool:
def need_recv_kv(self, model_input: ModelInputForGPUWithSamplingMetadata,
kv_caches: List[torch.Tensor]) -> bool:
"""Check if we need to receive kv-cache from the other worker.
We need to receive KV when
1. current vLLM instance is KV cache consumer/decode vLLM instance
@@ -1825,6 +1826,9 @@ class ModelRunner(GPUModelRunnerBase[ModelInputForGPUWithSamplingMetadata]):
if self.vllm_config.kv_transfer_config is None:
return False
if model_input.attn_metadata is None:
raise ValueError("model_input.attn_metadata cannot be None")
prefill_meta = model_input.attn_metadata.prefill_metadata
# check if the current run is profiling
@@ -1835,7 +1839,8 @@ class ModelRunner(GPUModelRunnerBase[ModelInputForGPUWithSamplingMetadata]):
return self.vllm_config.kv_transfer_config.is_kv_consumer and (
not is_profile_run) and is_prefill_run
def need_send_kv(self, model_input, kv_caches) -> bool:
def need_send_kv(self, model_input: ModelInputForGPUWithSamplingMetadata,
kv_caches: List[torch.Tensor]) -> bool:
"""Check if we need to send kv-cache to the other worker.
We need to send KV when
1. current vLLM instance is KV cache producer/prefill vLLM instance
@@ -1850,6 +1855,9 @@ class ModelRunner(GPUModelRunnerBase[ModelInputForGPUWithSamplingMetadata]):
if self.vllm_config.kv_transfer_config is None:
return False
if model_input.attn_metadata is None:
raise ValueError("model_input.attn_metadata cannot be None")
prefill_meta = model_input.attn_metadata.prefill_metadata
# check if the current run is profiling