Why is the hidden dimension of a SwiGLU block typically reduced to about 8/3 of the model dimension instead of 4 times?

Last updated 22 November 2026

  • SwiGLU has three weight matrices instead of two. Setting 3dh = 8d² (the standard 4x FFN's parameter count) gives h = 8d/3 ≈ 2.67d.

  • Matching parameters and FLOPs makes the comparison fair and shows SwiGLU's quality gain isn't just from extra parameters.

  • The value is rounded for hardware efficiency (LLaMA-7B: 8/3 · 4096 ≈ 10923, rounded to 11008).

  • https://dev.to/mshojaei77/swiglu-the-ffn-upgrade-i-use-to-get-free-performance-33jc
  • https://www.ultralytics.com/glossary/swiglu
  • https://theorempath.com/compare/swiglu-vs-gelu-vs-relu
All Transformers interview questions