Skip to content

Conversation

@kylesayrs
Copy link
Collaborator

@kylesayrs kylesayrs commented Nov 10, 2025

Changes

  • Add propagate_error argument to sequential pipeline.
    • When True, the sequential pipeline propagates quantized outputs (outputs after module optimization/GPTQ apply)
    • When False, the sequential pipeline propagates unquantized outputs (full precision)
    • GPTAQ authors report slightly better accuracy recovery when propagate_error=False. This aligns with the preliminary testing I've done myself, but more work will be required to make this a default argument.

Signed-off-by: Kyle Sayers <[email protected]>
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @kylesayrs, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the sequential pipeline by introducing a propagate_error argument, allowing fine-grained control over how intermediate layer outputs are handled during the quantization calibration process. This new option enables users to choose between propagating quantized or unquantized outputs, offering a mechanism to potentially improve model accuracy recovery, aligning with recent findings in quantization research.

Highlights

  • New propagate_error Argument: Introduced a new propagate_error boolean argument to the sequential pipeline configuration, defaulting to True.
  • Output Propagation Control: This argument controls whether quantized (when True) or unquantized (when False) layer outputs are propagated as inputs to subsequent layers during calibration.
  • Accuracy Recovery: Preliminary testing and research (GPTAQ) suggest that setting propagate_error to False can lead to better accuracy recovery by propagating unquantized outputs.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@kylesayrs kylesayrs changed the title implement propagate_error [GPTAQ] Implement propagate_error argument Nov 10, 2025
@kylesayrs kylesayrs added the ready When a PR is ready for review label Nov 10, 2025
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a propagate_error argument to the sequential pipeline, allowing control over whether to propagate quantized or unquantized outputs between subgraphs. The implementation correctly reflects this new option. My review focuses on improving the efficiency of the pipeline by avoiding redundant computations. I've identified two places where an efficiency check for the last subgraph was removed and should be restored. I also pointed out an opportunity to skip an entire processing loop when it's not needed, which would significantly improve performance in that scenario.

@github-actions
Copy link

👋 Hi! Thank you for contributing to llm-compressor. Please add the ready label when the PR is ready for review.

Note: This is required to complete the testing suite, please only add the label once the PR is code complete and local testing has been performed.

Signed-off-by: Kyle Sayers <[email protected]>
Signed-off-by: Kyle Sayers <[email protected]>
@kylesayrs kylesayrs changed the title [GPTAQ] Implement propagate_error argument Implement propagate_error argument Nov 10, 2025
Copy link
Collaborator

@brian-dellabetta brian-dellabetta left a comment

Choose a reason for hiding this comment

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

nice! nit -- batch_idx is a bit more readable than b_idx

@kylesayrs
Copy link
Collaborator Author

@brian-dellabetta I agree, but I think b_idx is more readable than putting the loop on two separate lines 🙁

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

Labels

ready When a PR is ready for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants