用途:对已部署的 NVIDIA RAG Blueprint 服务做一次性性能基准测试,包含服务端剖析(分阶段耗时、引用质量、瓶颈推断)与可选 aiperf 负载测试(TTFT、端到端、token 与请求吞吐、错误率),并生成统一报告。不负责答案质量评分(用 rag-eval)、服务部署配置(用 rag-blueprint)或生产监控告警。
主要能力:CLI 仅支持 -c/--config、--help、--version,行为完全由 YAML 配置驱动;内置 quick_profile.yaml(仅剖析约 30 秒)、single_run.yaml(单并发,剖析加 aiperf 约 2 分钟)、sweep.yaml(多轴笛卡尔扫描,load.concurrency、rag.vdb_top_k、rag.reranker_top_k 可为 int 或 list[int])。stdout 依次输出启动横幅、摘要、解析后的完整配置、逐点进度与可复制的 aiperf 命令、逐点汇总表及对比表。
使用方式:需 Python 3.11+ 与 uv,在仓库根目录执行 uv sync --project scripts/rag-perf 安装;运行 uv run --project scripts/rag-perf rag-perf -c scripts/rag-perf/configs/single_run.yaml。首次运行前必须把 rag.collection_names 的占位符替换为真实集合。aiperf 阶段需 pip install -e ./scripts/rag-perf 注册 nvidia_rag 端点插件。合成查询需可达的 OpenAI 兼容 chat-completions 端点。
限制:CLI 仅配置驱动,改参数需编辑或复制 YAML;input.file 与 input.synthetic 互斥,文件仅支持 .jsonl/.csv;并发与 top-k 列表值须唯一;warmup_requests 至少为 1;推理模型需 synthetic.disable_thinking: true;aiperf 的请求速率分布、GPU 遥测等需改 runner.py。需从仓库根目录运行,且需网络可达的 RAG 服务(默认 http://localhost:8081)。