Repository navigation
Allow use_sliced_mla_proj with Qwix interception quantization. - #5575
Merged
Merged
Conversation
copybara-service
Bot
requested review from
A9isha,
NuojCheng,
RissyRan,
SurbhiJainUSC,
abhinavclemson,
aireenmei,
bvandermoon,
darisoy,
dipannita08,
gagika,
gobbleturk,
hengtaoguo,
huytransformer,
igorts-git,
jiangjy1982,
khatwanimohit,
richjames0,
shralex,
shuningjin,
vipannalla and
xibinliu
as code owners
October 6, 2026 21:11
copybara-service
Bot
force-pushed
the
test_994611405
branch
4 times, most recently
from
October 6, 2026 22:54
3697fe2 to
3293eb2
Compare
darisoy
approved these changes
Oct 6, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
copybara-service
Bot
force-pushed
the
test_994611405
branch
2 times, most recently
from
October 7, 2026 07:07
e65b5a4 to
df6e7d0
Compare
`use_sliced_mla_proj` slices the single `wq_b` / `wkv_b` kernel param before a plain `lax.dot_general` (see `DenseGeneral(slice_bounds=...)`). With Qwix interception quantization (`use_qwix_quantization=True`), the layers keep `quant=None`, and Qwix intercepts that dot_general by module path. So the sliced projections are still quantized in both forward and backward. The current config check rejects every quantized config, which blocks sliced MLA projections for Qwix-quantized (e.g. fp8) training. # Tests Updated `tests/unit/configs_value_test.py` (non-Qwix quantization still rejected, Qwix allowed, Qwix + batch split rejected). #### Auxiliary Test (similar to [PR#5141](#5141)) Sliced MLA (`use_sliced_mla_proj`) + Qwix: interception correct. [internal link] [full [internal link] ``` # use_sliced_mla_proj=false [QWIX] module='decoder/moe_layers/self_attention/wq_b' op=dot_general0 rule=0 --- [QWIX] module='decoder/moe_layers/self_attention/wkv_b' op=dot_general0 rule=0 --- [QWIX] module='mtp_block/mtp_layer_1/mtp_1_transformer_layer/self_attention/wq_b' op=dot_general0 rule=0 --- [QWIX] module='mtp_block/mtp_layer_1/mtp_1_transformer_layer/self_attention/wkv_b' op=dot_general0 rule=0 # use_sliced_mla_proj=true [QWIX] module='decoder/moe_layers/self_attention/wq_b' op=dot_general0 rule=0 [QWIX] module='decoder/moe_layers/self_attention/wq_b' op=dot_general1 rule=0 --- [QWIX] module='decoder/moe_layers/self_attention/wkv_b' op=dot_general0 rule=0 [QWIX] module='decoder/moe_layers/self_attention/wkv_b' op=dot_general1 rule=0 --- [QWIX] module='mtp_block/mtp_layer_1/mtp_1_transformer_layer/self_attention/wq_b' op=dot_general0 rule=0 [QWIX] module='mtp_block/mtp_layer_1/mtp_1_transformer_layer/self_attention/wq_b' op=dot_general1 rule=0 --- [QWIX] module='mtp_block/mtp_layer_1/mtp_1_transformer_layer/self_attention/wkv_b' op=dot_general0 rule=0 [QWIX] module='mtp_block/mtp_layer_1/mtp_1_transformer_layer/self_attention/wkv_b' op=dot_general1 rule=0 ``` # Checklist - [X] I have performed a self-review of my code. - [X] I have necessary comments in my code, particularly in hard-to-understand areas. - [X] I have run end-to-end tests tests and provided workload links above if applicable. - [X] I have made or will make corresponding changes to the doc if needed. PiperOrigin-RevId: 994917175
copybara-service
Bot
force-pushed
the
test_994611405
branch
from
October 7, 2026 08:00
df6e7d0 to
1486248
Compare
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.
Allow
use_sliced_mla_projwith Qwix interception quantization.use_sliced_mla_projslices the singlewq_b/wkv_bkernel param before a plainlax.dot_general(seeDenseGeneral(slice_bounds=...)). With Qwix interception quantization (use_qwix_quantization=True), the layers keepquant=None, and Qwix intercepts that dot_general by module path. So the sliced projections are still quantized in both forward and backward. The current config check rejects every quantized config, which blocks sliced MLA projections for Qwix-quantized (e.g. fp8) training.Tests
Updated
tests/unit/configs_value_test.py(non-Qwix quantization still rejected, Qwix allowed, Qwix + batch split rejected).Auxiliary Test (similar to PR#5141)
Sliced MLA (
use_sliced_mla_proj) + Qwix: interception correct. [internal link] [full [internal link]Checklist