Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Snippets][CPU] Added KVCacheMatcher check for LLM in MHATokenization #28812

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

a-sidorova
Copy link
Contributor

@a-sidorova a-sidorova commented Feb 4, 2025

Details:

  • Extracted is_LLM check from GPU plugin to common part to reuse in other plugins
  • Used extracted is_large_language_model function in check for LLM in MHATokenization in CPU Plugin

Tickets:

@github-actions github-actions bot added the category: CPU OpenVINO CPU plugin label Feb 4, 2025
@a-sidorova a-sidorova force-pushed the feature/snippets/is_llm_check_in_callback branch from 6fedb81 to 6cf3934 Compare February 13, 2025 13:39
@github-actions github-actions bot added category: GPU OpenVINO GPU plugin category: transformations OpenVINO Runtime library - Transformations labels Feb 13, 2025
@a-sidorova a-sidorova marked this pull request as ready for review February 14, 2025 05:28
@a-sidorova a-sidorova requested review from a team as code owners February 14, 2025 05:28
@a-sidorova a-sidorova requested review from itikhono and removed request for a team February 14, 2025 05:28
@a-sidorova a-sidorova added this to the 2025.1 milestone Feb 14, 2025
@a-sidorova
Copy link
Contributor Author

@itikhono @sshlyapn guys, could you take a look please from GPU Plugin and Transformation side? 😊

@a-sidorova a-sidorova force-pushed the feature/snippets/is_llm_check_in_callback branch from 6cf3934 to 0c75162 Compare February 19, 2025 11:32
@github-actions github-actions bot removed the category: GPU OpenVINO GPU plugin label Feb 19, 2025
@a-sidorova a-sidorova requested a review from itikhono February 19, 2025 11:35
Comment on lines 1059 to 1060
ov::op::util::has_op_with_type<intel_cpu::ScaledDotProductAttentionWithKVCache>(model) ||
ov::op::util::has_op_with_type<ov::op::PagedAttentionExtension>(model);
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we still need these checks here?
If we do, can move them inside is_large_language_model? Since we created a dedicated helper for this check, all the logic related should be inside. What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

At first time I just wanted to align with GPU check - I was not sure that PA should be in the check is_llm in GPU Plugin. But I found that they updated the condition included PA. So I moved PA to common helper leaving only SDPAWithKVCache because it's CPU-specific op.
Thanks!

@a-sidorova a-sidorova force-pushed the feature/snippets/is_llm_check_in_callback branch from 0c75162 to 3c8a73c Compare February 24, 2025 05:50
@a-sidorova a-sidorova force-pushed the feature/snippets/is_llm_check_in_callback branch from 3c8a73c to 782ed19 Compare February 24, 2025 08:58
@github-actions github-actions bot added the category: GPU OpenVINO GPU plugin label Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: CPU OpenVINO CPU plugin category: GPU OpenVINO GPU plugin category: transformations OpenVINO Runtime library - Transformations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants