Repository navigation
FP8 ragged block test: unwrap unsloth-zoo partial-block patch for the stock baseline - #17808
Merged
Merged
Conversation
…he stock baseline unsloth_zoo #2515 patches Fp8Dequantize._dequantize_one on import (_unsloth_partial_block_patched / _unsloth_original). The test's unpatched baseline only unwrapped unsloth's own ragged-block wrapper, so it ran the zoo-fixed op and pytest.raises(ValueError) failed. Unwrap both markers, pin that the baseline is transformers' own op, and check the two patches stacked still match the block reference.
Member
Author
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Delightful! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
This was referenced Nov 15, 2026
danielhanchen
added a commit
to danielhanchen/unsloth-staging-2
that referenced
this pull request
Nov 16, 2026
Final comment pass for recently merged PRs. Trims comments added by unslothai#17660, unslothai#17806, unslothai#17807, unslothai#17808, unslothai#17812, unslothai#17830, unslothai#17854, unslothai#17857 and unslothai#17870 that are still on main. Multi-line explanations are collapsed to one line, and comments that restate the code are removed. Comments that explain a version quirk or a correctness trap are kept, along with license headers and pragmas. Changed comment lines: unslothai#17660 5 -> 2, unslothai#17806 4 -> 2, unslothai#17808 1 -> 0, unslothai#17830 3 -> 1, unslothai#17857 1 -> 0. unslothai#17807, unslothai#17812, unslothai#17854 and unslothai#17870 are unchanged. Overall: 6 files, 14 lines removed, 5 added. Only comments change: the AST check (comment_tools.py check) and the pre-push gate both pass.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tests/test_fp8_ragged_block_dequant.py::test_ragged_rows_match_block_reference[glm5_3]and[ling3]fail inRepo tests (CPU, rest)on every PR whose CI installs unsloth-zoo at or after898a6b0d(unslothai/unsloth-zoo#2515). Seen on #17725 and #17801:unsloth-zoo#2515 now patches
Fp8Dequantize._dequantize_oneon import to dequantize partial edge blocks correctly. Its wrapper is marked_unsloth_partial_block_patchedand keeps the stock function in_unsloth_original. This test's "unpatched" baseline only unwrapped unsloth's own ragged-block wrapper (_unsloth_ragged_blocks/__wrapped__). So the baseline was actually the zoo-fixed op, and the expected stockValueErrornever came. The zoo patch is correct; the test's notion of "unpatched" was too narrow.Changes (test only)
_op_cls(patched=False)unwraps both markers, so the baseline is transformers' own op again.test_unpatched_op_carries_no_unsloth_wrapperpins that the baseline has no unsloth or unsloth-zoo wrapper left. TheValueErrorassertion only means something against the stock op.test_ragged_padding_composes_over_the_zoo_partial_block_patchcovers the real-world case, where both patches are live in one process. It stacks unsloth's ragged padding on top of the zoo partial-block patch and checks the block reference for 576x384, 576x2560 and stacked 2x256x200 experts. It skips when the zoo module is absent.Verification
0c225609(before #2515)c8655b99(main)c8655b99, zoo patch applied explicitly first