Repository navigation
refactor: replace manual gated activations with native ggml GLU - #2250
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Core SiLU helper src/core/ggml_extend.cpp |
ggml_ext_silu_act checks that dimension 0 is even, makes the input contiguous along dimension 0 when needed, and selects a SwiGLU operation based on gate_first. |
Diffusion model forward methods src/model/diffusion/* |
Diffusion MLPs and the sparse MoE block replace explicit gate activation and multiplication with split SwiGLU or GeGLU operations. |
Text encoder model forward methods src/model/te/llm.hpp, src/model/te/t5.hpp |
MLPs use split SwiGLU or GeGLU operations. Qwen35DeltaNet uses split SwiGLU to combine its normalized delta output with z. |
VAE forward methods src/model/vae/minimax_h3_audio_vae.hpp, src/model/vae/minimax_h3_vae.hpp |
The audio VAE uses split GeGLU, and the VAE decoder uses SwiGLU. |
Priority:
Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Refactor
Possibly related PRs
- leejet/stable-diffusion.cpp#2235: Replaces manual SiLU gating with SwiGLU operations in a Qwen image transformer block.
- leejet/stable-diffusion.cpp#2245: Replaces manual GELU gating with a native GeGLU operation.
- leejet/stable-diffusion.cpp#2240: Replaces manual SiLU gating with SwiGLU in the MiniMax H3 diffusion MLP.
Merge Risk: 
Minimal · up to 5dc18
-
No merge-blocking issue was identified in the gated activation changes.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passedFull details: Docstring Coverage
-
Explanation
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 5 functions across 13 files.
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
Finishing Touches: 💡 1
-
📝 Generate docstrings: 💡
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
Summary
ggml_ext_silu_act.Related Issue / Discussion
N/A
Additional Information
N/A
Checklist
Summary by CodeRabbit