ReadonlycfgReadonlyGReadonlyJReadonlylutReadonlynTrellis-encode [B,T] rows (already variance-matched) and return the decoded STATE at every t as [B,T] int32 — the k low bits of state t are the emitted symbol, and (bitshift trellis) state t is exactly the last L/k symbols, which is what makes random-access decode possible.
Fake-quant a 2-D tensor whose trellis axis is the LAST axis. Per-row (per rotated vector) fp16 scale, QTIP's Wscale = RMS(W)/RMS(lut) applied per row instead of per tensor (deviation: our incoherence processing is one-sided, so rows do not share a norm).
OptionalonProgress: (done: number, total: number) => voidfakeQuantRows that ALSO returns the packed bit-stream and the fp16 row
scales — the on-disk trellis format (see packStates). rec is the same
f32 reconstruction fakeQuantRows returns, so the fake-quant and packed
artifacts are built from one Viterbi pass.
OptionalonProgress: (done: number, total: number) => void
States → decoded values ([B,T] f32), the exact map encodeDecode uses.