Prevent client-side clipping in vLLM grid

This commit is contained in:
2026-07-15 20:36:10 +08:00
parent 2f730417e0
commit 6307620e20
2 changed files with 13 additions and 4 deletions

View File

@@ -15,7 +15,7 @@ from pathlib import Path
from typing import Any from typing import Any
SCHEMA = "community-vllm-qwen235b-prefill-grid-v1" SCHEMA = "community-vllm-qwen235b-prefill-grid-v2"
MODEL = "/home/admin/cpfs/wjh/models/Qwen/Qwen3-235B-A22B-FP8" MODEL = "/home/admin/cpfs/wjh/models/Qwen/Qwen3-235B-A22B-FP8"
SERVED_MODEL = "qwen3-235b-community-prefill" SERVED_MODEL = "qwen3-235b-community-prefill"
TRACE = ( TRACE = (
@@ -25,6 +25,7 @@ TRACE = (
WINDOWS = "/home/admin/cpfs/wjh/aituner/aituner/trace_windows/windows.json" WINDOWS = "/home/admin/cpfs/wjh/aituner/aituner/trace_windows/windows.json"
TRACE_SHA256 = "f878e9af18f94dcfaced94a8e1e6b20a2f7d97d64aa862448025660dbbd965b2" TRACE_SHA256 = "f878e9af18f94dcfaced94a8e1e6b20a2f7d97d64aa862448025660dbbd965b2"
ORDER_SEED = 20260715 ORDER_SEED = 20260715
CLIENT_MAX_CONCURRENCY = 256
@dataclass(frozen=True) @dataclass(frozen=True)
@@ -117,7 +118,7 @@ def study_payload(
if tp == 8: if tp == 8:
base_flags["enable-expert-parallel"] = True base_flags["enable-expert-parallel"] = True
return { return {
"study_id": f"community-qwen235b-prefill-tp{tp}-v1", "study_id": f"community-qwen235b-prefill-tp{tp}-v2",
"hardware": { "hardware": {
"gpu_count": tp, "gpu_count": tp,
"gpu_model": "NVIDIA H20", "gpu_model": "NVIDIA H20",
@@ -151,7 +152,11 @@ def study_payload(
"completion_tokens_override": 1, "completion_tokens_override": 1,
"u_field": "sampling_u", "u_field": "sampling_u",
"timestamp_field": "timestamp", "timestamp_field": "timestamp",
"max_concurrency": 64, # Keep the request generator above the largest server-side MNS so
# MNS=128 is exercised by vLLM rather than clipped by the client.
# The extra headroom also leaves an explicit engine waiting queue
# under overload instead of moving that queue into the replay loop.
"max_concurrency": CLIENT_MAX_CONCURRENCY,
"input_length_filter": { "input_length_filter": {
"min_input_tokens": 0, "min_input_tokens": 0,
"max_input_tokens": 32768, "max_input_tokens": 32768,
@@ -244,7 +249,7 @@ def prepare(args: argparse.Namespace) -> None:
trial_dir = output / "trials" / config.name trial_dir = output / "trials" / config.name
trial_path = trial_dir / "trial_spec.json" trial_path = trial_dir / "trial_spec.json"
trial = { trial = {
"study_id": f"community-qwen235b-prefill-tp{config.tp}-v1", "study_id": f"community-qwen235b-prefill-tp{config.tp}-v2",
"trial_id": config.name, "trial_id": config.name,
"config_patch": { "config_patch": {
"env_patch": {}, "env_patch": {},
@@ -298,6 +303,8 @@ def prepare(args: argparse.Namespace) -> None:
"chunked_prefill": True, "chunked_prefill": True,
"cuda_graphs": False, "cuda_graphs": False,
"custom_all_reduce": False, "custom_all_reduce": False,
"client_max_concurrency": CLIENT_MAX_CONCURRENCY,
"max_server_mns": max(config.mns for config in GRID),
"kv_blocks_source": "community_vllm_measured_and_fixed_per_topology", "kv_blocks_source": "community_vllm_measured_and_fixed_per_topology",
}, },
"order": {"method": "python_random_shuffle", "seed": args.order_seed}, "order": {"method": "python_random_shuffle", "seed": args.order_seed},

View File

@@ -40,6 +40,8 @@ def test_study_uses_raw_prompt_and_fixed_serving_contract(tmp_path: Path) -> Non
assert payload["trace"]["request_mode"] == "raw_completion" assert payload["trace"]["request_mode"] == "raw_completion"
assert payload["trace"]["completion_tokens_override"] == 1 assert payload["trace"]["completion_tokens_override"] == 1
assert payload["trace"]["replay_time_scale"] == 1.0 assert payload["trace"]["replay_time_scale"] == 1.0
assert payload["trace"]["max_concurrency"] == 256
assert payload["trace"]["max_concurrency"] > max(item.mns for item in MODULE.GRID)
assert payload["engine"]["base_flags"]["enable-expert-parallel"] is True assert payload["engine"]["base_flags"]["enable-expert-parallel"] is True
assert payload["engine"]["base_flags"]["disable-custom-all-reduce"] is True assert payload["engine"]["base_flags"]["disable-custom-all-reduce"] is True
assert payload["engine"]["base_flags"]["num-gpu-blocks-override"] == 62351 assert payload["engine"]["base_flags"]["num-gpu-blocks-override"] == 62351