Fix compatibility with latest compressed_tensors compressor refactor#1576
Merged
Fix compatibility with latest compressed_tensors compressor refactor#1576
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the LLM-Compressor export path to remain compatible with recent compressed_tensors refactors (notably removal of compressed_tensors.config.format) and adjusts test dependency sourcing to use upstream llmcompressor main.
Changes:
- Add
_compress_and_set_format()to support both legacy and newercompressed_tensorscompression/format APIs. - Update
pack_layer()to use the new compatibility helper. - Switch CPU/CUDA test requirements to install
llmcompressorfrom the upstream@mainbranch (removing the temporarycompressed-tensorspin).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
auto_round/export/export_to_llmcompressor/export.py |
Introduces compatibility helper and routes packing through it to handle new/old compressed_tensors APIs. |
test/test_cuda/requirements_llmc.txt |
Updates LLMC test dependency source to llmcompressor@main. |
test/test_cpu/requirements.txt |
Updates CPU test dependency source to llmcompressor@main. |
The compressed_tensors commit 927f6d5 removed `compressed_tensors.config.format` and its `set_per_module_format` function. This broke the llmcompressor export path in `pack_layer()`. Add `_compress_and_set_format()` helper with backward compatibility: - New API (>=0.9.0): uses `compress_module()` from `compressed_tensors.compressors` - Old API (<0.9.0): falls back to `NaiveQuantizationCompressor` + `set_per_module_format` Signed-off-by: Yi Liu <yi4.liu@intel.com> Signed-off-by: yiliu30 <yi4.liu@intel.com>
Fetches Azure DevOps CI logs for a given GitHub PR number and parses pytest FAILURES sections to produce a grouped summary with tracebacks. Usage: python scripts/fetch_ci_failures.py <PR_NUMBER> [--save <output.md>] Signed-off-by: Yi Liu <yi4.liu@intel.com> Signed-off-by: yiliu30 <yi4.liu@intel.com>
for more information, see https://pre-commit.ci
CompressedLinear was removed in compressed_tensors PR #610. These 3 tests need weight_handler.py detect_layer updates to work with the new quantization_scheme-based loading path. Signed-off-by: yiliu30 <yi4.liu@intel.com>
Keep as local-only utility script. Signed-off-by: yiliu30 <yi4.liu@intel.com>
chensuyue
approved these changes
Mar 20, 2026
xin3he
approved these changes
Mar 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #1566
Summary
ModuleNotFoundError: No module named 'compressed_tensors.config.format'caused by compressed_tensors commit 927f6d5 which removed theconfig.formatmodule_compress_and_set_format()helper that supports both old and new compressed_tensors APIscompress_module()fromcompressed_tensors.compressorsNaiveQuantizationCompressor+set_per_module_formatFixes the 3 CI failures in PR #1570:
test_llmc_dynamic_wint8aint8_exporttest_llmc_dynamic_wint8aint8_export_with_tuningtest_fp8_block_llm_compressor_formatTest plan