Skip to content

Conversation

@jrplatin
Copy link
Collaborator

@jrplatin jrplatin commented Sep 24, 2025

Description

In this PR, I add manual Qwix weight quantization and activation quantization for SparseMatmul in DeepSeekMoE. This is needed because qwix.quantize_model does not work nicely with the shard_map that we are using (which hides Qwix metadata).

Tests

Added relevant unit testing + tested with and without sparse_matmul and skip_quantization.

Checklist

Before submitting this PR, please make sure:

  • I have performed a self-review of my code.
  • I have necessary comments in my code, particularly in hard-to-understand areas.
  • I have made or will make corresponding changes to any relevant documentation.

@jrplatin jrplatin changed the base branch from main to bz/ds-sparse-matmul September 24, 2025 23:24
@jrplatin jrplatin force-pushed the jacobplatin/ds-sparse-matmul-qwix branch 3 times, most recently from dc66730 to 1ad3d95 Compare September 25, 2025 02:34
@jrplatin jrplatin force-pushed the jacobplatin/ds-sparse-matmul-qwix branch from 1ad3d95 to c1c5ace Compare September 29, 2025 01:19
@jrplatin jrplatin marked this pull request as ready for review September 29, 2025 01:42
@jrplatin jrplatin changed the title [Draft] Qwix support for SpraseMatmul [JAX][Quantization] Add Qwix support for SparseMatul Sep 29, 2025
@jrplatin jrplatin requested a review from bzgoogle September 30, 2025 13:45
@jrplatin jrplatin changed the base branch from bz/ds-sparse-matmul to main September 30, 2025 19:37
bzgoogle and others added 7 commits September 30, 2025 22:50
Signed-off-by: bzgoogle <beinuoz@google.com>
Signed-off-by: bzgoogle <beinuoz@google.com>
Signed-off-by: Jacob Platin <jacobplatin@google.com>
Signed-off-by: Jacob Platin <jacobplatin@google.com>
Signed-off-by: Jacob Platin <jacobplatin@google.com>
Signed-off-by: Jacob Platin <jacobplatin@google.com>
@jrplatin jrplatin force-pushed the jacobplatin/ds-sparse-matmul-qwix branch from 1c020fd to 0eea95b Compare September 30, 2025 22:53
Signed-off-by: Jacob Platin <jacobplatin@google.com>
@jrplatin jrplatin merged commit 1d805b1 into main Sep 30, 2025
1 of 2 checks passed
bzgoogle pushed a commit that referenced this pull request Oct 3, 2025
Signed-off-by: Jacob Platin <jacobplatin@google.com>
bzgoogle pushed a commit that referenced this pull request Oct 30, 2025
Signed-off-by: Jacob Platin <jacobplatin@google.com>
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.

4 participants