Skip to content

Fail closed for non-affine NAX quantization - #1

Closed
PhilipJohnBasile wants to merge 1 commit into
codex/moe-dflash-integration-20260730from
codex/nax-affine-mode-guard-20260811
Closed

Fail closed for non-affine NAX quantization#1
PhilipJohnBasile wants to merge 1 commit into
codex/moe-dflash-integration-20260730from
codex/nax-affine-mode-guard-20260811

Conversation

@PhilipJohnBasile

Copy link
Copy Markdown
Owner

Scope

MTPLX custom NAX and vk verification kernels consume affine quantization biases. This patch preserves stock MLX execution for every QuantizedLinear mode other than affine before any custom dispatch or affine-only tensor access.

Evidence

  • Real nvfp4, mxfp4, and mxfp8 layers fall back to stock MLX with zero output difference.
  • A simulated future non-affine 6-bit mode exercises the common guard.
  • No custom verification kernel is called in those cases.
  • Focused suite: 10 passed.
  • Ruff, py_compile, and git diff --check passed.
  • Mutation check: removing the guard reproduces the missing biases KeyError.
  • Independent frozen-diff Sol review: APPROVE, no blockers.

This is a fail-closed compatibility fix, not a speed claim.

@PhilipJohnBasile
PhilipJohnBasile marked this pull request as ready for review August 24, 2026 01:44

Copy link
Copy Markdown
Owner Author

Archiving this stacked 2.4-era component PR with its parent integration stack. It is not part of the current 2.9.1 mainline or upstream PR youssofal#336. The branch and commit remain preserved; any still-relevant affine-guard change should return later as a small rebase onto current upstream main.

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