Skip to content

Tthe LLM Compressor export modification in mixed‑precision mode: the original format unifies all layers as Linear, causing vLLM inference to fail during parsing. - #2128

Open
1607662794 wants to merge 2 commits into
intel:mainfrom
1607662794:main

Conversation

@1607662794

Copy link
Copy Markdown

Description

This PR fixes an issue where the LLM Compressor exports all layers as Linear type in mixed‑precision mode, regardless of their original type. This causes vLLM to fail during model parsing and prevents inference from starting.

Type of Change

Bug fix

Checklist Before Submitting

  • [√] My code has been tested locally.
  • [√] Documentation has been updated as needed.
  • New or updated tests are included where applicable.
  • The CUDA CI has passed. You can trigger it by commenting /azp run Unit-Test-CUDA-AutoRound.

…ication: the original format unifies all layers as Linear, causing vLLM inference to fail during parsing.
@wenhuach21

Copy link
Copy Markdown
Contributor

@Yi4Liu @WeiweiZhang1 please have a review


quant_format = _get_quant_format(model)
quantization_config = QuantizationConfig.from_pretrained(model, format=quant_format)
model.config.quantization_config = quantization_config.to_dict()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hi @1607662794, we’ve handled the mixed-precision case this way. Could you follow the same approach here as well? Thanks!

scheme_groups = {} # (bits, data_type) -> list of layer names
for name, cfg in layer_config.items():
layer_bits = cfg.get("bits", bits)
layer_dt = cfg.get("data_type", data_type)
if layer_bits > 8:
continue
key = (layer_bits, layer_dt)
scheme_groups.setdefault(key, []).append(name)
is_mixed = len(scheme_groups) > 1

@yiliu30
yiliu30 requested a review from xin3he August 7, 2026 05:18
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