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

Augment blockwise quantization #18101

Merged
merged 9 commits into from
Oct 30, 2023
Merged

Augment blockwise quantization #18101

merged 9 commits into from
Oct 30, 2023

Conversation

chenfucn
Copy link
Contributor

Description

Augment block wise 4b quantization -- plain CPU impl

Motivation and Context

Allow column wise or row wise blocks. Experiments show row wise quantization in LLM weight matrices achieves better precision.

Tests for quantization and dequantization code.

@chenfucn chenfucn requested a review from a team as a code owner October 25, 2023 18:50
yufenglee
yufenglee previously approved these changes Oct 26, 2023
Copy link
Member

@yufenglee yufenglee left a comment

Choose a reason for hiding this comment

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

:shipit:

onnxruntime/core/mlas/lib/q4_dq.cpp Show resolved Hide resolved
onnxruntime/core/mlas/lib/q4_dq.cpp Show resolved Hide resolved
onnxruntime/core/mlas/lib/q4_dq.cpp Outdated Show resolved Hide resolved
onnxruntime/core/mlas/lib/q4_dq.cpp Show resolved Hide resolved
edgchen1
edgchen1 previously approved these changes Oct 27, 2023
@chenfucn chenfucn merged commit 4819fbf into microsoft:main Oct 30, 2023
79 of 84 checks passed
@chenfucn chenfucn deleted the cfu_blkq branch October 30, 2023 16:14
chenfucn added a commit that referenced this pull request Nov 3, 2023
### Description
Replace block-wise 4b quantization implementation


### Motivation and Context
In #18101 we have an
augmented block-wise 4b quantization interface and implementation. Here
we use this new implementation in onnxruntime contrib ops

---------

Co-authored-by: Edward Chen <[email protected]>
kleiti pushed a commit to kleiti/onnxruntime that referenced this pull request Mar 22, 2024
### Description
Augment block wise 4b quantization -- plain CPU impl

### Motivation and Context

Allow column wise or row wise blocks. Experiments show row wise
quantization in LLM weight matrices achieves better precision.

Added tests for quantization and dequantization code.
kleiti pushed a commit to kleiti/onnxruntime that referenced this pull request Mar 22, 2024
### Description
Replace block-wise 4b quantization implementation


### Motivation and Context
In microsoft#18101 we have an
augmented block-wise 4b quantization interface and implementation. Here
we use this new implementation in onnxruntime contrib ops

---------

Co-authored-by: Edward Chen <[email protected]>
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.

3 participants