Skip to main content

Module inference

Module inference 

Source
Expand description

CPU forward-pass primitives: RMS-norm, SiLU, sparse SwiGLU FFN.

Functionsยง

rms_norm
RMS normalization with explicit weight semantics.
silu
SiLU activation function.
sparse_ffn_forward
Sparse SwiGLU FFN: compute only active_indices neurons.
sparse_ffn_forward_pair
Fused two-position sparse FFN: gate/up/down weight rows are streamed from memory ONCE for both positions. Bit-identical to two single calls (per-position accumulation order is unchanged).