Skip to main content

//clika-runtime/io.clika.runtime/Activation

Activation

[common]
enum Activation : Enum<Activation>

A fused activation epilogue. Identity = none. The gated kinds (SwiGlu, GeGlu, ReGlu, Situ) take a concatenated [*, 2d] gate‖up input and emit [*, d], used as a fused projection epilogue.

Entries​

IDENTITY[common]
IDENTITY
0 on purpose: a zero-initialized field means "no activation"
SIGMOID[common]
SIGMOID
SILU[common]
SILU
RELU[common]
RELU
GELU[common]
GELU
exact, erf-based
FAST_GELU[common]
FAST_GELU
the fast approximation (binds the tanh form)
TANH[common]
TANH
QUICK_GELU[common]
QUICK_GELU
sigmoid approximation: x·sigmoid(1.702·x)
RELU6[common]
RELU6
min(max(x, 0), 6)
TANH_GELU[common]
TANH_GELU
the tanh approximation, named
SWIGLU[common]
SWIGLU
GEGLU[common]
GEGLU
REGLU[common]
REGLU
SITU[common]
SITU
Soft-capped gated activation; BOTH halves transform: out = β·tanh(gate/β)·sigmoid(gate) · lβ·tanh(up/lβ). The two soft-cap scalars ride ops::matmul/ops::linear as situ_beta (β, the gate cap) and situ_linear_beta (lβ, the up cap); both must be 0 and come from the model's own config; passing Situ without them (or either scalar with any other kind) rejects. Computed at fp32 end-to-end with one demote at the store for f16/bf16 outputs.

Types​

NameSummary
Companion[common]
object Companion

Properties​

NameSummary
code[common]
val code: Int
name[common]
val name: String
ordinal[common]
val ordinal: Int

Functions​

NameSummary
valueOf[common]
fun valueOf(value: String): Activation
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
values[common]
fun values(): Array<Activation>
Returns an array containing the constants of this enum type, in the order they're declared.