Skip to content

Fix CI test FP8 static backend matching failure#1589

Merged
chensuyue merged 2 commits intomainfrom
lvl/fix_ci_failure
Mar 21, 2026
Merged

Fix CI test FP8 static backend matching failure#1589
chensuyue merged 2 commits intomainfrom
lvl/fix_ci_failure

Conversation

@lvliang-intel
Copy link
Copy Markdown
Contributor

Description

Problem
test_fp8_static and test_fp8_static_rtn fail during model loading with:
ValueError: No compatible backend found for layer model.decoder.layers.1.self_attn.v_proj
with config QuantizationScheme(..., transform_config={})

Root Cause
When a quantized FP8 static model is saved and reloaded, the transform_config field undergoes a None → {} drift:

Preset definition (FP8_STATIC): transform_config=None (dataclass default)
Export/save: BaseCompressor initializes transform_config to {}, which gets serialized into the quantization config JSON
Load/inference: JSON deserializes it back as {}, producing QuantizationScheme(..., transform_config={})
Backend matching: fp8_static_scheme_checker compares the loaded config against FP8_STATIC using ==, which fails because {} != None

Fix
Updated QuantizationScheme.eq to treat None and empty dict {} as semantically equivalent for dict-typed fields like transform_config. Both represent "no transform config", so they should compare as equal.

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Performance improvement
  • Code refactoring
  • Other (please specify):

Related Issues

Fixes or relates to #

Checklist Before Submitting

  • My code has been tested locally.
  • Documentation has been updated as needed.
  • New or updated tests are included where applicable.

… None mismatch

Signed-off-by: lvliang-intel <liang1.lv@intel.com>
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

Fixes FP8 static backend matching during model reload by making QuantizationScheme equality tolerant to None vs {} drift in dict-typed fields (notably transform_config), preventing false “no compatible backend” errors in FP8 static inference.

Changes:

  • Updates QuantizationScheme.__eq__ to treat None and empty dict {} as equivalent for dict-valued fields.
  • Prevents FP8 static backend selection from failing when reloaded configs deserialize transform_config as {}.

@chensuyue chensuyue merged commit 6bfe88f into main Mar 21, 2026
30 checks passed
@chensuyue chensuyue deleted the lvl/fix_ci_failure branch March 21, 2026 01:02
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