A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 5, 08:30 UTC
[Core] Change max_model_len in EngineCoreReadyResponse to be non-None (#39442)
Signed-off-by: Nick Hill <nickhill123@gmail.com>
Nick Hill committed
Apr 9, 2026 at 23:34 UTC
ef076c1b7305b1edca58a39bd9922a7286f224d5
2 files changed
+4
-6
vllm/v1/engine/__init__.py
+1
-1
@@ -72,9 +72,9 @@ class EngineCoreReadyResponse:
72
values (e.g. max_model_len after KV cache auto-fitting).
73
"""
74
75
+ max_model_len: int
76
num_gpu_blocks: int
77
dp_stats_address: str | None
77
- max_model_len: int | None = None
78
79
80
class EngineCoreRequest(
vllm/v1/engine/core_client.py
+3
-5
@@ -671,11 +671,9 @@ class MPClient(EngineCoreClient):
671
return
672
vllm_config = self.vllm_config
673
response = msgspec.msgpack.decode(payload, type=EngineCoreReadyResponse)
674
- if response.max_model_len is not None:
675
- vllm_config.model_config.max_model_len = min(
676
- vllm_config.model_config.max_model_len,
677
- response.max_model_len,
678
- )
674
+ vllm_config.model_config.max_model_len = min(
675
+ vllm_config.model_config.max_model_len, response.max_model_len
676
+ )
677
678
# Setup KV cache config with initialization state from
679
# engine core process. Sum values from all engines in DP case.