Unverified Commit 2f4ec752 authored by pansicheng's avatar pansicheng Committed by GitHub
Browse files

filter by num_hidden_layers (#7056)

parent da47621c
......@@ -1786,8 +1786,7 @@ class DeepseekV2ForCausalLM(nn.Module):
for name in weight_names:
if "kv_b_proj" in name:
layer_id = int(name.split(".")[2])
# filter the nextn layer.
if layer_id != self.config.num_hidden_layers:
if layer_id < self.config.num_hidden_layers:
layer_ids.add(layer_id)
for layer_id in layer_ids:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment