bluelike commited on
Commit
59ab7f5
1 Parent(s): 323bf0d

Update modeling_qwen.py

Browse files
Files changed (1) hide show
  1. modeling_qwen.py +1 -1
modeling_qwen.py CHANGED
@@ -651,7 +651,7 @@ class QWenModel(QWenPreTrainedModel):
651
  for idx in range(len(rotary_pos_emb)):
652
  rotary_pos_emb[idx] = rotary_pos_emb[idx].to(hidden_states.device)
653
 
654
- hidden_states = self.drop(hidden_states)
655
  if images is not None:
656
  for idx, (i, a, b) in enumerate(img_pos):
657
  hidden_states[i][a + 1 : b] = images[idx]
 
651
  for idx in range(len(rotary_pos_emb)):
652
  rotary_pos_emb[idx] = rotary_pos_emb[idx].to(hidden_states.device)
653
 
654
+ hidden_states = self.drop(hidden_states).clone()
655
  if images is not None:
656
  for idx, (i, a, b) in enumerate(img_pos):
657
  hidden_states[i][a + 1 : b] = images[idx]