Skip to content

[II] Test W4A8 QSRT rate compatibility - #149

Closed
voipmonitor wants to merge 1 commit into
local-inference-lab:masterfrom
voipmonitor:agent/ii-w4a8-qsrt-rate-contract-tests
Closed

voipmonitor wants to merge 1 commit into
local-inference-lab:masterfrom
voipmonitor:agent/ii-w4a8-qsrt-rate-contract-tests

Conversation

@voipmonitor

@voipmonitor voipmonitor commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Status

  • Implementation: implemented
  • Validation: qualified

Purpose

Protect the W4A8 QSRT planning contract enforced by commit 33cbfc70033473f85cc378da44fd8feca9c85610. W4A8 kernels decode one compile-time rate for an entire payload, while the H308 atom profiles carry per-pair K3/K4 rate selectors that require W4A16 execution.

Resulting behavior

The CPU planner tests require both mixed-rate H308 profiles to fail closed under quant_mode="w4a8_mx". The tests also require the supported coupled-K2 uniform-rate profile to retain the source-native Trellis layout.

Compatibility

This pull request changes tests only. Runtime behavior remains defined by commit 33cbfc70033473f85cc378da44fd8feca9c85610.

Validation

  • Focused planner tests: 3 passed.
  • Ruff check and format: passed.
  • git diff --check: passed.

Summary by CodeRabbit

  • Tests
    • Added coverage for validating QSRT profiles during w4a8_mx weight planning.
    • Confirmed mixed-rate profiles are rejected with an error.
    • Confirmed uniform-rate coupled profiles are accepted and use the required weight layout.

@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 81bdf5c0-a068-470f-8e76-b8ea02203eef

📥 Commits

Reviewing files that changed from the base of the PR and between 33cbfc7 and b6a7672.

📒 Files selected for processing (1)
  • tests/moe/test_execution_model.py

📝 Walkthrough

Walkthrough

The PR adds tests for w4a8_mx QSRT profile validation. Mixed-rate profiles must raise ValueError. A uniform-rate coupled profile must succeed and select PreparedWeightLayout.TRELLIS_NATIVE.

Changes

QSRT weight planning validation

Layer / File(s) Summary
QSRT profile validation
tests/moe/test_execution_model.py
Parameterized tests verify that mixed-rate QSRT profiles are rejected. A uniform-rate coupled profile is accepted and uses PreparedWeightLayout.TRELLIS_NATIVE.

Estimated code review effort: 2 (Simple) | ~10 minutes

Mergeability Score: ⚪ Minimal · up to b6a76

This PR adds focused planner coverage without changing runtime behavior, and no actionable merge-blocking risk remains after normal checks and review.

Suggested reviewers: lukealonso

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the tests and the W4A8 QSRT rate compatibility contract covered by the changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@lukealonso

Copy link
Copy Markdown
Collaborator

Closing without merge. The mixed-rate W4A8 QSRT rejection remains implemented in b12x/moe/_shared/execution.py by commit 33cbfc70033473f85cc378da44fd8feca9c85610; this pull request only adds planner tests for that existing behavior.

@lukealonso lukealonso closed this Aug 16, 2026
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.

2 participants