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, and print(module) shows it. 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, :class:ConvTranspose, :class:Embedding,
:class:LayerNorm, :class:RMSNorm, :class:MoE) and quantized
(:class:QLinear, :class:QLinearWoQ, :class:QConv,
:class:QConvWoQ, :class:QMoEWoQ); :class:Embedding serves a
quantized table through the same class. :class:KVCache is the
serving-side key/value cache with its configuration vocabulary.
| Name | Kind |
|---|---|
Conv | class |
ConvTranspose | class |
Embedding | class |
KVBlockScheme | class |
KVCache | class |
KVCacheConfig | class |
KVCacheMode | class |
KVLayerSpec | class |
KVQuantSpec | class |
LayerNorm | class |
Linear | class |
LoadResult | class |
MoE | class |
Module | class |
ModuleList | class |
PagedParams | class |
Parameter | class |
QConv | class |
QConvWoQ | class |
QLinear | class |
QLinearWoQ | class |
QMoEWoQ | class |
RMSNorm | class |
Sequential | class |
StepIndices | class |
WeightResidency | class |