Просмотр исходного кода

py : add check for '.attn.masked_bias' layers to GPT2model (#5281)

Mirror Azure 1 год назад
Родитель
Сommit
2d40085c26
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      convert-hf-to-gguf.py

+ 1 - 1
convert-hf-to-gguf.py

@@ -1138,7 +1138,7 @@ class GPT2Model(Model):
 
         for name, data_torch in self.get_tensors():
             # we don't need these
-            if name.endswith((".attention.masked_bias", ".attention.bias", ".attention.rotary_emb.inv_freq", ".attn.bias")):
+            if name.endswith((".attention.masked_bias", ".attention.bias", ".attention.rotary_emb.inv_freq", ".attn.bias", ".attn.masked_bias")):
                 continue
 
             if name.endswith((".c_attn.weight", ".c_proj.weight", ".c_fc.weight", ".c_proj.weight")):