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

Fix PositionIdsReplacer for Qwen #28203

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

itikhono
Copy link
Contributor

@itikhono itikhono commented Dec 25, 2024

Details:

The "current len" pattern might be created in 2 different ways in the Qwen model.
After one of the comments in the review (https://github.com/openvinotoolkit/openvino/pull/28067/files) was resolved, we made the pattern stricter, it stopped covering one of the cases.

Tickets:

@itikhono itikhono requested a review from a team as a code owner December 25, 2024 14:58
@github-actions github-actions bot added the category: transformations OpenVINO Runtime library - Transformations label Dec 25, 2024
auto p_neg_const = wrap_type<v0::Constant>();
auto p_neg_mul = wrap_type<v1::Multiply>({p_current_len, p_neg_const});
// the rotary_emb_cos/rotary_emb_sin are sliced by the total length [1,..4096,1,128]
auto p_rotary_emb_sincos = wrap_type<v0::Constant>();
auto p_slice_1 = wrap_type<v8::Slice>({p_rotary_emb_sincos, _const(), p_opt_reshape, _const(), _const()});
auto p_slice_2 = wrap_type<v8::Slice>({p_slice_1, p_neg_mul, _const(), _const(), _const()});

Copy link
Contributor

Choose a reason for hiding this comment

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

can we cover this case by some test from model_hub_tests?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: transformations OpenVINO Runtime library - Transformations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants