gses82 commited on
Commit
d7f70f6
1 Parent(s): fa76488

Update pipeline.py

Browse files

Fix value projection of hidden_states_ptb in PAGIdentitySelfAttnProcessor

Files changed (1) hide show
  1. pipeline.py +2 -3
pipeline.py CHANGED
@@ -134,9 +134,8 @@ class PAGIdentitySelfAttnProcessor:
134
 
135
  value = attn.to_v(hidden_states_ptb)
136
 
137
- hidden_states_ptb = torch.zeros(value.shape).to(value.get_device())
138
- # hidden_states_ptb = value
139
-
140
  hidden_states_ptb = hidden_states_ptb.to(query.dtype)
141
 
142
  # linear proj
 
134
 
135
  value = attn.to_v(hidden_states_ptb)
136
 
137
+ value = attn.to_v(hidden_states_ptb)
138
+ hidden_states_ptb = value
 
139
  hidden_states_ptb = hidden_states_ptb.to(query.dtype)
140
 
141
  # linear proj