Skip to content

Conversation

@tgaddair
Copy link
Contributor

@tgaddair tgaddair commented Mar 13, 2024

Fixes #308.

Previous implementation assumed the rank set in the config was correct and we only need to scale by process group size. However, this may not always be the case depending on how the weights get split for tensor parallelism (column vs row parallel). As such, we should ignore the config and instead rely on the true rank dimension of the tensor independent of the process group size.

@tgaddair tgaddair marked this pull request as ready for review March 13, 2024 05:29
@tgaddair tgaddair mentioned this pull request Mar 13, 2024
4 tasks
lora_b_list = [pad_rank(w, dim=0, world_size=self.world_size) for w in lora_b_list]

if lora_b_list:
if lora_a_list:
Copy link
Contributor

Choose a reason for hiding this comment

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

Curious what the significance of swapping from lora_b_list to lora_a_list here is.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is the same, actually.

@tgaddair tgaddair merged commit 49f3f53 into main Mar 14, 2024
@tgaddair tgaddair deleted the fix-308 branch March 14, 2024 04:24
@tgaddair tgaddair mentioned this pull request Mar 14, 2024
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.

SGMV not working for llama 70b

3 participants