Routed expert

Take the up branch

×

The odd features of the projection, counted from zero (the 2nd, 4th, …): 2,880 up features.

u=[ g  u ]1,3,5,…{\htmlData{light=take-up}{u}}=[\,g\;{\htmlData{light=take-up}{u}}\,]_{1,3,5,\ldots}
in
[ g  u ][\,g\;u\,] [B batch, T positions, 5760 expert gate and up features]
out
uu [B batch, T positions, 2880 expert d_ff]
Sources

In codex[..., 1::2] · 250

Open pinned code ↗

Direct evidence

The experts’ activation: the gate features are the even features of the projection, counted from zero, the linear features the odd ones; the gate is capped at the limit from above, the linear bounded to ±limit; the gate times the sigmoid of 1.702 times itself, multiplied by the linear plus one.

model.py 249–256 ↗ · openai/gpt-oss @ 5681a6b65526

Excerpt
def swiglu(x, alpha: float = 1.702, limit: float = 7.0):
    x_glu, x_linear = x[..., ::2], x[..., 1::2]
    # Clamp the input values
    x_glu = x_glu.clamp(min=None, max=limit)
    x_linear = x_linear.clamp(min=-limit, max=limit)
    out_glu = x_glu * torch.sigmoid(alpha * x_glu)
    # Note we add an extra bias of 1 to the linear layer
    return out_glu * (x_linear + 1)