Skip to content

Conversation

@ming1753
Copy link
Collaborator

@ming1753 ming1753 commented Jul 25, 2025

Background

Adapt Scheduler V1 for multimodality on the basis of #2928.

Perf

Near to Scheduler V0.

Effect

Config kv_cache_ratio is deprecated, and the recovery stop issue will no longer occur in the multimodal service.

How to enable

Set environment variable ENABLE_V1_KVCACHE_SCHEDULER to 1 to enable scheduler v1.

export ENABLE_V1_KVCACHE_SCHEDULER=1

@paddle-bot
Copy link

paddle-bot bot commented Jul 25, 2025

Thanks for your contribution!

@ming1753 ming1753 changed the title Mm scheduler v1 [Feature] Multimodal Scheduler V1 Jul 25, 2025
// limitations under the License.

#include "paddle/extension.h"
#include <map>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

map没用到的话可以省去

Comment on lines 151 to 152
old_end_idx = request.num_computed_tokens
new_end_idx = old_end_idx + num_new_tokens
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

old/new,是不是换成prev/cur更好理解点

return {out};
}

PD_BUILD_OP(get_img_boundaries)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PD_BUILD_OP是不是没走pybind啊

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个算子用在服务上层,和推理引擎是异步的,不用也影响不大

@Jiang-Jia-Jun Jiang-Jia-Jun requested a review from rainyfly July 29, 2025 08:52
@rainyfly
Copy link
Collaborator

Update fix according to #3071

@rainyfly rainyfly merged commit 5acde4e into PaddlePaddle:develop Jul 30, 2025
9 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants