Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Serving session lifecycle 规则"
created: 2026-09-05
updated: 2026-10-09
updated: 2026-12-01
type: rule
tags: [vllm-omni, components, serving]
sources: ["PR #6537", "PR #6354", vllm_omni/config/stage_config.py, vllm_omni/entrypoints/openai/api_server.py, vllm_omni/engine/duplex/adapter.py, vllm_omni/engine/duplex/runtime.py, vllm_omni/experimental/fullduplex/mage_vl/adapter.py, vllm_omni/experimental/fullduplex/mage_vl/serving/backend.py, vllm_omni/experimental/fullduplex/mage_vl/serving/server.py, tests/e2e/features/fullduplex/test_mage_vl_adapter.py, tests/e2e/features/fullduplex/test_mage_vl_serving.py, tests/e2e/online_serving/nemotron_voicechat_realtime_duplex.py, "PR #7363", "PR #7784"]
Expand All @@ -12,8 +12,10 @@ confidence: high

## SERV-6h — deferred session cognition 必须保持 input responsiveness、response ownership、worker drain 与 cleanup

- 触发:共享 `DuplexAdapter`/`DuplexRuntime` lifecycle、deferred cognition/gate、full-duplex barge-in、
shared-GPU `asyncio.to_thread` inference、disconnect/explicit close 或 session registry teardown 变化。
- 触发:Mage-VL 引入的共享 `DuplexAdapter`/`DuplexRuntime` deferred cognition/gate 路径中,修改
full-duplex barge-in、shared-GPU `asyncio.to_thread` inference、disconnect/explicit close 或 session
registry teardown。以下取消、epoch 和 acknowledgement 约束不适用于 native MiniCPM-o
[resident Thinker 路径](../../models/minicpm-o-4-5/rules-duplex.md#mcpmo-4k-resident-interruption)。
- 强制:昂贵的 deferred cognition 必须在 sole input reader 之外运行,完成 watcher 而不是 input
consumption 才能发起 response;response start/replacement 通过一个 response lock 串行化,新 response
以 stale epoch 加 cancellation 取代 live response。`response.cancel` 无论有无 in-flight response 都必须
Expand Down
4 changes: 2 additions & 2 deletions knowledge/repos/vllm-omni/models/minicpm-o-4-5/_index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "MiniCPM-o 4.5"
created: 2026-07-20
updated: 2026-11-26
updated: 2026-12-01
type: index
tags: [vllm-omni, models, model-executor]
sources: ["PR #3642", "PR #5382", "PR #5524", "PR #5638", "PR #5792", "PR #5869", "PR #6056", "PR #6154", "PR #6170", "PR #6318", "PR #6404", "PR #6678", "PR #6628", tests/dfx/perf/tests/test_minicpmo_4_5.json, tests/dfx/perf/tests/test_minicpmo_4_5_duplex_seed_tts.json, tests/e2e/accuracy/minicpmo_4_5/test_minicpmo_4_5.py, tests/engine/duplex/test_duplex_deploy_config.py, tests/e2e/online_serving/helpers/minicpmo_4_5_duplex.py, tests/e2e/online_serving/test_minicpmo_4_5_duplex.py, tests/e2e/online_serving/test_minicpmo_4_5_duplex_expansion.py, vllm_omni/experimental/fullduplex/client.py, vllm_omni/model_executor/models/minicpmo_4_5/duplex/stage0.py, vllm_omni/entrypoints/duplex/realtime_input.py, vllm_omni/model_executor/models/cosyvoice3/code2wav_core/hifigan.py, vllm_omni/model_executor/models/minicpmo_4_5/, tests/model_executor/models/minicpmo_4_5/test_cuda_graph_wrapper.py, tests/model_executor/models/minicpmo_4_5/test_cfm_graph_capture_gating.py, tests/model_executor/models/minicpmo_4_5/test_talker_batching.py, vllm_omni/platforms/npu/models/minicpmo_4_5_code2wav.py, "PR #6082", "PR #6587", "PR #8007", "PR #8332", "PR #8443", "PR #8462", "PR #8222", "PR #10595"]
Expand Down Expand Up @@ -52,7 +52,7 @@ Online serving CI 的 core suite 固定 async chunk,expansion 分开覆盖 syn
fixture 不再覆盖 eager/KV cap 并固定 active-speech turn window;验证证据边界见 MCPMO-5b。

描述直达源码与模型专有门禁见 [rules](rules.md#direct-代码快速入口);并发 duplex 的 ragged
Talker chunk、full-attention 容量 rollover、shipping profile 与 chat 隔离见 [native duplex 规则](rules-duplex.md) 新增核对:MCPMO-4j。
Talker chunk、full-attention 容量 rollover、shipping profile 与 chat 隔离见 [native duplex 规则](rules-duplex.md) 新增核对:MCPMO-4j;resident Thinker 的 cancel/clear/barge-in 边界查 MCPMO-4k。
;Code2Wav
state、batch cap 与 NPU residual limits 见 [Code2Wav 并发批处理规则](rules-code2wav-batching.md)。新模型语义验证见
[model validation](../../review/guides/model-validation.md)。
Expand Down
23 changes: 21 additions & 2 deletions knowledge/repos/vllm-omni/models/minicpm-o-4-5/rules-duplex.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
title: "MiniCPM-o 4.5 native duplex 规则"
created: 2026-09-04
updated: 2026-10-06
updated: 2026-12-01
type: rule
tags: [vllm-omni, models, model-executor]
sources: ["PR #6318", "PR #6346", "PR #6404", "PR #6458", "PR #6619", "PR #6630", "PR #6678", "PR #6626", "PR #6767", "PR #6821", vllm_omni/deploy/minicpmo_4_5.yaml, vllm_omni/model_executor/models/minicpmo_4_5/minicpmo_4_5_omni_tts.py, vllm_omni/model_executor/stage_input_processors/minicpmo_4_5_omni.py, tests/model_executor/models/minicpmo_4_5/test_talker_batching.py, vllm_omni/deploy/minicpmo_4_5_2gpu.yaml, vllm_omni/deploy/minicpmo_4_5_3gpu.yaml, vllm_omni/deploy/minicpmo_4_5_8x4090.yaml, examples/online_serving/minicpmo/realtime_duplex_demo.py, vllm_omni/experimental/fullduplex/client.py, vllm_omni/model_executor/models/minicpmo_4_5/duplex/adapter.py, vllm_omni/model_executor/models/minicpmo_4_5/duplex/session.py, vllm_omni/model_executor/models/minicpmo_4_5/duplex/stage0.py, vllm_omni/entrypoints/duplex/realtime_input.py, vllm_omni/entrypoints/duplex/runtime_adapter.py, vllm_omni/entrypoints/duplex/runtime_bridge.py, vllm_omni/entrypoints/duplex/serving.py, vllm_omni/entrypoints/duplex/session_runner.py, vllm_omni/experimental/fullduplex/video_stacking.py, tests/config/test_config_factory.py, tests/engine/duplex/test_duplex_deploy_config.py, tests/e2e/online_serving/helpers/minicpmo_4_5_duplex.py, tests/e2e/online_serving/test_minicpmo_4_5_duplex_expansion.py, tests/entrypoints/openai_api/test_duplex_handler.py, tests/examples/test_minicpmo_realtime_duplex_simple_demo.py, "PR #6529", vllm_omni/entrypoints/duplex/protocol.py, vllm_omni/entrypoints/duplex/realtime_state.py, tests/entrypoints/openai/test_duplex_protocol.py, "PR #6799", "PR #7416", "PR #8462", "PR #8007"]
sources: ["PR #6318", "PR #6346", "PR #6404", "PR #6458", "PR #6619", "PR #6630", "PR #6678", "PR #6626", "PR #6767", "PR #6821", vllm_omni/deploy/minicpmo_4_5.yaml, vllm_omni/model_executor/models/minicpmo_4_5/minicpmo_4_5_omni_tts.py, vllm_omni/model_executor/stage_input_processors/minicpmo_4_5_omni.py, tests/model_executor/models/minicpmo_4_5/test_talker_batching.py, vllm_omni/deploy/minicpmo_4_5_2gpu.yaml, vllm_omni/deploy/minicpmo_4_5_3gpu.yaml, vllm_omni/deploy/minicpmo_4_5_8x4090.yaml, examples/online_serving/minicpmo/realtime_duplex_demo.py, vllm_omni/experimental/fullduplex/client.py, vllm_omni/model_executor/models/minicpmo_4_5/duplex/adapter.py, vllm_omni/model_executor/models/minicpmo_4_5/duplex/session.py, vllm_omni/model_executor/models/minicpmo_4_5/duplex/stage0.py, vllm_omni/entrypoints/duplex/realtime_input.py, vllm_omni/entrypoints/duplex/runtime_adapter.py, vllm_omni/entrypoints/duplex/runtime_bridge.py, vllm_omni/entrypoints/duplex/serving.py, vllm_omni/entrypoints/duplex/session_runner.py, vllm_omni/experimental/fullduplex/video_stacking.py, tests/config/test_config_factory.py, tests/engine/duplex/test_duplex_deploy_config.py, tests/e2e/online_serving/helpers/minicpmo_4_5_duplex.py, tests/e2e/online_serving/test_minicpmo_4_5_duplex_expansion.py, tests/entrypoints/openai_api/test_duplex_handler.py, tests/examples/test_minicpmo_realtime_duplex_simple_demo.py, "PR #6529", vllm_omni/entrypoints/duplex/protocol.py, vllm_omni/entrypoints/duplex/realtime_state.py, tests/entrypoints/openai/test_duplex_protocol.py, "PR #6799", "PR #7416", "PR #8462", "PR #8007", "PR #11293"]
confidence: high
---

Expand Down Expand Up @@ -139,3 +139,22 @@ confidence: high
- 强制:这些 profile 省略该键,使默认 `0` 关闭 limiter,adapter 留在 unlimited path。配置测试断言 `active_stream_window == 0`,而不是 `== max_sessions`。8×4090 的并发上限仍由 stage `max_num_seqs=1` 承担,不靠窗口 1。
- 禁止:为恢复 first-packet 并发把正窗口写回这四份 profile;把窗口等于 session capacity 的旧断言写回测试。任何正值都会离开 unlimited path。
- 验收:四份 base profile 展开后窗口为 0,且默认 serve 不进入 K-bounded promote。^[PR #7416]

## MCPMO-4k Resident interruption

- 触发:在包含 [#11293 合入提交](https://github.com/vllm-project/vllm-omni/commit/3edf4f64367e0729443b7a1e3d9537e2877da013)
的 runtime 修改 MiniCPM-o native automatic response 的 `response.cancel`、
`output_audio_buffer.clear` 或显式/音频重叠触发的 barge-in。
- 强制:自动回复支持 resumable request、已有 resident Stage 0 request 且模型提供中断控制时,
停止旧回复,按输入队列顺序提交 turn-end/forced-listen 控制,保留 request、epoch、Thinker KV
及未提交的 PCM;按 response ID/model turn 抑制旧输出,不把整条 epoch 判为 stale。已 drain
的 output clear 只回 ACK;无 active work 或 response ID 不匹配时遵循原取消 guard。
- 禁止:把 `input_audio_buffer.clear` 混成 response cancel,或把 `input.cancel` 当作保留 KV 的操作。
`input_audio_buffer.clear` 单独丢弃未提交 PCM;显式 `input.cancel` 与有资格但提交中断控制失败的
会话走 destructive cancel。手动回复及不支持 resumable request 的路径不应用 resident 保留逻辑。
- 验收:覆盖中断控制与前后 input append 的顺序、同 request/epoch 上的旧回复抑制与新回复、
partial PCM 保留、drained clear ACK,以及控制提交失败后的 destructive fallback。
参考[协议分流](https://github.com/vllm-project/vllm-omni/blob/3edf4f64367e0729443b7a1e3d9537e2877da013/vllm_omni/engine/duplex/session/runner.py#L2784-L2823)、
[resident 条件](https://github.com/vllm-project/vllm-omni/blob/3edf4f64367e0729443b7a1e3d9537e2877da013/vllm_omni/engine/duplex/session/runner.py#L2990-L3025)、
[回退](https://github.com/vllm-project/vllm-omni/blob/3edf4f64367e0729443b7a1e3d9537e2877da013/vllm_omni/engine/duplex/session/runner.py#L1091-L1099)
与[CPU 场景测试](https://github.com/vllm-project/vllm-omni/blob/3edf4f64367e0729443b7a1e3d9537e2877da013/tests/engine/duplex/test_resident_interruption.py#L154-L222)。^[PR #11293]
Loading