fix: make override DeepseekV2Model work (#14707)
This commit is contained in:
@@ -3202,7 +3202,6 @@ class DeepseekV2Model(nn.Module):
|
|||||||
class DeepseekV2ForCausalLM(nn.Module):
|
class DeepseekV2ForCausalLM(nn.Module):
|
||||||
# for quark model load
|
# for quark model load
|
||||||
packed_modules_mapping = {}
|
packed_modules_mapping = {}
|
||||||
model_cls = DeepseekV2Model
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@@ -3228,7 +3227,7 @@ class DeepseekV2ForCausalLM(nn.Module):
|
|||||||
self.quant_config = quant_config
|
self.quant_config = quant_config
|
||||||
self.determine_num_fused_shared_experts()
|
self.determine_num_fused_shared_experts()
|
||||||
self.use_nsa = is_deepseek_nsa(config)
|
self.use_nsa = is_deepseek_nsa(config)
|
||||||
self.model = self.model_cls(
|
self.model = DeepseekV2Model(
|
||||||
config, quant_config, prefix=add_prefix("model", prefix)
|
config, quant_config, prefix=add_prefix("model", prefix)
|
||||||
)
|
)
|
||||||
if self.pp_group.is_last_rank:
|
if self.pp_group.is_last_rank:
|
||||||
|
|||||||
Reference in New Issue
Block a user