Support MiniCPM3 (#1371)

This commit is contained in:
William
2024-09-10 17:57:52 +08:00
committed by GitHub
parent fec2d1223c
commit e72275cf7f
5 changed files with 683 additions and 2 deletions

View File

@@ -64,6 +64,11 @@ class ModelConfig:
self.attention_arch = AttentionArch.MLA
self.kv_lora_rank = self.hf_config.kv_lora_rank
self.qk_rope_head_dim = self.hf_config.qk_rope_head_dim
elif "MiniCPM3ForCausalLM" in self.hf_config.architectures:
self.head_dim = 128
self.attention_arch = AttentionArch.MLA
self.kv_lora_rank = self.hf_config.kv_lora_rank
self.qk_rope_head_dim = self.hf_config.qk_rope_head_dim
else:
self.attention_arch = AttentionArch.MHA