ExpertVariant enum

Feed-forward body inside an Expert.

  • ExpertVariant.mlp — the classical two-layer MLP x -> w2(act(w1(x))).
  • ExpertVariant.swiGlu — the SwiGLU gated body used by both DeepSeek-V3 (inference/model.py) and Mixtral (transformers/models/mixtral/modeling_mixtral.py): x -> w2(silu(w1(x)) * w3(x)). Adds one extra w3 projection of shape [hiddenDim, dim]. Uses SiLU regardless of ExpertActivation (the gate itself is the nonlinearity).
Inheritance
Available extensions

Values

mlp → const ExpertVariant
swiGlu → const ExpertVariant

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
name String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

values → const List<ExpertVariant>
A constant List of the values in this enum, in order of their declaration.