Add DSpark backend to long-context matrix experiment
- Add start_dspark.sh with --spec-method dspark --spec-tokens 5 - Add BACKENDS env var to run only selected backends - Fix client/backend mapping for DSpark (bench client uses vllm, parser uses vllm) - Add three-way compare.py for sglang/vllm/dspark - Reuse existing sglang/vllm results from 20260708-100016 - Add DSpark long-context results and comparison
This commit is contained in:
parent
278653b6a6
commit
7e614fb702
100
experiments/dsv4_h200_long_context_matrix/compare.py
Executable file
100
experiments/dsv4_h200_long_context_matrix/compare.py
Executable file
@ -0,0 +1,100 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""Generate a side-by-side comparison of SGLang, vLLM, and DSpark results.
|
||||||
|
|
||||||
|
Usage:
|
||||||
|
python3 compare.py --sglang <sglang_root> --vllm <vllm_root> --dspark <dspark_root> \
|
||||||
|
[--output comparison.md]
|
||||||
|
"""
|
||||||
|
import argparse
|
||||||
|
import json
|
||||||
|
from collections import defaultdict
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
|
||||||
|
def load_result(result_root: Path) -> dict:
|
||||||
|
path = result_root / "results.json"
|
||||||
|
with open(path, "r", encoding="utf-8") as f:
|
||||||
|
return json.load(f)
|
||||||
|
|
||||||
|
|
||||||
|
def slo_status(ttft_p95_ms: float, tpot_mean_ms: float, ttft_limit_ms: float = 3000.0, tpot_limit_ms: float = 50.0) -> str:
|
||||||
|
ttft_ok = ttft_p95_ms < ttft_limit_ms
|
||||||
|
tpot_ok = tpot_mean_ms < tpot_limit_ms
|
||||||
|
if ttft_ok and tpot_ok:
|
||||||
|
return "✅"
|
||||||
|
if ttft_ok or tpot_ok:
|
||||||
|
return "⚠️"
|
||||||
|
return "❌"
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
parser = argparse.ArgumentParser()
|
||||||
|
parser.add_argument("--sglang", type=Path, required=True)
|
||||||
|
parser.add_argument("--vllm", type=Path, required=True)
|
||||||
|
parser.add_argument("--dspark", type=Path, required=True)
|
||||||
|
parser.add_argument("-o", "--output", type=Path, default=Path("comparison.md"))
|
||||||
|
parser.add_argument("--ttft-limit", type=float, default=3000.0)
|
||||||
|
parser.add_argument("--tpot-limit", type=float, default=50.0)
|
||||||
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
sglang_data = load_result(args.sglang)
|
||||||
|
vllm_data = load_result(args.vllm)
|
||||||
|
dspark_data = load_result(args.dspark)
|
||||||
|
|
||||||
|
model = sglang_data.get("metadata", {}).get("model", "unknown")
|
||||||
|
hardware = sglang_data.get("metadata", {}).get("hardware", "unknown")
|
||||||
|
|
||||||
|
# Map engine names to display labels.
|
||||||
|
engine_to_label = {
|
||||||
|
"sglang": "sglang",
|
||||||
|
"vllm": "vllm",
|
||||||
|
"vllm-dspark": "dspark",
|
||||||
|
}
|
||||||
|
|
||||||
|
by_scenario = defaultdict(dict)
|
||||||
|
for data in (sglang_data, vllm_data, dspark_data):
|
||||||
|
engine = data["metadata"]["engine"]
|
||||||
|
label = engine_to_label.get(engine, engine)
|
||||||
|
for s in data.get("scenarios", []):
|
||||||
|
key = s["name"]
|
||||||
|
by_scenario[key][label] = s
|
||||||
|
|
||||||
|
with open(args.output, "w", encoding="utf-8") as f:
|
||||||
|
f.write(f"# SGLang vs vLLM vs DSpark long-context matrix ({hardware})\n\n")
|
||||||
|
f.write("## Summary\n\n")
|
||||||
|
f.write(f"- Model: `{model}`\n")
|
||||||
|
f.write(f"- DSpark model: `/data/models/DeepSeek-V4-Flash-DSpark`\n")
|
||||||
|
f.write(f"- Hardware: {hardware}\n")
|
||||||
|
f.write("- Benchmark client: `sglang.bench_serving`\n")
|
||||||
|
f.write("- DSpark flags: `--spec-method dspark --spec-model <model> --spec-tokens 5`\n")
|
||||||
|
f.write(f"- SLO reference: TTFT P95 < {args.ttft_limit}ms, TPOT mean < {args.tpot_limit}ms\n\n")
|
||||||
|
|
||||||
|
f.write("## Side-by-side results\n\n")
|
||||||
|
f.write("| Scenario | Backend | Conc | Input | Output | Req/s | OutTok/s | TTFT P95(ms) | TTFT P99(ms) | TPOT Mean(ms) | TPOT P95(ms) | TPOT P99(ms) | E2E P99(ms) | SLO |\n")
|
||||||
|
f.write("|---|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|\n")
|
||||||
|
|
||||||
|
for scenario_name in sorted(by_scenario.keys()):
|
||||||
|
for backend in ("sglang", "vllm", "dspark"):
|
||||||
|
s = by_scenario[scenario_name].get(backend)
|
||||||
|
if s is None:
|
||||||
|
continue
|
||||||
|
cfg = s["config"]
|
||||||
|
m = s["metrics"]
|
||||||
|
status = slo_status(m["ttft_ms"]["p95"], m["tpot_ms"]["mean"], args.ttft_limit, args.tpot_limit)
|
||||||
|
f.write(
|
||||||
|
f"| {scenario_name} | {backend} | {cfg['concurrency']} | {cfg['input_len']} | {cfg['output_len']} | "
|
||||||
|
f"{m['request_throughput']:.2f} | {m['output_token_throughput']:.2f} | "
|
||||||
|
f"{m['ttft_ms']['p95']:.2f} | {m['ttft_ms']['p99']:.2f} | "
|
||||||
|
f"{m['tpot_ms']['mean']:.2f} | {m['tpot_ms']['p95']:.2f} | {m['tpot_ms']['p99']:.2f} | "
|
||||||
|
f"{m['e2e_ms']['p99']:.2f} | {status} |\n"
|
||||||
|
)
|
||||||
|
|
||||||
|
f.write("\n## Notes\n\n")
|
||||||
|
f.write("- SLO check uses TTFT P95 and TPOT mean.\n")
|
||||||
|
f.write("- A ⚠️ indicates one of the two metrics is out of target; ❌ indicates both are out.\n")
|
||||||
|
|
||||||
|
print(f"Wrote comparison to {args.output}")
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
@ -10,9 +10,15 @@ SERVED_MODEL_NAME="deepseek-v4-flash"
|
|||||||
|
|
||||||
SGLANG_PORT="${SGLANG_PORT:-30006}"
|
SGLANG_PORT="${SGLANG_PORT:-30006}"
|
||||||
VLLM_PORT="${VLLM_PORT:-30005}"
|
VLLM_PORT="${VLLM_PORT:-30005}"
|
||||||
|
DSPARK_PORT="${DSPARK_PORT:-30013}"
|
||||||
|
|
||||||
VENV_SGLANG="${VENV_SGLANG:-/data/user1/yy/envs/sglang}"
|
VENV_SGLANG="${VENV_SGLANG:-/data/user1/yy/envs/sglang}"
|
||||||
VENV_VLLM="${VENV_VLLM:-/data/user1/yy/envs/vllm}"
|
VENV_VLLM="${VENV_VLLM:-/data/user1/yy/envs/vllm}"
|
||||||
|
VENV_VLLM_DSPARK="${VENV_VLLM_DSPARK:-/data/user1/yy/envs/vllm-dspark}"
|
||||||
|
|
||||||
|
# DSpark uses a separate model checkpoint and speculative decoding.
|
||||||
|
DSPARK_MODEL_NAME="DeepSeek-V4-Flash-DSpark"
|
||||||
|
DSPARK_MODEL_PATH="/data/models/DeepSeek-V4-Flash-DSpark"
|
||||||
|
|
||||||
export CUDA_VISIBLE_DEVICES="0,1,2,3,4,5,6,7"
|
export CUDA_VISIBLE_DEVICES="0,1,2,3,4,5,6,7"
|
||||||
TP=8
|
TP=8
|
||||||
@ -60,3 +66,4 @@ VENV_CLIENT="${VENV_CLIENT:-$VENV_SGLANG}"
|
|||||||
|
|
||||||
SGLANG_START_SCRIPT="${SCRIPT_DIR:-.}/start_sglang.sh"
|
SGLANG_START_SCRIPT="${SCRIPT_DIR:-.}/start_sglang.sh"
|
||||||
VLLM_START_SCRIPT="${SCRIPT_DIR:-.}/start_vllm.sh"
|
VLLM_START_SCRIPT="${SCRIPT_DIR:-.}/start_vllm.sh"
|
||||||
|
DSPARK_START_SCRIPT="${SCRIPT_DIR:-.}/start_dspark.sh"
|
||||||
|
|||||||
@ -0,0 +1,83 @@
|
|||||||
|
# SGLang vs vLLM vs DSpark long-context matrix (8x NVIDIA H200 143GB)
|
||||||
|
|
||||||
|
## Summary
|
||||||
|
|
||||||
|
- Model: `/data/models/DeepSeek-V4-Flash`
|
||||||
|
- DSpark model: `/data/models/DeepSeek-V4-Flash-DSpark`
|
||||||
|
- Hardware: 8x NVIDIA H200 143GB
|
||||||
|
- Benchmark client: `sglang.bench_serving`
|
||||||
|
- DSpark flags: `--spec-method dspark --spec-model <model> --spec-tokens 5`
|
||||||
|
- SLO reference: TTFT P95 < 3000.0ms, TPOT mean < 50.0ms
|
||||||
|
|
||||||
|
## Side-by-side results
|
||||||
|
|
||||||
|
| Scenario | Backend | Conc | Input | Output | Req/s | OutTok/s | TTFT P95(ms) | TTFT P99(ms) | TPOT Mean(ms) | TPOT P95(ms) | TPOT P99(ms) | E2E P99(ms) | SLO |
|
||||||
|
|---|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|
|
||||||
|
| c10_i131072_o1024 | sglang | 10 | 131072 | 1024 | 0.68 | 319.74 | 4147.51 | 7409.82 | 25.69 | 49.89 | 58.92 | 26432.66 | ⚠️ |
|
||||||
|
| c10_i131072_o1024 | vllm | 10 | 131072 | 1024 | 0.39 | 183.08 | 6596.15 | 6603.12 | 47.10 | 77.53 | 84.06 | 48426.64 | ⚠️ |
|
||||||
|
| c10_i131072_o1024 | dspark | 10 | 131072 | 1024 | 0.66 | 310.66 | 11615.81 | 11676.24 | 24.58 | 46.24 | 46.56 | 29271.39 | ⚠️ |
|
||||||
|
| c10_i131072_o256 | sglang | 10 | 131072 | 256 | 0.34 | 42.70 | 26046.62 | 26064.38 | 1374.50 | 1810.56 | 19553.62 | 58326.41 | ❌ |
|
||||||
|
| c10_i131072_o256 | vllm | 10 | 131072 | 256 | 0.38 | 48.09 | 23250.03 | 24238.33 | 150.22 | 299.91 | 301.72 | 51439.08 | ❌ |
|
||||||
|
| c10_i131072_o256 | dspark | 10 | 131072 | 256 | 0.40 | 51.33 | 24693.20 | 27039.11 | 59.88 | 78.22 | 316.95 | 36603.69 | ❌ |
|
||||||
|
| c10_i131072_o4096 | sglang | 10 | 131072 | 4096 | 0.27 | 517.96 | 6177.42 | 6920.28 | 14.21 | 19.92 | 25.87 | 54286.63 | ⚠️ |
|
||||||
|
| c10_i131072_o4096 | vllm | 10 | 131072 | 4096 | 0.23 | 445.81 | 2096.29 | 2168.81 | 18.57 | 21.47 | 21.61 | 67041.13 | ✅ |
|
||||||
|
| c10_i131072_o4096 | dspark | 10 | 131072 | 4096 | 1.05 | 1998.23 | 1543.09 | 1546.01 | 3.34 | 4.81 | 4.84 | 14731.59 | ✅ |
|
||||||
|
| c10_i262144_o1024 | sglang | 10 | 262144 | 1024 | 0.16 | 76.30 | 39446.96 | 43965.67 | 108.42 | 202.43 | 202.90 | 120180.87 | ❌ |
|
||||||
|
| c10_i262144_o1024 | vllm | 10 | 262144 | 1024 | 0.18 | 84.63 | 34130.22 | 38144.40 | 98.87 | 142.57 | 266.08 | 108658.89 | ❌ |
|
||||||
|
| c10_i262144_o1024 | dspark | 10 | 262144 | 1024 | 0.20 | 96.79 | 39321.30 | 40783.01 | 48.19 | 67.60 | 68.13 | 91123.07 | ⚠️ |
|
||||||
|
| c10_i262144_o256 | sglang | 10 | 262144 | 256 | 0.15 | 18.70 | 58074.31 | 62652.59 | 2953.70 | 3625.59 | 41185.32 | 134628.33 | ❌ |
|
||||||
|
| c10_i262144_o256 | vllm | 10 | 262144 | 256 | 0.18 | 22.76 | 50632.44 | 51883.02 | 229.20 | 339.27 | 344.95 | 110216.92 | ❌ |
|
||||||
|
| c10_i262144_o256 | dspark | 10 | 262144 | 256 | 0.18 | 23.12 | 64654.53 | 67877.62 | 52.05 | 73.84 | 151.28 | 80196.26 | ❌ |
|
||||||
|
| c10_i262144_o4096 | sglang | 10 | 262144 | 4096 | 0.14 | 272.46 | 18088.12 | 22579.09 | 28.00 | 43.87 | 45.07 | 120183.75 | ⚠️ |
|
||||||
|
| c10_i262144_o4096 | vllm | 10 | 262144 | 4096 | 0.11 | 215.86 | 34100.32 | 38022.94 | 37.18 | 56.07 | 62.00 | 157944.21 | ⚠️ |
|
||||||
|
| c10_i262144_o4096 | dspark | 10 | 262144 | 4096 | 0.18 | 349.94 | 33426.83 | 37512.71 | 20.67 | 35.94 | 44.44 | 103440.52 | ⚠️ |
|
||||||
|
| c25_i65536_o1024 | sglang | 25 | 65536 | 1024 | 0.67 | 346.70 | 19996.43 | 24478.11 | 149.27 | 395.00 | 2037.09 | 69586.94 | ❌ |
|
||||||
|
| c25_i65536_o1024 | vllm | 25 | 65536 | 1024 | 0.64 | 332.61 | 24861.20 | 28942.75 | 72.36 | 196.24 | 271.32 | 72689.84 | ❌ |
|
||||||
|
| c25_i65536_o1024 | dspark | 25 | 65536 | 1024 | 0.80 | 412.74 | 26078.12 | 29135.60 | 42.82 | 56.19 | 133.89 | 60995.55 | ⚠️ |
|
||||||
|
| c25_i65536_o256 | sglang | 25 | 65536 | 256 | 0.71 | 84.45 | 27219.06 | 31612.70 | 292.84 | 801.18 | 938.43 | 68854.26 | ❌ |
|
||||||
|
| c25_i65536_o256 | vllm | 25 | 65536 | 256 | 0.81 | 95.60 | 24902.72 | 28974.45 | 180.78 | 273.59 | 278.16 | 60781.45 | ❌ |
|
||||||
|
| c25_i65536_o256 | dspark | 25 | 65536 | 256 | 0.84 | 98.79 | 27635.11 | 29212.48 | 51.68 | 65.52 | 134.94 | 39437.04 | ❌ |
|
||||||
|
| c25_i65536_o4096 | sglang | 25 | 65536 | 4096 | 0.41 | 950.01 | 18559.58 | 23249.71 | 23.78 | 42.50 | 82.84 | 96670.12 | ⚠️ |
|
||||||
|
| c25_i65536_o4096 | vllm | 25 | 65536 | 4096 | 0.32 | 741.71 | 24847.97 | 28840.96 | 28.80 | 46.66 | 63.40 | 129654.04 | ⚠️ |
|
||||||
|
| c25_i65536_o4096 | dspark | 25 | 65536 | 4096 | 0.61 | 1409.20 | 25048.60 | 29143.30 | 14.72 | 30.57 | 42.07 | 73496.43 | ⚠️ |
|
||||||
|
| c2_i131072_o1024 | sglang | 2 | 131072 | 1024 | 0.60 | 136.10 | 479.99 | 482.72 | 8.56 | 9.72 | 9.79 | 5480.98 | ✅ |
|
||||||
|
| c2_i131072_o1024 | vllm | 2 | 131072 | 1024 | 0.70 | 158.36 | 676.14 | 695.90 | 6.49 | 8.20 | 8.34 | 4803.24 | ✅ |
|
||||||
|
| c2_i131072_o1024 | dspark | 2 | 131072 | 1024 | 2.29 | 514.96 | 679.81 | 691.56 | 1.10 | 1.60 | 1.63 | 1450.74 | ✅ |
|
||||||
|
| c2_i131072_o256 | sglang | 2 | 131072 | 256 | 1.43 | 139.48 | 589.14 | 605.33 | 8.29 | 8.96 | 9.05 | 1750.12 | ✅ |
|
||||||
|
| c2_i131072_o256 | vllm | 2 | 131072 | 256 | 1.51 | 147.12 | 684.63 | 700.28 | 7.08 | 9.27 | 9.45 | 1556.46 | ✅ |
|
||||||
|
| c2_i131072_o256 | dspark | 2 | 131072 | 256 | 3.10 | 301.11 | 617.17 | 634.08 | 1.00 | 1.41 | 1.42 | 780.85 | ✅ |
|
||||||
|
| c2_i131072_o4096 | sglang | 2 | 131072 | 4096 | 0.11 | 244.38 | 584.43 | 599.22 | 7.53 | 7.61 | 7.62 | 28360.35 | ✅ |
|
||||||
|
| c2_i131072_o4096 | vllm | 2 | 131072 | 4096 | 0.12 | 262.22 | 671.34 | 688.15 | 7.09 | 7.17 | 7.18 | 26496.04 | ✅ |
|
||||||
|
| c2_i131072_o4096 | dspark | 2 | 131072 | 4096 | 0.47 | 1076.96 | 540.43 | 541.94 | 1.76 | 2.03 | 2.08 | 6313.36 | ✅ |
|
||||||
|
| c2_i262144_o1024 | sglang | 2 | 262144 | 1024 | 0.51 | 114.94 | 1007.07 | 1024.10 | 8.36 | 9.03 | 9.06 | 6240.65 | ✅ |
|
||||||
|
| c2_i262144_o1024 | vllm | 2 | 262144 | 1024 | 0.19 | 43.14 | 8722.76 | 9009.70 | 20.17 | 52.24 | 57.91 | 13826.13 | ⚠️ |
|
||||||
|
| c2_i262144_o1024 | dspark | 2 | 262144 | 1024 | 0.25 | 55.65 | 10466.90 | 10984.16 | 14.36 | 43.30 | 48.52 | 15361.85 | ⚠️ |
|
||||||
|
| c2_i262144_o256 | sglang | 2 | 262144 | 256 | 0.29 | 28.44 | 9538.91 | 9980.78 | 14.10 | 26.98 | 29.16 | 11941.34 | ⚠️ |
|
||||||
|
| c2_i262144_o256 | vllm | 2 | 262144 | 256 | 0.23 | 22.74 | 8625.18 | 8952.31 | 10.18 | 23.01 | 25.44 | 10378.60 | ⚠️ |
|
||||||
|
| c2_i262144_o256 | dspark | 2 | 262144 | 256 | 0.26 | 25.25 | 10459.44 | 10978.82 | 17.58 | 45.28 | 48.94 | 14620.43 | ⚠️ |
|
||||||
|
| c2_i262144_o4096 | sglang | 2 | 262144 | 4096 | 0.08 | 189.78 | 9453.57 | 9896.38 | 7.82 | 8.48 | 8.60 | 38723.14 | ⚠️ |
|
||||||
|
| c2_i262144_o4096 | vllm | 2 | 262144 | 4096 | 0.08 | 180.76 | 8759.63 | 9062.80 | 8.63 | 11.53 | 12.01 | 35881.75 | ⚠️ |
|
||||||
|
| c2_i262144_o4096 | dspark | 2 | 262144 | 4096 | 0.17 | 384.42 | 8709.00 | 8987.60 | 3.23 | 6.44 | 6.99 | 15113.78 | ⚠️ |
|
||||||
|
| c5_i131072_o1024 | sglang | 5 | 131072 | 1024 | 0.87 | 321.54 | 1231.23 | 1298.36 | 9.03 | 10.47 | 10.71 | 7298.25 | ✅ |
|
||||||
|
| c5_i131072_o1024 | vllm | 5 | 131072 | 1024 | 0.90 | 331.65 | 856.18 | 917.80 | 8.93 | 10.48 | 10.62 | 6989.27 | ✅ |
|
||||||
|
| c5_i131072_o1024 | dspark | 5 | 131072 | 1024 | 2.75 | 1019.06 | 1080.05 | 1176.83 | 2.53 | 3.98 | 4.18 | 2383.07 | ✅ |
|
||||||
|
| c5_i131072_o256 | sglang | 5 | 131072 | 256 | 1.05 | 146.97 | 3270.23 | 4685.65 | 19.91 | 40.81 | 46.10 | 7815.89 | ⚠️ |
|
||||||
|
| c5_i131072_o256 | vllm | 5 | 131072 | 256 | 0.39 | 54.07 | 9384.23 | 9677.91 | 51.54 | 107.16 | 117.25 | 19860.69 | ❌ |
|
||||||
|
| c5_i131072_o256 | dspark | 5 | 131072 | 256 | 0.44 | 60.98 | 10128.32 | 10501.28 | 37.60 | 60.86 | 61.78 | 17256.59 | ⚠️ |
|
||||||
|
| c5_i131072_o4096 | sglang | 5 | 131072 | 4096 | 0.20 | 378.76 | 4667.56 | 6275.51 | 11.98 | 22.07 | 23.60 | 31176.81 | ⚠️ |
|
||||||
|
| c5_i131072_o4096 | vllm | 5 | 131072 | 4096 | 0.23 | 447.85 | 1054.01 | 1104.66 | 8.48 | 9.13 | 9.14 | 28818.20 | ✅ |
|
||||||
|
| c5_i131072_o4096 | dspark | 5 | 131072 | 4096 | 0.70 | 1335.09 | 1156.91 | 1249.38 | 3.20 | 4.19 | 4.21 | 11315.66 | ✅ |
|
||||||
|
| c5_i262144_o1024 | sglang | 5 | 262144 | 1024 | 0.15 | 56.42 | 20522.02 | 25944.29 | 54.11 | 118.98 | 124.02 | 53444.22 | ❌ |
|
||||||
|
| c5_i262144_o1024 | vllm | 5 | 262144 | 1024 | 0.16 | 60.32 | 22564.89 | 26639.92 | 47.49 | 100.69 | 109.86 | 53790.59 | ⚠️ |
|
||||||
|
| c5_i262144_o1024 | dspark | 5 | 262144 | 1024 | 0.19 | 69.32 | 22995.12 | 26781.97 | 38.56 | 57.19 | 57.43 | 40847.11 | ⚠️ |
|
||||||
|
| c5_i262144_o256 | sglang | 5 | 262144 | 256 | 0.16 | 21.94 | 25875.40 | 30596.95 | 97.05 | 231.75 | 252.98 | 43756.53 | ❌ |
|
||||||
|
| c5_i262144_o256 | vllm | 5 | 262144 | 256 | 0.19 | 25.85 | 21986.99 | 26381.86 | 123.42 | 202.78 | 215.56 | 45761.90 | ❌ |
|
||||||
|
| c5_i262144_o256 | dspark | 5 | 262144 | 256 | 0.19 | 26.70 | 29425.38 | 30576.66 | 41.74 | 60.42 | 62.17 | 37097.84 | ⚠️ |
|
||||||
|
| c5_i262144_o4096 | sglang | 5 | 262144 | 4096 | 0.11 | 209.50 | 16539.50 | 20323.40 | 25.05 | 56.69 | 60.22 | 60383.57 | ⚠️ |
|
||||||
|
| c5_i262144_o4096 | vllm | 5 | 262144 | 4096 | 0.11 | 205.12 | 22171.78 | 26533.69 | 25.69 | 63.32 | 68.33 | 64086.27 | ⚠️ |
|
||||||
|
| c5_i262144_o4096 | dspark | 5 | 262144 | 4096 | 0.16 | 299.79 | 22250.95 | 26667.05 | 17.46 | 45.41 | 49.74 | 51820.15 | ⚠️ |
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
|
||||||
|
- SLO check uses TTFT P95 and TPOT mean.
|
||||||
|
- A ⚠️ indicates one of the two metrics is out of target; ❌ indicates both are out.
|
||||||
@ -0,0 +1,35 @@
|
|||||||
|
# 8x NVIDIA H200 143GB VLLM Benchmark Report
|
||||||
|
|
||||||
|
- Result root: `/data/user1/yy/experiments/dsv4_h200_long_context_matrix/results/20260709-020227/dspark`
|
||||||
|
- Model: `/data/models/DeepSeek-V4-Flash-DSpark`
|
||||||
|
- Backend: VLLM
|
||||||
|
- Benchmark client: `sglang.bench_serving --backend vllm`
|
||||||
|
|
||||||
|
## Results
|
||||||
|
|
||||||
|
| Scenario | Phase | Concurrency | Input | Output | Duration(s) | Success | Req/s | In tok/s | Out tok/s | Total tok/s | Mean TTFT(ms) | P95 TTFT(ms) | P99 TTFT(ms) | Mean TPOT(ms) | P95 TPOT(ms) | P99 TPOT(ms) | Mean E2E(ms) | P95 E2E(ms) | P99 E2E(ms) | SLO |
|
||||||
|
|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|
|
||||||
|
| c10_i131072_o1024 | dspark | 10 | 131072 | 1024 | 30.45 | 20 | 0.66 | 48423.00 | 310.66 | 48733.65 | 4033.86 | 11615.81 | 11676.24 | 24.58 | 46.24 | 46.56 | 14685.68 | 28877.70 | 29271.39 | ⚠️ |
|
||||||
|
| c10_i131072_o256 | dspark | 10 | 131072 | 256 | 49.62 | 20 | 0.40 | 29712.25 | 51.33 | 29763.58 | 16856.00 | 24693.20 | 27039.11 | 59.88 | 78.22 | 316.95 | 22010.51 | 32508.36 | 36603.69 | ❌ |
|
||||||
|
| c10_i131072_o4096 | dspark | 10 | 131072 | 4096 | 19.08 | 20 | 1.05 | 77265.07 | 1998.23 | 79263.30 | 727.34 | 1543.09 | 1546.01 | 3.34 | 4.81 | 4.84 | 7316.24 | 12401.94 | 14731.59 | ✅ |
|
||||||
|
| c2_i131072_o1024 | dspark | 2 | 131072 | 1024 | 1.75 | 4 | 2.29 | 138490.59 | 514.96 | 139005.55 | 447.72 | 679.81 | 691.56 | 1.10 | 1.60 | 1.63 | 794.56 | 1362.81 | 1450.74 | ✅ |
|
||||||
|
| c2_i131072_o256 | dspark | 2 | 131072 | 256 | 1.29 | 4 | 3.10 | 187564.60 | 301.11 | 187865.71 | 419.01 | 617.17 | 634.08 | 1.00 | 1.41 | 1.42 | 536.04 | 747.52 | 780.85 | ✅ |
|
||||||
|
| c2_i131072_o4096 | dspark | 2 | 131072 | 4096 | 8.44 | 4 | 0.47 | 28698.90 | 1076.96 | 29775.86 | 325.51 | 540.43 | 541.94 | 1.76 | 2.03 | 2.08 | 4193.26 | 6216.99 | 6313.36 | ✅ |
|
||||||
|
| c5_i131072_o1024 | dspark | 5 | 131072 | 1024 | 3.63 | 10 | 2.75 | 203409.39 | 1019.06 | 204428.44 | 595.29 | 1080.05 | 1176.83 | 2.53 | 3.98 | 4.18 | 1507.07 | 2347.99 | 2383.07 | ✅ |
|
||||||
|
| c5_i131072_o256 | dspark | 5 | 131072 | 256 | 22.89 | 10 | 0.44 | 32258.45 | 60.98 | 32319.42 | 5806.57 | 10128.32 | 10501.28 | 37.60 | 60.86 | 61.78 | 11223.11 | 16310.02 | 17256.59 | ⚠️ |
|
||||||
|
| c5_i131072_o4096 | dspark | 5 | 131072 | 4096 | 14.28 | 10 | 0.70 | 51732.19 | 1335.09 | 53067.28 | 560.62 | 1156.91 | 1249.38 | 3.20 | 4.19 | 4.21 | 6029.71 | 10552.87 | 11315.66 | ✅ |
|
||||||
|
| c10_i262144_o1024 | dspark | 10 | 262144 | 1024 | 97.73 | 20 | 0.20 | 28498.71 | 96.79 | 28595.50 | 24591.83 | 39321.30 | 40783.01 | 48.19 | 67.60 | 68.13 | 45387.50 | 70254.49 | 91123.07 | ⚠️ |
|
||||||
|
| c10_i262144_o256 | dspark | 10 | 262144 | 256 | 110.17 | 20 | 0.18 | 25281.12 | 23.12 | 25304.24 | 42248.63 | 64654.53 | 67877.62 | 52.05 | 73.84 | 151.28 | 48223.85 | 78728.49 | 80196.26 | ❌ |
|
||||||
|
| c10_i262144_o4096 | dspark | 10 | 262144 | 4096 | 108.97 | 20 | 0.18 | 25559.57 | 349.94 | 25909.50 | 13472.46 | 33426.83 | 37512.71 | 20.67 | 35.94 | 44.44 | 52210.57 | 100105.13 | 103440.52 | ⚠️ |
|
||||||
|
| c2_i262144_o1024 | dspark | 2 | 262144 | 1024 | 16.19 | 4 | 0.25 | 31154.91 | 55.65 | 31210.55 | 5853.53 | 10466.90 | 10984.16 | 14.36 | 43.30 | 48.52 | 7871.57 | 14740.72 | 15361.85 | ⚠️ |
|
||||||
|
| c2_i262144_o256 | dspark | 2 | 262144 | 256 | 15.41 | 4 | 0.26 | 32738.24 | 25.25 | 32763.49 | 5850.43 | 10459.44 | 10978.82 | 17.58 | 45.28 | 48.94 | 7672.82 | 14088.43 | 14620.43 | ⚠️ |
|
||||||
|
| c2_i262144_o4096 | dspark | 2 | 262144 | 4096 | 23.65 | 4 | 0.17 | 21326.49 | 384.42 | 21710.90 | 5487.63 | 8709.00 | 8987.60 | 3.23 | 6.44 | 6.99 | 11596.58 | 14994.53 | 15113.78 | ⚠️ |
|
||||||
|
| c5_i262144_o1024 | dspark | 5 | 262144 | 1024 | 53.37 | 10 | 0.19 | 26116.34 | 69.32 | 26185.66 | 13406.14 | 22995.12 | 26781.97 | 38.56 | 57.19 | 57.43 | 25295.54 | 38376.69 | 40847.11 | ⚠️ |
|
||||||
|
| c5_i262144_o256 | dspark | 5 | 262144 | 256 | 52.29 | 10 | 0.19 | 26655.70 | 26.70 | 26682.40 | 17996.01 | 29425.38 | 30576.66 | 41.74 | 60.42 | 62.17 | 23507.98 | 35234.36 | 37097.84 | ⚠️ |
|
||||||
|
| c5_i262144_o4096 | dspark | 5 | 262144 | 4096 | 63.58 | 10 | 0.16 | 21924.13 | 299.79 | 22223.92 | 10590.48 | 22250.95 | 26667.05 | 17.46 | 45.41 | 49.74 | 30807.30 | 48506.31 | 51820.15 | ⚠️ |
|
||||||
|
| c25_i65536_o1024 | dspark | 25 | 65536 | 1024 | 62.71 | 50 | 0.80 | 29366.67 | 412.74 | 29779.41 | 11692.07 | 26078.12 | 29135.60 | 42.82 | 56.19 | 133.89 | 29981.59 | 57554.65 | 60995.55 | ⚠️ |
|
||||||
|
| c25_i65536_o256 | dspark | 25 | 65536 | 256 | 59.86 | 50 | 0.84 | 30764.36 | 98.79 | 30863.14 | 19438.04 | 27635.11 | 29212.48 | 51.68 | 65.52 | 134.94 | 24957.48 | 37092.86 | 39437.04 | ❌ |
|
||||||
|
| c25_i65536_o4096 | dspark | 25 | 65536 | 4096 | 82.31 | 50 | 0.61 | 22371.88 | 1409.20 | 23781.09 | 8084.05 | 25048.60 | 29143.30 | 14.72 | 30.57 | 42.07 | 38164.69 | 72245.56 | 73496.43 | ⚠️ |
|
||||||
|
|
||||||
|
SLO: S2 tier — TTFT P95 < 3000ms, TPOT mean < 50ms. ✅ pass, ⚠️ partial, ❌ fail.
|
||||||
|
|
||||||
File diff suppressed because it is too large
Load Diff
@ -14,6 +14,13 @@ source "${SCRIPT_DIR}/config.env"
|
|||||||
|
|
||||||
RUN_ID="${RUN_ID:-$(date '+%Y%m%d-%H%M%S')}"
|
RUN_ID="${RUN_ID:-$(date '+%Y%m%d-%H%M%S')}"
|
||||||
RESULT_BASE="${SCRIPT_DIR}/results"
|
RESULT_BASE="${SCRIPT_DIR}/results"
|
||||||
|
# Comma-separated list of backends to run. Default: sglang,vllm,dspark.
|
||||||
|
BACKENDS="${BACKENDS:-sglang,vllm,dspark}"
|
||||||
|
|
||||||
|
backend_enabled() {
|
||||||
|
local backend="$1"
|
||||||
|
[[ ",${BACKENDS}," == *",${backend},"* ]]
|
||||||
|
}
|
||||||
|
|
||||||
log_dir_global="${RESULT_BASE}/${RUN_ID}/logs"
|
log_dir_global="${RESULT_BASE}/${RUN_ID}/logs"
|
||||||
mkdir -p "$log_dir_global"
|
mkdir -p "$log_dir_global"
|
||||||
@ -52,6 +59,8 @@ stop_server() {
|
|||||||
# Fallback cleanup.
|
# Fallback cleanup.
|
||||||
if [[ "$backend" == "sglang" ]]; then
|
if [[ "$backend" == "sglang" ]]; then
|
||||||
pkill -9 -f "sglang serve.*DeepSeek-V4-Flash" 2>/dev/null || true
|
pkill -9 -f "sglang serve.*DeepSeek-V4-Flash" 2>/dev/null || true
|
||||||
|
elif [[ "$backend" == "dspark" ]]; then
|
||||||
|
pkill -9 -f "vllm serve.*DeepSeek-V4-Flash-DSpark" 2>/dev/null || true
|
||||||
else
|
else
|
||||||
pkill -9 -f "vllm serve.*DeepSeek-V4-Flash" 2>/dev/null || true
|
pkill -9 -f "vllm serve.*DeepSeek-V4-Flash" 2>/dev/null || true
|
||||||
fi
|
fi
|
||||||
@ -62,13 +71,16 @@ start_server() {
|
|||||||
local backend="$1"
|
local backend="$1"
|
||||||
local max_model_len="$2"
|
local max_model_len="$2"
|
||||||
local max_slots="$3"
|
local max_slots="$3"
|
||||||
local start_script
|
local start_script port
|
||||||
if [[ "$backend" == "sglang" ]]; then
|
if [[ "$backend" == "sglang" ]]; then
|
||||||
start_script="${SGLANG_START_SCRIPT}"
|
start_script="${SGLANG_START_SCRIPT}"
|
||||||
local port="$SGLANG_PORT"
|
port="$SGLANG_PORT"
|
||||||
|
elif [[ "$backend" == "dspark" ]]; then
|
||||||
|
start_script="${DSPARK_START_SCRIPT}"
|
||||||
|
port="$DSPARK_PORT"
|
||||||
else
|
else
|
||||||
start_script="${VLLM_START_SCRIPT}"
|
start_script="${VLLM_START_SCRIPT}"
|
||||||
local port="$VLLM_PORT"
|
port="$VLLM_PORT"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
log "starting ${backend} server (max_model_len=${max_model_len}, slots=${max_slots}) with ${start_script}"
|
log "starting ${backend} server (max_model_len=${max_model_len}, slots=${max_slots}) with ${start_script}"
|
||||||
@ -88,13 +100,15 @@ run_warmup() {
|
|||||||
local port
|
local port
|
||||||
if [[ "$backend" == "sglang" ]]; then
|
if [[ "$backend" == "sglang" ]]; then
|
||||||
port="$SGLANG_PORT"
|
port="$SGLANG_PORT"
|
||||||
|
elif [[ "$backend" == "dspark" ]]; then
|
||||||
|
port="$DSPARK_PORT"
|
||||||
else
|
else
|
||||||
port="$VLLM_PORT"
|
port="$VLLM_PORT"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
log "warming up ${backend} (input=${input_len}, output=${output_len}, num=1)"
|
log "warming up ${backend} (input=${input_len}, output=${output_len}, num=1)"
|
||||||
"${VENV_CLIENT}/bin/python" "${SCRIPT_DIR}/../../scripts/common/warmup.py" \
|
"${VENV_CLIENT}/bin/python" "${SCRIPT_DIR}/../../scripts/common/warmup.py" \
|
||||||
--backend "$backend" \
|
--backend vllm \
|
||||||
--port "$port" \
|
--port "$port" \
|
||||||
--input-len "$input_len" \
|
--input-len "$input_len" \
|
||||||
--output-len "$output_len" \
|
--output-len "$output_len" \
|
||||||
@ -142,6 +156,8 @@ run_group() {
|
|||||||
local port
|
local port
|
||||||
if [[ "$backend" == "sglang" ]]; then
|
if [[ "$backend" == "sglang" ]]; then
|
||||||
port="$SGLANG_PORT"
|
port="$SGLANG_PORT"
|
||||||
|
elif [[ "$backend" == "dspark" ]]; then
|
||||||
|
port="$DSPARK_PORT"
|
||||||
else
|
else
|
||||||
port="$VLLM_PORT"
|
port="$VLLM_PORT"
|
||||||
fi
|
fi
|
||||||
@ -161,9 +177,22 @@ run_group() {
|
|||||||
warmup_input_len="$(echo "$warmup_input" | awk '{print $2}')"
|
warmup_input_len="$(echo "$warmup_input" | awk '{print $2}')"
|
||||||
run_warmup "$backend" "$warmup_input_len" 256
|
run_warmup "$backend" "$warmup_input_len" 256
|
||||||
|
|
||||||
|
# Bench client backend: DSpark is served by vLLM API, so use vllm client.
|
||||||
|
local client_backend="$backend"
|
||||||
|
if [[ "$backend" == "dspark" ]]; then
|
||||||
|
client_backend="vllm"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Output filename prefix: DSpark raw files must start with "vllm_" so that
|
||||||
|
# scripts/common/parse_backend.py (which only knows sglang/vllm) can parse them.
|
||||||
|
local file_prefix="${backend}"
|
||||||
|
if [[ "$backend" == "dspark" ]]; then
|
||||||
|
file_prefix="vllm_dspark"
|
||||||
|
fi
|
||||||
|
|
||||||
for scenario in "${scenarios_ref[@]}"; do
|
for scenario in "${scenarios_ref[@]}"; do
|
||||||
read -r concurrency input_len output_len num_prompts <<< "$scenario"
|
read -r concurrency input_len output_len num_prompts <<< "$scenario"
|
||||||
output_file="${raw_dir}/${backend}_${group_label}_$(date '+%m%d')_${concurrency}_${input_len}_${output_len}.jsonl"
|
output_file="${raw_dir}/${file_prefix}_${group_label}_$(date '+%m%d')_${concurrency}_${input_len}_${output_len}.jsonl"
|
||||||
detail_log="${phase_log_dir}/${backend}_${group_label}_c${concurrency}_i${input_len}_o${output_len}.log"
|
detail_log="${phase_log_dir}/${backend}_${group_label}_c${concurrency}_i${input_len}_o${output_len}.log"
|
||||||
|
|
||||||
if scenario_already_completed "$output_file" "$num_prompts"; then
|
if scenario_already_completed "$output_file" "$num_prompts"; then
|
||||||
@ -174,7 +203,7 @@ run_group() {
|
|||||||
log "running ${backend} ${group_label} scenario: c=${concurrency} i=${input_len} o=${output_len} n=${num_prompts}"
|
log "running ${backend} ${group_label} scenario: c=${concurrency} i=${input_len} o=${output_len} n=${num_prompts}"
|
||||||
|
|
||||||
"${VENV_CLIENT}/bin/python" -m sglang.bench_serving \
|
"${VENV_CLIENT}/bin/python" -m sglang.bench_serving \
|
||||||
--backend "$backend" \
|
--backend "$client_backend" \
|
||||||
--host 127.0.0.1 \
|
--host 127.0.0.1 \
|
||||||
--port "$port" \
|
--port "$port" \
|
||||||
--dataset-name random \
|
--dataset-name random \
|
||||||
@ -200,8 +229,13 @@ run_group() {
|
|||||||
parse_backend() {
|
parse_backend() {
|
||||||
local backend="$1"
|
local backend="$1"
|
||||||
local result_root="${RESULT_BASE}/${RUN_ID}/${backend}"
|
local result_root="${RESULT_BASE}/${RUN_ID}/${backend}"
|
||||||
log "parsing ${backend} results in ${result_root}"
|
# parse_backend.py only knows sglang/vllm; DSpark raw files use vllm client format.
|
||||||
"${VENV_CLIENT}/bin/python" "${SCRIPT_DIR}/../../scripts/common/parse_backend.py" "$result_root" --backend "$backend" \
|
local parser_backend="$backend"
|
||||||
|
if [[ "$backend" == "dspark" ]]; then
|
||||||
|
parser_backend="vllm"
|
||||||
|
fi
|
||||||
|
log "parsing ${backend} results in ${result_root} (parser_backend=${parser_backend})"
|
||||||
|
"${VENV_CLIENT}/bin/python" "${SCRIPT_DIR}/../../scripts/common/parse_backend.py" "$result_root" --backend "$parser_backend" \
|
||||||
>> "${result_root}/logs/parse.log" 2>&1 || {
|
>> "${result_root}/logs/parse.log" 2>&1 || {
|
||||||
log "WARNING: parser failed for ${backend}; see ${result_root}/logs/parse.log"
|
log "WARNING: parser failed for ${backend}; see ${result_root}/logs/parse.log"
|
||||||
}
|
}
|
||||||
@ -213,20 +247,28 @@ write_backend_metadata() {
|
|||||||
ensure_result_root "$result_root"
|
ensure_result_root "$result_root"
|
||||||
local meta_json="${result_root}/results.json"
|
local meta_json="${result_root}/results.json"
|
||||||
|
|
||||||
local env_path
|
local env_path model_path engine_name
|
||||||
if [[ "$backend" == "sglang" ]]; then
|
if [[ "$backend" == "sglang" ]]; then
|
||||||
env_path="$VENV_SGLANG"
|
env_path="$VENV_SGLANG"
|
||||||
|
model_path="$MODEL_PATH"
|
||||||
|
engine_name="sglang"
|
||||||
|
elif [[ "$backend" == "dspark" ]]; then
|
||||||
|
env_path="$VENV_VLLM_DSPARK"
|
||||||
|
model_path="$DSPARK_MODEL_PATH"
|
||||||
|
engine_name="vllm-dspark"
|
||||||
else
|
else
|
||||||
env_path="$VENV_VLLM"
|
env_path="$VENV_VLLM"
|
||||||
|
model_path="$MODEL_PATH"
|
||||||
|
engine_name="vllm"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
write_metadata_json \
|
write_metadata_json \
|
||||||
"$meta_json" \
|
"$meta_json" \
|
||||||
"${EXPERIMENT_NAME}_${backend}" \
|
"${EXPERIMENT_NAME}_${backend}" \
|
||||||
"$RUN_ID" \
|
"$RUN_ID" \
|
||||||
"$MODEL_PATH" \
|
"$model_path" \
|
||||||
"$backend" \
|
"${backend}" \
|
||||||
"$backend" \
|
"$engine_name" \
|
||||||
"$HARDWARE" \
|
"$HARDWARE" \
|
||||||
"$ACCELERATOR" \
|
"$ACCELERATOR" \
|
||||||
"$CHIP" \
|
"$CHIP" \
|
||||||
@ -254,11 +296,13 @@ write_backend_metadata() {
|
|||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
|
|
||||||
# Cleanup any leftovers.
|
# Cleanup any leftovers.
|
||||||
stop_server sglang
|
for backend in sglang vllm dspark; do
|
||||||
stop_server vllm
|
backend_enabled "$backend" && stop_server "$backend"
|
||||||
|
done
|
||||||
|
|
||||||
write_backend_metadata sglang
|
for backend in sglang vllm dspark; do
|
||||||
write_backend_metadata vllm
|
backend_enabled "$backend" && write_backend_metadata "$backend"
|
||||||
|
done
|
||||||
|
|
||||||
for group in "${CONTEXT_GROUPS[@]}"; do
|
for group in "${CONTEXT_GROUPS[@]}"; do
|
||||||
read -r group_label max_model_len max_slots <<< "$group"
|
read -r group_label max_model_len max_slots <<< "$group"
|
||||||
@ -270,24 +314,28 @@ for group in "${CONTEXT_GROUPS[@]}"; do
|
|||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Run SGLang for this group.
|
for backend in sglang vllm dspark; do
|
||||||
run_group sglang "$group_label" "$max_model_len" "$max_slots" "$scenario_array_name"
|
backend_enabled "$backend" && run_group "$backend" "$group_label" "$max_model_len" "$max_slots" "$scenario_array_name"
|
||||||
|
done
|
||||||
# Run vLLM for this group.
|
|
||||||
run_group vllm "$group_label" "$max_model_len" "$max_slots" "$scenario_array_name"
|
|
||||||
done
|
done
|
||||||
|
|
||||||
# Parse and compare.
|
# Parse and compare.
|
||||||
parse_backend sglang
|
for backend in sglang vllm dspark; do
|
||||||
parse_backend vllm
|
backend_enabled "$backend" && parse_backend "$backend"
|
||||||
|
done
|
||||||
|
|
||||||
log "generating comparison report"
|
if backend_enabled sglang && backend_enabled vllm && backend_enabled dspark; then
|
||||||
"${VENV_CLIENT}/bin/python" "${SCRIPT_DIR}/../../scripts/common/compare.py" \
|
log "generating three-way comparison report"
|
||||||
--sglang "${RESULT_BASE}/${RUN_ID}/sglang" \
|
"${VENV_CLIENT}/bin/python" "${SCRIPT_DIR}/compare.py" \
|
||||||
--vllm "${RESULT_BASE}/${RUN_ID}/vllm" \
|
--sglang "${RESULT_BASE}/${RUN_ID}/sglang" \
|
||||||
--output "${RESULT_BASE}/${RUN_ID}/comparison.md" \
|
--vllm "${RESULT_BASE}/${RUN_ID}/vllm" \
|
||||||
>> "${log_dir_global}/compare.log" 2>&1 || {
|
--dspark "${RESULT_BASE}/${RUN_ID}/dspark" \
|
||||||
log "WARNING: comparison script failed; see ${log_dir_global}/compare.log"
|
--output "${RESULT_BASE}/${RUN_ID}/comparison.md" \
|
||||||
}
|
>> "${log_dir_global}/compare.log" 2>&1 || {
|
||||||
|
log "WARNING: comparison script failed; see ${log_dir_global}/compare.log"
|
||||||
|
}
|
||||||
|
else
|
||||||
|
log "skipping three-way comparison (not all backends enabled: BACKENDS=${BACKENDS})"
|
||||||
|
fi
|
||||||
|
|
||||||
log "all results saved to ${RESULT_BASE}/${RUN_ID}"
|
log "all results saved to ${RESULT_BASE}/${RUN_ID}"
|
||||||
|
|||||||
72
experiments/dsv4_h200_long_context_matrix/start_dspark.sh
Executable file
72
experiments/dsv4_h200_long_context_matrix/start_dspark.sh
Executable file
@ -0,0 +1,72 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Start vLLM with DSpark speculative decoding for the long-context matrix.
|
||||||
|
# Usage: start_dspark.sh <max_model_len> <max_num_seqs>
|
||||||
|
set -e
|
||||||
|
|
||||||
|
MAX_MODEL_LEN="${1:-80000}"
|
||||||
|
MAX_NUM_SEQS="${2:-64}"
|
||||||
|
|
||||||
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
# shellcheck source=/dev/null
|
||||||
|
source "${SCRIPT_DIR}/config.env"
|
||||||
|
|
||||||
|
cd /data/user1/yy
|
||||||
|
mkdir -p logs tmp
|
||||||
|
|
||||||
|
VENV="${VENV_VLLM_DSPARK}"
|
||||||
|
export PATH="$VENV/bin:$PATH"
|
||||||
|
export PYTHONUNBUFFERED=1
|
||||||
|
export TMPDIR=/data/user1/yy/tmp
|
||||||
|
export CUDA_VISIBLE_DEVICES="${CUDA_VISIBLE_DEVICES}"
|
||||||
|
|
||||||
|
LOG="/data/user1/yy/logs/dsv4_h200_long_context_matrix_dspark_${MAX_MODEL_LEN}_$(date +%Y%m%d_%H%M%S).log"
|
||||||
|
PID_FILE="/data/user1/yy/dsv4_h200_long_context_matrix_dspark.pid"
|
||||||
|
|
||||||
|
rm -f "$PID_FILE"
|
||||||
|
|
||||||
|
echo "=== Starting DeepSeek-V4-Flash-DSpark server (TP=$TP, max_model_len=$MAX_MODEL_LEN, max_num_seqs=$MAX_NUM_SEQS) ==="
|
||||||
|
echo "Model: $DSPARK_MODEL_PATH"
|
||||||
|
echo "Port: $DSPARK_PORT"
|
||||||
|
echo "Log: $LOG"
|
||||||
|
|
||||||
|
nohup vllm serve "$DSPARK_MODEL_PATH" \
|
||||||
|
--trust-remote-code \
|
||||||
|
--tensor-parallel-size "$TP" \
|
||||||
|
--kv-cache-dtype fp8 \
|
||||||
|
--max-model-len "$MAX_MODEL_LEN" \
|
||||||
|
--max-num-seqs "$MAX_NUM_SEQS" \
|
||||||
|
--block-size 256 \
|
||||||
|
--gpu-memory-utilization 0.90 \
|
||||||
|
--tokenizer-mode deepseek_v4 \
|
||||||
|
--reasoning-parser deepseek_v4 \
|
||||||
|
--spec-method dspark \
|
||||||
|
--spec-model "$DSPARK_MODEL_PATH" \
|
||||||
|
--spec-tokens 5 \
|
||||||
|
--no-disable-hybrid-kv-cache-manager \
|
||||||
|
--disable-uvicorn-access-log \
|
||||||
|
--port "$DSPARK_PORT" \
|
||||||
|
> "$LOG" 2>&1 &
|
||||||
|
|
||||||
|
PID=$!
|
||||||
|
echo $PID > "$PID_FILE"
|
||||||
|
echo "PID: $PID"
|
||||||
|
echo "Waiting for health..."
|
||||||
|
|
||||||
|
for i in $(seq 1 240); do
|
||||||
|
if curl --fail --silent --show-error --max-time 5 "http://127.0.0.1:${DSPARK_PORT}/health" >/dev/null 2>&1; then
|
||||||
|
echo "DSpark server is ready at http://127.0.0.1:${DSPARK_PORT}"
|
||||||
|
echo "Log: $LOG"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
if ! kill -0 $PID 2>/dev/null; then
|
||||||
|
echo "ERROR: DSpark server exited early"
|
||||||
|
tail -200 "$LOG"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "Waiting... ($i/240)"
|
||||||
|
sleep 5
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "ERROR: DSpark server not healthy after 240 retries"
|
||||||
|
tail -200 "$LOG"
|
||||||
|
exit 1
|
||||||
Loading…
x
Reference in New Issue
Block a user