Skip to main content

Module weights

Module weights 

Source
Expand description

Where each constant of a compiled step comes from.

A projection or a table the author declares in Q8_0 is read straight out of the checkpoint: the rows its binding’s view picks, in the order it picks them, copied byte for byte — the program maps the checkpoint and uploads those rows, so a weight is never rewritten or quantized again. Every other constant — a norm weight, a rotary table, a small f32 projection — the compiler computes once, as bind::values reads it, and ships beside the program.

Structs§

Rows
A quantized matrix read straight from the checkpoint: rows rows of cols weights in ty, the device copy’s rows the runs’ rows in order. transposed when the program declares the matrix the other way round — a projection’s rows are its outputs, the columns of the in × out matrix the program multiplies by.
Run
rows consecutive checkpoint rows, the first at byte offset of the file.

Enums§

Placement
How a constant reaches the device.

Functions§

place
Where constant var (of len elements) of a step authored from spec comes from. q8 when the author declared it a quantized matrix — rows read in place, or values when the checkpoint keeps it in a float format; positions the rows of the rotary caches.