Skip to content

Commit

Permalink
fix deberta implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
lenglaender committed Jan 7, 2025
1 parent c3ab05a commit dee1023
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/adapters/models/deberta/modeling_deberta.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,11 @@ def forward(
# >>> END AH Changes <<<

if rel_att is not None:
attention_scores = attention_scores + rel_att
# >>> START AH Changes <<<
rel_att_padded = torch.zeros_like(attention_scores)
rel_att_padded[:, :, :, -rel_att.size(-1) :] = rel_att
# >>> END AH Changes <<<
attention_scores = attention_scores + rel_att_padded

# bxhxlxd
if self.head_logits_proj is not None:
Expand Down

0 comments on commit dee1023

Please sign in to comment.