Shared expert

Down projection

×

Map 2,048 gated features back to 8,192 features.

yshared=hWdown{\htmlData{light=output down}{y^{\mathrm{shared}}}}={\htmlData{light=h product}{h}}W_{\mathrm{down}}
in
hh [B batch, T positions, 2048 shared d_ff]
out
ysharedy^{\mathrm{shared}} [B batch, T positions, 8192 d]
Parameters16,777,216 × 69 layers

16,777,216 parameters per instance.

ComponentCalculationParameters
Weight matrix2,048 × 8,19216,777,216

This projection has no bias parameter.

The reference module holds the weight output by input, [out, in].

One in each of the 69 GDN layers, each with its own weights.

Sources

In codeself.down_proj(…) · 826

Open pinned code ↗

Direct evidence

The shared expert is a SwiGLU MLP: down(SiLU(gate x) · up x).

modeling_qwen3_5_moe.py 814–827 ↗ · huggingface/transformers @ 18329f106538

Excerpt
class Qwen3_5MoeMLP(nn.Module):
    def __init__(self, config: Qwen3_5MoeConfig, intermediate_size: int):
        super().__init__()
        self.config = config
        self.hidden_size = config.hidden_size
        self.intermediate_size = intermediate_size
        self.gate_proj = nn.Linear(self.hidden_size, self.intermediate_size, bias=False)
        self.up_proj = nn.Linear(self.hidden_size, self.intermediate_size, bias=False)
        self.down_proj = nn.Linear(self.intermediate_size, self.hidden_size, bias=False)
        self.act_fn = ACT2FN[config.hidden_act]

    def forward(self, x):
        down_proj = self.down_proj(self.act_fn(self.gate_proj(x)) * self.up_proj(x))
        return down_proj