zwt123home123 commited on
Commit
aa13e89
·
verified ·
1 Parent(s): e84cf04

Update modeling_internlm2.py

Browse files
Files changed (1) hide show
  1. 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):