[Bugfix] Enhance extra_config handling for layer name suffix matching - #48589
Conversation
Signed-off-by: Xin He <xin3.he@intel.com>
…nfig parser Signed-off-by: Xin He <xin3.he@intel.com>
|
This PR remains the minimal fix for #49137: it correctly handles the reported direct A deeper audit found several adjacent AutoRound name-resolution paths that are outside this PR current code and tests. I prepared and locally validated a stacked follow-up that:
Against commit
@xin3he, would you like this as a stacked PR targeting your |
|
@xin3he The stacked patch is now published after the repository-required human line-by-line review and personal test run:
The commit is based directly on
Could you either run your Qwen3.5-9B |
|
Update: the stacked follow-up is now available as a draft PR: It targets |
|
@jikunshang Could you please help review this PR? |
yiliu30
left a comment
There was a problem hiding this comment.
LGTM, please add model level test, thanks!
The model level test is executed locally as described above, it's a bug fix so I only updated the UT to cover. |
Great, we already have a model test in our unit tests. Please check the |
|
Hi @xin3he, the pre-commit checks have failed. Please run: uv pip install pre-commit>=4.5.1
pre-commit install
pre-commit run --all-filesThen, commit the changes and push to your branch. For future commits, |
lm_head is usually tied and cannot be quantized for tiny model, so I will skip it. |
I ran these commands, but nothing changed. |
This pull request improves how the configuration is selected for layers with extra configuration by adding support for suffix matching. This addresses situations where the keys in
extra_configare short names (like"lm_head"), but the actuallayer_nameis fully qualified (like"model.language_model.lm_head"), which can happen due to model nesting.Configuration handling improvements:
layer_namewhen looking up keys inextra_config, so that short names in the config will correctly apply to fully qualified layer names. This ensures that extra configuration is applied even when model nesting changes the layer naming.Purpose
Support MLLM quantized lm_head in inc/auto-round format, related issue: intel/auto-round#1709
@Yi4Liu @wenhuach21
Test Plan
test_inc_config_parser_suffix_match_for_lm_headtest_inc_get_quant_method_lm_head_uses_suffix_matchReal model: quantize and load Qwen/Qwen3.5-9B.
Quantization conmmand:
auto-round /models/Qwen3.5-9B/ --quant_lm_head --iters 0 --disable_opt_rtnServe command:
vllm serve tmp_autoround/ --port 8000 --tensor-parallel-size 1 --max-model-len 2048 --reasoning-parser qwen3 --served-model-name qwenTest Result
UT passed.
Model loaded successfully.
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.