-
Notifications
You must be signed in to change notification settings - Fork 61
Add Glm4MoeForCausalLM Support #619
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: shagsood <[email protected]>
Signed-off-by: shagsood <[email protected]>
Signed-off-by: shagsood <[email protected]>
Signed-off-by: shagsood <[email protected]>
|
@shagsood do we have approval for this model? also do add this model under validated model list |
|
@vbaddi can you please review this PR? |
Yes we have legal approval for this model. |
|
|
||
| class QEffGlm4MoeMoE(Glm4MoeMoE): | ||
| """ | ||
| MoE Block |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: We can start using our optimized moe block for prefill/decode usecase here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a specific PR I need to refer for this?
| key_states, | ||
| value_states, | ||
| attention_mask, | ||
| dropout=0.0 if not self.training else self.attention_dropout, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we remove this dropout, since we are not using it in eager_attention_forward
| value: torch.Tensor, | ||
| attention_mask: Optional[torch.Tensor], | ||
| scaling: float, | ||
| dropout: float = 0.0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove, since its not used.
This PR adds support for zai-org/GLM-4.5-Air model.
Open source MoE model with performance and accuracy better than many closed source models: