zwt123home123 commited on
Commit
a00443f
·
verified ·
1 Parent(s): 9f52557

Update modeling_phi3.py

Browse files
Files changed (1) hide show
  1. modeling_phi3.py +3 -3
modeling_phi3.py CHANGED
@@ -328,9 +328,9 @@ class Phi3Attention(nn.Module):
328
  self.attncut = True
329
  self.headcut = True
330
  self.layercut = False
331
- self.layercut_idx = 24
332
- self.offset = 70
333
- head_num=24
334
  self.mask = torch.load("headcut_mask/internvl2.0_4B/mask_"+str(head_num)+".pth")
335
 
336
  def _init_rope(self):
 
328
  self.attncut = True
329
  self.headcut = True
330
  self.layercut = False
331
+ self.layercut_idx = 24 # number of layer kept
332
+ self.offset = 70 # system prompt token length
333
+ head_num=24 # num of heads kept on average
334
  self.mask = torch.load("headcut_mask/internvl2.0_4B/mask_"+str(head_num)+".pth")
335
 
336
  def _init_rope(self):