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
Conversation
…ication: the original format unifies all layers as Linear, causing vLLM inference to fail during parsing.
|
@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() |
There was a problem hiding this comment.
Hi @1607662794, we’ve handled the mixed-precision case this way. Could you follow the same approach here as well? Thanks!
auto-round/auto_round/export/export_to_llmcompressor/export_to_fp.py
Lines 313 to 322 in 98f2cdb
|
@1607662794 Could you please share the case before and after this fix? |
Before the modification, the quantization config’s target was uniformly set to “Linear”, making it impossible to distinguish different layers. After the modification, target is specifically assigned to the actual layers covered by that quantization config. Exported in the llm‑compressor format.
|
|
@1607662794 Thank you for this contribution. It's a known issue and the fix I shared could fix this issue by checking the layer name first instead of the class name. I worry that your change might not work in vLLM. In my memory, the MOE class name is If you could share the model tested with this fix and confirm that it loads successfully in v0.26.0 vLLM, I would be happy to approve this PR. |
Sure, using Qwen3.6-35B-A3B as an example with vLLM 0.26.0, this mixed‑precision configuration can be successfully loaded and inferred.
|



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
/azp run Unit-Test-CUDA-AutoRound.