Prhub

#2217 test(ci): right-size session model GPU coverage

原始 PR 作者 guapisolo 合并时间 2026-08-07 04:02 文件变更 5 提交数 1 评论 0 代码增减 +14 / -41

执行摘要

调整 session 模型 CI GPU 规格并启用 EAGLE

PR body 明确指出 'Run GLM-4.7, Nemotron-3, and Qwen3 on the 2-GPU H200 lane with per-model TP sizes that match their serving needs. Enable the existing EAGLE preset for the GLM-4.7, Nemotron 3, and Qwen3.5 checkpoints that ship compatible MTP weights, keeping speculative decoding limited to active session models. Remove the disabled Qwen3-Next session verifier because active coverage has moved to Qwen3.5.' 其核心是让 CI 资源分配与模型实际服务需求匹配,避免统一 4-GPU 的浪费,并让投机解码覆盖在具备 MTP 权重的模型上。

值得精读,尤其是学习如何根据模型特性(KV heads、模型大小、服务需求)定制 CI 资源分配,以及如何安全地在测试中启用 EAGLE 投机解码。对于负责 CI 基础设施和 session 测试的开发者有参考价值。

讨论亮点

PR 无 review 评论。作者在 body 中列出三个 Review Focus:关注 Nemotron-3 TP2 与模型两个 KV heads 的匹配、GLM-4.7 TP1 在 2-GPU lane 上的 serving 可行性,以及 Qwen3-Next 删除的覆盖转移合理性。

实现拆解

  1. 套件迁移:修改 test_nemotron3.pytest_glm47.pytest_qwen3.py 中的 register_cuda_ci 调用,将 suitestage-c-4-gpu-h200 改为 stage-c-2-gpu-h200test_qwen35.py 保持 stage-c-4-gpu-h200 不变。
  2. 资源与 TP 配置:为每个模型增加 num_gpus=2,并按需调整 tp_size:Nemotron-3 为 TP2(匹配模型两个 KV heads),GLM-4.7 与 Qwen3 为 TP1(单卡即可服务),Qwen3.5 维持 TP2。
  3. 启用 EAGLE:在 test_glm47.pytest_nemotron3.pytest_qwen35.pyCONFIG 中增加 enable_spec=True,复用现有 EAGLE preset,未引入新 serving flags。
  4. 删除 Qwen3-Next 测试:移除 test_qwennext.py 整个文件(此前处于 disabled 状态),覆盖由 Qwen3.5 承接。
  5. 验证方式:无新增测试文件,lane 注册即覆盖;通过 pytest --collect-only 确认全部 7 个 lane 均可收集。
文件 模块 状态 重要度
tests/e2e/sglang/test_session_server_multi_role/test_qwennext.py 会话测试 removed 6.08
tests/e2e/sglang/test_session_server_multi_role/test_nemotron3.py 会话测试 modified 4.63
tests/e2e/sglang/test_session_server_multi_role/test_glm47.py 会话测试 modified 4.19
tests/e2e/sglang/test_session_server_multi_role/test_qwen3.py 会话测试 modified 4.1
tests/e2e/sglang/test_session_server_multi_role/test_qwen35.py 会话测试 modified 3.46

关键符号

test_qwennext test_nemotron3 test_glm47 test_qwen3 test_qwen35

关键源码片段

tests/e2e/sglang/test_session_server_multi_role/test_nemotron3.py test-coverage

迁移到 2-GPU lane,TP2 匹配 KV heads,启用 EAGLE spec

from tests.ci.ci_register import register_cuda_ci
from tests.e2e.sglang.test_session_server_multi_role._common import ModelConfig, run_both_versions# 注册 CI lane:Nemotron-3 使用 2-GPU H200 套件,替代原 4-GPU 统一分配
register_cuda_ci(est_time=800, suite="stage-c-2-gpu-h200", labels=["sglang"])# Nemotron-3-Super-120B-A12B-FP8 约 120GB,TP2 跨越两块 H200 并匹配模型两个 KV heads
CONFIG = ModelConfig(
    model_name="nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-FP8",
    reasoning_parser="nemotron_3",
    tool_call_parser="qwen3_coder", # 工具调用使用与 Qwen3.5 相同的 XML 包裹
    tito_model="nemotron3",
    num_gpus=2,
    tp_size=2,
    enable_spec=True, # 启用 EAGLE 投机解码,复用已有 preset
    cycles=2,
    assistant_text_threshold=1.0, # nemotron_3 parser 尾部换行导致 roundtrip 漂移,放宽阈值
    tool_call_failure_mode="append_tool",
)
​
​
def test_nemotron3():
    run_both_versions(CONFIG)
​
​
if __name__ == "__main__":
    test_nemotron3()
tests/e2e/sglang/test_session_server_multi_role/test_glm47.py test-coverage

迁移到 2-GPU lane,TP1 服务,启用 EAGLE spec

from tests.ci.ci_register import register_cuda_ci
from tests.e2e.sglang.test_session_server_multi_role._common import ModelConfig, run_both_versions# 迁移到 2-GPU H200 lane,GLM-4.7 以 TP1 方式服务(单 GPU 即可容纳)
register_cuda_ci(est_time=500, suite="stage-c-2-gpu-h200", labels=["sglang"])CONFIG = ModelConfig(
    model_name="zai-org/GLM-4.7-Flash",
    reasoning_parser="glm45",
    tool_call_parser="glm47",
    tito_model="glm47",
    num_gpus=2,
    tp_size=1,
    enable_spec=True, # 启用 EAGLE 投机解码
    # Lenient template:tool message 渲染不校验前序 assistant 的 tool_call.id,
    # 使 APPEND_TOOL 哨兵("tool_call_id": "none")可干净回环
    tool_call_failure_mode="append_tool",
)
​
​
def test_glm47():
    run_both_versions(CONFIG)
​
​
if __name__ == "__main__":
    test_glm47()

评论区精华

没有提炼出高价值讨论线程

当前评论区没有形成足够清晰的争议点或结论,后续有更多讨论时会体现在这里。

风险与影响

  1. 资源调整风险:若模型实际推理需要更高 TP,TP1/TP2 可能导致显存不足(OOM)或性能下降,尤其 GLM-4.7 在 TP1 下需验证显存占用是否可接受。
  2. EAGLE 稳定性风险enable_spec=True 会在 session 场景下启用投机解码,可能引入额外的超时或不稳定因素,需持续观察 CI 结果。
  3. 覆盖移除风险:删除 Qwen3-Next 测试后该模型将失去 CI 覆盖,若后续重新启用需恢复测试文件。
  4. 依赖风险:本 PR 依赖 #2130,若父 PR 未合入,当前分支可能无法独立在 CI 中运行。

影响范围集中在 CI 测试配置,不涉及生产代码。对团队而言,可更高效利用 H200 资源,减少闲置 GPU 浪费;同时 session 模型的验证与线上服务配置更一致,确保投机解码只在支持的模型上启用。对开发流程的影响是 CI 耗时可能缩短,但需关注新的 lane 配置是否稳定。

依赖 #2130 EAGLE 启用 QwenNext 覆盖移除

关联 Issue

未识别关联 Issue

当前没有检测到明确关联的 Issue 链接,后续同步到相关引用后会出现在这里。

完整报告

参与讨论