Skip to content
IJK

MoE Layers: Experts, a Router and What the Choice Affects

By IJK ·

What NVIDIA's post says replaces the single feed-forward block in an MoE layer, what the router network does and what the choice affects.

What the choice affects

The right choice affects throughput, memory cost, and serving complexity more than raw parameter count does. [1]

Dense layer versus MoE layer

In a dense model every parameter participates in every forward pass. [2]

All 27B parameters of a 27B model fire for every token, through a single shared feed-forward network (FFN) block per decoder layer. [3]

An MoE model replaces that single shared FFN with multiple FFN blocks, also known as experts. [4]

replaced byfronted byDense layera single shared FFN block per decoder layerMoE layermultiple FFN blocks, also known as expertsRouter networkassigns each token to the top k scoring experts
What replaces the single FFN?

The router

A learned gate network, usually called a router network, sits in front of all of them and assigns each incoming token to the top k scoring experts. [5]

Sources

  1. The NVIDIA source says: The right choice affects throughput, memory cost, and serving complexity more than raw parameter count does. Dense vs. MoE Models
  2. The NVIDIA source says: In a dense model every parameter participates in every forward pass. Dense vs. MoE Models
  3. The NVIDIA source says: All 27B parameters of a 27B model fire for every token, through a single shared feed-forward network (FFN) block per decoder layer. Dense vs. MoE Models
  4. The NVIDIA source says: An MoE model replaces that single shared FFN with multiple FFN blocks, also known as experts. Dense vs. MoE Models
  5. The NVIDIA source says: A learned gate network, usually called a router network, sits in front of all of them and assigns each incoming token to the top k scoring experts. Dense vs. MoE Models

Editorial (AI-assisted; automatically checked, not human-reviewed). Each statement is linked to its source; check the source before relying on a detail.

  • machine learning
  • llm
  • mixture of experts
  • nvidia