zwt123home123
commited on
Update modeling_internlm2.py
Browse files- modeling_internlm2.py +3 -3
modeling_internlm2.py
CHANGED
@@ -310,9 +310,9 @@ class InternLM2Attention(nn.Module):
|
|
310 |
self.attncut = True
|
311 |
self.headcut = True
|
312 |
self.layercut = True
|
313 |
-
self.layercut_idx = 24
|
314 |
-
self.offset = 41
|
315 |
-
head_num=24
|
316 |
self.mask = torch.load("headcut_mask/internvl2.0_8B/mask_"+str(head_num)+".pth")
|
317 |
|
318 |
def _init_rope(self):
|
|
|
310 |
self.attncut = True
|
311 |
self.headcut = True
|
312 |
self.layercut = True
|
313 |
+
self.layercut_idx = 24 # number of layer kept
|
314 |
+
self.offset = 41 # system prompt token length
|
315 |
+
head_num=24 # num of heads kept on average
|
316 |
self.mask = torch.load("headcut_mask/internvl2.0_8B/mask_"+str(head_num)+".pth")
|
317 |
|
318 |
def _init_rope(self):
|