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

[Bug Fix] fix slice bug in LlamaRotaryEmbedding #7882

Merged
merged 1 commit into from
Jan 24, 2024

Conversation

MarioLulab
Copy link
Contributor

@MarioLulab MarioLulab commented Jan 22, 2024

PR types

Bug fixes

PR changes

Others

Description

In LlamaRotaryEmbedding, self.cos_cached and self.sin_cached are both the shape of [1, max_seq_len_cached, 1, self.dim], but forward function wrongly does slice operation on dimension 2 which is the dimension with the constant value 1. We update dimensions which should be slice actually.

Snipaste_2024-01-23_16-30-55

Copy link

paddle-bot bot commented Jan 22, 2024

Thanks for your contribution!

@MarioLulab
Copy link
Contributor Author

可以帮忙 review 一下吗 😃 @wawltor @ZHUI

@ZHUI ZHUI requested a review from lugimzzz January 24, 2024 03:58
Copy link
Contributor

@lugimzzz lugimzzz left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Collaborator

@wawltor wawltor left a comment

Choose a reason for hiding this comment

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

LGTM

@wawltor wawltor merged commit eafa066 into PaddlePaddle:develop Jan 24, 2024
7 checks passed
@MarioLulab MarioLulab deleted the luqi/fix_slice_bug branch January 24, 2024 05:14
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.

3 participants