Skip to content

Static Activation Quantization and Mixed-Precision Quantization Incompatibility #363

Open

Description

@aptsunny

When using static quantization for activation, we encountered an issue where the mixed-precision quantization fails due to the order of registering activation parameters. This incompatibility disrupts the expected behavior of mixed-precision quantization, leading to incorrect results or unintended behavior.

Image

Activity

  1. sasha-hailo commented on Apr 14, 2025

    @sasha-hailo

    @aptsunny ,
    I assume you encountered the same issue I did a few months ago.
    Please see the bug report I opened in #163.
    I also posted my fix proposal in a forked repo (https://github.com/sasha-hailo/llmc/tree/main_hailo_share).
    Hope you find it helpful.

  2. aptsunny commented on Apr 16, 2025

    @aptsunny
    Author

    @aptsunny , I assume you encountered the same issue I did a few months ago. Please see the bug report I opened in #163. I also posted my fix proposal in a forked repo (https://github.com/sasha-hailo/llmc/tree/main_hailo_share). Hope you find it helpful.

    I really appreciate your input on this issue. Your solution is spot-on, and I’ll work on getting it implemented.

  3. sasha-hailo commented on May 7, 2025

    @sasha-hailo

    @gushiqiao ,
    Thank you for the update.
    Is my understanding correct, that this currently supports keeping selected layers in full precision
    (but not the originally intended granularity of supporting any quantization precision to any layer)?

  4. aptsunny commented on May 7, 2025

    @aptsunny
    Author

    llmc/configs/quantization/methods/MixPrecision/rtn_w_a_static.yml

    Line 37 in b0bf39e

    ignored_layers:

    Hi, I noticed that the latest implementation has removed the mix_bits related functionality. As a result, it seems that mixed-precision quantization experiments with different layers quantized to 8-bit and 16-bit respectively are hard to conduct. Could you please explain the reason for this change and whether there are any alternative ways to achieve such mixed-precision quantization now?

  5. gushiqiao commented on May 7, 2025

    @gushiqiao
    Contributor

    This setting is deployment-friendly. The previous code structure was somewhat messy, so for now we've opted for a simplified support of 8-bit and 16-bit mixed precision. In theory, all methods in LLMC should work with this setup, whether using static or dynamic quantization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions