You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(modelopt): harden NVFP4 dequant shape validation and tests
Address PR review feedback on the NVFP4 dequant path:
- unpack_nvfp4_codes now rejects non-2D input with a clear ValueError so a
loader shape/dtype mistake surfaces instead of being silently reinterpreted
via the uint8 cast.
- dequantize_nvfp4 enforces the fixed NVFP4 16-element block size; a derived
size other than 16 means mismatched weight/scale shapes and now raises.
- Rewrite the known-value and raw-uint8 block-scale tests to use full K=16
blocks (spec-realistic), asserting trailing zero-code reconstruction.
- Fix stale "repeat_interleave" comment to "np.repeat".
- Add regression tests for the two new validation errors.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: justinchuby <justinchuby@users.noreply.github.com>
0 commit comments