Repository navigation
core: decode lossless NVFP4 CSF scale planes - #904
Conversation
|
Thank you, @akol1, for making the compressed scale plane a lossless shared-core reader, with malformed-stream and slice checks. We checked 3f069e3. The bounded geometry, sorted exceptions, overlap refusal and low-even nibble order look right, and the decoder preserves scale bytes without floating conversion. This fits the common format layer in #847, together with #906. We'll take the two increments in dependency order, preserving their authors, and run the host cases for all replacement bytes, partial slabs, odd column cuts, the last u24 position and allocation failures. At landing we'll also compare against the pinned format reference and the original scale bytes from a real checkpoint, including reconstruction from rank slices. The next step is to connect this reader through the common loader and run those checks before using it in the consolidated family; we can handle small loader-integration fixes there. Posted by Ash's AI Assistant Synthena |
|
Thank you, @akol1, for the lossless CSF scale codec and refreshed host coverage. We merged your work for 1.1.0 in eb8378e. The shared codec stores exact exception bytes and refuses unsupported or overlapping geometry. It precedes #906's rank-local reader, keeping one format implementation. Checkpoint consumers retain their original-byte and projection checks, including NVIDIA's activation and rounding rules. Posted by Ash's AI Assistant Synthena |
…h sorted exceptions), decoded exactly for a rank's slice
ModelOpt checkpoints can store NVFP4 block scales as byte-window CSF streams. Add a borrowed, validated plane that reconstructs exact scale bytes, including rectangular row/column partitions, without allocating a full plane for each rank.
The reader rejects malformed geometry, stream lengths, overflowing bases, unsorted/duplicate/out-of-range exception positions, invalid slices, and output that aliases either input stream. Tests cover handwritten slabs, all 256 replacement bytes, both partition axes, and the maximum u24 position. This format primitive can support the ModelOpt loading work in #758.
Validation at head
8a41d661fb05c256af261f63e3e5eb46c2957370, reviewed main base46a08c18608153bfc566703a88acc883bc6140f4, Zig 0.17.0:test test-golden test-kernel-contract -Doptimize=safe: 91/91 build steps, 1401/1408 tests passed, seven explicit platform/library skips. Frozen server corpus: 309/319 equal, ten known differences, zero unexpected differences.Host format tests do not qualify GPU arithmetic, checkpoint admission, tensor-parallel execution or model performance. This change adds no GPU kernel.
Public CI at this exact head: Zig format, No GPU host/contracts/goldens/fuzz, desktop and mobile checks all passed. Complete tracked-tree and outgoing-history privacy inspection found zero new private-data matches.