filter by num_hidden_layers (#7056)
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user