Skip to content

Conversation

@dhuangnm
Copy link
Collaborator

@dhuangnm dhuangnm commented Dec 2, 2025

SUMMARY:
Update dependency bounds based on their latest releases.

TEST PLAN:
All nightly tests.

Run with upper bounds: https://github.com/neuralmagic/llm-compressor-testing/actions/runs/19864870462
Run with lower bounds: https://github.com/neuralmagic/llm-compressor-testing/actions/runs/19867046299

@github-actions
Copy link

github-actions bot commented Dec 2, 2025

👋 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.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @dhuangnm, 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 focuses on updating the dependency version constraints within the setup.py file for the llmcompressor project. The changes primarily involve raising the upper bounds for several key libraries like numpy, torch, transformers, datasets, and pillow, allowing the project to utilize more recent versions of these packages. Additionally, the accelerate dependency's range has been refined to ensure compatibility with auto-round 0.9.1. These updates are crucial for maintaining compatibility with the latest ecosystem and preparing for the llmcompressor 0.9 release.

Highlights

  • Dependency Upper Bounds Updated: Increased the maximum allowed versions for numpy, torch, transformers, datasets, and pillow to incorporate newer releases, ensuring compatibility with the latest ecosystem.
  • Accelerate Dependency Refined: Adjusted the accelerate dependency's lower bound to >=1.10.0 and upper bound to <=1.12.0 for release builds, specifically to meet the requirements of auto-round 0.9.1.
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.

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 updates the dependency bounds for several packages. The changes are mostly straightforward version bumps. However, I've identified a potential dependency issue with accelerate in non-release builds, which could lead to conflicts with auto-round. I've also pointed out a redundant conditional for the auto-round dependency that can be simplified. My suggestions aim to ensure dependency consistency across different build types and improve code clarity.

"accelerate>=1.6.0,<=1.10.1"
"accelerate>=1.10.0,<=1.12.0"
if BUILD_TYPE == "release"
else "accelerate>=1.6.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

high

The accelerate dependency for non-release builds is set to >=1.6.0. However, the comment on line 131 states that auto-round==0.9.1 requires accelerate >= 1.10.0. Since auto-round is a dependency for all build types, the lower bound for accelerate should be 1.10.0 for non-release builds as well to avoid potential dependency conflicts.

Suggested change
else "accelerate>=1.6.0"
else "accelerate>=1.10.0"

setup.py Outdated
else "compressed-tensors>=0.12.3a2"
),
("auto-round==0.9.1"),
("auto-round==0.9.1" if BUILD_TYPE == "release" else "auto-round==0.9.1"),
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The conditional logic for the auto-round dependency is redundant as it specifies the same version 0.9.1 for both release and non-release builds. This can be simplified to a static dependency for better readability and maintainability.

Suggested change
("auto-round==0.9.1" if BUILD_TYPE == "release" else "auto-round==0.9.1"),
("auto-round==0.9.1"),

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we may want to update this to be its own install tag, similar to dev

e. g uv pip install -e .[dev,autoround]

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Updated, I'll file another PR for the workflows to use the new [autoround] install tag.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fynnsu
fynnsu previously approved these changes Dec 2, 2025
Copy link
Collaborator

@dsikka dsikka left a comment

Choose a reason for hiding this comment

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

Thanks!

Just an FYI - I think we want to pin the transformers version, regardless of release. This is for the time being while we ensure we can support the v5 release that will be out soon.

@dhuangnm
Copy link
Collaborator Author

dhuangnm commented Dec 2, 2025

Thanks!

Just an FYI - I think we want to pin the transformers version, regardless of release. This is for the time being while we ensure we can support the v5 release that will be out soon.

Got it, updated the upper bound for transformers to 5.0.0 although currently its latest is 5.0.0.rc0 on the PyPi.

Signed-off-by: Dan Huang <[email protected]>
@dsikka
Copy link
Collaborator

dsikka commented Dec 2, 2025

Thanks!
Just an FYI - I think we want to pin the transformers version, regardless of release. This is for the time being while we ensure we can support the v5 release that will be out soon.

Got it, updated the upper bound for transformers to 5.0.0 although currently its latest is 5.0.0.rc0 on the PyPi.

Oh sorry, I meant the upper bound should be the current stable release

("auto-round==0.9.1"),
],
extras_require={
"autoround": [
Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks! We will also need to change the transformers test workflow to run autoround tests as they require this install:

- name: Running AutoRound Tests

If we think this will be a bigger change, we can make the autoround optional install change in a followup

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good catch, updated the workflow to install "autoround" dependency as well.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Should be a separate job, no?
Sorry, I think my request is becoming larger than we expected. We can revert to install autoround how you were previously (i.e not using the optional install) and I'll add a follow-up to fix this

@dhuangnm
Copy link
Collaborator Author

dhuangnm commented Dec 2, 2025

Thanks!
Just an FYI - I think we want to pin the transformers version, regardless of release. This is for the time being while we ensure we can support the v5 release that will be out soon.

Got it, updated the upper bound for transformers to 5.0.0 although currently its latest is 5.0.0.rc0 on the PyPi.

Oh sorry, I meant the upper bound should be the current stable release

Gotcha, updated.

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.

4 participants