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

How to support activation 4bit quantization? #346

Open
Ther-nullptr opened this issue Nov 4, 2024 · 1 comment
Open

How to support activation 4bit quantization? #346

Ther-nullptr opened this issue Nov 4, 2024 · 1 comment

Comments

@Ther-nullptr
Copy link

As mentioned in title.

@dacorvo
Copy link
Collaborator

dacorvo commented Nov 4, 2024

Why 4-bit activations are not supported in quanto ?

Activations are quantized dynamically based on the recording of scales during calibration (unlike weights that are quantized statically), adding an extra cost to the inference.
To make it worth it, we need to benefit from an accelerated matmul with the quantized weights.
Unfortunately, at this stage the only accelerated operations available are for scalar quantization scales, that give terrible results with 4-bit weights (you need group-wise scales to preserve accuracy).

How could you still use 4-bit activations ?

You would need to modify some code here and there:

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

No branches or pull requests

2 participants