Expand description
The decode engine’s program: one step of a checkpoint as the commands its units run, in order.
A step holds its token-rows — every row of every sequence the step advances — in the token-row store, each row a
vector in every Slot. A command is one unit’s job over every row of the step, in the step’s row order, finished
before the next command starts: Command::Matvec streams one matrix through the array and the block-scale lanes
once for all the rows; the norms, the gates and the products are the vector unit’s micro-programs;
Command::Conv and Command::Delta carry a Gated-DeltaNet block’s ring and memory, and
Command::CacheAppend and Command::Attend an attention block’s cache, each over every row’s own sequence. A
command that carries a sequence’s state takes its rows in order, so a sequence’s rows see one another as a prompt
run a token at a time does.
lower reads the step off the model’s one program — the decode step author writes,
lifted into the one IR, fused by the shared table under the engine’s shim and read block by block
(super::lower_graph) — and super::model::EngineModel runs exactly that list: the program is the model, so
what the sequencer issues and the cycle twin prices is what the model computes. hand_lowering writes the same
commands from the spec directly; it is kept only as the oracle the step-graph reading is held to.
Structs§
- Lowered
- A program and the cut of the model’s one program it was read off.
- Program
- One step of a checkpoint at a knob point.
Enums§
- Command
- One command of a step.
- Program
Error - Why the engine has no program for a model: the author cannot write its step, the front end cannot lift it, or its step graph holds a block the engine has no unit for.
- Slot
- A vector each token-row of a step carries, one of the token-row store’s slots.
Functions§
- hand_
lowering - The step of
specatnumericswritten from the spec directly: the embedding, each layer’s mixer and FFN around the residual, the final norm and the head. The oracleloweris held to, never a program the engine is given. - lower
- The engine’s step of
specatnumerics, read off the decode step the author writes over a cache ofctxpositions: the model’s one program, lifted by the shared front end into its step graph and read block by block. The commands do not depend onctx(the cache’s length is the layout’s); the identity records the cut read.
Type Aliases§
- Word
- A command as the sequencer reads it: 256 bits,
[7:0]the command,[15:8]its layer, seven 5-bit slots from bit 16, two 20-bit tensors from bit 51 (each its index inProgram::tensors, the weight image’s order), four 16-bit counts from bit 91, a 20-bit element offset from bit 155, an 8-bit rotary table from bit 175 (its index inProgram::ropes) and a 32-bit f32 constant from bit 183.