Skip to content

Commit 8bc3475

Browse files
authored
Update src/transformers/models/openai_moe/modeling_openai_moe.py
1 parent bd52d61 commit 8bc3475

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/transformers/models/openai_moe/modeling_openai_moe.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ def eager_attention_forward(
242242
scores = unnormalized_scores / normalizer
243243

244244
attn_weights = nn.functional.dropout(scores, p=dropout, training=module.training)
245-
attn_output = torch.matmul(attn_weights[..., :-1], value_states) # ignore the sinks
245+
attn_output = torch.matmul(attn_weights, value_states) # ignore the sinks
246246
attn_output = attn_output.transpose(1, 2).contiguous()
247247
return attn_output, attn_weights
248248

0 commit comments

Comments
 (0)