Enable validated prefix caching and record DGX Spark optimization benchmarks

This commit is contained in:
2026-09-17 22:09:58 +08:00
parent 5f3030260e
commit 1e2f48d1a4
28 changed files with 707 additions and 8 deletions
+23
View File
@@ -0,0 +1,23 @@
# CUDA Graph 实验:保留证据,未采用为默认
当前 nightly 的 Qwen4Exp 使用 runtime breakable CUDA Graph。原始分割参数不能将 CPU 查表排除,
随后只排除查表又暴露了 capture-time 哈希缓冲区尚未填充的问题。
此目录的适配将原始哈希计算和 mmap 查表合并为一个 eager-break custom op,输出原地写入。
该实现通过小型 GPU 捕获/重放测试,以及完整模型启动、短问答和大部分长输入测试。
单流中位数 31.799 tokens/s,对比 eager 30.502,约 +4.3%。
32K 重复请求用尽了最初设置的 256 输出 token(全部为 reasoning),未产生最终答案,
导致该轮完整验收未通过并自动恢复 eager。不能据此断言模型算错或图执行有错误;
图候选没有在提高输出预算后重跑。因此保留它作为实验,不宣传为已通过的优化。
原始结果:../../docs/results/graph2.jsonl。方法与限制:../../docs/benchmark-method.md。
保持与主部署隔离,默认启动脚本不会启用此目录。
复现实验需先有原始稳定镜像 local/qwen38-flash-spark:nightly-0bfc7a15
docker build -t local/qwen38-flash-spark:graph2-0bfc7a15 experiments/graph
docker run --rm -i --gpus all -e VLLM_USE_BREAKABLE_CUDAGRAPH=1 \
--entrypoint python3 local/qwen38-flash-spark:graph2-0bfc7a15 -u - < experiments/graph/test_disk_adapter.py
运行完整服务时将本目录 compose.yaml 作为根 compose.yaml 的 override;这会替换现有服务,
不适合与其并行运行。实验前先保留原始配置,完成后恢复默认部署。