docs(hps): add Triton instance count configuration docs#17765
Merged
Bobholamovic merged 9 commits intoPaddlePaddle:mainfrom Mar 9, 2026
Merged
docs(hps): add Triton instance count configuration docs#17765Bobholamovic merged 9 commits intoPaddlePaddle:mainfrom
Bobholamovic merged 9 commits intoPaddlePaddle:mainfrom
Conversation
Add documentation for Triton `instance_group` count parameter in both Chinese and English READMEs, covering configuration examples and tuning guidance for GPU and CPU models.
|
Thanks for your contribution! |
Rewrite instance count docs to accurately describe behavior: single instance processes one batch at a time with intra-batch blocking, while multiple instances enable parallel batch processing to reduce queuing latency.
Clarify that Triton only loads the layout detection model (PP-DocLayoutV3) while VLM is served by vLLM separately. Note that multiple instances improve per-request latency, and that additional instances also increase vLLM load, CPU and memory usage.
…ure section Add a note under the Triton models table clarifying that only the layout detection model (PP-DocLayoutV3) runs in Triton, while VLM is served separately by vLLM.
Bobholamovic
reviewed
Mar 5, 2026
| | `layout-parsing` | 推理设备(如 GPU) | 版面解析推理 | | ||
| | `restructure-pages` | CPU | 多页结果后处理(跨页表格合并、标题层级重分配) | | ||
|
|
||
| > 注意:Triton 服务中仅加载了版面检测模型(PP-DocLayoutV3),VLM 模型由独立的 vLLM 推理服务提供。 |
Member
There was a problem hiding this comment.
这个感觉放在正文里说明更好,比如放在上面的表格里,Triton 服务器里包含版面检测模型以及产线串联逻辑,vLLM 服务器里包含VLM(VLM的“M”就是“模型”,不必重复)
|
|
||
| ### Triton 实例数 | ||
|
|
||
| Triton 服务中仅加载了版面检测模型(PP-DocLayoutV3),VLM 模型由独立的 vLLM 推理服务提供。每个 Triton 模型的并行推理实例数通过 `config.pbtxt` 中的 `instance_group` 配置(默认:1)。增加实例数可以提高并行处理能力,但会占用更多设备资源。 |
Integrate layout detection model (PP-DocLayoutV3) and VLM info into the architecture component table instead of a separate note. Remove redundant first sentence in Triton instance count section.
Bobholamovic
reviewed
Mar 9, 2026
| 实例数与动态批处理之间存在权衡: | ||
|
|
||
| - **单实例(`count: 1`)**:动态批处理会将多个请求合并为一个批次并行执行,但同批次的请求需等待最慢的那个完成后才能一起返回,可能导致部分请求的时延升高。同时,单实例同一时刻只能处理一个批次,当前批次未完成时后续请求只能排队等待。适合显存有限或请求耗时较均匀的场景 | ||
| - **多实例(`count: 2+`)**:多个实例可以同时各自处理不同的批次,能够同时处理更多请求,减少排队等待时间,单个请求的时延也会有所改善。但需注意,同一实例内的批次仍然遵循动态批处理的行为(批内请求一起开始、一起结束)。每增加一个实例会额外占用一份版面检测模型(PP-DocLayoutV3)的显存,同时也会增加对 vLLM 推理服务的负载以及内存和 CPU 的使用,需根据推理设备的资源情况酌情设置 |
Member
There was a problem hiding this comment.
版面检测模型(PP-DocLayoutV3)这里可以不用再标注一次“PP-DocLayoutV3“,这样之后更换模型也方便一些,不容易遗漏修改
Remove redundant model name annotation and use "VLM" instead of "vLLM" for better generality per review feedback.
Bobholamovic
reviewed
Mar 9, 2026
| There is a trade-off between instance count and dynamic batching: | ||
|
|
||
| - **Single instance (`count: 1`)**: Dynamic batching combines multiple requests into one batch for parallel execution, but all requests in the same batch must wait for the slowest one to finish before results are returned, which may increase latency for faster requests. Additionally, a single instance can only process one batch at a time — subsequent requests must queue until the current batch completes. Best suited for scenarios with limited GPU memory or uniform request processing times | ||
| - **Multiple instances (`count: 2+`)**: Multiple instances can process different batches simultaneously, allowing more requests to be handled concurrently. This reduces queuing time and improves latency for individual requests. Note that within each instance, dynamic batching behavior still applies (requests in the same batch start and finish together). Each additional instance consumes an extra copy of the layout detection model (PP-DocLayoutV3)'s GPU memory, increases the load on the vLLM inference service, and uses more CPU and system memory. Adjust based on the available resources of your inference device |
Bobholamovic
approved these changes
Mar 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add documentation for Triton
instance_groupcount parameter in both Chinese and English READMEs, covering configuration examples and tuning guidance for GPU and CPU models.