Skip to content

[feat](minimax): refactor rmsnorm for minimax#613

Open
PerryZhang01 wants to merge 3 commits intomainfrom
minimax_norm
Open

[feat](minimax): refactor rmsnorm for minimax#613
PerryZhang01 wants to merge 3 commits intomainfrom
minimax_norm

Conversation

@PerryZhang01
Copy link
Copy Markdown
Contributor

Motivation

This PR refactors rmsnorm in minimax_v2.py. In minimax norm operation uses whole q dim and k dim rather than one head dim, so it should introduce allreduce in tp mode. this pr algins vllm code. (https://github.com/vllm-project/vllm/blob/main/vllm/model_executor/models/minimax_m2.py#L222)

TEST

image

@PerryZhang01 PerryZhang01 force-pushed the minimax_norm branch 5 times, most recently from 6eeab48 to 943adb6 Compare April 20, 2026 12:49
@PerryZhang01 PerryZhang01 force-pushed the minimax_norm branch 3 times, most recently from 698fc4b to 9b94450 Compare April 21, 2026 06:45
self.rotary_emb = rotary_emb
self.q_norm = q_norm
self.k_norm = k_norm
self.norm_accross_all_heads = False
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

urgly..

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

variable name or other something else?

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