hc_head.hc_base parameter name mismatch

#1
by hnhyzz - opened

I encountered this error when serving the model using vllm with AMD cards.
The parameter name hc_head.hc_base is unexpected. Should it be hc_head_base?

(EngineCore pid=936) ERROR 08-01 02:59:59 [core.py:1349] File "/workspace/vllm/model_executor/models/utils.py", line 358, in _load_module
(EngineCore pid=936) ERROR 08-01 02:59:59 [core.py:1349] yield from self._load_module(
(EngineCore pid=936) ERROR 08-01 02:59:59 [core.py:1349] File "/workspace/vllm/model_executor/models/utils.py", line 331, in _load_module
(EngineCore pid=936) ERROR 08-01 02:59:59 [core.py:1349] loaded_params = module_load_weights(weights)
(EngineCore pid=936) ERROR 08-01 02:59:59 [core.py:1349] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(EngineCore pid=936) ERROR 08-01 02:59:59 [core.py:1349] File "/workspace/vllm/models/deepseek_v4/amd/model.py", line 860, in load_weights
(EngineCore pid=936) ERROR 08-01 02:59:59 [core.py:1349] param = params_dict[name]
(EngineCore pid=936) ERROR 08-01 02:59:59 [core.py:1349] ~~~~~~~~~~~^^^^^^
(EngineCore pid=936) ERROR 08-01 02:59:59 [core.py:1349] KeyError: 'hc_head.hc_base'

tiny-random org

Hello, I think the HF implementation's naming is incompatible with vLLM (see https://github.com/huggingface/transformers/blob/3717b9cda226af7377da1944f395af0eac6e2b51/src/transformers/models/deepseek_v4/modeling_deepseek_v4.py#L957).

HF vLLM Deepseek official release
naming hc_head.hc_base hc_head_base hc_head_base
bf16 support yes no (correct me if wrong) no

For this bf16 model, i only tested on HF framework (see example usage) and thus followed HF's naming.

Maybe try tiny-random/deepseek-v4-fp4-fp8, which is tested on sglang (and should also work on vLLM)

yujiepan changed discussion status to closed
yujiepan changed discussion status to open

Sign up or log in to comment