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 Qwen tensor parallelism #120

Merged
merged 7 commits into from
Dec 11, 2023
Merged

Fix Qwen tensor parallelism #120

merged 7 commits into from
Dec 11, 2023

Conversation

tgaddair
Copy link
Contributor

@tgaddair tgaddair commented Dec 10, 2023

Unlike Llama, Qwen stores qkv as a single tensor on disk. However, logically it is still handled as three distinct tensors in the attention block, which means that splitting the tensor as though it is one big tensor will cause things to break. Instead, when loading and splitting the tensor, we need to take into account each individual chunk (q, k, v) and split each chunk, rather than the entire tensor.

Related: #115.

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

2 participants