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.
|


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.