Skip to content

spec_decode_verify transforms and qmv_quad gs 128 coverage (gemma4-qat#323, #324) - #13

Merged
jeethu merged 1 commit into
prism-v0.32.4-fixesfrom
fork/v0.32.4-followups
Oct 17, 2026
Merged

jeethu merged 1 commit into
prism-v0.32.4-fixesfrom
fork/v0.32.4-followups

Conversation

@jeethu

@jeethu jeethu commented Oct 17, 2026

Copy link
Copy Markdown
Member

Two follow-ups to #12 on prism-v0.32.4-fixes, tracked in gemma4-qat (this repository has issues turned off).

spec_decode_verify: transforms throw for K > 0 (numen-tech/gemma4-qat#323)

In the composition, the accept length n_acc is the index of a take_along_axis and carries no stop_gradient. So mx.jvp, mx.vjp and mx.grad through mx.fast.spec_decode_verify all throw [gather_axis] Cannot calculate JVP/VJP with respect to indices. The outputs are integer token ids, so the right tangent is zero. The index now goes through stop_gradient, which changes no forward value.

test_spec_decode_verify_transforms checks that jvp gives zero tangents and that vjp gives a zero cotangent with the logits' shape.

qmv_quad ragged-N test: group size 128 (numen-tech/gemma4-qat#324)

dispatch_qmv sends K = 128 to qmv_quad for any group size, but test_qmv_quad_ragged_n (patch 23, numen-tech/gemma4-qat#302) covered only group sizes 32 and 64. Group size 128 at K = 128 is now included: 72 subtests, up from 56. They pass on the current kernel, so this adds coverage only.

Test

  • pytest python/tests: 966 passed, 57 skipped (965 before, plus the new test).
  • C++ build-lib/tests/tests (metallib): 311/311 test cases, 6534 assertions.

… qmv_quad gs 128

The composition gathers the committed token with n_acc as its index and no
stop_gradient, so jvp/vjp/grad through spec_decode_verify threw for K > 0.
The outputs are integer ids, so the index now carries a zero tangent
(numen-tech/gemma4-qat#323).

test_qmv_quad_ragged_n adds group size 128 at K = 128, which dispatch_qmv
also routes to qmv_quad (numen-tech/gemma4-qat#324): 72 subtests, all pass.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-17T10:13:34.359808Z bf382bb PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@jeethu
jeethu merged commit 6779ccb into prism-v0.32.4-fixes Oct 17, 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.

1 participant