clika_runtime.nn
clika_runtime.nn: build models as module trees.
Compose layers by attribute assignment inside a :class:Module subclass,
define forward, and call the module like a function; state_dict /
load_state_dict move checkpoints by dotted names, to places the
tree, forward hooks observe or rewrite a call, and print(module) shows
the tree. :class:Parameter and :class:Buffer are the tensors a module
registers by type; the containers (:class:Sequential,
:class:ModuleList, :class:ModuleDict, :class:ParameterList,
:class:ParameterDict) compose without a hand-written forward;
:mod:clika_runtime.nn.init fills weights in place. Stateless operations
(activations, losses, padding, attention) live in
:mod:clika_runtime.nn.functional.
The layer set covers both weight postures: dense (:class:Linear,
:class:Conv with :class:Conv1d / :class:Conv2d / :class:Conv3d,
:class:ConvTranspose with its 1d / 2d / 3d spellings, :class:Embedding,
:class:LayerNorm, :class:RMSNorm, :class:MultiheadAttention,
:class:MoE) and quantized (:class:QLinear, :class:QLinearWoQ,
:class:QConv, :class:QConvWoQ, :class:QMoEWoQ); :class:Embedding
serves a quantized table through the same class. Every layer takes the
familiar constructor (device= / dtype= tail, a mode such as
activation="gelu" by name), and its weights read as
:class:Parameter views (layer.weight). :class:Dropout and its
channel-wise and alpha variants regularize under train() and pass
their input through under eval(); :class:Identity returns its input. :class:KVCache is the
serving-side key/value cache with its configuration vocabulary;
:func:fuse_linears names the linear-group fusion.