Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 15, 2026

  • Understand the issue: ignore_layers argument not working for FP8 models
  • Root cause: get_fp_layer_names only checks SUPPORTED_LAYER_TYPES which doesn't include FP8Linear
  • Fix get_fp_layer_names to also check INNER_SUPPORTED_LAYER_TYPES (FP8Linear)
  • Test the fix with a minimal test case
  • Add test to existing test suite for FP8 models
  • Add comprehensive unit tests for get_fp_layer_names function
  • Address code review feedback (improved mocking, removed debug print)
  • Run existing tests to ensure no regression
  • Security scan passed (0 vulnerabilities found)
  • Final code review passed (0 issues found)
  • Address PR review comments: removed unused import, added None test, fixed pre-commit issues

Changes in this commit:

  • Removed unused import of INNER_SUPPORTED_LAYER_TYPES from test file
  • Added test_none_ignore_layers to test None input handling
  • Applied pre-commit formatting (black, isort)
Original prompt

#1283


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Fix issue with auto rounding feature Fix ignore_layers not working for FP8 models Jan 15, 2026
Copilot AI requested a review from yiliu30 January 15, 2026 04:32
@yiliu30 yiliu30 marked this pull request as ready for review January 15, 2026 04:56
Copilot AI review requested due to automatic review settings January 15, 2026 04:56
Copy link
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 fixes a bug where the --ignore_layers argument fails to exclude layers from quantization in FP8 models. The root cause was that get_fp_layer_names() only checked SUPPORTED_LAYER_TYPES but FP8 models contain FP8Linear layers which exist only in INNER_SUPPORTED_LAYER_TYPES.

Changes:

  • Updated get_fp_layer_names() to check both SUPPORTED_LAYER_TYPES and INNER_SUPPORTED_LAYER_TYPES
  • Added comprehensive unit tests for layer name matching with regular Linear and FP8Linear layers
  • Added integration test validating end-to-end behavior with FP8 models

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
auto_round/compressors/utils.py Modified get_fp_layer_names() to check both layer type lists, enabling FP8Linear layer detection
test/test_cpu/utils/test_compressor_utils.py Added unit tests covering regular Linear layers, FP8Linear layers, pattern matching, and edge cases
test/test_cuda/advanced/test_fp8_input.py Added integration test validating ignore_layers functionality with FP8 models

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@yiliu30
Copy link
Contributor

yiliu30 commented Jan 15, 2026

@copilot Please fix the pre-commit issue

Copy link
Contributor Author

Copilot AI commented Jan 15, 2026

@copilot Please fix the pre-commit issue

Fixed pre-commit issues (black, isort formatting) in commit 17fbf3a. All pre-commit checks now pass.

@n1ck-guo
Copy link
Contributor

LGTM

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