Skip to content

fix(quantizer): support preserved MXFP4 in DSpark plans - #645

Open
apetersson wants to merge 1 commit into
antirez:ds4f-mxfp4from
apetersson:fix/642-dspark-preserved-mxfp4
Open

fix(quantizer): support preserved MXFP4 in DSpark plans#645
apetersson wants to merge 1 commit into
antirez:ds4f-mxfp4from
apetersson:fix/642-dspark-preserved-mxfp4

Conversation

@apetersson

Copy link
Copy Markdown

Enable preserved native MXFP4 for DSpark routed experts only, with strict I8/F8_E8M0 shape, payload, and alignment validation. Non-expert MXFP4 remains rejected.

Add mixed IQ2_XXS gate/up + MXFP4 down Metal coverage for 1–5 tokens, harden block decoding fixtures, and fix fused tiny gate/up output indexing. No GGUF format changes; compatibility with ds4f-mxfp4 is preserved.

Validation

  • Quantizer, MXFP4 dot, mixed/all-MXFP4 Metal, CPU, and model-independent tests pass.
  • Strict dry-run: 3 MXFP4 tensors, 7,297,737,120 bytes.
  • MTP and DSpark focused verification pass with zero argmax gap and valid 81-tensor DSpark binding.
  • Model-backed Metal correctness groups pass with zero tensor-equivalence drift. The abliterated 0731 model reports 19 expected model-specific golden/output mismatches.
  • git diff --check passes.

Fixes #642

Allow native packed MXFP4 only for routed DSpark expert tensors while
keeping ordinary MXFP4 quantization requests rejected. Validate the paired
I8 weight and F8_E8M0 scale contract before planning or conversion.

Add native planner and repacker regressions plus mixed IQ2_XXS/MXFP4
Metal coverage for one through five tokens. Correct the fused tiny gate/up
diagnostic slot indexing exercised by those tests.

Fixes antirez#642
@apetersson

Copy link
Copy Markdown
Author

Speed regression benchmark (M1 Ultra, 7 alternating base/patched DSpark pairs):

speed-regression.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant