Molbap HF Staff commited on
Commit
cc25da0
·
verified ·
1 Parent(s): 514d471

Create modular_glm.py

Browse files
Files changed (1) hide show
  1. content/modular_glm.py +10 -0
content/modular_glm.py ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ class GlmMLP(Phi3MLP):
2
+ pass
3
+
4
+ class GlmAttention(LlamaAttention):
5
+ def __init__(self, config, layer_idx=None):
6
+ super().__init__(config, layer_idx)
7
+ self.o_proj = nn.Linear(config.num_attention_heads * self.head_dim, config.hidden_size, bias=False)
8
+
9
+ class GlmForCausalLM(LlamaForCausalLM):
10
+ pass