Daily Tech Briefing
AI 科技速览

每天 5 分钟内学习 AI。获取最新的人工智能新闻,理解其重要性,并学习如何将其应用于您的工作。

AI 快讯
MarkTechPost · 2026/7/21 16:29:36

Validating Distributed LLM Serving Benchmarks with NVIDIA srt-slurm, SLURM Recipes, Parameter Sweeps, and Pareto Analysis

AI 中文解读
NVIDIA 发布了一款名为 srt-slurm 的开源工具,专门用来测试大型语言模型(如 DeepSeek-R1)在多个 GPU 上的服务性能。简单来说,过去这类性能测试非常繁琐,需要手动配置很多参数,很容易出错。现在,你只需要写一个简单的配置文件,srt-slurm 就能自动生成标准化的测试流程,并且能在 Google Colab 这样的在线环境中先模拟跑一遍,验证无误后再提交到真正的 GPU 集群上执行。这就像做菜前先用小锅试味,确保配方万无一失再上大锅。对于普通用户和开发者来说,这项技术让大模型服务的部署和优化门槛大大降低。企业可以更快、更省心地测试AI服务的吞吐量和响应速度,从而提供更稳定、更流畅的AI产品,比如更智能的客服、更流畅的AI绘图等。最终,用户能享受到成本更低、响应更快的 AI 应用体验。
In this tutorial, we explore NVIDIA’s srt-slurm framework and learn how we use srtctl to convert declarative YAML configurations into reproducible SLURM benchmark workflows for distributed LLM serving. We set up the project in Google Colab, inspect its internal architecture, define a cluster configuration, dry-run built-in and custom recipes, and model a disaggregated prefill-and-decode deployment for DeepSeek-R1. We also generate parameter sweeps, interact with the typed Python API, validate expanded configurations, and analyze simulated benchmark results through a throughput-versus-latency Pareto frontier. Although Colab does not provide a real SLURM environment, we use it as a practical development workspace to understand, validate, and prepare production-grade benchmark recipes before we submit them to an actual GPU cluster. Copy CodeCopiedUse a different Browserimport os, sys, subprocess, textwrap, json, shutil, importlib from pathlib import Path def run(cmd, check=True, quiet=False): """Run a shell command, stream output.""" print(f"\n$ {cmd}") r = subprocess.run(cmd, shell=True, text=True, capture_output=True) out = (r.stdout or "") + (r.stderr or "") if not quiet: print(out[-6000:]) if check and r.returncode != 0: raise RuntimeError(f"Command failed ({r.returncode}): {cmd}") return out def section(title): print("\n" + "═"*78 + f"\n {title}\n" + "═"*78) section("1. Install srt-slurm") REPO = Path("/content/srt-slurm") if Path("/content").exists() else Path.cwd()/"srt-slurm" if not REPO.exists(): run(f"git clone --depth 1 https://github.com/NVIDIA/srt-slurm.git {REPO}", quiet=True) run(f"{sys.executable} -m pip install -q -e {REPO}", quiet=True) sys.path.insert(0, str(REPO / "src")) importlib.invalidate_caches() os.chdir(REPO) run("srtctl --help") We prepare the Colab environment by importing the required modules and defining reusable helper functions for command execution and section formatting. We clone the NVIDIA srt-slurm repository, install it in editable mode, and expose its source directory to the active Python runtime. We then switch to the repository directory and verify that the srtctl command-line interface is installed correctly. Copy CodeCopiedUse a different Browsersection("2. Repository architecture") print(textwrap.dedent(""" src/srtctl/ cli/ submit.py (apply/dry-run/preflight/monitor), do_sweep, interactive core/ schema.py (typed config), sweep.py, slurm.py (sbatch gen), validation.py, health.py, topology.py, fingerprint.py backends/ sglang.py, trtllm.py, vllm.py, mocker.py ← engine adapters frontends/ Dynamo / router frontends templates/ Jinja2 → sbatch + orchestrator scripts recipes/ ready-made benchmarks per platform (gb200-fp4, h100, b200-fp8, qwen3-32b, dsv4-pro, mocker smoke tests, ...) analysis/ srtlog (log parsers) + Streamlit dashboard (Pareto, latency...) docs/ sweeps.md, profiling.md, analyzing.md, config-reference.md """)) for d in ["recipes", "docs"]: print(f"{d}/ →", ", ".join(sorted(p.name for p in (REPO/d).iterdir()))[:300]) section("3. Cluster configuration (srtslurm.yaml)") (REPO/"srtslurm.yaml").write_text(textwrap.dedent("""\ cluster: "colab-demo" default_account: "demo-account" default_partition: "gpu" default_time_limit: "01:00:00" gpus_per_node: 4 use_gpus_per_node_directive: true use_segment_sbatch_directive: true containers: dynamo-sglang: "/containers/dynamo-sglang.sqsh" lmsysorg+sglang+v0.5.5.post2.sqsh: "/containers/sglang-v0.5.5.sqsh" model_paths: deepseek-r1: "/models/DeepSeek-R1" """)) print((REPO/"srtslurm.yaml").read_text()) We inspect the repository structure to understand how srtctl organizes its command-line tools, schemas, backends, templates, recipes, and analysis components. We then create a local srtslurm.yaml file containing simulated cluster defaults, container
分享
阅读原文