Class MiniMaxMlp
java.lang.Object
smile.llm.model.minimax.MiniMaxMlp
Gated feed-forward with the
swigluoai activation, used for the dense
layers, the shared expert and every routed expert:
w2(glu * (up + 1)) where glu = gate * sigmoid(alpha * gate),
gate is clamped above at limit and up to [-limit, limit].
Parameters are registered as w1 (gate), w2 (down) and
w3 (up) to match FeedForward.
-
Constructor Summary
ConstructorsConstructorDescriptionMiniMaxMlp(int dim, int intermediate, double alpha, double limit) Constructor.MiniMaxMlp(int dim, int intermediate, double alpha, double limit, MiniMaxWeightMode mode) Constructor. -
Method Summary
-
Constructor Details
-
MiniMaxMlp
public MiniMaxMlp(int dim, int intermediate, double alpha, double limit) Constructor.- Parameters:
dim- model dimension.intermediate- hidden width.alpha- sigmoid slope.limit- clamp bound.
-
MiniMaxMlp
Constructor.- Parameters:
dim- model dimension.intermediate- hidden width.alpha- sigmoid slope.limit- clamp bound.mode- weight mode; quantized layers are loaded throughcollect(String, Map).
-
-
Method Details
-
module
-
forward
-