Skip to content
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

Per token #39

Closed
wants to merge 2 commits into from
Closed

Per token #39

wants to merge 2 commits into from

Conversation

horheynm
Copy link
Member

Blocked on channel wise being merged.
Channel gets scale and zp from one axis, per token is along another dim, so can reuse that

self._scale, self._zero_point = self.calculate_qparams(observed)
if self.quantization_args.strategy == QuantizationStrategy.TOKEN:
self._scale, self._zero_point = self.get_qparams_per_dim(
observed, dim=2
Copy link
Contributor

Choose a reason for hiding this comment

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

dim should be 1

@horheynm horheynm closed this May 3, 2024
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