Skip to content

Update quants tests - #45480

Merged
SunMarc merged 2 commits into
mainfrom
fix-q
Apr 27, 2026
Merged

SunMarc merged 2 commits into
mainfrom
fix-q

Conversation

@SunMarc

@SunMarc SunMarc commented Apr 16, 2026 •

Copy link
Copy Markdown
Member

What does this PR do?

This PR fixes quantization tests. A few things were deprecated when compressed-tensors had their latest release, so i'm updating the tests. For fouroversix, it's just that the model was a bit too big for the CI.
We removed some tests in compressed tensors as we don't test sparse model anymore.

@SunMarc
SunMarc requested a review from ydshieh April 16, 2026 15:23
@HuggingFaceDocBuilderDev

Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@SunMarc

SunMarc commented Apr 17, 2026

Copy link
Copy Markdown
Member Author

run-slow: compressed_tensors_integration, fouroversix_integration

@github-actions

Copy link
Copy Markdown
Contributor

Workflow Run ⚙️

This comment contains run-slow, running the specified jobs:

models: []
quantizations: ["quantization/compressed_tensors_integration", "quantization/fouroversix_integration"]

@github-actions

Copy link
Copy Markdown
Contributor

CI Results

Workflow Run ⚙️

Commit Info

Context Commit Description
RUN 908452fd workflow commit (merge commit)
PR 563dfb99 branch commit (from PR)
main 69448db2 base commit (on main)

✅ No failing test specific to this PR 🎉 👏 !

Comment on lines +71 to +72
self.assertTrue(
torch.allclose(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

let's use torch.testing.assert_close

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

will do

f"Weight mismatch for module '{name}' in quantized-only or stacked model.",
)

def test_outputs_match(self):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

just a short comment (on PR page like here) to say why this is removed would be nice. So we keep a "for the record")

def test_default_run_compressed__True(self):
from compressed_tensors.linear.compressed_linear import CompressedLinear
from compressed_tensors.quantization.utils import iter_named_leaf_modules
from compressed_tensors import QuantizationStatus

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I guess the changes here is also because sth is deprecated (?)

@ydshieh ydshieh left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks

@github-actions

Copy link
Copy Markdown
Contributor

[For maintainers] Suggested jobs to run (before merge)

run-slow: compressed_tensors_integration, fouroversix_integration

@SunMarc
SunMarc enabled auto-merge April 27, 2026 12:47
@SunMarc
SunMarc added this pull request to the merge queue Apr 27, 2026
Merged via the queue into main with commit e651c68 Apr 27, 2026
17 checks passed
@SunMarc
SunMarc deleted the fix-q branch April 27, 2026 12:59
ArthurZucker pushed a commit that referenced this pull request Apr 28, 2026
* update

* Use torch.testing.assert_close in compressed_tensors weight check
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