[CausalLM] Implement and Integrate Ernie 4.5 MoE Model #3598
+1,167
−5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Dependency of the PR
Commits to be reviewed in this PR
[CausalLM] Implement ERNIE's GLM Style RoPE
[CausalLM] Add ernie to main & meson build
[CausalLM] Implement Erine MoE Layer
[CausalLM] Add causallm common properties
[Application][CausalLM] Implement Ernie 4.5 MoE Model
Summary
This PR implements and integrates the Ernie 4.5 MoE (Mixture of Experts) model into the CausalLM application.
The changes include the implementation of the model structure, the MoE layer, GLM-style RoPE, and build system integration.
Erine 4.5 Models Key Difference btw Qwen
1. Qwen apply RMSNorm before RoPE to Q, K but Ernie don't
2. Ernie Apply GLM Style RoPE
3. Ernie use 2 Shared Expert + 6 TopK Expert (in 21B-A3B Model)
4. Ernie Has
e_score_correction_bias& add this bias after softmax of routerSigned-off-by: Donghak PARK [email protected]