diff --git a/knowledge/repos/vllm-omni/components/diffusion/_index.md b/knowledge/repos/vllm-omni/components/diffusion/_index.md index 255e878a..1a369903 100644 --- a/knowledge/repos/vllm-omni/components/diffusion/_index.md +++ b/knowledge/repos/vllm-omni/components/diffusion/_index.md @@ -86,3 +86,4 @@ shared RMSNorm 的empty-input与fused精度边界沿 tensor dtype rules 的DIFF- - [AR-Diffusion 实时模型集成规则](rules-ar-realtime-integration.md) - [Diffusion attention dense 4D mask routing](rules-4d-mask-routing.md) - [vllm-omni · Diffusion — Wan SDPA 对齐测试规则](rules-wan-sdpa-math.md) +- [Diffusion master-port 测试规则](rules-master-port-tests.md) diff --git a/knowledge/repos/vllm-omni/components/diffusion/rules-master-port-tests.md b/knowledge/repos/vllm-omni/components/diffusion/rules-master-port-tests.md new file mode 100644 index 00000000..d231de02 --- /dev/null +++ b/knowledge/repos/vllm-omni/components/diffusion/rules-master-port-tests.md @@ -0,0 +1,19 @@ +--- +title: "Diffusion master-port 测试规则" +created: 2026-10-26 +updated: 2026-10-26 +type: rule +tags: [vllm-omni, components, diffusion] +sources: ["PR #9219"] +--- + +# Diffusion master-port 测试规则 + +## VLLM-OMNI-PR9219-MASTER-PORT-TESTS — master_port 测试不依赖未预留端口:stub is_port_available 并断言探测序列 + +- 触发:改动 `tests/diffusion/test_omni_diffusion_config_master_port.py`(`OmniDiffusionConfig` 的 `MASTER_PORT` env 优先于 kwarg、显式 kwarg 稳定性、默认端口可用性、busy-port settle 步进各测试),或在该文件中重新引入以 `get_open_port()` 返回值做等值断言或真实 bind 的测试写法;不覆盖生产解析 `vllm_omni/diffusion/data.py` 的 `_resolve_master_port` / `settle_port` 语义本身。 +- 强制:候选端口选择类测试(env 优先、kwarg 稳定、busy-port +37 步进)必须打桩 `vllm_omni.diffusion.data.is_port_available`(经 data 模块内导入的名称 monkeypatch),使用互不相同且异于单次 +37 步长的固定常量(`_ENV_PORT`/`_KWARG_PORT`/`_EXPLICIT_PORT`),并断言打桩记录的探测序列恰为期望值——env 优先用例断言结果等于 env 端口且 `checked == [_ENV_PORT]`(kwarg 不得被查询),busy 用例断言结果为 `busy_port + 37` 且 `checked == [busy_port, busy_port + 37]`——使测试在端口被 CI 并发抢占时仍然确定(#9208 的失败即 `get_open_port()` 返回值未预留、被抢后 settle +37 导致断言不等)。默认端口路径不打桩:该路径仍走 live `get_open_port()`,须保留 bounded resolve-and-bind 重试(至多 10 次),仅在 `127.0.0.1` 上绑定(CodeQL 会标记 wildcard bind),重试耗尽以 `pytest.fail` 报告最后错误。生产解析保持不变。 +- 禁止:断言 `config.master_port == get_open_port()` 之类对未预留端口的等值比较;在候选选择测试中保留真实 bind 或 wildcard bind(`bind(("", ...))`);删除对探测序列的断言使解析停止查询可用性检查时测试仍通过;为迁就测试改动生产 `settle_port` 的步进或优先级语义。 +- 验收:`pytest tests/diffusion/test_omni_diffusion_config_master_port.py -q` 全绿(当前 6 项);优先级与步进用例均带探测序列断言;默认路径用例为 loopback 上的 bounded 重试;`ruff check` 与 `ruff format --check` 通过。^[PR #9219] + + diff --git a/knowledge/repos/vllm-omni/components/model-executor/_index.md b/knowledge/repos/vllm-omni/components/model-executor/_index.md index d11bc829..d0d8892f 100644 --- a/knowledge/repos/vllm-omni/components/model-executor/_index.md +++ b/knowledge/repos/vllm-omni/components/model-executor/_index.md @@ -71,3 +71,4 @@ sources: [] - [NPU model adapter rules](rules-npu-model-adapters.md) - [vLLM-Omni model executor — upstream warmup request identification rules](rules-warmup-ids.md) - [Host Weight Runtime 测试评审规则](rules-host-weight-runtime.md) +- [模型执行器 — Qwen2.5-Omni talker 终止 conditioning 规则](rules-qwen25-talker-eos.md) diff --git a/knowledge/repos/vllm-omni/components/model-executor/rules-qwen25-talker-eos.md b/knowledge/repos/vllm-omni/components/model-executor/rules-qwen25-talker-eos.md new file mode 100644 index 00000000..a47f987c --- /dev/null +++ b/knowledge/repos/vllm-omni/components/model-executor/rules-qwen25-talker-eos.md @@ -0,0 +1,19 @@ +--- +title: "模型执行器 — Qwen2.5-Omni talker 终止 conditioning 规则" +created: 2026-10-26 +updated: 2026-10-26 +type: rule +tags: [vllm-omni, components, model-executor] +sources: ["PR #9371"] +--- + +# 模型执行器 — Qwen2.5-Omni talker 终止 conditioning 规则 + +## VLLM-OMNI-PR9371-QOMNI-TALKER-EOS — Qwen2.5-Omni thinker→talker 终止 conditioning 必须对齐 HF 参考并覆盖截断 + +- 触发:修改 `vllm_omni/model_executor/stage_input_processors/qwen2_5_omni.py` 的 `thinker2talker_full_payload`、`vllm_omni/model_executor/models/qwen2_5_omni/qwen2_5_omni.py` 中 talker 的 text/codec embedding conditioning,或 thinker 在 stop-token 完成与长度上限截断下的音频终止行为。 +- 强制:传给 talker 的 conditioning 与 HuggingFace 参考实现保持一致:在 thinker hidden states 之外附带对应 text-token embeddings,并在终止处补 terminal text-EOS 与 text-pad embedding;自然完成与 length-cap 截断两条路径都必须落到同一终止条件,保证音频输出干净结束。注意 AR runner 不为最后采样的 token 产生 hidden-state row,两条终止路径都要补齐该缺口。 +- 禁止:只把 raw thinker hidden states 喂给 talker 而缺少 terminal EOS/pad conditioning(缺陷表现为文本截断后接重复无意义音频尾);只修 stop-token 完成路径而漏掉 length-cap 截断路径;共享示例客户端默认注入 seed/temperature 覆盖服务端采样行为。 +- 验收:CPU 级回归同时覆盖自然完成与强制截断(`tests/model_executor/models/qwen2_5_omni/test_qwen2_5_omni_talker_conditioning.py`、`tests/model_executor/stage_input_processors/test_qwen2_5_omni_thinker2talker.py`);示例客户端单测断言默认请求中不含 seed/temperature、仅显式给定时转发;调用该示例的 e2e 用确定性采样(`--seed 42 --temperature 0`)加有界长度 prompt,并输出 finish_reason 辅助诊断。^[PR #9371] + +