Skip to main content

Module model

Module model 

Source
Expand description

The decode engine’s model: a hybrid Gated-DeltaNet checkpoint (qwen35, Qwen3.5 and Qwen3.8) run over a batch of sequences in the engine’s arithmetic, every number from super::numerics.

Each sequence carries its own state: per Gated-DeltaNet block its conv ring and its memory, per attention block its key and value caches, held in the formats the knobs name (EngineNumerics). A step takes any rows of any sequences; a sequence’s rows run in order through its own state, and every row’s arithmetic is its own, so a sequence’s numbers never depend on what else rides the batch.

The matrices run as the array runs them: a block-format row’s exact sums against its activations quantized as the knob names, per 32 elements or per the matrix’s own block (numerics::dot), an f32 matrix’s dot in the vector units’ lanes.

A step is the checkpoint’s program at the model’s knob point (super::program::lower: the model’s one program, read off its step graph), its commands run in order over the step’s token-rows: the model is the interpreter of the program the engine’s sequencer issues.

Structs§

EngineModel
A hybrid Gated-DeltaNet checkpoint in the engine’s arithmetic.
EngineNumerics
The knobs of the engine’s arithmetic.
Replay
What a lazily flushed head does at a token whose log, the token’s own entry appended, holds count tokens (Replay::at).

Enums§

CacheFormat
How an attention block’s keys and values are stored.
EngineError
Why the engine’s model cannot run a checkpoint.
StateFormat
How a sequence’s recurrent memory and conv ring are stored between tokens.

Constants§

CACHE_BUDGET
The default bytes of tensor data the model keeps in memory.
CODED_BUDGET
The default bytes of decoded rows the model keeps: a coded weight takes four bytes.
FLUSH_TOKENS
Tokens a lazily flushed memory carries in its log between flushes.
TRAILING_TOKENS
Tokens of each window a trailing flush replays: half of FLUSH_TOKENS, so its log, two windows at its longest, is as long as a flush’s every FLUSH_TOKENS.

Functions§

argmax
The greedy token: the index of the largest logit (super::numerics::argmax).
runs
Whether the engine runs spec at numerics, or what of it the engine does not run yet, by name.