[Bugfix] Sync block_size from EngineCore to frontend for hybrid Mamba… (#42967)
Signed-off-by: Amit Gruner <agruner@crusoe.ai> Co-authored-by: Amit Gruner <agruner@crusoe.ai> Co-authored-by: Jiangyun Zhu <riverclouds.zhu@qq.com>
This commit is contained in:
co-authored by
Amit Gruner
Jiangyun Zhu
parent
b623f7ea95
commit
654bd2bca4
@@ -27,12 +27,13 @@ from vllm.platforms import current_platform
|
||||
from vllm.pooling_params import LateInteractionParams, PoolingParams
|
||||
from vllm.usage.usage_lib import UsageContext
|
||||
from vllm.utils.torch_utils import set_default_torch_num_threads
|
||||
from vllm.v1.engine import EngineCoreRequest
|
||||
from vllm.v1.engine import EngineCoreReadyResponse, EngineCoreRequest
|
||||
from vllm.v1.engine.core import EngineCore
|
||||
from vllm.v1.engine.core_client import (
|
||||
AsyncMPClient,
|
||||
DPLBAsyncMPClient,
|
||||
EngineCoreClient,
|
||||
MPClient,
|
||||
SyncMPClient,
|
||||
)
|
||||
from vllm.v1.engine.utils import CoreEngineProcManager
|
||||
@@ -236,6 +237,30 @@ def test_dplb_non_late_interaction_still_uses_lb():
|
||||
assert client.lb_engines[1][0] == 1
|
||||
|
||||
|
||||
def test_apply_ready_response_syncs_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",
|
||||
)
|
||||
)
|
||||
client._apply_ready_response(payload)
|
||||
assert client.vllm_config.cache_config.block_size == 1056
|
||||
|
||||
|
||||
def loop_until_done(client: EngineCoreClient, outputs: dict):
|
||||
while True:
|
||||
engine_core_outputs = client.get_output().outputs
|
||||
|
||||
Reference in New Issue
Block a user