Skip to content

[Bugfix] Fix Per-Token Dynamic Activation Quantization #393

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

max410011
Copy link

@max410011 max410011 commented Jul 14, 2025

Summary

This PR fixes the activation quantization issue described in Issue #394, where the input scale shape was incorrect when using the Dynamic TOKEN strategy.

Fix

  • Corrected the reduction dimensions to ensure only the hidden dimension is reduced.
  • This ensures the input scale shape is (batch_size, seq_len, 1) instead of (1, seq_len, hidden_dim).

@brian-dellabetta
Copy link
Contributor

brian-dellabetta commented Jul 15, 2025

Hi @max410011 , appreciate the thorough detail in the issue! I tried your PR, and both original main and your branch seem to work, the resultant models can be loaded up and run in vllm, which surprises me. This is some old code, and per-token/per-channel always slips me up. I will ask around to see if your reasoning in the issue description is correct.

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.

2 participants