[Bugfix][V1] Sync mamba_block_size via EngineCoreReadyResponse (#50809)

Signed-off-by: “新颐” <lxy537258@antgroup.com>
Co-authored-by: “新颐” <lxy537258@antgroup.com>
This commit is contained in:
lxy
2026-08-19 16:44:36 +00:00
committed by GitHub
co-authored by “新颐”
parent 3a386cfaf5
commit 0c8c3f41cf
4 changed files with 39 additions and 0 deletions
@@ -343,6 +343,42 @@ def test_apply_ready_response_syncs_block_size():
assert client.vllm_config.cache_config.block_size == 1056
def test_apply_ready_response_syncs_mamba_block_size():
import msgspec
client = object.__new__(MPClient)
client.vllm_config = SimpleNamespace(
cache_config=SimpleNamespace(block_size=16, num_gpu_blocks=0),
model_config=SimpleNamespace(max_model_len=8192),
)
client.stats_update_address = None
payload = msgspec.msgpack.encode(
EngineCoreReadyResponse(
max_model_len=8192,
num_gpu_blocks=100,
block_size=1056,
dp_stats_address=None,
dtype="bfloat16",
vllm_version="test",
world_size=1,
data_parallel_size=1,
tensor_parallel_size=1,
pipeline_parallel_size=1,
decode_context_parallel_size=1,
data_parallel_rank=0,
max_num_seqs=256,
max_num_batched_tokens=8192,
instance_id="test-instance",
supports_lora=False,
max_loras=0,
mamba_block_size=1056,
)
)
client._apply_ready_response(payload)
assert client.vllm_config.cache_config.mamba_block_size == 1056
def loop_until_done(client: EngineCoreClient, outputs: dict):
while True:
engine_core_outputs = client.get_output().outputs