Last updated: 2026-06-12
Inference Runtime
Swiglu
T-CPU SwiGLU implementation.
This is the scalar reference activation used by MoE and dense MLP paths before tier-specific kernels are trusted.
2 exports shown
struct
Params
pub const Params = struct Inputs and outputs for one SwiGLU activation.
function
run
pub fn run(params: Params) !void Compute `output[i] = silu(gate[i]) * up[i]` where `silu(x) = x / (1 + exp(-x))`.
Reference SwiGLU used by MoE and dense MLP paths to validate tier-specific kernels.