Update pipeline.py
Browse filesFix value projection of hidden_states_ptb in PAGIdentitySelfAttnProcessor
- pipeline.py +2 -3
pipeline.py
CHANGED
@@ -134,9 +134,8 @@ class PAGIdentitySelfAttnProcessor:
|
|
134 |
|
135 |
value = attn.to_v(hidden_states_ptb)
|
136 |
|
137 |
-
|
138 |
-
|
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
|