Module ops

Module ops 

Source
Expand description

Tiny host GEMV / gather helpers for the C1 CPU graph.

Functionsยง

argmax
Greedy next-token: argmax, lower id on ties.
embed_token
Token embedding gather: embed[token, :].
fill
Deterministic fill in (-scale/2, scale/2).
ident
Row-major identity padded to [out, inn].
matvec
y = W x with W row-major [out, inn].
matvec_column_tp
Column-parallel y = W x (Megatron o_proj). W is [out, inn].
ones
Ones vector (RMSNorm / identity-ish scales).