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

MiniCPM: fix for gpa #7967

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

MiniCPM: fix for gpa #7967

wants to merge 1 commit into from

Conversation

zkh2016
Copy link
Contributor

@zkh2016 zkh2016 commented Jun 17, 2024

@github-actions github-actions bot added the python python script changes label Jun 17, 2024
@@ -1547,7 +1547,7 @@ def set_vocab(self):

def _reverse_hf_permute(self, weights: Tensor, n_head: int, n_kv_head: int | None = None) -> Tensor:
if n_kv_head is not None and n_head != n_kv_head:
n_head //= n_kv_head
n_head = n_kv_head
Copy link
Collaborator

Choose a reason for hiding this comment

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

This makes MiniCPMModel._reverse_hf_permute exactly equivalent to LlamaModel.permute. Should LlamaModel.permute (which is also a static method) be used instead in MiniCPMModel?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix fixes an issue or bug python python script changes Review Complexity : Low Trivial changes to code that most beginner devs (or those who want a break) can tackle. e.g. UI fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants