Skip to content

[Quant] Add Humming backend support to CT WNA16 MoE - #52799

Closed
HDCharles wants to merge 1 commit into
vllm-project:mainfrom
HDCharles:yiliu/ct-humming-w2a16-v2
Closed

HDCharles wants to merge 1 commit into
vllm-project:mainfrom
HDCharles:yiliu/ct-humming-w2a16-v2

Conversation

@HDCharles

Copy link
Copy Markdown
Contributor

Summary

  • Generalize CompressedTensorsWNA16MoEMethod to support arbitrary integer bit widths (2–8) for Humming backend, using math.ceil packed dimension calculation instead of 32 // num_bits
  • Wire up Humming-specific weight schema (_humming_wna16_weight_schema for QuantizationArgs), quant config (get_humming_moe_quant_config), and kernel selection
  • Add _is_supported_wna16_weight_key to allow Humming experts to accept WNA16 QuantKey types with ScalarType dtypes
  • Add _dtype_abbr helper to fix QuantKey.__str__/ScaleDesc.__str__ crash on ScalarType dtypes
  • Add uint5/6/7 dtype mappings in humming utils

Depends on #52798 — must be merged first (this branch is stacked on it).

Test plan

  • test_humming_supports_compressed_tensors_wna16_quant_key — verifies Humming accepts WNA16 keys for bit widths 2–8
  • test_quant_key_str_supports_scalar_type_dtypes — verifies QuantKey.__str__ works with ScalarType
  • test_compressed_tensors_wna16_moe_create_weights_uses_ceil_packed_shapes — verifies ceil-based packed shapes for 3/5/6/7-bit (requires humming + CUDA)
  • test_compressed_tensors_wna16_moe_converts_and_sets_up_humming_kernel — end-to-end weight conversion and kernel setup (requires humming + CUDA)
  • All existing tests pass

🤖 Generated with Claude Code

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@mergify mergify Bot added the quantization label Aug 18, 2026
@mergify

mergify Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @HDCharles.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify Bot added the needs-rebase label Aug 19, 2026
CompressedTensorsWNA16MoEMethod previously chose weight buffer layout
(N-first vs K-first) based on which backend the oracle selected, leaking
backend-specific concerns into the integration layer. This required an
ever-growing exclusion list and caused unnecessary transpose round-trips
for some backends (e.g. Triton: load K-first → transpose back to N-first).

Now CT MoE always loads weights in the checkpoint's native N-first format
[E, N, K_packed]. Backend-specific transposition (to K-first for Marlin,
CPU, XPU, emulation) is handled in convert_to_wna16_moe_kernel_format
where it naturally belongs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@HDCharles
HDCharles force-pushed the yiliu/ct-humming-w2a16-v2 branch from 2798577 to a6bd447 Compare September 16, 2026 18:57
@mergify mergify Bot removed the needs-rebase label Sep 16, 2026
@mergify

mergify Bot commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @HDCharles.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify Bot added the needs-rebase label Sep 29, 2026
@HDCharles HDCharles closed this Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant