accuracy enhancement for baichuan2-13B for npu (#16868)
Co-authored-by: cy <chenyang08056032@163.com>
This commit is contained in:
@@ -464,6 +464,9 @@ class ModelConfig:
|
||||
):
|
||||
setattr(self.hf_text_config, "head_dim", self.head_dim)
|
||||
|
||||
elif "BaichuanForCausalLM" in self.hf_config.architectures:
|
||||
self.use_alibi = self.hf_config.hidden_size != 4096
|
||||
|
||||
self.attention_arch = AttentionArch.MHA
|
||||
|
||||
self.num_attention_heads = self.hf_text_config.num_attention_heads
|
||||
|
||||
Reference in New Issue
Block a user