dequantize_mxfp4 ended in transpose(1, 2), hardcoding gpt-oss's rank-4
[E, rows, G, B]. A SINGLE expert projection [rows, G, B] -- what a
DeepSeek-V3-lineage checkpoint such as released Kimi K3 ships per expert --
raised IndexError instead of returning its [K, rows].
transpose(-2, -1) is equivalent for the rank-4 case (the result is rank 3
there, so dims (1,2) already WERE the trailing pair) and correct for rank 3.
Rank 2 now raises a ValueError telling you to reshape, where it previously
raised IndexError from inside torch.
gpt-oss bit-exactness unchanged and still gated: test_real_gptoss20b_bytes
asserts torch.equal against transformers' own convert_moe_packed_tensors, and
rank-3-vs-rank-4 equivalence is proved expert-by-expert rather than argued.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>