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: 解决llama-2-70B(chat)模型推理阶段报错 #413

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

Conversation

olifei
Copy link

@olifei olifei commented Nov 17, 2023

原因:Llama-2-70B transformer结构num_heads与num_key_value_heads不相等,会导致在forward阶段计算attention时维度出现错误。参考transformers进行修改:
https://github.com/huggingface/transformers/blob/main/src/transformers/models/llama/modeling_llama.py#L263

原因:70B transformer结构num_heads与num_key_value_heads不相等
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.

None yet

1 participant