From 44d4b6c22558e0d4836a7ce28b9c2f4c6a2dac6b Mon Sep 17 00:00:00 2001 From: biondizzle Date: Fri, 15 May 2026 01:16:19 +0000 Subject: [PATCH] fix: add missing renames for Hadamard coding + compressor.ape MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Three more dropped checkpoint→model mappings: 1. hc_head: checkpoint has hc_head.hc_base/fn/scale, model has hc_head_base/fn/scale (underscore not dot separator) 2. attn_hc/ffn_hc: checkpoint has .attn_hc. and .ffn_hc., model has .hc_attn. and .hc_ffn. (word order reversed) 3. compressor.position_bias → compressor.ape: checkpoint name is position_bias, model attr is ape (absolute position encoding) All 461 remaining zero params should now be just indexer.k_norm.bias (legit zero - no bias in checkpoint, only weight). --- vllm/patches/deepseek_v4.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/vllm/patches/deepseek_v4.py b/vllm/patches/deepseek_v4.py index 9b2b9ce1..1854f922 100644 --- a/vllm/patches/deepseek_v4.py +++ b/vllm/patches/deepseek_v4.py @@ -1290,6 +1290,14 @@ class DeepseekV4Model(nn.Module): ".mlp.shared_experts.gate_proj.": ".ffn.shared_experts.w1.", ".mlp.shared_experts.up_proj.": ".ffn.shared_experts.w3.", ".mlp.shared_experts.down_proj.": ".ffn.shared_experts.down_proj.", + # Hadamard coding params + ".attn_hc.": ".hc_attn.", + ".ffn_hc.": ".hc_ffn.", + "hc_head.hc_base": "hc_head_base", + "hc_head.hc_fn": "hc_head_fn", + "hc_head.hc_scale": "hc_head_scale", + # compressor.position_bias → compressor.ape + ".compressor.position_bias": ".compressor.ape", # modelopt uses mlp, vllm uses ffn internally ".mlp.": ".ffn.", }