Skip to content

Fix compatibility with latest compressed_tensors compressor refactor#1576

Merged
xin3he merged 9 commits intomainfrom
fix/pr-1570
Mar 20, 2026
Merged

Fix compatibility with latest compressed_tensors compressor refactor#1576
xin3he merged 9 commits intomainfrom
fix/pr-1570

Conversation

@yiliu30
Copy link
Copy Markdown
Contributor

@yiliu30 yiliu30 commented Mar 19, 2026

Fix #1566

Summary

  • Fix ModuleNotFoundError: No module named 'compressed_tensors.config.format' caused by compressed_tensors commit 927f6d5 which removed the config.format module
  • Add backward-compatible _compress_and_set_format() helper that supports both old and new compressed_tensors APIs
  • 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

Fixes the 3 CI failures in PR #1570:

  • test_llmc_dynamic_wint8aint8_export
  • test_llmc_dynamic_wint8aint8_export_with_tuning
  • test_fp8_block_llm_compressor_format

Test plan

  • All 3 previously failing tests pass locally (3 passed in 81s)
  • Full CI run on this PR

Copilot AI review requested due to automatic review settings March 19, 2026 11:48
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 newer compressed_tensors compression/format APIs.
  • Update pack_layer() to use the new compatibility helper.
  • Switch CPU/CUDA test requirements to install llmcompressor from the upstream @main branch (removing the temporary compressed-tensors pin).

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>
yiliu30 and others added 4 commits March 19, 2026 12:00
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>
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 chensuyue added this to the 0.12.0 milestone Mar 20, 2026
@xin3he xin3he merged commit 49d2dbb into main Mar 20, 2026
29 checks passed
@xin3he xin3he deleted the fix/pr-1570 branch March 20, 2026 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[LLMC]: Adapt to the CT&LLMC main branch code refactor

4 participants